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AA,IAChChN,EAAY8M,SAAS,OAAQG,EAAAA,IAC7BjN,EAAY8M,SAAS,OAAQI,EAAAA,GAC7BlN,EAAY8M,SAAS,aAAcK,EAAAA,GAEnCnN,EAAY8M,SAAS,eAAgBnW,EAAAA,GACrCqJ,EAAY8M,SAAS,eAAgBM,EAAAA,GAGrCpN,EAAYqN,OAAQ,EACpB,MAAMC,EAAUC,EAAAA,MAEhBvN,EAAY9M,MAAKsa,EAAAA,EAAAA,IAAuBF,IACxCtY,OAAOyY,SAAWzN,EAQlB7K,SAASoF,iBAAiB,mBAAmB,WAC3CvF,OAAO0Y,SAAS,EAAE,EACnB,IAEDvY,SAASoF,iBAAiB,sBAAsB,WAC9CyF,EAAY2N,YAAYle,SAAQ,SAAU0H,GACxC,IACuC,oBAA1BA,EAAW+D,YACpB/D,EAAW+D,YAEF,CAAZ,MAAQ0S,GAAI,CACd,GACF,IAGDzY,SAASoF,iBAAiB,sBAAsB,WAC9ChL,KAAK2L,YACN,G","sources":["webpack://app/./app/javascript/controllers/ sync _controller\\.js$","webpack://app/./app/javascript/controllers/accordion_controller.js","webpack://app/./app/javascript/controllers/ace_controller.js","webpack://app/./app/javascript/controllers/ace_html_controller.js","webpack://app/./app/javascript/controllers/appearance_settings_form_controller.js","webpack://app/./app/javascript/controllers/checkbox_group_controller.js","webpack://app/./app/javascript/controllers/copy_controller.js","webpack://app/./app/javascript/controllers/copy_input_controller.js","webpack://app/./app/javascript/controllers/dependent_select_controller.js","webpack://app/./app/javascript/controllers/dg_notification_controller.js","webpack://app/./app/javascript/controllers/dropzone_controller.js","webpack://app/./app/javascript/controllers/frame_visit_controller.js","webpack://app/./app/javascript/controllers/hello_controller.js","webpack://app/./app/javascript/controllers/infinite_scroll_controller.js","webpack://app/./app/javascript/controllers/lightbox_controller.js","webpack://app/./app/javascript/controllers/mantle_autocomplete_controller.js","webpack://app/./app/javascript/controllers/mantle_controller.js","webpack://app/./app/javascript/controllers/mantle_demo_controller.js","webpack://app/./app/javascript/controllers/mantle_modal_controller.js","webpack://app/./app/javascript/controllers/map_fields_controller.js","webpack://app/./app/javascript/controllers/menu_controller.js","webpack://app/./app/javascript/controllers/nested_form_controller.js","webpack://app/./app/javascript/controllers/page_edit_content_controller.js","webpack://app/./app/javascript/controllers/page_editor_controller.js","webpack://app/./app/javascript/controllers/play_sessions_filter_controller.js","webpack://app/./app/javascript/controllers/radio_controller.js","webpack://app/./app/javascript/controllers/selector_controller.js","webpack://app/./app/javascript/controllers/selectors_controller.js","webpack://app/./app/javascript/controllers/step_controller.js","webpack://app/./app/javascript/controllers/steps/composer_controller.js","webpack://app/./app/javascript/controllers/steps/composer_layer_controller.js","webpack://app/./app/javascript/controllers/steps/visit_url_controller.js","webpack://app/./app/javascript/controllers/tags_dropdown_controller.js","webpack://app/./app/javascript/controllers/turbo_workaround_controller.js","webpack://app/./app/javascript/controllers/visualise_controller.js","webpack://app/./app/javascript/controllers/widget_action_builder_controller.js","webpack://app/./app/javascript/controllers/widget_edit_content_controller.js","webpack://app/./app/javascript/packs/application.js"],"sourcesContent":["var map = {\n\t\"./accordion_controller.js\": 3264,\n\t\"./ace_controller.js\": 372,\n\t\"./ace_html_controller.js\": 6119,\n\t\"./appearance_popover_controller.js\": 6124,\n\t\"./appearance_settings_form_controller.js\": 2412,\n\t\"./checkbox_group_controller.js\": 8673,\n\t\"./control_bar_controller.js\": 9910,\n\t\"./copy_controller.js\": 9320,\n\t\"./copy_input_controller.js\": 4318,\n\t\"./dependent_select_controller.js\": 2456,\n\t\"./dg_modal_controller.js\": 4735,\n\t\"./dg_notification_controller.js\": 5780,\n\t\"./dropzone_controller.js\": 2817,\n\t\"./frame_visit_controller.js\": 4898,\n\t\"./header_controller.js\": 5204,\n\t\"./hello_controller.js\": 981,\n\t\"./infinite_scroll_controller.js\": 8049,\n\t\"./lightbox_controller.js\": 3989,\n\t\"./mantle_autocomplete_controller.js\": 7406,\n\t\"./mantle_controller.js\": 6381,\n\t\"./mantle_demo_controller.js\": 2474,\n\t\"./mantle_modal_controller.js\": 2713,\n\t\"./map_fields_controller.js\": 1474,\n\t\"./menu_controller.js\": 4977,\n\t\"./nested_form_controller.js\": 5911,\n\t\"./page_edit_content_controller.js\": 2403,\n\t\"./page_editor_controller.js\": 2841,\n\t\"./page_switcher_controller.js\": 4695,\n\t\"./play_form_controller.js\": 225,\n\t\"./play_sessions_filter_controller.js\": 8207,\n\t\"./playground_controller.js\": 1713,\n\t\"./playground_tour_controller.js\": 762,\n\t\"./radio_controller.js\": 8621,\n\t\"./selector_controller.js\": 1293,\n\t\"./selectors_controller.js\": 4288,\n\t\"./step_controller.js\": 460,\n\t\"./steps/composer_controller.js\": 9064,\n\t\"./steps/composer_layer_controller.js\": 4869,\n\t\"./steps/visit_url_controller.js\": 1490,\n\t\"./styles_controller.js\": 133,\n\t\"./tags_dropdown_controller.js\": 5605,\n\t\"./turbo_workaround_controller.js\": 757,\n\t\"./visualise_controller.js\": 3821,\n\t\"./widget_action_builder_controller.js\": 5758,\n\t\"./widget_edit_content_controller.js\": 7995,\n\t\"controllers/accordion_controller.js\": 3264,\n\t\"controllers/ace_controller.js\": 372,\n\t\"controllers/ace_html_controller.js\": 6119,\n\t\"controllers/appearance_popover_controller.js\": 6124,\n\t\"controllers/appearance_settings_form_controller.js\": 2412,\n\t\"controllers/checkbox_group_controller.js\": 8673,\n\t\"controllers/control_bar_controller.js\": 9910,\n\t\"controllers/copy_controller.js\": 9320,\n\t\"controllers/copy_input_controller.js\": 4318,\n\t\"controllers/dependent_select_controller.js\": 2456,\n\t\"controllers/dg_modal_controller.js\": 4735,\n\t\"controllers/dg_notification_controller.js\": 5780,\n\t\"controllers/dropzone_controller.js\": 2817,\n\t\"controllers/frame_visit_controller.js\": 4898,\n\t\"controllers/header_controller.js\": 5204,\n\t\"controllers/hello_controller.js\": 981,\n\t\"controllers/infinite_scroll_controller.js\": 8049,\n\t\"controllers/lightbox_controller.js\": 3989,\n\t\"controllers/mantle_autocomplete_controller.js\": 7406,\n\t\"controllers/mantle_controller.js\": 6381,\n\t\"controllers/mantle_demo_controller.js\": 2474,\n\t\"controllers/mantle_modal_controller.js\": 2713,\n\t\"controllers/map_fields_controller.js\": 1474,\n\t\"controllers/menu_controller.js\": 4977,\n\t\"controllers/nested_form_controller.js\": 5911,\n\t\"controllers/page_edit_content_controller.js\": 2403,\n\t\"controllers/page_editor_controller.js\": 2841,\n\t\"controllers/page_switcher_controller.js\": 4695,\n\t\"controllers/play_form_controller.js\": 225,\n\t\"controllers/play_sessions_filter_controller.js\": 8207,\n\t\"controllers/playground_controller.js\": 1713,\n\t\"controllers/playground_tour_controller.js\": 762,\n\t\"controllers/radio_controller.js\": 8621,\n\t\"controllers/selector_controller.js\": 1293,\n\t\"controllers/selectors_controller.js\": 4288,\n\t\"controllers/step_controller.js\": 460,\n\t\"controllers/steps/composer_controller.js\": 9064,\n\t\"controllers/steps/composer_layer_controller.js\": 4869,\n\t\"controllers/steps/visit_url_controller.js\": 1490,\n\t\"controllers/styles_controller.js\": 133,\n\t\"controllers/tags_dropdown_controller.js\": 5605,\n\t\"controllers/turbo_workaround_controller.js\": 757,\n\t\"controllers/visualise_controller.js\": 3821,\n\t\"controllers/widget_action_builder_controller.js\": 5758,\n\t\"controllers/widget_edit_content_controller.js\": 7995\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7074;","import { Controller } from \"@hotwired/stimulus\"\nimport {enter, leave} from 'el-transition';\n\nexport default class extends Controller {\n static targets = [\"content\", \"arrow\"]\n\n connect() {\n // Ensure initial state matches content visibility\n // this.contentTargets.forEach((content, index) => {\n // if (!content.classList.contains('hidden')) {\n // this.arrowTargets[index].classList.add('rotate-180')\n // }\n // })\n }\n\n toggle(event) {\n event.preventDefault()\n const clickedContent = event.currentTarget.nextElementSibling\n const clickedArrow = event.currentTarget.querySelector('[data-accordion-target=\"arrow\"]')\n \n \n\n // Toggle clicked accordion item\n if (clickedContent.classList.contains('hidden')) {\n // Close all other accordion items first\n this.contentTargets.forEach((content, index) => {\n if (content !== clickedContent && !content.classList.contains('hidden')) {\n this.arrowTargets[index].classList.remove('rotate-180')\n leave(content).then(() => {\n })\n }\n })\n clickedArrow.classList.add('rotate-180')\n enter(clickedContent).then(() => {\n })\n } else {\n clickedArrow.classList.remove('rotate-180')\n leave(clickedContent).then(() => {\n })\n }\n }\n\n}","import { Controller } from \"@hotwired/stimulus\"\n\nimport * as ace from 'brace';\nimport 'brace/mode/json';\nimport 'brace/theme/solarized_light';\nexport default class extends Controller {\n static targets = [ \"input\", \"editor\" ]\n\n connect() {\n console.log(this.editorTargets);\n this.editorTargets.forEach((edTarget, idx) => {\n console.log(edTarget);\n let editor = ace.edit(edTarget);\n editor.getSession().setMode('ace/mode/json');\n editor.setTheme('ace/theme/github_light');\n let jsonDoc = JSON.parse(this.inputTargets[idx].value);\n console.log(jsonDoc);\n editor.setValue(JSON.stringify(jsonDoc, null, '\\t'));\n });\n }\n\n submit() {\n this.editorTargets.forEach((edTarget, idx) => {\n let editor = ace.edit(edTarget);\n this.inputTargets[idx].value = editor.getValue();\n });\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nimport * as ace from 'brace';\nimport 'brace/mode/liquid';\nimport 'brace/mode/html';\nimport 'brace/theme/solarized_light';\n// import format from \"html-format\";\n\nexport default class extends Controller {\n static targets = [ \"input\", \"editor\" ]\n\n initialize() {\n }\n connect() {\n\n }\n // minify = ( s ) => {\n // return s ? s\n // .replace(/\\>[\\r\\n ]+\\<\") // Removes new lines and irrelevant spaces which might affect layout, and are better gone\n // .replace(/(<.*?>)|\\s+/g, (m, $1) => $1 ? $1 : ' ')\n // .trim()\n // : \"\"\n // }\n\n minifyHtml = (html) => {\n // Remove line breaks and indentation\n return html\n .replace(/[\\n\\r\\t]/g, '') // Remove newlines, carriage returns and tabs\n .replace(/\\s+/g, ' ') // Replace multiple spaces with single space\n .replace(/>\\s+<') // Remove spaces between tags\n .replace(/\\s+>/g, '>') // Remove spaces before closing angle bracket\n .replace(/<\\s+/g, '<') // Remove spaces after opening angle bracket\n .trim(); // Remove leading/trailing whitespace\n }\n\n prettifyHtml = (html) => {\n let indent = 0,\n mode = 'IDLE',\n inTag = false,\n tag = '',\n tagToCome = '',\n shouldBreakBefore = false,\n shouldBreakAfter = false,\n breakBefore = ['p', 'ul', 'li'],\n breakAfter = ['div', 'h1', 'h2', 'h3', 'h4', 'p', 'ul', 'li'];\n\n return html\n .split('')\n .reduce((output, char, index) => {\n\n if (char === '<') {\n tagToCome = this.whichTag(html, index);\n shouldBreakBefore = tagToCome && breakBefore.indexOf(tagToCome) >= 0;\n mode = 'TAG';\n inTag = true;\n output += (shouldBreakBefore ? this.br(indent) : '') + '<';\n } else if (char === '/' && mode == 'TAG') {\n mode = 'CLOSING_TAG'\n inTag = true;\n output += '/';\n } else if (char === ' ') {\n inTag = false;\n output += ' ';\n } else if (char === '>') {\n if (mode === 'TAG' || mode === 'CLOSING_TAG') {\n indent += mode === 'TAG' ? +1 : -1;\n\n shouldBreakAfter = breakAfter.indexOf(tag) >= 0;\n inTag = false;\n tag = '';\n }\n output += '>';\n output += shouldBreakAfter ? this.br(indent) : '';\n } else {\n output += char;\n\n if (inTag) {\n tag += char;\n }\n }\n\n return output;\n }, '');\n }\n _tabs = (number) => {\n let output = '';\n\n for (let cnt = 0; cnt < number; cnt++) {\n output += '\\t';\n }\n\n return output;\n}\n\nbr = (indent) => {\n return '\\n' + this._tabs(indent);\n}\n\nwhichTag = (html, index) => {\n let inTag = true,\n tag = '';\n\n const arr = html.split('');\n\n for (let i = index + 1; i < index + 10; i++) {\n const char = arr[i];\n\n if (char >= 'a' && char <= 'z' && inTag) {\n tag += char;\n } else if (char !== '/') {\n inTag = false;\n }\n }\n\n return tag;\n}\n\n connect() {\n console.log(this.editorTargets);\n // load();\n }\n\n load() {\n this.editorTargets.forEach((edTarget, idx) => {\n let editor = ace.edit(edTarget);\n editor.setBehavioursEnabled(true)\n editor.getSession().setMode('ace/mode/html');\n editor.getSession().setUseWrapMode(true);\n editor.getSession().setFoldStyle(\"markbegin\")\n editor.setTheme('ace/theme/github_light');\n let val = this.prettifyHtml(this.inputTargets[idx].value);\n // let val = this.inputTargets[idx].value;\n // val = val.replace(/\\\\/g, '');\n // console.log(\"HTML val\");\n // console.log(val);\n editor.setValue(val);\n\n });\n }\n\n submit() {\n this.editorTargets.forEach((edTarget, idx) => {\n let editor = ace.edit(edTarget);\n let val = editor.getValue();\n console.log(`VALUE LENGTH - ${val.length}`)\n let minified = this.minifyHtml(val);\n console.log(`MINIFIED LENGTH - ${minified.length}`)\n console.log(minified)\n \n this.inputTargets[idx].value = unescape(minified);\n });\n }\n \n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"template\", \"container\"];\n\n add(e) {\n console.log(\"click!\");\n let new_index = new Date().getTime();\n let content = this.templateTarget.innerHTML.replace(/NEW_RECORD/g, new_index);\n this.containerTarget.insertAdjacentHTML('beforeend', content);\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [];\n\n connect() {\n console.log(\"loaded\");\n }\n\n toggleActive(e) {\n let border = e.currentTarget.parentElement.querySelector(\".checkbox-border\");\n border.classList.toggle(\"hidden\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"link\"];\n\n \n copy(e) {\n e.preventDefault();\n navigator.clipboard.writeText(this.linkTarget.dataset.value);\n const notify = new CustomEvent(\"toast\");\n window.dispatchEvent(notify);\n }\n\n get alert() {\n return document.getElementById(\"pageAlert\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"input\"];\n \n copy(e) {\n navigator.clipboard.writeText(this.inputTarget.value);\n }\n \n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"source\", \"target\" ];\n\n handleSelectChange() {\n this.populateSelect(this.sourceTarget.value);\n }\n\n populateSelect(sourceId, targetId = null) {\n fetch(`/${this.data.get('sourceRoutePart')}/${sourceId}/${this.data.get('targetRoutePart')}`, {\n credentials: 'same-origin'\n })\n .then(response => response.json())\n .then(data => {\n const selectBox = this.targetTarget;\n selectBox.innerHTML = '';\n data.forEach(item => {\n const opt = document.createElement('option');\n opt.value = item.id;\n opt.innerHTML = item[this.data.get('displayAttribute')];\n opt.selected = parseInt(targetId) === item.id;\n selectBox.appendChild(opt);\n });\n });\n }\n}","import Notification from \"@stimulus-components/notification\"\n\nexport default class extends Notification {\n connect() {\n super.connect()\n }\n async hide() {\n if (this.timeout) {\n clearTimeout(this.timeout)\n }\n \n await this.leave()\n \n this.element.classList.add(\"hidden\");\n }\n}\n\n\n","import { Controller } from \"@hotwired/stimulus\"\nimport { DirectUpload } from \"@rails/activestorage\"\nimport Dropzone from \"dropzone\"\nimport { getMetaValue, findElement, removeElement, insertAfter } from \"../utils/helpers\"\n\nDropzone.autoDiscover = false\n\nexport default class extends Controller {\n static targets = [ \"input\", \"message\" ]\n\n connect() {\n this.dropZone = createDropZone(this)\n this.hideFileInput()\n this.bindEvents()\n }\n\n// Private\n hideFileInput() {\n this.inputTarget.disabled = true\n this.inputTarget.style.display = \"none\"\n }\n\n bindEvents() {\n this.dropZone.on(\"addedfile\", (file) => {\n this.messageTarget.style.display = \"none\";\n setTimeout(() => { file.accepted && createDirectUploadController(this, file).start() }, 500)\n })\n\n this.dropZone.on(\"removedfile\", (file) => {\n file.controller && removeElement(file.controller.hiddenInput)\n })\n\n this.dropZone.on(\"canceled\", (file) => {\n file.controller && file.controller.xhr.abort()\n })\n\n this.dropZone.on(\"processing\", (file) => {\n this.submitButton.disabled = true\n })\n\n this.dropZone.on(\"queuecomplete\", (file) => {\n this.submitButton.disabled = false\n })\n }\n\n get headers() { return { \"X-CSRF-Token\": getMetaValue(\"csrf-token\") } }\n\n get url() { return this.inputTarget.getAttribute(\"data-direct-upload-url\") }\n\n get maxFiles() { return this.data.get(\"maxFiles\") || 1 }\n\n get maxFileSize() { return this.data.get(\"maxFileSize\") || 256 }\n\n get acceptedFiles() { return this.data.get(\"acceptedFiles\") }\n\n get addRemoveLinks() { return this.data.get(\"addRemoveLinks\") || true }\n\n get form() { return this.element.closest(\"form\") }\n\n get submitButton() { return findElement(this.form, \"input[type=submit], button[type=submit]\") }\n\n}\n\nclass DirectUploadController {\n constructor(source, file) {\n this.directUpload = createDirectUpload(file, source.url, this)\n this.source = source\n this.file = file\n }\n\n start() {\n this.file.controller = this\n this.hiddenInput = this.createHiddenInput()\n this.directUpload.create((error, attributes) => {\n if (error) {\n removeElement(this.hiddenInput)\n this.emitDropzoneError(error)\n } else {\n this.hiddenInput.value = attributes.signed_id\n this.emitDropzoneSuccess()\n }\n })\n }\n\n// Private\n createHiddenInput() {\n const input = document.createElement(\"input\")\n input.type = \"hidden\"\n input.name = this.source.inputTarget.name\n insertAfter(input, this.source.inputTarget)\n return input\n }\n\n directUploadWillStoreFileWithXHR(xhr) {\n this.bindProgressEvent(xhr)\n this.emitDropzoneUploading()\n }\n\n bindProgressEvent(xhr) {\n this.xhr = xhr\n this.xhr.upload.addEventListener(\"progress\", event => this.uploadRequestDidProgress(event))\n }\n\n uploadRequestDidProgress(event) {\n const element = this.source.element\n const progress = event.loaded / event.total * 100\n findElement(this.file.previewTemplate, \".dz-upload\").style.width = `${progress}%`\n }\n\n emitDropzoneUploading() {\n this.file.status = Dropzone.UPLOADING\n this.source.dropZone.emit(\"processing\", this.file)\n }\n\n emitDropzoneError(error) {\n this.file.status = Dropzone.ERROR\n this.source.dropZone.emit(\"error\", this.file, error)\n this.source.dropZone.emit(\"complete\", this.file)\n }\n\n emitDropzoneSuccess() {\n this.file.status = Dropzone.SUCCESS\n this.source.dropZone.emit(\"success\", this.file)\n this.source.dropZone.emit(\"complete\", this.file)\n }\n}\n\n// Top level...\nfunction createDirectUploadController(source, file) {\n return new DirectUploadController(source, file)\n}\n\nfunction createDirectUpload(file, url, controller) {\n return new DirectUpload(file, url, controller)\n}\n\nfunction createDropZone(controller) {\n return new Dropzone(controller.element, {\n url: controller.url,\n headers: controller.headers,\n maxFiles: controller.maxFiles,\n maxFilesize: controller.maxFileSize,\n acceptedFiles: controller.acceptedFiles,\n addRemoveLinks: controller.addRemoveLinks,\n autoQueue: false\n })\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n connect() {\n window.addEventListener(\"message\", this.handleMessage.bind(this))\n }\n\n disconnect() {\n window.removeEventListener(\"message\", this.handleMessage.bind(this))\n }\n\n handleMessage(event) {\n if (event.data.type === \"demoground:visit\") {\n const url = event.data.location\n if(event.data.turbo_frame) {\n let frame = document.querySelector(`turbo-frame#${event.data.turbo_frame}`)\n frame.src = url;\n frame.reload()\n return\n } else {\n Turbo.visit(url)\n }\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n connect() {\n this.element.textContent = \"Hello World!\"\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport InfiniteScroll from 'infinite-scroll'\n\nexport default class extends Controller {\n static targets = [\"entries\", \"pagination\"]\n\n initialize() {\n this.setupScroll();\n }\n\n connect() {\n }\n\n setupScroll() {\n let entries = this.entriesTarget\n let paginate = this.paginationTarget\n let lastPage = paginate.querySelector(\"a[rel='next']\") ? false : true;\n this.scroll = new InfiniteScroll( `#${this.element.id}`, {\n history: false,\n scrollThreshold: this.element.dataset[\"scroll\"] || 200,\n append: false,\n responseBody: 'json',\n elementScroll: this.element.dataset[\"scrollElement\"] || false,\n path: function() {\n let nextElm = paginate.querySelector(\"a[rel='next']\")\n if(lastPage) {\n return false;\n } else if(nextElm) {\n return nextElm.getAttribute(\"href\");\n }\n },\n checkLastPage: function () {\n return lastPage;\n }\n });\n this.scroll.on( 'load', function( data, url ) {\n // data is JSON\n entries.insertAdjacentHTML('beforeend', data.entries);\n paginate.innerHTML = data.pagination;\n lastPage = data.last_page;\n if(lastPage) {\n this.scroll.destroy();\n }\n });\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nimport GLightbox from 'glightbox';\nexport default class extends Controller {\n initialize() {\n this.lightbox = new GLightbox({openEffect: \"none\", closeEffect: \"none\"});\n }\n\n reload () {\n this.lightbox.reload();\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n\nexport default class extends Controller {\n static targets = [\"loader\", \"autocomplete\", \"urlInput\", \"emailInput\"];\n\n connect() { \n this.autocompleteTarget.addEventListener(\"autocomplete.change\", (e) => {\n this.change(e);\n });\n\n [\"loadstart\", \"loadend\"].forEach(evt => {\n this.autocompleteTarget.addEventListener(evt, (e) => {\n this.loaderTarget.classList.toggle(\"hidden\");\n });\n });\n }\n change(e) {\n const selected = e.detail.selected\n const customer = JSON.parse(selected.dataset[\"autocompleteData\"]);\n this.urlInputTarget.value = customer.shopifyDomain || customer.domain;\n this.emailInputTarget.value = customer.email;\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { fetchSessionFromMantle } from \"../utils/helpers\"\nexport default class extends Controller {\n initialize() {\n console.log(\"initializing mantle!\");\n }\n\n connect() {\n window.addEventListener(\"message\", this.messageHandler.bind(this));\n this.loadPage();\n this.setupMantleToken();\n setInterval(() => {\n this.setupMantleToken();\n }, 60 * 1000);\n }\n\n messageHandler(e) {\n if(e.origin != this.element.dataset[\"targetOrigin\"]) return;\n try {\n // Handle message\n const data = e.data;\n if(data.type == 'mantle:bridge:action') {\n switch(data.action) {\n case 'newDemo':\n this.modalController.toggle();\n break;\n \n default:\n console.log(\"Unknown action:\", data.action);\n }\n } else if(data.type == 'mantle:bridge:closeModal') {\n this.modalController.closeWithoutMantle();\n }\n } catch(e) {\n console.error(e);\n }\n }\n\n loadPage() {\n const message = {\n type: \"mantle:bridge:setPage\", \n title: this.element.dataset[\"title\"], \n subtitle: this.element.dataset[\"subtitle\"] \n }\n if(this.element.dataset.primaryAction) message.primaryAction = JSON.parse(decodeURIComponent(this.element.dataset.primaryAction.replace(/\\+/g, ' ')));\n parent.postMessage(\n message, \n this.element.dataset[\"targetOrigin\"])\n }\n setupMantleToken() {\n fetchSessionFromMantle(this.element.dataset[\"targetOrigin\"]).then((session) => {\n console.log(\"SESSION!\")\n console.log(session);\n window.sessionToken = session.session;\n document.addEventListener(\"turbolinks:request-start\", function (event) {\n var xhr = event.data.xhr;\n xhr.setRequestHeader(\"Authorization\", \"Bearer \" + window.sessionToken);\n });\n \n document.addEventListener(\"turbolinks:render\", function () {\n $(\"form, a[data-method=delete]\").on(\"ajax:beforeSend\", function (event) {\n const xhr = event.detail[0];\n xhr.setRequestHeader(\"Authorization\", \"Bearer \" + window.sessionToken);\n });\n });\n // All xhr requests\n XMLHttpRequest.prototype.open = (function(open) {\n return function(method,url,async) {\n open.apply(this,arguments);\n this.setRequestHeader('Authorization', \"Bearer \" + window.sessionToken);\n };\n })(XMLHttpRequest.prototype.open);\n\n var originalFetch = window.fetch;\n window.fetch = function (input, init) {\n if (!init) {\n init = {};\n }\n if (!init.headers) {\n init.headers = new Headers();\n }\n\n // init.headers could be: \n // `A Headers object, an object literal, \n // or an array of two-item arrays to set request’s headers.`\n if (init.headers instanceof Headers) {\n init.headers.append('Authorization', \"Bearer \" + window.sessionToken);\n } else if (init.headers instanceof Array) {\n init.headers.push(['Authorization', \"Bearer \" + window.sessionToken]);\n } else {\n // object ?\n init.headers['Authorization'] = \"Bearer \" + window.sessionToken;\n }\n return originalFetch(input, init);\n };\n });\n }\n get modalController() {\n return this.application.getControllerForElementAndIdentifier(this.element, \"mantle-modal\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n static targets = [\"newCustomer\", \"mantleCustomer\"]\n\n initialize() {\n }\n\n change(e) {\n this.newCustomerTarget.classList.toggle(\"hidden\");\n this.mantleCustomerTarget.classList.toggle(\"hidden\");\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport {enter, leave} from 'el-transition';\n\nexport default class extends Controller {\n static targets = [\"modal\", \"modalBody\", \"modalBackground\"]\n static values = { open: Boolean, mantleHide: Boolean }\n\n connect(){\n this.mantleHide = true;\n }\n\n toggle(e){\n e?.preventDefault();\n this.openValue = !this.openValue\n }\n\n openValueChanged() {\n this.openValue ? this._open() : this._close()\n }\n\n closeWithoutMantle() {\n this.mantleHide = false;\n this.openValue = false;\n }\n \n _open(){\n this.modalTarget.classList.remove(\"hidden\");\n this.mantleShowModalBackgroundOverlay();\n enter(this.modalBodyTarget);\n enter(this.modalBackgroundTarget)\n }\n \n _close(){\n this.modalTarget.classList.add(\"hidden\")\n if(this.mantleHide) {\n this.mantleHideModalBackgroundOverlay();\n } else this.mantleHide = true;\n leave(this.modalBodyTarget)\n leave(this.modalBackgroundTarget)\n this._emptyInputs()\n }\n\n _emptyInputs(){\n const inputs = this.modalBodyTarget?.querySelectorAll(\"input[type=text], input[type=number], input[type=email]\")\n inputs.forEach(input => {\n if (!input.disabled) {\n input.value = null\n }\n })\n }\n\n escapeKeyPressed(event) {\n if (event.keyCode == 27) {\n if (!this.modalTarget.classList.contains(\"hidden\")) {\n this.toggle(null)\n }\n }\n }\n\n mantleShowModalBackgroundOverlay = () => {\n parent.postMessage(\n {\n type: \"mantle:bridge:showModalBackgroundOverlay\",\n }, this.element.dataset[\"targetOrigin\"]\n );\n };\n \n mantleHideModalBackgroundOverlay = () => {\n parent.postMessage(\n {\n type: \"mantle:bridge:hideModalBackgroundOverlay\",\n }, this.element.dataset[\"targetOrigin\"]\n );\n };\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"mainMenu\", \"fields\", \"controlsContainer\", \"rulesConatiner\", \"validationMessage\"]\n\n connect() {\n this.controlsWrapperClass = this.data.get(\"controlsWrapperClass\")\n }\n getFields(key) {\n return this.fieldsTargets.find(f => f.dataset.key == key)\n }\n\n selectField(e) {\n e.preventDefault();\n let dropdown = e.target.parentNode.parentNode.parentNode.parentNode.parentNode;\n dropdown.querySelector(\".prospect_import_field_mappings_mapped_field input\").value = e.currentTarget.dataset.id\n dropdown.querySelector(\".prospect_import_field_mappings_entity input\").value = e.currentTarget.dataset.fieldtype\n dropdown.querySelector(\"button\").innerText = e.currentTarget.innerText\n this.dropdownController(e.target.parentNode.parentNode.parentNode.parentNode).hide(e);\n }\n\n selectMenu(e) {\n e.preventDefault();\n e.stopPropagation();\n let menu = e.currentTarget.closest(\".dropdown-menu\")\n this.controlsContainerTarget.insertAdjacentElement(\"beforeend\", this.mainMenuTarget)\n menu.insertAdjacentElement(\"beforeend\", this.getFields(e.currentTarget.dataset.key));\n }\n\n showMenu(event) {\n event.preventDefault();\n if(!event.currentTarget.classList.contains(\"disabled\")) {\n //Display the controls\n event.currentTarget.parentNode.parentNode.querySelector(\".dropdown-menu\").replaceChildren(this.mainMenuTarget)\n window.setTimeout(function () {\n document.getElementById('filterFields').focus();\n }, 0);\n }\n }\n\n resetMenu(e) {\n this.moveControls(e.currentTarget.querySelector(\".segment-controls\"))\n }\n\n moveControls(controls) {\n if(controls) {\n this.controlsContainerTarget.insertAdjacentElement(\"beforeend\", controls)\n }\n }\n\n dropdownController(elm) {\n return this.application.getControllerForElementAndIdentifier(elm, \"dropdown\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"toggleable\"];\n\n toggle(e) {\n this.toggleableTarget.classList.toggle(\"hidden\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"template\", \"add\", \"body\"]\n static values = {\n wrapperSelector: String\n }\n\n connect() {\n // Optional: Add any initialization logic here\n }\n\n add(event) {\n event.preventDefault()\n \n const content = this.templateTarget.innerHTML.replace(/NEW_RECORD/g, new Date().getTime())\n this.bodyTarget.insertAdjacentHTML('beforeend', content)\n }\n\n remove(event) {\n event.preventDefault()\n \n const wrapper = event.target.closest(this.wrapperSelectorValue)\n \n // New records can be removed directly\n if (wrapper.dataset.newRecord === \"true\") {\n wrapper.remove()\n }\n // Existing records need to be marked for deletion\n else {\n wrapper.style.display = \"none\"\n const input = wrapper.querySelector(\"input[name*='_destroy']\")\n input.value = \"1\"\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"jsonInput\", \"iframe\", \"form\", \"modal\", \"elementHTMLInput\", \"elementId\"];\n\n connect() {\n window.addEventListener('message', this.handleMessage.bind(this));\n this.snapshotReceived = false;\n }\n\n allContent(e) {\n this.iframeTarget.contentWindow.postMessage({\n type: 'demoground:edit_content:all_page'\n }, '*');\n }\n\n handleMessage(event) {\n if (event.data.type === 'demoground:text_changed') {\n // Handle text changes from editable elements\n } else if (event.data.type === 'demoground:static_json_snapshot:complete') {\n // Handle snapshot data\n if (this.hasJsonInputTarget) {\n this.jsonInputTarget.value = JSON.stringify(event.data.snapshot);\n this.snapshotReceived = true;\n if (this.hasFormTarget) {\n this.formTarget.requestSubmit();\n }\n }\n } else if (event.data.type === \"demoground:edit_content:element\") {\n if (this.hasElementHTMLInputTarget) {\n this.elementHTMLInputTarget.value = event.data.elementHtml;\n }\n if (this.hasElementIdTarget) {\n this.elementIdTarget.textContent = event.data.elementId;\n }\n this.selectedElementId = event.data.elementSelectorId;\n const modalController = this.application.getControllerForElementAndIdentifier(\n this.element,\n 'dg-modal'\n );\n const aceHtmlController = this.application.getControllerForElementAndIdentifier(\n this.modalTarget,\n 'ace-html'\n );\n if(event.data.isChild == true) {\n this.editingChild = true;\n this.frameSelector = event.data.frameSelector;\n }\n aceHtmlController.load();\n modalController.toggle();\n }\n }\n\n saveHtmlEdit(e) {\n e.preventDefault();\n const aceHtmlController = this.application.getControllerForElementAndIdentifier(\n this.modalTarget,\n 'ace-html'\n );\n aceHtmlController.submit();\n if (this.hasElementHTMLInputTarget && this.hasIframeTarget) {\n const html = this.elementHTMLInputTarget.value;\n const frame = this.iframeTarget;\n frame.contentWindow.postMessage({\n type: this.editingChild ? 'demoground:edit_content:child_update' : 'demoground:edit_content:update',\n frameSelector: this.frameSelector,\n elementId: this.selectedElementId,\n html: html\n }, '*');\n this.frameSelector = null;\n this.editingChild = false;\n const modalController = this.application.getControllerForElementAndIdentifier(\n this.element,\n 'dg-modal'\n );\n modalController.toggle();\n }\n }\n\n disconnect() {\n window.removeEventListener('message', this.handleMessage.bind(this));\n }\n\n snapshotContent(e) {\n if(this.snapshotReceived == true) return;\n e.preventDefault();\n //Send the postmessage to the iframe\n if (this.hasIframeTarget) {\n this.iframeTarget.contentWindow.postMessage({\n type: 'demoground:static_json_snapshot'\n }, '*');\n }\n\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"iframe\"]\n\n connect() {\n // Initial scale\n this.scaleIframe()\n\n // Re-scale on window resize\n window.addEventListener('resize', () => this.scaleIframe())\n }\n\n scaleIframe() {\n // const iframe = this.iframeTarget\n // const parent = iframe.parentElement\n\n // const scaleX = parent.clientWidth / iframe.offsetWidth\n // const scaleY = parent.clientHeight / iframe.offsetHeight\n // const scale = Math.min(scaleX, scaleY)\n \n // iframe.style.transform = `scale(${scale})`\n // iframe.style.transformOrigin = 'top left'\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport Rails from \"@rails/ujs\";\nimport debounce from \"debounce\";\n\nexport default class extends Controller {\n initialize() {\n this.debouncedQuery = debounce(this.doQuery.bind(this), 500);\n }\n\n search(e) {\n if (e.keyCode === 13) {\n this.debouncedQuery(e);\n }\n }\n\n doQuery(e) {\n const form = e.target.form;\n const formData = new FormData(form);\n const newParams = new URLSearchParams(formData);\n const url = new URL(window.location.href);\n const existingParams = new URLSearchParams(url.search);\n console.log(newParams.toString());\n console.log(existingParams.toString())\n // Merge existing and new params\n let entries = Array.from(newParams.entries()).filter((entry, index, self) =>\n index === self.findIndex(e => e[0] === entry[0])\n )\n console.log(entries);\n for (const [key, value] of entries) {\n console.log(`${key} - ${value}`);\n existingParams.set(key, value);\n }\n console.log(existingParams.toString());\n url.search = existingParams.toString();\n window.location = url;\n }\n\n query(e) {\n this.debouncedQuery(e)\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"border\", \"label\"];\n\n initialize() {\n console.log(\"initializing radio!\");\n }\n\n connect() {\n console.log(\"radio connect!\");\n }\n\n change(e) {\n // Remove green styling from all radio labels and borders\n this.labelTargets.forEach(label => {\n label.classList.add(\"border-gray-300\");\n label.classList.remove(\"border-green-600\", \"ring-2\", \"ring-green-600\");\n });\n this.borderTargets.forEach(border => {\n border.classList.add(\"border-transparent\");\n border.classList.remove(\"border-green-600\");\n });\n\n // Add green styling only to the selected radio\n const checked = e.currentTarget.checked;\n if (checked) {\n const label = e.currentTarget.closest('[data-target=\"radio.label\"]');\n const border = label.querySelector('[data-target=\"radio.border\"]');\n \n label.classList.remove(\"border-gray-300\");\n label.classList.add(\"border-green-600\", \"ring-2\", \"ring-green-600\");\n border.classList.remove(\"border-transparent\"); \n border.classList.add(\"border-green-600\");\n }\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"selectorType\", \"selectorInput\", \"errorMessage\"];\n\n remove(e) {\n this.element.remove();\n }\n\n validate(e) {\n const selectorType = this.selectorTypeTarget.value;\n const selectorValue = this.selectorInputTarget.value;\n\n if(selectorValue?.length <= 0 || this.isValid(selectorType, selectorValue)) {\n this.selectorInputTarget.classList.remove('border-red-500', 'ring-red-500', 'focus:border-red-500', 'focus:ring-red-500');\n this.errorMessageTarget.classList.add(\"hidden\")\n this.selectorInputTarget.setCustomValidity(\"\")\n\n } else {\n this.selectorInputTarget.classList.add('border-red-500', 'ring-red-500', 'focus:border-red-500', 'focus:ring-red-500');\n this.errorMessageTarget.classList.remove(\"hidden\")\n this.selectorInputTarget.setCustomValidity(\"Not a valid selector.\")\n\n }\n\n return false;\n }\n\n isValid(selectorType, selectorValue) {\n if (selectorType === 'css') {\n try {\n document.querySelector(selectorValue);\n return true;\n } catch (e) {\n return false;\n }\n } else if (selectorType === 'xpath') {\n try {\n document.evaluate(selectorValue, document, null, XPathResult.ANY_TYPE, null);\n return true;\n } catch (e) {\n return false;\n }\n }\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"template\", \"container\"];\n\n add(e) {\n let new_index = new Date().getTime();\n let content = this.templateTarget.innerHTML.replace(/NEW_RECORD/g, new_index);\n this.containerTarget.insertAdjacentHTML('beforeend', content);\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nimport { replaceUrlParam } from \"../utils/helpers\"\nexport default class extends Controller {\n static targets = [\"newLink\"];\n\n setOrderId(e) {\n let orderId = e.currentTarget.dataset[\"orderId\"];\n this.newLinkTargets.forEach(newLink => {\n newLink.href = replaceUrlParam(newLink.href, \"order_id_position\", orderId);\n });\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n static targets = [\"template\", \"layersContainer\", \"source\", \"layer\", \"canvas\", \"width\", \"height\"];\n connect() {\n console.log(\"conn\");\n // this.setWidthHeight(null);\n }\n setWidthHeight(e) {\n console.log(\"setting w he\");\n this.canvasTarget.width = this.widthTarget.value;\n this.canvasTarget.height = this.heightTarget.value;\n\n this.scaleCanvas();\n }\n\n scaleCanvas() {\n var con = this.canvasTarget.parentNode,\n canvas = this.canvasTarget,\n aspect = canvas.height/canvas.width, \n width = con.offsetWidth,\n height = con.offsetHeight;\n console.log(width);\n console.log(Math.round(width * aspect));\n canvas.style.width = `${width}px`;\n canvas.style.height = `${Math.round(width * aspect)}px`;\n }\n\n addLayer(e) {\n //Toggle the other layers\n this.layerTargets.forEach((layer) => {\n let ctrl = this.toggleController(layer)\n ctrl.hide(e);\n });\n let new_index = new Date().getTime();\n let content = this.templateTarget.innerHTML.replace(/NEW_RECORD/g, new_index);\n this.layersContainerTarget.insertAdjacentHTML('beforeend', content);\n }\n \n toggleController(layer) {\n return this.application.getControllerForElementAndIdentifier(layer, \"toggle\");\n }\n\n setSource(e) {\n let source = e.currentTarget.value\n this.sourceTargets.forEach(t => {\n let input = t.querySelector(\"input, select\");\n if(t.dataset[\"source\"] == source) {\n t.classList.remove(\"hidden\");\n input.required = true;\n } else {\n t.classList.add(\"hidden\");\n input.required = false;\n } \n });\n if(source == \"url_param\") this.testTarget.classList.remove(\"hidden\");\n else this.testTarget.classList.add(\"hidden\"); \n }\n}","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n static targets = [\"source\", \"test\", \"index\"];\n\n connect() {\n if(this.indexTarget.textContent == \"0\")\n this.indexTarget.textContent = this.composerController.layerTargets.length;\n }\n\n setSource(e) {\n let source = e.currentTarget.value;\n this.sourceTargets.forEach(t => {\n let input = t.querySelector(\"input, select\");\n if(t.dataset[\"source\"] == source) {\n t.classList.remove(\"hidden\");\n input.required = true;\n } else {\n t.classList.add(\"hidden\");\n input.required = false;\n } \n });\n if(source == \"url_param\") this.testTarget.classList.remove(\"hidden\");\n else this.testTarget.classList.add(\"hidden\"); \n }\n\n removeLayer(e) {\n e.preventDefault();\n let layer = e.currentTarget;\n if(confirm(\"Are you sure you want to delete this layer?\")) {\n layer.closest(\".composer-layer\").remove();\n }\n }\n\n get composerController() {\n return this.application.getControllerForElementAndIdentifier(document.getElementById(\"composer\"), \"steps--composer\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n static targets = [\"source\", \"test\"];\n\n setSource(e) {\n let source = e.currentTarget.value\n this.sourceTargets.forEach(t => {\n let input = t.querySelector(\"input, select\");\n if(t.dataset[\"source\"] == source) {\n t.classList.remove(\"hidden\");\n input.required = true;\n } else {\n t.classList.add(\"hidden\");\n input.required = false;\n } \n });\n if(source == \"url_param\") this.testTarget.classList.remove(\"hidden\");\n else this.testTarget.classList.add(\"hidden\"); \n }\n}","import { Dropdown } from \"tailwindcss-stimulus-components\"\n\nexport default class TagsDropdown extends Dropdown {\n static targets = [\"form\"]\n\n connect() {\n super.connect();\n this.hasChanged = false;\n }\n\n hide(e) {\n super.hide(e);\n // if(this.hasChanged) this.formTarget.submit()\n }\n\n openValueChanged() {\n super.openValueChanged();\n if (!this.openValue && this.hasChanged) {\n if(this.hasFormTarget) this.formTarget.submit();\n else if(this.element.dataset.formId) {\n document.getElementById(this.element.dataset.formId).submit();\n }\n }\n }\n\n setChanged(e) {\n console.log(\"ch\");\n this.hasChanged = true;\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n connect() {\n // Could be replaced by requestAnimationFrame()\n setTimeout(() => {\n [...this.element.children].map(el => this.activateScript(el));\n }, 300);\n }\n \n // Trigger this method to remove the script elements when the turbo:before-cache event is emitted\n // Add additional logic if you need to unmount your code properly. \n // For example: ReactDOM.unmountComponentAtNode(this.element);\n disconnect() {\n [...this.element.children].map(el => this.removeScript(el));\n }\n\n removeScript(element) {\n if (element.nodeName == 'SCRIPT') {\n element.parentElement?.removeChild(element);\n }\n }\n\n activateScript(element) {\n if (element.nodeName == 'SCRIPT') {\n const createdScriptElement = document.createElement(\"script\");\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n this.copyElementAttributes(createdScriptElement, element);\n this.replaceElementWithElement(element, createdScriptElement);\n }\n }\n\n replaceElementWithElement(fromElement, toElement) {\n const parentElement = fromElement.parentElement\n if (parentElement) {\n return parentElement.replaceChild(toElement, fromElement);\n }\n }\n\n copyElementAttributes(destinationElement, sourceElement) {\n for (const { name, value } of [ ...sourceElement.attributes ]) {\n destinationElement.setAttribute(name, value)\n }\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"input\", \"image\", \"emptyPreview\", \"loader\", \"imageLink\", \"container\"];\n \n connect() {\n const ctrl = this;\n this.imageTarget.onload = function(e) {\n ctrl.lightboxController.reload();\n //Need to get a ref to the controller\n ctrl.loaderTarget.classList.add(\"hidden\");\n ctrl.imageTarget.classList.remove(\"hidden\");\n ctrl.imageLinkTarget.classList.remove(\"hidden\");\n }\n }\n\n keyPress(e) {\n if(e.keyCode == 13){\n e.preventDefault();\n this.generatePreview(e);\n }\n }\n\n generatePreview(e) {\n this.imageLinkTarget.classList.add(\"hidden\");\n this.imageTarget.classList.add(\"hidden\");\n this.emptyPreviewTarget.classList.add(\"hidden\");\n this.loaderTarget.classList.remove(\"hidden\");\n let pms = {};\n this.inputTargets.forEach(function(input) {\n pms[input.name] = input.value;\n });\n let params = new URLSearchParams(pms);\n let url = `${this.element.dataset.mockUrl}?${params.toString()}`;\n this.imageTarget.src = \"\";\n this.imageTarget.src = url;\n this.imageLinkTarget.setAttribute(\"href\", url);\n }\n\n get lightboxController() {\n return this.application.getControllerForElementAndIdentifier(this.containerTarget, \"lightbox\");\n }\n\n \n \n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"selectorInput\", \"button\", \"widgetHtmlInput\"]\n\n connect() {\n this.iframe = document.getElementById(this.element.dataset[\"frame\"]);\n window.addEventListener(\"message\", this.messageHandler.bind(this));\n }\n\n messageHandler(e) {\n try{\n if(e.data.type == \"demoground:hotspot:element\") {\n this.selectorInputTarget.value = e.data.selector;\n this.widgetHtmlInputTarget.value = e.data.widgetHtml;\n button.disabled = false;\n button.textContent = \"Choose Element\";\n }\n } catch(e) {\n \n }\n }\n\n initiateSelector(e) {\n e.preventDefault();\n console.log(\"INITIATE!\");\n const button = e.currentTarget;\n button.disabled = true;\n button.textContent = \"Choose the element within the widget\";\n this.iframe.contentWindow.postMessage({ type: \"demoground:hotspot:chooseElement\", index: this.element.dataset[\"widgetindex\"] }, \"*\")\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"htmlInput\", \"iframe\", \"form\", \"modal\", \"elementHTMLInput\", \"elementId\"];\n\n connect() {\n window.addEventListener('message', this.handleMessage.bind(this));\n this.snapshotReceived = false;\n }\n\n allContent(e) {\n if (this.hasElementHTMLInputTarget) {\n this.elementHTMLInputTarget.value = this.htmlInputTarget.value;\n }\n if (this.hasElementIdTarget) {\n this.elementIdTarget.textContent = \"All\";\n }\n this.selectedElementId = \"all\";\n const modalController = this.application.getControllerForElementAndIdentifier(\n this.element,\n 'dg-modal'\n );\n const aceHtmlController = this.application.getControllerForElementAndIdentifier(\n this.modalTarget,\n 'ace-html'\n );\n aceHtmlController.load();\n modalController.toggle();\n }\n\n handleMessage(event) {\n if (event.data.type === 'demoground:text_changed') {\n // Handle text changes from editable elements\n console.log('Text changed:', event.data.element_id, event.data.text);\n } else if (event.data.type === 'demoground:widget_snapshot:complete') {\n console.log(\"SNAPSHOT COMPLETED!\");\n // Handle snapshot data\n if (this.hasHtmlInputTarget) {\n this.htmlInputTarget.value = event.data.snapshot;\n this.snapshotReceived = true;\n if (this.hasFormTarget) {\n this.formTarget.requestSubmit();\n }\n }\n } else if (event.data.type === \"demoground:edit_widget_content:element\") {\n if (this.hasElementHTMLInputTarget) {\n this.elementHTMLInputTarget.value = event.data.elementHtml;\n }\n if (this.hasElementIdTarget) {\n this.elementIdTarget.textContent = event.data.elementId;\n }\n this.selectedElementId = event.data.elementSelectorId;\n const modalController = this.application.getControllerForElementAndIdentifier(\n this.element,\n 'dg-modal'\n );\n const aceHtmlController = this.application.getControllerForElementAndIdentifier(\n this.modalTarget,\n 'ace-html'\n );\n aceHtmlController.load();\n modalController.toggle();\n }\n }\n\n saveHtmlEdit(e) {\n e.preventDefault();\n console.log(\"save edit\");\n console.log(this.hasElementHTMLInputTarget && this.hasIframeTarget);\n const aceHtmlController = this.application.getControllerForElementAndIdentifier(\n this.modalTarget,\n 'ace-html'\n );\n aceHtmlController.submit();\n if (this.hasElementHTMLInputTarget && this.hasIframeTarget) {\n const html = this.elementHTMLInputTarget.value;\n console.log(\"HTML\");\n console.log(html);\n console.log(`SELECT - ${this.selectedElementId}`);\n if(this.selectedElementId == \"all\") {\n this.snapshotReceived = true;\n this.htmlInputTarget.value = html;\n this.iframeTarget.contentWindow.postMessage({\n type: 'demoground:edit_widget_content:update',\n elementId: '#demogWidgetContainer',\n html: html\n }, '*');\n } else {\n this.iframeTarget.contentWindow.postMessage({\n type: 'demoground:edit_widget_content:update',\n elementId: this.selectedElementId,\n html: html\n }, '*');\n }\n const modalController = this.application.getControllerForElementAndIdentifier(\n this.element,\n 'dg-modal'\n );\n modalController.toggle();\n }\n }\n\n disconnect() {\n window.removeEventListener('message', this.handleMessage.bind(this));\n }\n\n snapshotContent(e) {\n if(this.snapshotReceived == true) return;\n e.preventDefault();\n //Send the postmessage to the iframe\n if (this.hasIframeTarget) {\n this.iframeTarget.contentWindow.postMessage({\n type: 'demoground:widget_html_snapshot'\n }, '*');\n }\n\n }\n}","import \"@hotwired/turbo-rails\"\n\nimport { Application } from \"@hotwired/stimulus\"\nimport { definitionsFromContext } from \"@hotwired/stimulus-webpack-helpers\"\nimport Notification from '@stimulus-components/notification'\nimport { Autocomplete } from 'stimulus-autocomplete'\nimport TreeController from '@kanety/stimulus-tree';\nimport setupUltimateTurboModal from \"ultimate_turbo_modal\";\nimport { Datepicker } from 'stimulus-datepicker'\n// import Dropdown from 'stimulus-dropdown'\nimport { Tabs, Modal, Popover, Dropdown, Toggle } from \"tailwindcss-stimulus-components\"\n\nconst application = Application.start()\nsetupUltimateTurboModal(application);\n\n// application.register('tabs', Tabs)\napplication.register('dropdown', Dropdown)\napplication.register('toggle', Toggle)\napplication.register('popover', Popover)\napplication.register('tabs', Tabs)\napplication.register('tree', TreeController)\napplication.register('datepicker', Datepicker)\n// application.register('modal', Modal)\napplication.register('notification', Notification)\napplication.register('autocomplete', Autocomplete)\n\n// Configure Stimulus development experience\napplication.debug = false\nconst context = require.context(\"controllers/\", true, /_controller\\.js$/)\n\napplication.load(definitionsFromContext(context))\nwindow.Stimulus = application\n// application.register('dropdown', Dropdown)\n\nexport { application }\n\nimport \"../utils/helpers\"\nimport \"../controllers\"\n// Support component names relative to this directory:\ndocument.addEventListener(\"turbolinks:load\", function() {\n window.scrollTo(0,0)\n});\n\ndocument.addEventListener('turbo:before-cache', function () {\n application.controllers.forEach(function (controller) {\n try {\n if (typeof controller.disconnect === 'function') {\n controller.disconnect()\n }\n } catch (_) {}\n })\n})\n\n// Alternative: Add this in the connect function of the stimulus controller.\ndocument.addEventListener('turbo:before-cache', function () {\n this.disconnect();\n})"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","accordion_controller_default","Controller","connect","toggle","event","preventDefault","clickedContent","currentTarget","nextElementSibling","clickedArrow","querySelector","classList","contains","this","contentTargets","forEach","content","index","arrowTargets","remove","leave","then","add","enter","ace_controller_default","console","log","editorTargets","edTarget","idx","editor","ace","getSession","setMode","setTheme","jsonDoc","JSON","parse","inputTargets","value","setValue","stringify","submit","getValue","ace_html_controller_default","constructor","__publicField","html","replace","trim","indent","mode","inTag","tag","tagToCome","shouldBreakBefore","shouldBreakAfter","breakBefore","breakAfter","split","reduce","output","char","whichTag","indexOf","br","number","cnt","_tabs","arr","i","initialize","load","setBehavioursEnabled","setUseWrapMode","setFoldStyle","val","prettifyHtml","length","minified","minifyHtml","unescape","appearance_settings_form_controller_default","new_index","Date","getTime","templateTarget","innerHTML","containerTarget","insertAdjacentHTML","checkbox_group_controller_default","toggleActive","parentElement","copy_controller_default","copy","navigator","clipboard","writeText","linkTarget","dataset","notify","CustomEvent","window","dispatchEvent","alert","document","getElementById","copy_input_controller_default","inputTarget","dependent_select_controller_default","handleSelectChange","populateSelect","sourceTarget","sourceId","targetId","fetch","data","get","credentials","response","json","selectBox","targetTarget","item","opt","createElement","selected","parseInt","appendChild","Notification","super","hide","timeout","clearTimeout","element","Dropzone","dropzone_controller_default","controller","dropZone","url","headers","maxFiles","maxFilesize","maxFileSize","acceptedFiles","addRemoveLinks","autoQueue","hideFileInput","bindEvents","disabled","style","display","on","file","messageTarget","setTimeout","accepted","source","DirectUploadController","createDirectUploadController","start","removeElement","hiddenInput","xhr","abort","submitButton","getMetaValue","getAttribute","form","closest","findElement","directUpload","DirectUpload","createDirectUpload","createHiddenInput","create","error","attributes","emitDropzoneError","signed_id","emitDropzoneSuccess","input","type","name","insertAfter","directUploadWillStoreFileWithXHR","bindProgressEvent","emitDropzoneUploading","upload","addEventListener","uploadRequestDidProgress","progress","loaded","total","previewTemplate","width","status","emit","handleMessage","bind","disconnect","removeEventListener","location","turbo_frame","frame","src","reload","Turbo","visit","textContent","infinite_scroll_controller_default","setupScroll","entries","entriesTarget","paginate","paginationTarget","lastPage","scroll","InfiniteScroll","history","scrollThreshold","append","responseBody","elementScroll","path","nextElm","checkLastPage","pagination","last_page","destroy","lightbox","GLightbox","openEffect","closeEffect","mantle_autocomplete_controller_default","autocompleteTarget","change","evt","loaderTarget","detail","customer","urlInputTarget","shopifyDomain","domain","emailInputTarget","email","messageHandler","loadPage","setupMantleToken","setInterval","origin","action","modalController","closeWithoutMantle","message","title","subtitle","primaryAction","decodeURIComponent","parent","postMessage","fetchSessionFromMantle","session","open","sessionToken","setRequestHeader","$","XMLHttpRequest","prototype","method","async","apply","arguments","originalFetch","init","Headers","Array","push","application","getControllerForElementAndIdentifier","mantle_demo_controller_default","newCustomerTarget","mantleCustomerTarget","mantle_modal_controller_default","mantleHide","openValue","openValueChanged","_open","_close","modalTarget","mantleShowModalBackgroundOverlay","modalBodyTarget","modalBackgroundTarget","mantleHideModalBackgroundOverlay","_emptyInputs","_a","querySelectorAll","escapeKeyPressed","keyCode","Boolean","map_fields_controller_default","controlsWrapperClass","getFields","key","fieldsTargets","find","f","selectField","dropdown","target","parentNode","fieldtype","innerText","dropdownController","selectMenu","stopPropagation","menu","controlsContainerTarget","insertAdjacentElement","mainMenuTarget","showMenu","replaceChildren","focus","resetMenu","moveControls","controls","elm","menu_controller_default","toggleableTarget","nested_form_controller_default","bodyTarget","wrapper","wrapperSelectorValue","newRecord","wrapperSelector","String","page_edit_content_controller_default","snapshotReceived","allContent","iframeTarget","contentWindow","hasJsonInputTarget","jsonInputTarget","snapshot","hasFormTarget","formTarget","requestSubmit","hasElementHTMLInputTarget","elementHTMLInputTarget","elementHtml","hasElementIdTarget","elementIdTarget","elementId","selectedElementId","elementSelectorId","aceHtmlController","isChild","editingChild","frameSelector","saveHtmlEdit","hasIframeTarget","snapshotContent","page_editor_controller_default","scaleIframe","debouncedQuery","debounce","doQuery","search","formData","FormData","newParams","URLSearchParams","URL","href","existingParams","toString","from","filter","entry","self","findIndex","set","query","radio_controller_default","labelTargets","label","borderTargets","border","checked","selector_controller_default","validate","selectorType","selectorTypeTarget","selectorValue","selectorInputTarget","isValid","errorMessageTarget","setCustomValidity","evaluate","XPathResult","ANY_TYPE","selectors_controller_default","step_controller_default","setOrderId","orderId","newLinkTargets","newLink","replaceUrlParam","composer_controller_default","setWidthHeight","canvasTarget","widthTarget","height","heightTarget","scaleCanvas","con","canvas","aspect","offsetWidth","offsetHeight","Math","round","addLayer","layerTargets","layer","toggleController","layersContainerTarget","setSource","sourceTargets","t","required","testTarget","composer_layer_controller_default","indexTarget","composerController","removeLayer","confirm","visit_url_controller_default","TagsDropdown","Dropdown","hasChanged","formId","setChanged","children","el","activateScript","removeScript","nodeName","removeChild","createdScriptElement","copyElementAttributes","replaceElementWithElement","fromElement","toElement","replaceChild","destinationElement","sourceElement","setAttribute","visualise_controller_default","ctrl","imageTarget","onload","lightboxController","imageLinkTarget","keyPress","generatePreview","emptyPreviewTarget","pms","params","mockUrl","widget_action_builder_controller_default","iframe","selector","widgetHtmlInputTarget","widgetHtml","button","initiateSelector","widget_edit_content_controller_default","htmlInputTarget","element_id","text","hasHtmlInputTarget","Application","setupUltimateTurboModal","register","Toggle","Popover","Tabs","TreeController","Datepicker","Autocomplete","debug","context","require","definitionsFromContext","Stimulus","scrollTo","controllers","_"],"sourceRoot":""}