{ "version": 3, "sources": ["../../javascripts/web-ui/controllers/application.js", "../../javascripts/web-ui/controllers/dynamic-form.js", "../../javascripts/web-ui/turbo/stream-actions/morph.js", "../../javascripts/web-ui/morphdom-preserve-attributes.js", "../../javascripts/web-ui/morphdom-morph-template.js", "../../javascripts/web-ui/morphdom-should-update.js", "../../javascripts/web-ui/form/set-input-value-attributes.js", "../../javascripts/web-ui/controllers/dynamic-form/discard-changes-confirmation.js", "../../javascripts/web-ui/controllers/collaborative-form.js", "../../javascripts/web-ui/controllers/textarea.js", "../../javascripts/web-ui/controllers/dropdown-menu.js", "../../javascripts/web-ui/controllers/expandable.js", "../../javascripts/web-ui/controllers/refresh.js", "../../javascripts/web-ui/controllers/popover.js", "../../javascripts/web-ui/controllers/synchronized-form.js", "../../javascripts/web-ui/controllers/user-tools.js", "../../javascripts/web-ui/controllers/view-form-error.js", "../../javascripts/web-ui/controllers/modal-dialog.js", "../../javascripts/web-ui/controllers/async-select.js", "../../javascripts/web-ui/controllers/confirm-form.js", "../../javascripts/web-ui/controllers/switch.js", "../../javascripts/web-ui/controllers/option-group.js", "../../javascripts/web-ui/controllers/field-preview.js", "../../javascripts/web-ui/controllers/index.js", "../../javascripts/web-ui/confirmation-dialog.js", "../../javascripts/web-ui/turbo.js", "../../javascripts/web-ui/turbo/replace-stylesheets.js", "../../javascripts/web-ui/turbo/morphdom-render.js", "../../javascripts/web-ui/turbo/stream-actions/redirect.js", "../../javascripts/web-ui/turbo/disable-submit-button.js", "../../javascripts/web-ui/index.js"], "sourcesContent": ["import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus = application\n\nexport { application }\n", "import { Controller } from \"@hotwired/stimulus\"\nimport * as Morph from \"web-ui/turbo/stream-actions/morph\"\nimport { setInputValueAttributes } from \"web-ui/form/set-input-value-attributes\"\n\n// Set dynamic_form_debug_value to true to observe and diagnose\n\n// Connects to data-controller=\"dynamic-form\"\nexport default class extends Controller {\n static values = {\n debug: Boolean\n }\n\n connect() {\n this.debug(\"Connect\")\n\n this.changedElementNames = new Set()\n this.updatingElementNames = new Set()\n this.actions = {}\n this.updating = false\n this.updateDelay = 0\n\n this.element.addEventListener(\"change\", this.change)\n this.element.addEventListener(\"submit\", this.submit)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n\n this.element.removeEventListener(\"change\", this.change)\n this.element.removeEventListener(\"submit\", this.submit)\n }\n\n submit = (event) => {\n const submitter = event.submitter\n\n if (submitter == null) {\n return\n }\n\n const dataset = submitter.dataset\n const formUpdatesJSON = dataset.formUpdates\n if (formUpdatesJSON == null) {\n return\n }\n\n event.preventDefault()\n\n const formUpdates = JSON.parse(formUpdatesJSON)\n for (const [name, value] of Object.entries(formUpdates)) {\n this.actions[name] = value\n }\n\n const form = submitter.form\n this.requestUpdate(form)\n }\n\n change = (event) => {\n const input = event.target\n\n // Avoid updating disabled inputs, which can happen if a modification is\n // made to an input, and while it is still focused, an update disables that\n // input before it is blurred - Aaron, Wed Aug 09 2023\n if (input.disabled) {\n return\n }\n\n setInputValueAttributes(input)\n\n const form = input.form\n\n this.initiateChange(input.name, form)\n }\n\n //## This should be removed after migrating to the new method of submitting\n //## actions - Nick, Scott A, Aaron, Thu Apr 18 2024\n // Add data-action=\"click->dynamic-form#submitAction\" to a button of\n // type \"button\" in the form to have it submit its name and value along with\n // the next update batch. This is used to add and remove collection items, but\n // it could be used for anything else that requires one-off modifications to\n // the form to be submitted.\n // - Aaron, Thu Dec 08 2022\n //\n // Note that the button type must be \"button\", rather than \"submit\" in order\n // to work around a bug in Safari 16.x where the submitter is \"remembered\"\n // across submits, causing problems with turbo's ability to handle subsequent\n // change events.\n // - Aaron, Tue Aug 15 2023\n submitAction(event) {\n event.preventDefault()\n\n const submitter = event.target\n const form = submitter.form\n\n const name = submitter.name\n const value = submitter.value\n this.actions[name] = value\n\n this.requestUpdate(form)\n }\n\n initiateChange(name, form) {\n this.morphIgnoreInputs(name, true, form)\n this.changedElementNames.add(name)\n this.debug(`Recorded change newCount=${this.changedElementNames.size} name=${name}`)\n\n this.requestUpdate(form)\n }\n\n requestUpdate(form) {\n if (this.isUpdating()) {\n return\n }\n\n if (this.updateDelay > 0) {\n this.debug(`Delaying update ${this.updateDelay}ms`)\n }\n\n this.updating = true\n\n // Ensure update happens on the next tick, rather than the current, so that\n // an event handler may make additional changes to the form before the\n // update is submitted.\n // - Aaron, Shaun, Fri Jan 5 2023\n setTimeout(() => {\n this.update(form)\n }, this.updateDelay)\n }\n\n morphIgnoreInputs(name, ignore, form) {\n const formElements = form.elements\n\n for (const elementName in formElements) {\n if (elementName === name) {\n const element = formElements[elementName]\n\n if (element.forEach) {\n element.forEach(element => {\n Morph.ignore(element, ignore)\n })\n } else {\n Morph.ignore(element, ignore)\n }\n }\n }\n }\n\n update(form) {\n this.updatingElementNames = this.changedElementNames\n this.changedElementNames = new Set()\n\n const actions = this.actions\n this.actions = {}\n\n const updateRequest = (event) => {\n for (const [name, value] of Object.entries(actions)) {\n event.detail.formSubmission.fetchRequest.body.append(name, value)\n }\n\n event.detail.formSubmission.fetchRequest.body.append(\"_method\", \"patch\")\n }\n\n const completeUpdate = () => {\n // This function is called on turbo:submit-end, but the turbo stream morph\n // that the server responds with will not be applied until later. The only\n // known way to ensure that code can be run immediately before a morph and\n // immediately after is to add an event listener for\n // turbo:before-stream-render and override the event.detail.render method.\n //\n // In the overridden render method:\n //\n // 1. All fields that have been updated have their morph ignore removed\n //\n // 2. The original render is invoked, which applies the morph\n //\n // 3. The update is marked as complete\n //\n // 4. If there is a pending update, requestUpdate is invoked\n //\n // This code was originally added to prevent a race condition wherein a\n // field that was filled in could be subsequently cleared by a previous\n // update's morph being applied.\n // - Aaron, Thu Mar 21 2024\n const beforeStreamRender = (event) => {\n const stream = event.detail.newStream\n const action = stream.getAttribute(\"action\")\n\n if (action !== \"morph\") {\n return\n }\n\n const target = stream.getAttribute(\"target\")\n\n if (target !== this.element.id) {\n return\n }\n\n document.removeEventListener(\"turbo:before-stream-render\", beforeStreamRender)\n\n const render = event.detail.render\n\n event.detail.render = (self) => {\n // This must be done here to ensure that there is still a pending update\n // when the update (morphdom) happens for this update. If we did it in\n // updateRequestBody, a twice updated field may flash its old value\n // - Aaron, Wed Jul 20 2022\n this.updatingElementNames.forEach(name => {\n // Do not unignore if there is another change enqueued\n if (!this.changedElementNames.has(name)) {\n this.morphIgnoreInputs(name, false, form)\n }\n })\n this.updatingElementNames.clear()\n\n render(self)\n\n this.updating = false\n\n this.debug(`Completed update newCount=${this.changedElementNames.size}`)\n\n if (this.hasPendingUpdates()) {\n this.requestUpdate(form)\n }\n }\n }\n\n document.addEventListener(\"turbo:before-stream-render\", beforeStreamRender)\n }\n\n const addListener = () => {\n form.addEventListener(\"turbo:submit-start\", updateRequest, { once: true })\n }\n\n form.addEventListener(\"turbo:before-fetch-request\", addListener, { once: true })\n\n const ignoreServerErrors = (event) => {\n // The default behavior of turbo is to render the server error to the\n // user. Since we do not always control this error (our application\n // gateway can serve error pages that it controls), we do not render the\n // error page. - Aaron, Thu Apr 27 2023\n const response = event.detail.fetchResponse\n\n if (response.serverError) {\n this.debug(`Update failed due to server error`)\n event.preventDefault()\n\n\n Sentry.withScope(scope => {\n scope.setTag(\"statusCode\", response.statusCode)\n scope.setExtra(\"headers\", response.response.headers)\n\n Sentry.captureMessage(\"Dynamic form change failed\", \"error\")\n })\n\n this.updatingElementNames.forEach(name => {\n this.changedElementNames.add(name)\n })\n\n this.updateDelay += 250\n this.updateDelay = Math.min(this.updateDelay, 5000)\n } else {\n this.updateDelay = 0\n }\n }\n form.addEventListener(\"turbo:before-fetch-response\", ignoreServerErrors, { once: true })\n\n form.addEventListener(\"turbo:submit-end\", completeUpdate, { once: true })\n\n form.requestSubmit()\n\n form.removeEventListener(\"turbo:before-fetch-request\", addListener)\n }\n\n hasPendingActions() {\n return Object.keys(this.actions).length > 0\n }\n\n hasPendingUpdates() {\n return this.changedElementNames.size > 0 || this.hasPendingActions()\n }\n\n isUpdating() {\n return this.updating\n }\n\n hasUnsubmittedChanges() {\n return this.hasChanged() && !this.isSubmitting()\n }\n\n hasChanged() {\n return this.changed\n }\n\n isSubmitting() {\n return this.submitting\n }\n\n isSubmitted() {\n return this.submitted\n }\n\n isCanceling() {\n return this.canceling\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Dynamic form - \" + message)\n }\n }\n}\n", "import morphdom from \"morphdom\"\nimport { morphdomPreserveAttributes } from \"web-ui/morphdom-preserve-attributes\"\nimport { morphdomShouldUpdate } from \"web-ui/morphdom-should-update\"\n\nexport function ignore(element, ignore) {\n if (ignore) {\n element.dataset.turboMorphIgnore = ''\n } else {\n delete element.dataset.turboMorphIgnore\n }\n}\n\nfunction morph() {\n const options = {\n childrenOnly: this.hasAttribute(\"children-only\"),\n onBeforeElUpdated: (fromElement, toElement) => {\n morphdomPreserveAttributes(fromElement, toElement)\n return morphdomShouldUpdate(fromElement, toElement)\n },\n\n onBeforeNodeDiscarded: (node) => {\n if (!(node instanceof HTMLElement)) {\n return true\n }\n\n // Do not remove elements that indicate they should be ignored\n if (\"turboMorphIgnore\" in node.dataset) {\n return false\n }\n\n return true\n }\n }\n\n this.targetElements.forEach(element => {\n let newElement\n\n if (options.childrenOnly) {\n newElement = this.templateContent\n } else {\n newElement = this.templateElement.innerHTML\n }\n\n morphdom(element, newElement, options)\n })\n}\n\nexport function activate(Turbo) {\n Turbo.StreamActions.morph = morph\n}\n", "export function morphdomPreserveAttributes(fromElement, toElement) {\n const dataset = fromElement.dataset\n\n const preserveAttributesAttributeName = \"turboMorphPreserveAttributes\"\n\n if (!dataset.hasOwnProperty(preserveAttributesAttributeName)) {\n return\n }\n\n const delimitedAttributes = dataset[preserveAttributesAttributeName]\n const attributes = delimitedAttributes.split(\" \")\n\n for (let attribute of attributes) {\n const hasAttribute = fromElement.hasAttribute(attribute)\n if (hasAttribute) {\n const value = fromElement.getAttribute(attribute)\n toElement.setAttribute(attribute, value)\n } else {\n toElement.removeAttribute(attribute)\n }\n }\n}\n\n", "// Template element content is rendered into a document fragment. By\n// default, morphdom considers two fragments identical even if their\n// content differs - Nick, Sat Apr 20 2024\nexport function morphdomMorphTemplate(fromElement, toElement) {\n const node = toElement.cloneNode(true)\n fromElement.replaceWith(node)\n}\n", "import { morphdomMorphTemplate } from \"web-ui/morphdom-morph-template\"\n\nfunction isFocused(element) {\n const isInput = [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(element.tagName)\n if (!isInput) {\n return false\n }\n\n return document.hasFocus() && element === document.activeElement\n}\n\nfunction isTemplate(element) {\n return element.tagName === \"TEMPLATE\"\n}\n\nexport function morphdomShouldUpdate(fromElement, toElement) {\n if (isTemplate(fromElement)) {\n morphdomMorphTemplate(fromElement, toElement)\n return false\n }\n\n // Do not update anything that has focus, unless the toElement is disabled\n // - Aaron, Wed Aug 09 2023\n if (isFocused(fromElement) && !toElement.disabled) {\n return false\n }\n\n // Do not update elements that indicate they should be ignored\n if (\"turboMorphIgnore\" in fromElement.dataset) {\n return false\n }\n\n return true\n}\n", "// Morphdom uses the value of the `value` attribute for inputs to determine\n// whether or not to update the element. For selects, it uses the `selected`\n// attribute of `option` elements. It is possible for the value attribute to not\n// have the same value as the actual input's value when the value changes. This\n// function can be invoked to keep them in sync.\n//\n// Without this, for example, when a number field with the value of \"4\" is changed\n// to \"4a\" in the browser: the server will respond with an element that has a\n// value of \"4\", which will be the same as the browser version. This ensures that\n// that value attribute in the browser will change to \"4a\" before attempting to\n// morph, so a change will be detected, causing the input to change back to \"4\"\n// in the browser.\n// - Aaron, Mon Mar 4 2024\nexport function setInputValueAttributes(input) {\n const value = input.value\n\n if (input instanceof HTMLInputElement) {\n input.setAttribute(\"value\", value)\n } else if (input instanceof HTMLSelectElement) {\n const options = input.querySelectorAll(\"option\")\n\n options.forEach(option => {\n if (option.value == value) {\n option.setAttribute(\"selected\", \"\")\n } else {\n option.removeAttribute(\"selected\")\n }\n })\n } else if (input instanceof HTMLTextAreaElement) {\n input.textContent = value\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Set dynamic_form_discard_changes_confirmation_debug_value to true to observe and diagnose\n\nconst confirmationText = \"Changes you made will not be saved\"\n\n// Connects to data-controller=\"dynamic-form-discard-changes-confirmation\"\nexport default class extends Controller {\n static values = {\n debug: Boolean\n }\n\n connect() {\n this.debug(\"Connect\")\n\n this.changed = false\n this.allowNavigation = false\n\n this.element.addEventListener(\"change\", this.change)\n document.addEventListener(\"click\", this.click, { capture: true })\n document.addEventListener(\"turbo:visit\", this.turboVisit)\n window.addEventListener(\"beforeunload\", this.beforeUnload)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n\n this.element.removeEventListener(\"change\", this.change)\n document.removeEventListener(\"click\", this.click, { capture: true })\n document.removeEventListener(\"turbo:visit\", this.turboVisit)\n window.removeEventListener(\"beforeunload\", this.beforeUnload)\n }\n\n change = () => {\n this.changed = true\n }\n\n click = (event) => {\n const targetId = event.target.id\n if (targetId === \"cancel\") {\n this.allowNavigation = true\n return\n }\n\n if (!this.changed) {\n return\n }\n\n const targetLink = event.target.closest(\"a\")\n\n if (targetLink == null) {\n return\n }\n\n if (targetLink.target === \"_blank\") {\n return\n }\n\n const confirmed = confirm(confirmationText)\n\n if (confirmed) {\n this.allowNavigation = true\n } else {\n event.preventDefault()\n event.stopPropagation()\n }\n }\n\n // If the page being navigated to includes the meta tag to indicate that turbo\n // should reload the page, rather than proceeding with the turbo navigation,\n // then the page reload will trigger beforeunload.\n // At this point, we no longer need to protect against discarding changes because either the\n // form has been successfully submitted and the redirect is occurring, or the user clicked on\n // a turbo link and there weren't any unsaved changes.\n turboVisit = (event) => {\n window.removeEventListener(\"beforeunload\", this.beforeUnload)\n }\n\n beforeUnload = (event) => {\n if (!this.changed) {\n return\n }\n\n if (this.allowNavigation) {\n return\n }\n\n event.preventDefault()\n\n // Support for older browsers\n event.returnValue = confirmationText\n return confirmationText\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Dynamic form discard changes confirmation - \" + message)\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport * as Morph from \"web-ui/turbo/stream-actions/morph\"\nimport { setInputValueAttributes } from \"web-ui/form/set-input-value-attributes\"\n\nconst refreshIntervalMilliseconds = 10 * 1000\n\n// Set collaborative_form_debug_value to true to observe and diagnose\n\n// Connects to data-controller=\"collaborative-form\"\nexport default class extends Controller {\n static values = {\n refreshPath: String,\n debug: Boolean\n }\n\n connect() {\n this.debug(\"Connect\")\n this.refreshing = false\n this.lastRefreshTime = Date.now()\n this.changedElementNames = new Set()\n this.updatingElementNames = new Set()\n this.actions = {}\n this.updating = false\n this.updateDelay = 0\n\n this.startRefreshInterval()\n\n document.addEventListener(\"visibilitychange\", this.handleVisibilityChange)\n this.element.addEventListener(\"submit\", this.submit)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n\n document.removeEventListener(\"visibilitychange\", this.handleVisibilityChange)\n this.element.removeEventListener(\"submit\", this.submit)\n\n this.stopRefreshInterval()\n }\n\n startRefreshInterval() {\n this.stopRefreshInterval()\n\n this.refreshInterval = setInterval(() => {\n if (this.shouldRefresh()) {\n this.refresh()\n }\n }, refreshIntervalMilliseconds / 10)\n }\n\n stopRefreshInterval() {\n clearInterval(this.refreshInterval)\n }\n\n handleVisibilityChange = () => {\n if (this.shouldRefresh()) {\n this.refresh()\n }\n }\n\n submit = (event) => {\n const submitter = event.submitter\n\n if (submitter == null) {\n return\n }\n\n const dataset = submitter.dataset\n const formUpdatesJSON = dataset.formUpdates\n if (formUpdatesJSON == null) {\n return\n }\n\n event.preventDefault()\n\n const formUpdates = JSON.parse(formUpdatesJSON)\n for (const [name, value] of Object.entries(formUpdates)) {\n this.actions[name] = value\n }\n\n const form = submitter.form\n this.requestUpdate(form)\n }\n\n shouldRefresh() {\n if (this.element.getAttribute('busy') != null) {\n return false\n }\n\n if (document.hidden) {\n return false\n }\n\n if (this.hasPendingUpdates() || this.isUpdating()) {\n return false\n }\n\n const now = Date.now()\n const millisecondsSinceLastRefresh = now - this.lastRefreshTime\n\n if (millisecondsSinceLastRefresh < refreshIntervalMilliseconds) {\n return false\n }\n\n return true\n }\n\n refresh() {\n if (this.refreshing) {\n return\n }\n\n this.refreshAbortController = new AbortController()\n const signal = this.refreshAbortController.signal\n this.refreshing = true\n this.lastRefreshTime = Date.now()\n\n const refreshPath = this.refreshPathValue\n const headers = {\n Accept: \"text/vnd.turbo-stream.html\"\n }\n\n fetch(refreshPath, { headers, signal })\n .then(response => response.text())\n .then(\n html => {\n Turbo.renderStreamMessage(html)\n },\n error => {\n Sentry.captureException(error)\n }\n )\n .finally(() => {\n this.refreshing = false\n this.refreshAbortController = null\n })\n }\n\n abortRefresh() {\n if (this.refreshAbortController) {\n this.refreshAbortController.abort()\n }\n }\n\n change(event) {\n const input = event.target\n\n // Avoid updating disabled inputs, which can happen if a modification is\n // made to an input, and while it is still focused, an update disables that\n // input before it is blurred - Aaron, Wed Aug 09 2023\n if (input.disabled) {\n return\n }\n\n setInputValueAttributes(input)\n\n const form = input.form\n this.initiateChange(input.name, form)\n }\n\n initiateChange(name, form) {\n this.abortRefresh()\n\n this.morphIgnoreInputs(name, true, form)\n this.changedElementNames.add(name)\n this.debug(`Recorded change newCount=${this.changedElementNames.size} name=${name}`)\n\n this.requestUpdate(form)\n }\n\n requestUpdate(form) {\n if (this.isUpdating()) {\n return\n }\n\n if (this.updateDelay > 0) {\n this.debug(`Delaying update ${this.updateDelay}ms`)\n }\n\n this.updating = true\n\n // Ensure update happens on the next tick, rather than the current, so that\n // an event handler may make additional changes to the form before the\n // update is submitted.\n // - Aaron, Shaun, Fri Jan 5 2023\n setTimeout(() => {\n this.update(form)\n }, this.updateDelay)\n }\n\n morphIgnoreInputs(name, ignore, form) {\n const formElements = form.elements\n\n for (const elementName in formElements) {\n if (elementName === name) {\n const element = formElements[elementName]\n\n if (element.forEach) {\n element.forEach(element => {\n Morph.ignore(element, ignore)\n })\n } else {\n Morph.ignore(element, ignore)\n }\n }\n }\n }\n\n update(form) {\n this.updatingElementNames = this.changedElementNames\n this.changedElementNames = new Set()\n\n const actions = this.actions\n this.actions = {}\n\n const updateRequestBody = (event) => {\n for (const entry of [...event.detail.formSubmission.fetchRequest.body.entries()]) {\n const entryName = entry[0]\n\n if (this.updatingElementNames.has(entryName)) {\n continue\n }\n\n if (entryName === 'authenticity_token') {\n continue\n }\n\n if (entryName.startsWith('_')) {\n continue\n }\n\n event.detail.formSubmission.fetchRequest.body.delete(entryName)\n }\n\n for (const [name, value] of Object.entries(actions)) {\n event.detail.formSubmission.fetchRequest.body.append(name, value)\n }\n\n event.detail.formSubmission.fetchRequest.body.append(\"_method\", \"patch\")\n }\n\n const completeUpdate = () => {\n // This function is called on turbo:submit-end, but the turbo stream morph\n // that the server responds with will not be applied until later. The only\n // known way to ensure that code can be run immediately before a morph and\n // immediately after is to add an event listener for\n // turbo:before-stream-render and override the event.detail.render method.\n //\n // In the overridden render method:\n //\n // 1. All fields that have been updated have their morph ignore removed\n //\n // 2. The original render is invoked, which applies the morph\n //\n // 3. The update is marked as complete\n //\n // 4. If there is a pending update, requestUpdate is invoked\n //\n // This code was originally added to prevent a race condition wherein a\n // field that was filled in could be subsequently cleared by a previous\n // update's morph being applied.\n // - Aaron, Thu Mar 21 2024\n const beforeStreamRender = (event) => {\n const stream = event.detail.newStream\n const action = stream.getAttribute(\"action\")\n\n if (action !== \"morph\") {\n return\n }\n\n const target = stream.getAttribute(\"target\")\n\n if (target !== this.element.id) {\n return\n }\n\n document.removeEventListener(\"turbo:before-stream-render\", beforeStreamRender)\n\n const render = event.detail.render\n\n event.detail.render = (self) => {\n // This must be done here to ensure that there is still a pending update\n // when the update (morphdom) happens for this update. If we did it in\n // updateRequestBody, a twice updated field may flash its old value\n // - Aaron, Wed Jul 20 2022\n this.updatingElementNames.forEach(name => {\n // Do not unignore if there is another change enqueued\n if (!this.changedElementNames.has(name)) {\n this.morphIgnoreInputs(name, false, form)\n }\n })\n this.updatingElementNames.clear()\n\n render(self)\n\n this.updating = false\n\n this.debug(`Completed update newCount=${this.changedElementNames.size}`)\n\n if (this.hasPendingUpdates()) {\n this.requestUpdate(form)\n }\n }\n }\n\n document.addEventListener(\"turbo:before-stream-render\", beforeStreamRender)\n }\n\n // turbo:submit-start does not happen synchronously, so we cannot add it\n // and immediately remove it, which is necessary to ensure that we do not\n // leave the event listener around for a different form submission. On the\n // other hand, turbo:before-fetch-request is synchronous, so we can add it\n // and then remove it and use it to install the turbo:submit-start only\n // when we are sure that it is this update that is being submitted.\n // - Aaron, Wed Jul 20 2022\n const addListener = () => {\n form.addEventListener(\"turbo:submit-start\", updateRequestBody, { once: true })\n }\n form.addEventListener(\"turbo:before-fetch-request\", addListener, { once: true })\n\n const ignoreServerErrors = (event) => {\n // The default behavior of turbo is to render the server error to the\n // user. Since we do not always control this error (our application\n // gateway can serve error pages that it controls), we do not render the\n // error page. - Aaron, Thu Apr 27 2023\n const response = event.detail.fetchResponse\n\n if (response.serverError) {\n this.debug(`Update failed due to server error`)\n event.preventDefault()\n\n Sentry.withScope(scope => {\n scope.setTag(\"statusCode\", response.statusCode)\n scope.setExtra(\"headers\", response.response.headers)\n\n Sentry.captureMessage(\"Collaborative form change failed\", \"error\")\n })\n\n this.updatingElementNames.forEach(name => {\n this.changedElementNames.add(name)\n })\n\n this.updateDelay += 250\n this.updateDelay = Math.min(this.updateDelay, 5000)\n } else {\n this.updateDelay = 0\n }\n }\n form.addEventListener(\"turbo:before-fetch-response\", ignoreServerErrors, { once: true })\n\n form.addEventListener(\"turbo:submit-end\", completeUpdate, { once: true })\n\n form.requestSubmit()\n\n form.removeEventListener(\"turbo:before-fetch-request\", addListener)\n }\n\n //## This should be removed after migrating to the new method of submitting\n //## actions - Nick, Scott A, Aaron, Thu Apr 18 2024\n // Add data-action=\"click->collaborative-form#submitAction\" to a button of\n // type \"button\" in the form to have it submit its name and value along with\n // the next update batch. This is used to add and remove collection items, but\n // it could be used for anything else that requires one-off modifications to\n // the form to be submitted.\n // - Aaron, Thu Dec 08 2022\n //\n // Note that the button type must be \"button\", rather than \"submit\" in order\n // to work around a bug in Safari 16.x where the submitter is \"remembered\"\n // across submits, causing problems with turbo's ability to handle subsequent\n // change events.\n // - Aaron, Tue Aug 15 2023\n submitAction(event) {\n event.preventDefault()\n\n const submitter = event.target\n const form = submitter.form\n\n const name = submitter.name\n const value = submitter.value\n this.actions[name] = value\n\n this.requestUpdate(form)\n }\n\n hasPendingActions() {\n return Object.keys(this.actions).length > 0\n }\n\n hasPendingUpdates() {\n return this.changedElementNames.size > 0 || this.hasPendingActions()\n }\n\n isUpdating() {\n return this.updating\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Collaborative form - \" + message)\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport * as Morph from \"web-ui/turbo/stream-actions/morph\"\n\n// Connects to data-controller=\"textarea\"\nexport default class extends Controller {\n static values = {\n debug: Boolean\n }\n\n connect() {\n this.debug(\"Connect\")\n\n this.element.addEventListener(\"focus\", this.onFocus)\n this.element.addEventListener(\"blur\", this.onBlur)\n this.element.addEventListener(\"input\", this.resize)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n\n this.element.removeEventListener(\"focus\", this.onFocus)\n this.element.removeEventListener(\"blur\", this.onBlur)\n this.element.removeEventListener(\"input\", this.resize)\n }\n\n resize = (e) => {\n const textareaElement = e.target\n\n this.debug(`Resizing textarea (ID: ${textareaElement.id})`)\n\n this.element.dataset.text = textareaElement.value\n }\n\n onFocus = () => {\n Morph.ignore(this.element, true)\n }\n\n onBlur = () => {\n Morph.ignore(this.element, false)\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Textarea - \" + message)\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\n// Connects to data-controller=\"dropdown-menu\"\nexport default class extends Controller {\n static targets = [\"button\"];\n\n isOpen() {\n return this.element.classList.contains(\"open\");\n }\n\n closeMenu(event) {\n if (event && this.element.contains(event.target)) {\n return;\n }\n\n this.element.classList.remove(\"open\");\n this.buttonTarget.removeAttribute(\"aria-expanded\");\n }\n\n openMenu() {\n this.element.classList.add(\"open\");\n this.buttonTarget.setAttribute(\"aria-expanded\", \"true\");\n }\n\n toggle() {\n if (this.isOpen()) {\n this.closeMenu();\n } else {\n this.openMenu();\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"expandable\"\nexport default class extends Controller {\n static targets = [\"container\", \"button\"]\n\n isExpanded() {\n return this.containerTarget.classList.contains(\"expanded\")\n }\n\n expand() {\n this.containerTarget.classList.remove(\"collapsed\")\n this.containerTarget.classList.add(\"expanded\")\n this.buttonTarget.innerText = \"Show less\"\n }\n\n collapse() {\n this.containerTarget.classList.remove(\"expanded\")\n this.containerTarget.classList.add(\"collapsed\")\n this.buttonTarget.innerText = \"Show more\"\n }\n\n toggle() {\n if (this.isExpanded()) {\n this.collapse()\n } else {\n this.expand()\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\nconst defaultIntervalSeconds = 10\n\n// Connects to data-controller=\"refresh\"\nexport default class extends Controller {\n static values = {\n intervalSeconds: Number,\n url: String\n }\n\n connect() {\n this.submissionCount = 0\n this.lastRefreshTime = Date.now()\n\n this.startInterval()\n\n document.addEventListener(\"turbo:submit-start\", this.recordSubmitStart)\n document.addEventListener(\"turbo:submit-end\", this.recordSubmitEnd)\n this.element.addEventListener(\"turbo:before-frame-render\", this.beforeFrameRender)\n }\n\n disconnect() {\n clearInterval(this.interval)\n this.interval = null\n document.removeEventListener(\"turbo:submit-start\", this.recordSubmitStart)\n document.removeEventListener(\"turbo:submit-end\", this.recordSubmitEnd)\n this.element.removeEventListener(\"turbo:before-frame-render\", this.beforeFrameRender)\n }\n\n startInterval() {\n clearInterval(this.interval)\n\n const intervalTimerMilliseconds = this.intervalMilliseconds / 10\n\n this.interval = setInterval(this.poll, intervalTimerMilliseconds)\n }\n\n get intervalMilliseconds() {\n const intervalSeconds = this.intervalSecondsValue || defaultIntervalSeconds\n return intervalSeconds * 1000\n }\n\n intervalSecondsValueChanged() {\n if (!this.interval) {\n // Ignore the change if the interval is not in progress. This happens when\n // the controller connects initially. - Aaron, Thu May 9 2024\n return\n }\n\n this.startInterval()\n }\n\n beforeFrameRender = (e) => {\n if (this.shouldRefresh()) {\n const newFrame = e.detail.newFrame\n\n for (const key in newFrame.dataset) {\n this.element.dataset[key] = newFrame.dataset[key]\n }\n } else {\n // Addresses a race condition where a pending refresh would render while a refresh\n // should not occur (e.g., a form is submitted while a refresh fetch is outstanding)\n // - Kelly, Aaron, Tue Feb 07 2023\n e.detail.render = () => {}\n e.stopPropagation()\n }\n }\n\n shouldRefresh() {\n if (document.hidden) return false\n if (this.element.getAttribute('aria-busy')) return false\n if (this.submissionCount > 0) return false\n\n return true\n }\n\n recordSubmitStart = () => {\n this.submissionCount += 1\n }\n\n recordSubmitEnd = () => {\n if (this.submissionCount > 0) {\n this.submissionCount -= 1\n }\n }\n\n poll = () => {\n const now = Date.now()\n const millisecondsSinceLastRefresh = now - this.lastRefreshTime\n\n if (millisecondsSinceLastRefresh < this.intervalMilliseconds) {\n return\n }\n\n if (this.shouldRefresh()) {\n this.refresh()\n }\n }\n\n refresh() {\n this.lastRefreshTime = Date.now()\n this.element.src = null\n this.element.src = this.urlValue\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport { computePosition, flip, shift, autoUpdate } from \"@floating-ui/dom\"\nimport * as Morph from \"web-ui/turbo/stream-actions/morph\"\n\n// Connects to data-controller=\"popover\"\nexport default class extends Controller {\n static targets = [\"container\", \"button\", \"popover\"]\n\n isVisible() {\n return this.containerTarget.classList.contains(\"visible\")\n }\n\n closePopover() {\n Morph.ignore(this.element, false)\n this.containerTarget.classList.remove(\"visible\", \"top\", \"bottom\")\n this.buttonTarget.removeAttribute(\"aria-expanded\")\n\n if (this.disableAutoUpdate) {\n this.disableAutoUpdate()\n }\n }\n\n open() {\n Morph.ignore(this.element, true)\n this.containerTarget.classList.add(\"visible\")\n this.buttonTarget.setAttribute(\"aria-expanded\", \"true\")\n this.popoverTarget.scrollTop = 0\n\n this.disableAutoUpdate = autoUpdate(\n this.buttonTarget,\n this.popoverTarget,\n this.updatePosition\n );\n }\n\n updatePosition = () => {\n computePosition(this.buttonTarget, this.popoverTarget, {\n placement: \"top\",\n middleware: [shift(), flip({ padding: 16 })],\n }).then(({ placement, middlewareData: { shift } }) => {\n if (placement === \"top\") {\n this.containerTarget.classList.add(\"top\")\n this.containerTarget.classList.remove(\"bottom\")\n } else {\n this.containerTarget.classList.add(\"bottom\")\n this.containerTarget.classList.remove(\"top\")\n }\n\n if (shift.x > 0) {\n this.popoverTarget.style.left = `${shift.x}px`\n }\n })\n }\n\n close(event) {\n if (!this.isVisible()) {\n return\n }\n\n if (event) {\n if (event.key === \"Escape\") {\n this.closePopover()\n }\n\n if (this.element.contains(event.target)) {\n return\n }\n }\n\n this.closePopover()\n }\n\n toggle() {\n this.isVisible() ? this.close() : this.open()\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Use this when you want to wait for a turbo frame to complete its request\n// before submitting the form that you add this controller to. An example is an\n// auto-saving form in a frame and a button outside of that frame that needs to\n// send a request indicating the form is \"complete\". It must wait for any\n// pending auto-saves to occur before its submit in order to ensure that the\n// data the user entered is considered. - Aaron, Fri Jun 10 2022\n\n// |--- Turbo frame submit start\n// |\n// | |- Click submit on synchronized form (synchronized form cancels the submission)\n// | |\n// | |\n// |-+- Turbo frame submit end\n// |- Synchronized form resubmits\n\n// Usage example:\n//\n// = synchronized_button_to \"Submit synchronized form\",\n// examples_collaborative_form_synchronized_form_path,\n// class: \"primary\",\n// turbo_frame_id: \"collaborative-form-frame\",\n// debug: true\n//\n// Set synchronized_form_debug_value to true to observe and diagnose\n\n// Connects to data-controller=\"synchronized-form\"\nexport default class extends Controller {\n static values = {\n turboFrameId: String,\n debug: Boolean\n }\n\n connect() {\n this.debug(\"Connect\")\n this.synchronize = this.synchronize.bind(this)\n\n this.element.addEventListener(\"submit\", this.synchronize, true)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n this.element.removeEventListener(\"submit\", this.synchronize, true)\n\n if (this.listener) {\n this.debug(\"Removing turbo:submit-end listener\")\n\n const turboFrame = document.getElementById(this.turboFrameIdValue)\n turboFrame?.removeEventListener(\"turbo:submit-end\", this.listener)\n this.listener = null\n }\n }\n\n synchronize(event) {\n const turboFrame = document.getElementById(this.turboFrameIdValue)\n\n if (!turboFrame || turboFrame.tagName !== \"TURBO-FRAME\") {\n this.warn(`Could not find turbo-frame with ID ${this.turboFrameIdValue}`)\n\n return\n }\n\n if (this.listener) {\n this.debug(\"Removing turbo:submit-end listener\")\n\n // This is a \"once\" listener, but we only want to resume the most recent\n // submission, so we ignore the others - Aaron, Fri Jun 10 2022\n turboFrame.removeEventListener(\"turbo:submit-end\", this.listener)\n }\n\n if (this.isTurboFrameBusy(turboFrame)) {\n this.debug(\"Suspending submission\")\n\n event.preventDefault()\n\n const form = event.target\n const submitter = event.submitter\n submitter?.setAttribute(\"disabled\", \"\")\n\n const submitForm = () => {\n submitter?.removeAttribute(\"disabled\")\n form.requestSubmit(submitter)\n }\n\n turboFrame.addEventListener(\"turbo:submit-end\", submitForm, { once: true })\n\n this.listener = submitForm\n } else {\n this.debug(`Allowing submission`)\n }\n }\n\n isTurboFrameBusy(turboFrame) {\n const busy = turboFrame.getAttribute(\"busy\") != null\n\n const collaborativeFormController = this.application.getControllerForElementAndIdentifier(turboFrame, \"collaborative-form\")\n\n const updating = collaborativeFormController?.isUpdating()\n\n this.debug(`isTurboFrameBusy - busy=${busy}, updating=${updating}`)\n\n return busy || updating\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Synchronized form - \" + message)\n }\n }\n\n warn(message) {\n console.warn(\"Synchronized form - \" + message)\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"user-tools\"\nexport default class extends Controller {\n static targets = [\"button\"]\n\n isOpen() {\n return this.element.classList.contains(\"open\")\n }\n\n closeMenu(event) {\n if (event && this.element.contains(event.target)) {\n return\n }\n\n this.element.classList.remove(\"open\")\n this.buttonTarget.removeAttribute(\"aria-expanded\")\n }\n\n openMenu() {\n this.element.classList.add(\"open\")\n this.buttonTarget.setAttribute(\"aria-expanded\", \"true\")\n }\n\n toggle() {\n if (this.isOpen()) {\n this.closeMenu()\n } else {\n this.openMenu()\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"view-form-error\"\nexport default class extends Controller {\n\n viewError() {\n const invalidField = document.querySelector(\"form .field.invalid, form .message.error\")\n\n if (invalidField) {\n invalidField.scrollIntoView({ behavior: \"smooth\", block: \"center\" })\n\n const input = invalidField.querySelector(\"input, textarea, select\")\n\n if (input) {\n input.focus({ preventScroll: true })\n }\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"modal-dialog\"\nexport default class extends Controller {\n connect() {\n this.element.showModal()\n this.element.addEventListener(\"close\", this.remove)\n }\n\n disconnect() {\n this.element.removeEventListener(\"close\", this.remove)\n }\n\n close() {\n this.element.close()\n }\n\n remove = () => {\n this.element.remove()\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\nimport \"tom-select\";\nimport * as Morph from \"web-ui/turbo/stream-actions/morph\";\nimport * as FloatingUI from \"@floating-ui/dom\";\n\n// Connects to data-controller=\"async-select\"\nexport default class extends Controller {\n static values = {\n url: String,\n }\n\n connect() {\n const input = this.element.querySelector(\"input[id]\")\n const label = input.dataset[\"selectedLabel\"]\n const id = input.value\n\n document.addEventListener(\"turbo:before-cache\", this.beforeTurboCache)\n\n const items = []\n const options = []\n\n if (id) {\n items.push(id)\n options.push({ id, label })\n }\n\n this.tomSelect = new TomSelect(input, {\n valueField: \"id\",\n labelField: \"label\",\n openOnFocus: false,\n searchField: [],\n items: items,\n options: options,\n maxItems: 1,\n sortField: {\n field: \"label\",\n direction: \"asc\",\n },\n // A turbo form listens to all change events to any input on the form and collects them to be submitted\n // This input should not trigger updates to the form - Matt, Scott A, Thu Mar 16 2023\n controlInput: '',\n render: {\n loading: () => '
',\n },\n load: this.search,\n onFocus: () => Morph.ignore(this.element, true),\n onBlur: () => {\n Morph.ignore(this.element, false)\n this.popStashedItem()\n },\n onItemAdd: (value, item) => {\n const label = item.textContent\n\n const input = this.element.querySelector(\"input[id]\")\n input.dataset.selectedLabel = label\n\n this.clearStashedItem()\n },\n onType: (term) => {\n this.stashItem()\n\n this.tomSelect.clearOptions()\n\n if (!term) {\n this.tomSelect.close()\n }\n },\n onDropdownOpen: (dropdown) => {\n this.disableAutoUpdate = FloatingUI.autoUpdate(\n this.tomSelect.control_input,\n dropdown,\n this.updatePosition\n )\n },\n })\n\n Morph.ignore(this.tomSelect.wrapper, true)\n\n this.observeDataAttributes(input)\n }\n\n // Store the current selected item and clear item list.\n // Clearing the item list fixes a couple of issues:\n // 1) Selected item is no longer the first item in the search results\n // 2) Selected item was present in the dropdown when loading\n // Stored selected item will be readded when a blur occurs\n // - Matt, Scott A, Thu Mar 16 2023\n stashItem = () => {\n const id = this.tomSelect.items[0]\n\n if (id) {\n const { label } = this.tomSelect.options[id]\n const item = { id, label }\n\n this.stashedItem = item\n this.tomSelect.clear(true)\n }\n }\n\n clearStashedItem = () => {\n this.stashedItem = null\n }\n\n popStashedItem = () => {\n if (this.stashedItem) {\n this.tomSelect.addOption(this.stashedItem)\n this.tomSelect.addItem(this.stashedItem.id, true)\n\n this.clearStashedItem()\n }\n }\n\n updatePosition = () => {\n FloatingUI.computePosition(\n this.tomSelect.control_input,\n this.tomSelect.dropdown,\n {\n placement: \"bottom\",\n middleware: [FloatingUI.flip({ padding: 16 })],\n }\n ).then(({ placement }) => {\n if (placement === \"bottom\") {\n this.tomSelect.dropdown.classList.add(\"bottom\")\n this.tomSelect.dropdown.classList.remove(\"top\")\n } else {\n this.tomSelect.dropdown.classList.add(\"top\")\n this.tomSelect.dropdown.classList.remove(\"bottom\")\n }\n })\n }\n\n beforeTurboCache = () => {\n this.tomSelect.destroy()\n }\n\n disconnect() {\n document.removeEventListener(\"turbo:before-cache\", this.beforeTurboCache)\n this.observer.disconnect()\n this.tomSelect.destroy()\n }\n\n // When a form value is persisted, rendering an async-select requires the label and value to be provided\n // to tom-select in order to display the selected item\n // When used within a collaborative form, subsequent changes to the selected item come through as mutations\n // to the attributes of the underlying input\n // This watches the value and data-selected-label attributes, and synchronizes them to tom-select\n // - Matt, Scott A, Thu Mar 16 2023\n observeDataAttributes(element) {\n this.observer = new MutationObserver((mutationRecords) => {\n const option = { id: null, label: null }\n\n const labelRecord = mutationRecords.find(record => record.attributeName === \"data-selected-label\")\n const valueRecord = mutationRecords.find(record => record.attributeName === \"value\")\n\n // tom-select alters attributes on the input that triggers mutations outside of what we're concerned with\n // We only proceed if the mutations include both value and label - Matt, Scott A, Thu Mar 16 2023\n if (!(labelRecord && valueRecord)) {\n return\n }\n\n const input = labelRecord.target\n\n option.id = input.value\n option.label = input.dataset[\"selectedLabel\"]\n\n const silent = true\n if (option.id && option.label) {\n this.tomSelect.addOption(option)\n this.tomSelect.addItem(option.id, silent)\n\n return\n }\n\n this.tomSelect.clear(silent)\n })\n\n this.observer.observe(element, { attributes: true })\n }\n\n search = async (term, callback) => {\n if (this.abortController) {\n this.abortController.abort()\n }\n\n this.abortController = new AbortController()\n\n const signal = this.abortController.signal\n\n try {\n const url = `${this.urlValue}?search_term=${encodeURIComponent(term)}`\n const response = await fetch(url, { signal })\n const json = await response.json()\n\n // ## Is this still needed?\n // ## Needs to be tested with real search data\n // ## - Matt, Scott A, Thu Mar 16 2023\n this.tomSelect.clearOptions()\n\n // As a user types, multiple searches are requested and aborted\n // This insures only the results that match the most current search term\n // are applied - Matt, Scott A, Thu Mar 16 2023\n if (term === this.tomSelect.lastValue) {\n callback(json)\n } else {\n callback([])\n }\n } catch (error) {\n callback([])\n\n // error code (20) is equivalent to an AbortError\n // See: https://developer.mozilla.org/en-US/docs/Web/API/DOMException#error_names\n // Abort errors will occur anytime a search is in flight and the user\n // types another character - Matt, Scott A, Mon Mar 6 2023\n if (error.code && error.code === 20) {\n return\n }\n\n Sentry.captureException(error)\n } finally {\n this.abortController = null\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\n// Connects to data-controller=\"confirm-form\"\nexport default class extends Controller {\n static targets = [\"button\"];\n\n validate(e) {\n const text = e.target.value;\n\n if (text.toLowerCase() === \"confirm\") {\n this.buttonTarget.removeAttribute(\"disabled\");\n } else {\n this.buttonTarget.setAttribute(\"disabled\", \"disabled\");\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"switch\"\nexport default class extends Controller {\n static values = {\n debug: Boolean\n }\n\n connect() {\n this.debug(\"Connect\")\n\n this.element.addEventListener(\"change\", this.submitForm)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n\n this.element.removeEventListener(\"change\", this.submitForm)\n }\n\n submitForm = (e) => {\n const option = e.target\n const form = option.form\n\n this.debug(`Submitting form (ID: ${form.id}, option ID: ${option.id})`)\n\n form.requestSubmit()\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Switch - \" + message)\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"option-group\"\nexport default class extends Controller {\n static values = {\n debug: Boolean\n }\n\n static targets = [\n \"option\"\n ]\n\n connect() {\n this.debug(\"Connect\")\n\n this.element.addEventListener(\"change\", this.onChange)\n }\n\n disconnect() {\n this.debug(\"Disconnect\")\n\n this.element.removeEventListener(\"change\", this.onChange)\n }\n\n optionTargetConnected(element) {\n this.debug(`Option connected ${element.name}`)\n }\n\n optionTargetDisconnected(element) {\n this.debug(`Option disconnected ${element.name}`)\n }\n\n onChange = (e) => {\n const option = e.target\n const checked = option.checked\n\n if (checked) {\n this.reconcile(option)\n }\n }\n\n reconcile(selectedOption) {\n let options = this.optionTargets.filter(option => option != selectedOption)\n\n options = options.filter(option => option.checked)\n\n const exclusiveSelectedOption = \"exclusive\" in selectedOption.dataset\n if (!exclusiveSelectedOption) {\n options = options.filter(option => \"exclusive\" in option.dataset)\n }\n\n options.forEach(option => {\n this.debug(`Unchecking option name=${option.name}`)\n\n option.checked = false\n\n const event = new Event(\"change\", { bubbles: true })\n option.dispatchEvent(event)\n })\n }\n\n debug(message) {\n if (this.debugValue) {\n console.log(\"Option group - \" + message)\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport * as Morph from \"web-ui/turbo/stream-actions/morph\"\n\n// Connects to data-controller=\"field-preview\"\nexport default class extends Controller {\n static values = {\n debug: Boolean,\n sourceId: String\n }\n\n static targets = [ \"destination\" ]\n\n connect() {\n this.debug(\"Connect\")\n\n const sourceTarget = this.sourceTarget()\n sourceTarget.addEventListener(\"input\", this.onInput)\n sourceTarget.addEventListener(\"focus\", this.onFocus)\n sourceTarget.addEventListener(\"blur\", this.onBlur)\n }\n\n disconnect() {\n const sourceTarget = this.sourceTarget()\n if (sourceTarget !== null) {\n sourceTarget.removeEventListener(\"input\", this.onInput)\n sourceTarget.removeEventListener(\"focus\", this.onFocus)\n sourceTarget.removeEventListener(\"blur\", this.onBlur)\n }\n }\n\n onInput = (event) => {\n const value = event.target.value.trim()\n\n if (value === null || value === \"\") {\n this.hidePreview()\n this.updatePreview(value)\n } else {\n this.updatePreview(value)\n this.showPreview()\n }\n }\n\n onFocus = () => {\n Morph.ignore(this.element, true)\n }\n\n onBlur = () => {\n Morph.ignore(this.element, false)\n }\n\n showPreview() {\n this.element.firstChild.hidden = false\n }\n\n hidePreview() {\n this.element.firstChild.hidden = true\n }\n\n updatePreview(text) {\n // We are setting the element's content using `textContent`\n // to ensure the application is not vulnerable to HTML injection\n // - Nick, Scott A, Thu Feb 15 2024\n this.destinationTarget.textContent = text\n }\n\n sourceTarget() {\n return document.getElementById(this.sourceIdValue)\n }\n\n debug(message, value=null) {\n if (this.debugValue) {\n if (value !== null) {\n console.log(\"Field preview - \" + message, value)\n } else {\n console.log(\"Field preview - \" + message)\n }\n }\n }\n}\n", "import { application } from \"web-ui/controllers/application\"\nimport DynamicForm from \"web-ui/controllers/dynamic-form\"\nimport DynamicFormDiscardChangesConfirmation from \"web-ui/controllers/dynamic-form/discard-changes-confirmation\"\nimport CollaborativeForm from \"web-ui/controllers/collaborative-form\"\nimport Textarea from \"web-ui/controllers/textarea\"\nimport DropdownMenu from \"web-ui/controllers/dropdown-menu\"\nimport Expandable from \"web-ui/controllers/expandable\"\nimport Refresh from \"web-ui/controllers/refresh\"\nimport Popover from \"web-ui/controllers/popover\"\nimport SynchronizedForm from \"web-ui/controllers/synchronized-form\"\nimport UserTools from \"web-ui/controllers/user-tools\"\nimport ViewFormError from \"web-ui/controllers/view-form-error\"\nimport ModalDialog from \"web-ui/controllers/modal-dialog\"\nimport AsyncSelect from \"web-ui/controllers/async-select\"\nimport ConfirmForm from \"web-ui/controllers/confirm-form\"\nimport Switch from \"web-ui/controllers/switch\"\nimport OptionGroup from \"web-ui/controllers/option-group\"\nimport FieldPreview from \"web-ui/controllers/field-preview\"\n\napplication.register(\"dynamic-form\", DynamicForm)\napplication.register(\"dynamic-form-discard-changes-confirmation\", DynamicFormDiscardChangesConfirmation)\napplication.register(\"collaborative-form\", CollaborativeForm)\napplication.register(\"textarea\", Textarea)\napplication.register(\"dropdown-menu\", DropdownMenu)\napplication.register(\"expandable\", Expandable)\napplication.register(\"refresh\", Refresh)\napplication.register(\"popover\", Popover)\napplication.register(\"synchronized-form\", SynchronizedForm)\napplication.register(\"user-tools\", UserTools)\napplication.register(\"view-form-error\", ViewFormError)\napplication.register(\"modal-dialog\", ModalDialog)\napplication.register(\"async-select\", AsyncSelect)\napplication.register(\"confirm-form\", ConfirmForm)\napplication.register(\"switch\", Switch)\napplication.register(\"option-group\", OptionGroup)\napplication.register(\"field-preview\", FieldPreview)\n\nexport { application as stimulusApplication }\n", "function showConfirmationDialog(confirmationTemplateID) {\n const dialogTemplate = document.querySelector(`#${confirmationTemplateID}`)\n\n if (!dialogTemplate) {\n return\n }\n\n const dialogFragment = dialogTemplate.content\n\n const dialog = dialogFragment.firstElementChild.cloneNode(true)\n document.body.appendChild(dialog)\n dialog.showModal()\n\n return new Promise((resolve, _reject) => {\n dialog.addEventListener(\"close\", () => {\n resolve(dialog.returnValue == \"confirm\")\n }, { once: true })\n }).finally(() => {\n dialog.remove()\n })\n}\n\nconst confirmations = new WeakSet()\n\nasync function handleClick(event) {\n const target = event.target\n\n const dataset = target.dataset\n const confirmationTemplateID = dataset.confirmationTemplateId\n\n if (!confirmationTemplateID) {\n return\n }\n\n if (confirmations.has(target)) {\n confirmations.delete(target)\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n const confirmed = await showConfirmationDialog(confirmationTemplateID)\n\n if (confirmed) {\n confirmations.add(target)\n target.click()\n }\n}\n\nexport function activate() {\n document.addEventListener(\"click\", handleClick, {\n capture: true\n })\n}\n", "import { Turbo } from \"@hotwired/turbo-rails\"\nimport * as ReplaceStylesheets from \"web-ui/turbo/replace-stylesheets\"\nimport * as MorphdomRender from \"web-ui/turbo/morphdom-render\"\n\nimport * as MorphStreamAction from \"web-ui/turbo/stream-actions/morph\"\nimport * as RedirectStreamAction from \"web-ui/turbo/stream-actions/redirect\"\nimport \"web-ui/turbo/disable-submit-button\"\n\nReplaceStylesheets.activate(Turbo)\nMorphdomRender.activate(Turbo)\n\nMorphStreamAction.activate(Turbo)\nRedirectStreamAction.activate(Turbo)\n\nTurbo.session.drive = false\n\n", "const debug = (window.location.search || \"\").includes(\"debug\")\n\nconst log = (...args) => {\n if (debug) {\n console.log(...args)\n }\n}\n\nfunction removeFingerprint(url) {\n if (!url) { return url }\n return url.replace(/-[0-9a-f]{7,128}(\\.digested)?\\.css$/, \".css\")\n}\n\nfunction stylesheetElementIsReplaceable(element) {\n return element.getAttribute(\"data-turbo-track\") == \"replace\" &&\n element.getAttribute(\"href\") != null\n}\n\n// Copied from turbo\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n return new Promise((resolve) => {\n const onComplete = () => {\n element.removeEventListener(\"error\", onComplete)\n element.removeEventListener(\"load\", onComplete)\n resolve()\n }\n\n element.addEventListener(\"load\", onComplete, { once: true })\n element.addEventListener(\"error\", onComplete, { once: true })\n setTimeout(resolve, timeoutInMilliseconds)\n })\n}\n\n// Original:\n// async copyNewHeadStylesheetElements() {\n// const loadingElements = []\n//\n// for (const element of this.newHeadStylesheetElements) {\n// loadingElements.push(waitForLoad(element as HTMLLinkElement))\n//\n// document.head.appendChild(element)\n// }\n//\n// await Promise.all(loadingElements)\n// }\n\nasync function copyNewHeadStylesheetElements() {\n log(\"copyNewHeadStylesheetElements\")\n\n const loadingElements = []\n const preloadElements = []\n\n const newStylesheetElements = this.newHeadStylesheetElements.filter(stylesheetElementIsReplaceable)\n const oldStylesheetElements = this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot).filter(stylesheetElementIsReplaceable)\n\n const oldElementIndex = Object.fromEntries(oldStylesheetElements.map(element => [removeFingerprint(element.getAttribute(\"href\")), element]))\n\n let lastStylesheetElement = null\n\n for (const newElement of newStylesheetElements) {\n const newHref = newElement.getAttribute(\"href\")\n const hrefWithoutFingerprint = removeFingerprint(newHref)\n const oldElement = oldElementIndex[hrefWithoutFingerprint]\n const oldHref = oldElement && oldElement.getAttribute(\"href\")\n\n if (oldHref == newHref) {\n log(`Skipping ${newHref}`)\n delete oldElementIndex[hrefWithoutFingerprint]\n continue\n }\n\n // Convert the link tag to a preload so that it can be enabled at the same\n // time as others (after everything has loaded) and any old stylesheets can\n // be removed at the same time as well.\n newElement.setAttribute(\"as\", \"style\")\n newElement.setAttribute(\"rel\", \"preload\")\n preloadElements.push(newElement)\n\n loadingElements.push(waitForLoad(newElement))\n\n if (oldElement) {\n log(`Updating ${oldElement.getAttribute(\"href\")} to ${newHref}`)\n\n oldElement.after(newElement)\n } else {\n log(`Appending ${newHref} after`, lastStylesheetElement)\n\n // Ensure that the new elements maintain their order as much as possible\n if (lastStylesheetElement) {\n lastStylesheetElement.after(newElement)\n } else {\n document.head.appendChild(newElement)\n }\n }\n\n lastStylesheetElement = newElement\n }\n\n await Promise.all(loadingElements)\n\n for (const element of Object.values(oldElementIndex)) {\n log(`Removing ${element.getAttribute(\"href\")}`)\n\n element.remove()\n }\n\n for (const element of preloadElements) {\n log(`Converting preload ${element.getAttribute(\"href\")}`)\n\n element.setAttribute(\"rel\", \"stylesheet\")\n element.removeAttribute(\"as\")\n }\n}\n\nexport function activate(Turbo) {\n Turbo.PageRenderer.prototype.copyNewHeadStylesheetElements = copyNewHeadStylesheetElements\n}\n", "import morphdom from \"morphdom\"\nimport { morphdomPreserveAttributes } from \"web-ui/morphdom-preserve-attributes\"\nimport { morphdomShouldUpdate } from \"web-ui/morphdom-should-update\"\n\nfunction morphdomRender({ detail }) {\n detail.render = (fromElement, toElement) => {\n morphdom(fromElement, toElement, {\n childrenOnly: true,\n onBeforeElUpdated: (fromElement, toElement) => {\n morphdomPreserveAttributes(fromElement, toElement)\n return morphdomShouldUpdate(fromElement, toElement)\n }\n })\n }\n}\n\nexport function activate() {\n addEventListener(\"turbo:before-frame-render\", morphdomRender)\n}\n", "function redirect() {\n const path = this.getAttribute(\"path\")\n\n if (!path) {\n throw new Error(\"Path is not specified\")\n }\n\n window.location = path\n}\n\nexport function activate(Turbo) {\n Turbo.StreamActions.redirect = redirect\n}\n", "// Form submission buttons are disabled if form submissions are a redirect\n// https://github.com/hotwired/turbo/issues/766\n// - Shaun, Aaron, Mon Mar 11 2024\n\nconst buttonsInsideForm = (form) => {\n const buttons = Array.from(form.querySelectorAll(\"[type=submit]\"))\n\n return buttons.filter(b => !b.disabled)\n}\n\nconst buttonsOutsideForm = (formID) => {\n const buttons = Array.from(document.querySelectorAll(`[type=submit][form=${formID}]`))\n\n return buttons.filter(b => !b.disabled)\n}\n\nconst enabledSubmitButtons = (form) => {\n const formID = form.id\n\n if (formID) {\n return [\n ...buttonsInsideForm(form),\n ...buttonsOutsideForm(formID)\n ]\n }\n\n return buttonsInsideForm(form)\n}\n\nconst disableButtonsOnRedirect = (event) => {\n const fetchResponse = event.detail.fetchResponse\n\n // Fetch response may not be present if the request was canceled\n // - Shaun, Antoine, Stephen, Tue Mar 12 2024\n if (fetchResponse && fetchResponse.redirected) {\n const form = event.target\n\n const enabledButtons = enabledSubmitButtons(form)\n\n for (const button of enabledButtons) {\n button.disabled = true\n }\n\n const turboStreamRedirect = fetchResponse.contentType.includes(\"text/vnd.turbo-stream.html\")\n if (turboStreamRedirect) {\n const restoreButtons = () => {\n for (const button of enabledButtons) {\n button.disabled = false\n }\n }\n\n document.addEventListener(\"turbo:before-stream-render\", restoreButtons, { once: true })\n }\n }\n}\n\ndocument.addEventListener(\"turbo:submit-end\", disableButtonsOnRedirect)\n\n\n\n\n\n// document.addEventListener(\"turbo:submit-end\", (event) => {\n// const fetchResponse = event.detail.fetchResponse\n\n// // Fetch response may not be present if the request was canceled\n// // - Shaun, Antoine, Stephen, Tue Mar 12 2024\n// if (!fetchResponse) {\n// return\n// }\n\n// if (!fetchResponse.redirected) {\n// return\n// }\n\n// const form = event.target\n// const enabledButtons = []\n\n// const disableButton = (button) => {\n// if (!button.disabled) {\n// enabledButtons.push(button)\n// }\n\n// button.disabled = true\n// }\n\n// form.querySelectorAll(\"[type=submit]\").forEach(disableButton)\n\n// const formID = form.id\n// if (formID) {\n// document.querySelectorAll(`[type=submit][form=${formID}]`).forEach(disableButton)\n// }\n\n// const restoreButtons = () => {\n// for (const button of enabledButtons) {\n// button.disabled = false\n// }\n// }\n\n// const turboStreamRedirect = fetchResponse.contentType.includes(\"text/vnd.turbo-stream.html\")\n// if (turboStreamRedirect) {\n// document.addEventListener(\"turbo:before-stream-render\", restoreButtons, { once: true })\n// }\n// });\n", "import { stimulusApplication } from \"web-ui/controllers\"\nimport * as MorphStreamAction from \"web-ui/turbo/stream-actions/morph\"\nimport * as ConfirmationDialog from \"web-ui/confirmation-dialog\"\nimport \"web-ui/turbo\"\n\nConf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AMI,EAAqBC,GACT,MAAM,KAAKA,EAAK,iBAAiB,eAAe,CAAC,EAElD,OAAOC,GAAK,CAACA,EAAE,QAAQ,EAGlCC,GAAsBC,GACV,MAAM,KAAK,SAAS,iBAAiB,sBAAsBA,CAAM,GAAG,CAAC,EAEtE,OAAOF,GAAK,CAACA,EAAE,QAAQ,EAGlCG,GAAwBJ,GAAS,CACrC,IAAMG,EAASH,EAAK,GAEpB,OAAIG,EACK,CACL,GAAGJ,EAAkBC,CAAI,EACzB,GAAGE,GAAmBC,CAAM,CAC9B,EAGKJ,EAAkBC,CAAI,CAC/B,EAEMK,GAA4BC,GAAW,CAC3C,IAAMC,EAAgBD,EAAM,OAAO,cAInC,GAAIC,GAAiBA,EAAc,WAAY,CAC7C,IAAMP,EAAOM,EAAM,OAEbE,EAAiBJ,GAAqBJ,CAAI,EAEhD,QAAWS,KAAUD,EACnBC,EAAO,SAAW,GAIpB,GAD4BF,EAAc,YAAY,SAAS,4BAA4B,EAClE,CACvB,IAAMG,EAAiB,IAAM,CAC3B,QAAWD,KAAUD,EACnBC,EAAO,SAAW,EAEtB,EAEA,SAAS,iBAAiB,6BAA8BC,EAAgB,CAAE,KAAM,EAAK,CAAC,CACxF,CACF,CACF,EAEA,SAAS,iBAAiB,mBAAoBL,EAAwB,EJhDnDM,EAASC,CAAK,EAClBD,EAASC,CAAK,EAEXD,EAASC,CAAK,EACXD,EAASC,CAAK,EAEnCA,EAAM,QAAQ,MAAQ,GKTHC,EAAS", "names": ["Application", "application", "Controller", "morph_exports", "__export", "activate", "ignore", "morphdom", "morphdomPreserveAttributes", "fromElement", "toElement", "dataset", "preserveAttributesAttributeName", "attributes", "attribute", "value", "morphdomMorphTemplate", "fromElement", "toElement", "node", "isFocused", "element", "isTemplate", "morphdomShouldUpdate", "fromElement", "toElement", "morphdomMorphTemplate", "ignore", "element", "morph", "options", "fromElement", "toElement", "morphdomPreserveAttributes", "morphdomShouldUpdate", "node", "newElement", "morphdom", "activate", "Turbo", "setInputValueAttributes", "input", "value", "option", "dynamic_form_default", "Controller", "event", "submitter", "formUpdatesJSON", "formUpdates", "name", "value", "form", "input", "setInputValueAttributes", "ignore", "formElements", "elementName", "element", "actions", "updateRequest", "completeUpdate", "beforeStreamRender", "stream", "render", "self", "addListener", "ignoreServerErrors", "response", "scope", "message", "Controller", "confirmationText", "discard_changes_confirmation_default", "event", "targetLink", "message", "Controller", "refreshIntervalMilliseconds", "collaborative_form_default", "Controller", "event", "submitter", "formUpdatesJSON", "formUpdates", "name", "value", "form", "signal", "refreshPath", "response", "html", "error", "input", "setInputValueAttributes", "ignore", "formElements", "elementName", "element", "actions", "updateRequestBody", "entry", "entryName", "completeUpdate", "beforeStreamRender", "stream", "render", "self", "addListener", "ignoreServerErrors", "scope", "message", "Controller", "textarea_default", "Controller", "textareaElement", "ignore", "message", "Controller", "dropdown_menu_default", "event", "Controller", "expandable_default", "Controller", "defaultIntervalSeconds", "refresh_default", "intervalTimerMilliseconds", "newFrame", "key", "Controller", "computePosition", "flip", "shift", "autoUpdate", "popover_default", "Controller", "ignore", "autoUpdate", "computePosition", "shift", "flip", "placement", "event", "Controller", "synchronized_form_default", "event", "turboFrame", "form", "submitter", "submitForm", "busy", "updating", "message", "Controller", "user_tools_default", "event", "Controller", "view_form_error_default", "invalidField", "input", "Controller", "modal_dialog_default", "Controller", "FloatingUI", "async_select_default", "Controller", "input", "label", "id", "items", "options", "ignore", "value", "item", "term", "dropdown", "placement", "element", "mutationRecords", "option", "labelRecord", "record", "valueRecord", "silent", "callback", "signal", "url", "json", "error", "Controller", "confirm_form_default", "Controller", "switch_default", "option", "form", "message", "Controller", "option_group_default", "element", "option", "selectedOption", "options", "event", "message", "Controller", "field_preview_default", "Controller", "sourceTarget", "event", "value", "ignore", "text", "message", "application", "dynamic_form_default", "discard_changes_confirmation_default", "collaborative_form_default", "textarea_default", "dropdown_menu_default", "expandable_default", "refresh_default", "popover_default", "synchronized_form_default", "user_tools_default", "view_form_error_default", "modal_dialog_default", "async_select_default", "confirm_form_default", "switch_default", "option_group_default", "field_preview_default", "showConfirmationDialog", "confirmationTemplateID", "dialogTemplate", "dialog", "resolve", "_reject", "confirmations", "handleClick", "event", "target", "activate", "Turbo", "debug", "log", "args", "removeFingerprint", "url", "stylesheetElementIsReplaceable", "element", "waitForLoad", "timeoutInMilliseconds", "resolve", "onComplete", "copyNewHeadStylesheetElements", "loadingElements", "preloadElements", "newStylesheetElements", "oldStylesheetElements", "oldElementIndex", "lastStylesheetElement", "newElement", "newHref", "hrefWithoutFingerprint", "oldElement", "activate", "Turbo", "morphdom", "morphdomRender", "detail", "fromElement", "toElement", "morphdom", "morphdomPreserveAttributes", "morphdomShouldUpdate", "activate", "redirect", "path", "activate", "Turbo", "buttonsInsideForm", "form", "b", "buttonsOutsideForm", "formID", "enabledSubmitButtons", "disableButtonsOnRedirect", "event", "fetchResponse", "enabledButtons", "button", "restoreButtons", "activate", "Turbo", "activate"] }