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AA,EAAQ,MAKiC,QAArCG,SAASopB,KAAKroB,QAAQy2B,cACtBjqB,OAAOkqB,YAAc,EAEbV,EAAWW,eAAexE,UAAUttB,KACxC8xB,eAAexE,UAAUttB,KAAO,WAC5B2H,OAAOkqB,cACP72B,KAAKyd,iBAAiB,WAAW,WAC7B9Q,OAAOkqB,aACV,IACDV,EAAShpB,MAAMnN,KAAM+2B,UACxB,E","sources":["webpack://roastertools-portal/./app/javascript/channels/ sync _channel\\.js$","webpack://roastertools-portal/./app/javascript/controllers/ sync _controller\\.js$","webpack://roastertools-portal/./app/javascript/channels/consumer.js","webpack://roastertools-portal/./app/javascript/channels/index.js","webpack://roastertools-portal/./app/javascript/channels/test_channel.js","webpack://roastertools-portal/./app/javascript/controllers/able_controller.js","webpack://roastertools-portal/./app/javascript/controllers/address_controller.js","webpack://roastertools-portal/./app/javascript/controllers/aggregated_demand_controller.js","webpack://roastertools-portal/./app/javascript/controllers/application_controller.js","webpack://roastertools-portal/./app/javascript/controllers/auto_select_controller.js","webpack://roastertools-portal/./app/javascript/controllers/batch_controller.js","webpack://roastertools-portal/./app/javascript/controllers/button_toggle_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/demand_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/demand_indicator_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/fulfill_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/inventory_count_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/online_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/operation_task_controller.js","webpack://roastertools-portal/./app/javascript/controllers/cableready/refresh_controller.js","webpack://roastertools-portal/./app/javascript/controllers/chained_select_target_controller.js","webpack://roastertools-portal/./app/javascript/controllers/chained_selects_controller.js","webpack://roastertools-portal/./app/javascript/controllers/checkbox_switch_controller.js","webpack://roastertools-portal/./app/javascript/controllers/checkbox_toggle_controller.js","webpack://roastertools-portal/./app/javascript/controllers/clicker_controller.js","webpack://roastertools-portal/./app/javascript/controllers/clipboard_controller.js","webpack://roastertools-portal/./app/javascript/controllers/commerce_orders_controller.js","webpack://roastertools-portal/./app/javascript/controllers/contact_controller.js","webpack://roastertools-portal/./app/javascript/controllers/contact_email_controller.js","webpack://roastertools-portal/./app/javascript/controllers/content_loader_controller.js","webpack://roastertools-portal/./app/javascript/controllers/content_loader_from_selector_controller.js","webpack://roastertools-portal/./app/javascript/controllers/conversion_controller.js","webpack://roastertools-portal/./app/javascript/controllers/copy_controller.js","webpack://roastertools-portal/./app/javascript/controllers/date_range_picker_controller.js","webpack://roastertools-portal/./app/javascript/controllers/delivery_methods_controller.js","webpack://roastertools-portal/./app/javascript/controllers/demand_modal_controller.js","webpack://roastertools-portal/./app/javascript/controllers/disable_button_controller.js","webpack://roastertools-portal/./app/javascript/controllers/discount_controller.js","webpack://roastertools-portal/./app/javascript/controllers/draggable_controller.js","webpack://roastertools-portal/./app/javascript/controllers/dropdown_controller.js","webpack://roastertools-portal/./app/javascript/controllers/dynamic_value_from_input_controller.js","webpack://roastertools-portal/./app/javascript/controllers/element_controller.js","webpack://roastertools-portal/./app/javascript/controllers/enable_on_event_controller.js","webpack://roastertools-portal/./app/javascript/controllers/filter_controller.js","webpack://roastertools-portal/./app/javascript/controllers/flatpickr_controller.js","webpack://roastertools-portal/./app/javascript/controllers/fulfills_controller.js","webpack://roastertools-portal/./app/javascript/controllers/hello_controller.js","webpack://roastertools-portal/./app/javascript/controllers/helpscout_beacon_controller.js","webpack://roastertools-portal/./app/javascript/controllers/highlight_controller.js","webpack://roastertools-portal/./app/javascript/controllers/hovercard_controller.js","webpack://roastertools-portal/./app/javascript/controllers/integrations/accounting_customers_controller.js","webpack://roastertools-portal/./app/javascript/controllers/integrations/commerce_orders_controller.js","webpack://roastertools-portal/./app/javascript/controllers/integrations/commerce_variants_controller.js","webpack://roastertools-portal/./app/javascript/controllers/justifi_credit_card_form_controller.js","webpack://roastertools-portal/./app/javascript/controllers/line_items_controller.js","webpack://roastertools-portal/./app/javascript/controllers/load_controller.js","webpack://roastertools-portal/./app/javascript/controllers/modal_controller.js","webpack://roastertools-portal/./app/javascript/controllers/nested_form_controller.js","webpack://roastertools-portal/./app/javascript/controllers/number_field_controller.js","webpack://roastertools-portal/./app/javascript/controllers/operation_tasks_controller.js","webpack://roastertools-portal/./app/javascript/controllers/order_controller.js","webpack://roastertools-portal/./app/javascript/controllers/paste_controller.js","webpack://roastertools-portal/./app/javascript/controllers/phone_format_controller.js","webpack://roastertools-portal/./app/javascript/controllers/plaid_controller.js","webpack://roastertools-portal/./app/javascript/controllers/plans_controller.js","webpack://roastertools-portal/./app/javascript/controllers/portal_other_product_controller.js","webpack://roastertools-portal/./app/javascript/controllers/price_levels_controller.js","webpack://roastertools-portal/./app/javascript/controllers/price_reloader_controller.js","webpack://roastertools-portal/./app/javascript/controllers/print_controller.js","webpack://roastertools-portal/./app/javascript/controllers/product_price_controller.js","webpack://roastertools-portal/./app/javascript/controllers/products_controller.js","webpack://roastertools-portal/./app/javascript/controllers/query_controller.js","webpack://roastertools-portal/./app/javascript/controllers/radio_button_toggle_controller.js","webpack://roastertools-portal/./app/javascript/controllers/roaster_pay_hosted_onboarding_controller.js","webpack://roastertools-portal/./app/javascript/controllers/roasts_controller.js","webpack://roastertools-portal/./app/javascript/controllers/rutter_controller.js","webpack://roastertools-portal/./app/javascript/controllers/sales_call_list_controller.js","webpack://roastertools-portal/./app/javascript/controllers/scroll_banner_controller.js","webpack://roastertools-portal/./app/javascript/controllers/search_params_controller.js","webpack://roastertools-portal/./app/javascript/controllers/selectable_controller.js","webpack://roastertools-portal/./app/javascript/controllers/shopify_variant_controller.js","webpack://roastertools-portal/./app/javascript/controllers/simple_math_controller.js","webpack://roastertools-portal/./app/javascript/controllers/single_tippy_controller.js","webpack://roastertools-portal/./app/javascript/controllers/stripe_controller.js","webpack://roastertools-portal/./app/javascript/controllers/switchable_controller.js","webpack://roastertools-portal/./app/javascript/controllers/toggle_controller.js","webpack://roastertools-portal/./app/javascript/controllers/tom_select_controller.js","webpack://roastertools-portal/./app/javascript/controllers/transaction_form_controller.js","webpack://roastertools-portal/./app/javascript/controllers/variant_price_controller.js","webpack://roastertools-portal/./app/javascript/controllers/video_controller.js","webpack://roastertools-portal/./app/javascript/packs/application.js","webpack://roastertools-portal/./app/javascript/controllers/index.js"],"sourcesContent":["var map = {\n\t\"./test_channel.js\": 3612,\n\t\"channels/test_channel.js\": 3612\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 = 6463;","var map = {\n\t\"./able_controller.js\": 2593,\n\t\"./address_controller.js\": 8151,\n\t\"./aggregated_demand_controller.js\": 2253,\n\t\"./application_controller.js\": 2605,\n\t\"./auto_select_controller.js\": 7200,\n\t\"./batch_controller.js\": 5174,\n\t\"./button_toggle_controller.js\": 4645,\n\t\"./cableready/demand_controller.js\": 4265,\n\t\"./cableready/demand_indicator_controller.js\": 4350,\n\t\"./cableready/fulfill_controller.js\": 4082,\n\t\"./cableready/inventory_count_controller.js\": 5168,\n\t\"./cableready/online_controller.js\": 1537,\n\t\"./cableready/operation_task_controller.js\": 9762,\n\t\"./cableready/refresh_controller.js\": 8751,\n\t\"./chained_select_target_controller.js\": 9872,\n\t\"./chained_selects_controller.js\": 2525,\n\t\"./checkbox_switch_controller.js\": 4862,\n\t\"./checkbox_toggle_controller.js\": 7226,\n\t\"./class_toggle_controller.js\": 8164,\n\t\"./clicker_controller.js\": 3744,\n\t\"./clipboard_controller.js\": 6187,\n\t\"./commerce_orders_controller.js\": 6424,\n\t\"./contact_controller.js\": 8489,\n\t\"./contact_email_controller.js\": 1549,\n\t\"./content_loader_controller.js\": 9797,\n\t\"./content_loader_from_selector_controller.js\": 1075,\n\t\"./conversion_controller.js\": 195,\n\t\"./copy_controller.js\": 6348,\n\t\"./date_range_picker_controller.js\": 368,\n\t\"./delivery_methods_controller.js\": 4546,\n\t\"./demand_modal_controller.js\": 475,\n\t\"./disable_button_controller.js\": 5171,\n\t\"./discount_controller.js\": 4097,\n\t\"./draggable_controller.js\": 8627,\n\t\"./dropdown_controller.js\": 1826,\n\t\"./dynamic_value_from_input_controller.js\": 1938,\n\t\"./element_controller.js\": 2396,\n\t\"./enable_on_event_controller.js\": 4443,\n\t\"./filter_controller.js\": 9455,\n\t\"./flatpickr_controller.js\": 864,\n\t\"./fulfills_controller.js\": 7163,\n\t\"./hello_controller.js\": 6155,\n\t\"./helpscout_beacon_controller.js\": 8231,\n\t\"./highlight_controller.js\": 4096,\n\t\"./hovercard_controller.js\": 7734,\n\t\"./integrations/accounting_customers_controller.js\": 2388,\n\t\"./integrations/commerce_orders_controller.js\": 8010,\n\t\"./integrations/commerce_variants_controller.js\": 7079,\n\t\"./justifi_credit_card_form_controller.js\": 9228,\n\t\"./line_items_controller.js\": 7934,\n\t\"./load_controller.js\": 1608,\n\t\"./modal_controller.js\": 7654,\n\t\"./nested_form_controller.js\": 8769,\n\t\"./number_field_controller.js\": 7695,\n\t\"./operation_tasks_controller.js\": 1726,\n\t\"./order_controller.js\": 3521,\n\t\"./paste_controller.js\": 1641,\n\t\"./phone_format_controller.js\": 6936,\n\t\"./plaid_controller.js\": 5507,\n\t\"./plans_controller.js\": 8446,\n\t\"./portal_other_product_controller.js\": 2968,\n\t\"./price_levels_controller.js\": 3924,\n\t\"./price_reloader_controller.js\": 4987,\n\t\"./print_controller.js\": 5852,\n\t\"./product_price_controller.js\": 9306,\n\t\"./products_controller.js\": 5441,\n\t\"./query_controller.js\": 3323,\n\t\"./radio_button_toggle_controller.js\": 2249,\n\t\"./roaster_pay_hosted_onboarding_controller.js\": 5868,\n\t\"./roasts_controller.js\": 2972,\n\t\"./rutter_controller.js\": 9785,\n\t\"./sales_call_list_controller.js\": 2584,\n\t\"./scroll_banner_controller.js\": 398,\n\t\"./search_params_controller.js\": 1953,\n\t\"./selectable_controller.js\": 1122,\n\t\"./shopify_variant_controller.js\": 877,\n\t\"./simple_math_controller.js\": 7537,\n\t\"./single_tippy_controller.js\": 2025,\n\t\"./stripe_controller.js\": 2254,\n\t\"./switchable_controller.js\": 632,\n\t\"./toggle_controller.js\": 5467,\n\t\"./tom_select_controller.js\": 4771,\n\t\"./transaction_form_controller.js\": 2854,\n\t\"./variant_price_controller.js\": 5878,\n\t\"./video_controller.js\": 3901,\n\t\"controllers/able_controller.js\": 2593,\n\t\"controllers/address_controller.js\": 8151,\n\t\"controllers/aggregated_demand_controller.js\": 2253,\n\t\"controllers/application_controller.js\": 2605,\n\t\"controllers/auto_select_controller.js\": 7200,\n\t\"controllers/batch_controller.js\": 5174,\n\t\"controllers/button_toggle_controller.js\": 4645,\n\t\"controllers/cableready/demand_controller.js\": 4265,\n\t\"controllers/cableready/demand_indicator_controller.js\": 4350,\n\t\"controllers/cableready/fulfill_controller.js\": 4082,\n\t\"controllers/cableready/inventory_count_controller.js\": 5168,\n\t\"controllers/cableready/online_controller.js\": 1537,\n\t\"controllers/cableready/operation_task_controller.js\": 9762,\n\t\"controllers/cableready/refresh_controller.js\": 8751,\n\t\"controllers/chained_select_target_controller.js\": 9872,\n\t\"controllers/chained_selects_controller.js\": 2525,\n\t\"controllers/checkbox_switch_controller.js\": 4862,\n\t\"controllers/checkbox_toggle_controller.js\": 7226,\n\t\"controllers/class_toggle_controller.js\": 8164,\n\t\"controllers/clicker_controller.js\": 3744,\n\t\"controllers/clipboard_controller.js\": 6187,\n\t\"controllers/commerce_orders_controller.js\": 6424,\n\t\"controllers/contact_controller.js\": 8489,\n\t\"controllers/contact_email_controller.js\": 1549,\n\t\"controllers/content_loader_controller.js\": 9797,\n\t\"controllers/content_loader_from_selector_controller.js\": 1075,\n\t\"controllers/conversion_controller.js\": 195,\n\t\"controllers/copy_controller.js\": 6348,\n\t\"controllers/date_range_picker_controller.js\": 368,\n\t\"controllers/delivery_methods_controller.js\": 4546,\n\t\"controllers/demand_modal_controller.js\": 475,\n\t\"controllers/disable_button_controller.js\": 5171,\n\t\"controllers/discount_controller.js\": 4097,\n\t\"controllers/draggable_controller.js\": 8627,\n\t\"controllers/dropdown_controller.js\": 1826,\n\t\"controllers/dynamic_value_from_input_controller.js\": 1938,\n\t\"controllers/element_controller.js\": 2396,\n\t\"controllers/enable_on_event_controller.js\": 4443,\n\t\"controllers/filter_controller.js\": 9455,\n\t\"controllers/flatpickr_controller.js\": 864,\n\t\"controllers/fulfills_controller.js\": 7163,\n\t\"controllers/hello_controller.js\": 6155,\n\t\"controllers/helpscout_beacon_controller.js\": 8231,\n\t\"controllers/highlight_controller.js\": 4096,\n\t\"controllers/hovercard_controller.js\": 7734,\n\t\"controllers/integrations/accounting_customers_controller.js\": 2388,\n\t\"controllers/integrations/commerce_orders_controller.js\": 8010,\n\t\"controllers/integrations/commerce_variants_controller.js\": 7079,\n\t\"controllers/justifi_credit_card_form_controller.js\": 9228,\n\t\"controllers/line_items_controller.js\": 7934,\n\t\"controllers/load_controller.js\": 1608,\n\t\"controllers/modal_controller.js\": 7654,\n\t\"controllers/nested_form_controller.js\": 8769,\n\t\"controllers/number_field_controller.js\": 7695,\n\t\"controllers/operation_tasks_controller.js\": 1726,\n\t\"controllers/order_controller.js\": 3521,\n\t\"controllers/paste_controller.js\": 1641,\n\t\"controllers/phone_format_controller.js\": 6936,\n\t\"controllers/plaid_controller.js\": 5507,\n\t\"controllers/plans_controller.js\": 8446,\n\t\"controllers/portal_other_product_controller.js\": 2968,\n\t\"controllers/price_levels_controller.js\": 3924,\n\t\"controllers/price_reloader_controller.js\": 4987,\n\t\"controllers/print_controller.js\": 5852,\n\t\"controllers/product_price_controller.js\": 9306,\n\t\"controllers/products_controller.js\": 5441,\n\t\"controllers/query_controller.js\": 3323,\n\t\"controllers/radio_button_toggle_controller.js\": 2249,\n\t\"controllers/roaster_pay_hosted_onboarding_controller.js\": 5868,\n\t\"controllers/roasts_controller.js\": 2972,\n\t\"controllers/rutter_controller.js\": 9785,\n\t\"controllers/sales_call_list_controller.js\": 2584,\n\t\"controllers/scroll_banner_controller.js\": 398,\n\t\"controllers/search_params_controller.js\": 1953,\n\t\"controllers/selectable_controller.js\": 1122,\n\t\"controllers/shopify_variant_controller.js\": 877,\n\t\"controllers/simple_math_controller.js\": 7537,\n\t\"controllers/single_tippy_controller.js\": 2025,\n\t\"controllers/stripe_controller.js\": 2254,\n\t\"controllers/switchable_controller.js\": 632,\n\t\"controllers/toggle_controller.js\": 5467,\n\t\"controllers/tom_select_controller.js\": 4771,\n\t\"controllers/transaction_form_controller.js\": 2854,\n\t\"controllers/variant_price_controller.js\": 5878,\n\t\"controllers/video_controller.js\": 3901\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;","// Action Cable provides the framework to deal with WebSockets in Rails.\n// You can generate new channels where WebSocket features live using the `rails generate channel` command.\n\nimport { createConsumer } from '@rails/actioncable'\n\nexport default createConsumer()","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","import consumer from './consumer'\n\nconst messagesContainer = document.getElementById(\"messagesContainer\")\nif (messagesContainer) {\n consumer.subscriptions.create({ channel: 'TestChannel', id: \"1\" }, {\n received (data) {\n messagesContainer.insertAdjacentHTML('beforeend', data)\n }\n })\n}\n","import { Controller } from \"stimulus\";\n\nconst DISABLED_BG = 'tw-bg-gray-100';\nconst ENABLED_BG = 'tw-white';\nconst ENABLED_TEXT = 'tw-text-teal-900';\nconst DISABLED_TEXT = 'tw-text-zinc-400'; \n\nexport default class extends Controller {\n static targets = [\n 'form',\n 'text',\n ]\n\n addCss(options) {\n this.formTargets.forEach(element => {\n if (element.dataset.disabled === 'true') {return}\n element.classList.add(options.bgColor);\n })\n }\n\n removeCss(options) {\n this.formTargets.forEach(element => {\n if (element.dataset.disabled === 'true') {return}\n element.classList.remove(options.bgColor);\n })\n }\n\n toggle() {\n if (this.hasFormTarget) {\n this.formTargets.forEach(element => {\n if (element.dataset.disabled === 'true') {return}\n if (element.dataset.tomSelectTarget == 'select') {\n element.disabled ? element.tomselect.enable() : element.tomselect.disable()\n } else {\n if (element.disabled) {\n this.removeCss({\n bgColor: DISABLED_BG,\n textColor: DISABLED_TEXT\n });\n this.addCss({\n bgColor: ENABLED_BG,\n textColor: ENABLED_TEXT\n });\n element.disabled = !element.disabled\n } else {\n this.removeCss({\n bgColor: ENABLED_BG,\n textColor: ENABLED_TEXT\n });\n this.addCss({\n bgColor: DISABLED_BG,\n textColor: DISABLED_TEXT\n });\n\n element.disabled = !element.disabled\n }\n }\n })\n } else {\n console.log('no element targets')\n }\n if (this.hasTextTarget) {\n this.textTargets.forEach(element => {\n element.classList.toggle('tw-opacity-50');\n })\n }\n }\n\n // Private\n\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['country', 'province'];\n static outlets = ['tom-select'];\n\n setCountryInProvince() {\n const provinceDropdown = this.provinceTarget.tomselect;\n\n provinceDropdown.clear();\n provinceDropdown.clearOptions();\n const remoteLoad = this.tomSelectOutlet.remoteLoad('/searches/provinces/', {\"country\": this.countryTarget.value});\n provinceDropdown.settings.load = remoteLoad['load'];\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['container', 'checkbox', 'errorContent']\n\n connect() {\n this.placeholder = this.containerTarget.innerHTML;\n this.calculate()\n }\n\n calculate() {\n this.containerTarget.insertAdjacentHTML('afterbegin','')\n setTimeout(() => {\n this.refreshOrShowPlaceholder()\n }, 5)\n }\n\n // private\n\n refreshOrShowPlaceholder() {\n let query_string = this.getQueryString()\n if (query_string.length > 0) {\n this.fetchHTML(query_string);\n } else {\n this.containerTarget.innerHTML = this.placeholder;\n }\n }\n\n getQueryString() {\n let query_string = \"\"\n this.checkboxTargets.forEach((e, i) => {\n if (e.checked == true) {\n query_string += '&order_ids%5B%5D=' + e.value\n }\n })\n return query_string.slice(1)\n }\n\n fetchHTML(query_string) {\n fetch(\"/demands?\" + query_string)\n .then(response => {\n if (response.ok) {\n response.blob()\n .then(response => response.text())\n .then(html => { this.containerTarget.innerHTML = html })\n } else {\n this.showError();\n }\n })\n .catch(_error => {\n this.showError();\n })\n }\n\n showError() {\n this.containerTarget.innerHTML = this.errorContentTarget.innerHTML;\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n // Use outlets API once Stimulus 3.2 is released\n // https://github.com/hotwired/stimulus/pull/576\n controllerForElement(controller, element) {\n return this.application.getControllerForElementAndIdentifier(element, controller)\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n connect() {\n if (this.element.tagName == \"SELECT\") {\n this.element.querySelector(\"option:not([value=''])\")?.\n setAttribute('selected', true)\n\n // Safari hack to ensure that the first option is selected\n let selectedValue = this.element.querySelector(\"option:not([value=''])\")?.value\n this.element.value = selectedValue\n\n this.element.dispatchEvent(new Event(\"change\"))\n }\n }\n}","import { Controller } from \"stimulus\";\nexport default class extends Controller {\n static outlets = [\n 'checkbox-switch'\n ]\n\n toggle_checkbox_switches(event) {\n if (this.hasCheckboxSwitchOutlet) {\n this.checkboxSwitchOutlets.forEach(outlet => {\n outlet.switchTarget.checked = !outlet.switchTarget.checked\n outlet.toggle(event)\n })\n }\n }\n\n // Private\n\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['button']\n static values = { open: Boolean }\n\n connect() {\n this.toggleClass = this.data.get('class') || 'hidden'\n }\n\n toggle(event) {\n event.preventDefault()\n\n this.openValue = !this.openValue\n }\n\n hide(event) {\n event.preventDefault();\n\n this.openValue = false;\n }\n\n show(event) {\n event.preventDefault();\n\n this.openValue = true;\n }\n\n openValueChanged() {\n if (!this.toggleClass) { return }\n\n this.buttonTargets.forEach(target => {\n target.classList.toggle(this.toggleClass)\n })\n }\n}","import ApplicationController from '../application_controller';\nimport CableReady from 'cable_ready'\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n console.log(\"DemandController\")\n consumer.subscriptions.create(\n {\n channel: \"DemandChannel\",\n demandable_date: this.element.dataset.demandableDate,\n account_id: this.element.dataset.accountId\n },\n {\n connected () {\n console.log(\"DemandChannel Connected\")\n },\n received (data) {\n console.log(\"Inside DemandChannel#received\")\n if (data.cableReady) CableReady.perform(data.operations)\n }\n })\n }\n}\n","import ApplicationController from '../application_controller';\nimport CableReady from 'cable_ready'\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n consumer.subscriptions.create(\n {\n channel: \"DemandIndicatorChannel\",\n task: this.element.dataset.task,\n account_id: this.element.dataset.accountId\n },\n {\n connected () {\n },\n received (data) {\n if (data.cableReady) CableReady.perform(data.operations)\n }\n })\n }\n}\n","import ApplicationController from '../application_controller';\nimport CableReady from 'cable_ready'\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n consumer.subscriptions.create(\n {\n channel: \"FulfillChannel\",\n resource_id: this.element.dataset.resourceId,\n resource_type: this.element.dataset.resourceType,\n },\n {\n received (data) {\n if (data.cableReady) CableReady.perform(data.operations)\n }\n })\n }\n}\n","import ApplicationController from '../application_controller';\nimport CableReady from 'cable_ready'\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n consumer.subscriptions.create(\n {\n channel: \"InventoryCountChannel\",\n inventory_count_id: this.element.dataset.inventoryCountId\n },\n {\n connected () {\n console.log(\"OperationTaskChannel Connected\")\n },\n received (data) {\n console.log(\"Inside InventoryCountController#received\")\n if (data.cableReady) CableReady.perform(data.operations)\n }\n })\n }\n}","import ApplicationController from '../application_controller';\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n consumer.subscriptions.create(\n {\n channel: \"OnlineChannel\",\n controller_name: this.element.dataset.contName,\n action_name: this.element.dataset.actionName,\n },\n {\n connected () {\n console.log(\"OnlineChannel Connected\")\n },\n received (data) {\n console.log(\"Inside OnlineChannel#received\")\n const container = document.getElementById(\"online_users\")\n const user_target = `user_${userId}`\n container.innerHTML = data.html;\n document.getElementById(user_target).remove()\n }\n })\n const userId = this.element.dataset.userId\n }\n}\n","import ApplicationController from '../application_controller';\nimport CableReady from 'cable_ready'\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n console.log(\"Hello Nested controller\")\n consumer.subscriptions.create(\n {\n channel: \"OperationTaskChannel\",\n task_name: this.element.dataset.taskName,\n account_id: this.element.dataset.accountId\n },\n {\n connected () {\n console.log(\"OperationTaskChannel Connected\")\n },\n received (data) {\n console.log(\"Inside #received\")\n if (data.cableReady) CableReady.perform(data.operations)\n }\n })\n }\n}\n","import ApplicationController from '../application_controller';\nimport CableReady from 'cable_ready'\nimport consumer from '../../channels/consumer'\n\nexport default class extends ApplicationController {\n connect() {\n consumer.subscriptions.create(\n {\n channel: \"RefreshChannel\",\n page_identifier: this.element.dataset.pageIdentifier,\n account_id: this.element.dataset.accountId,\n },\n {\n connected () {\n },\n received (data) {\n if (data.cableReady) {\n CableReady.perform(data.operations);\n }\n }\n }\n )\n }\n}\n","import ApplicationController from './application_controller'\n\nexport default class extends ApplicationController {\n\n static values = {\n sourceId: String,\n optionSelector: String\n }\n\n connect() {\n this.sourceController =\n super.controllerForElement(\n \"chained-selects\",\n document.querySelector(`select#${this.sourceIdValue}`)\n )\n\n this.sourceController.chainTo(this)\n }\n\n showOptions(value) {\n this.hideAllOptions()\n\n let selector = this.optionSelectorValue.replace(/{value}/, value)\n let options = this.element.querySelectorAll(`option${selector}`)\n\n options.forEach((option) => {\n option.hidden = false\n option.removeAttribute('disabled')\n })\n\n this.autoSelect(options[0])\n }\n\n // PRIVATE\n\n hideAllOptions() {\n this.allOptions.forEach((option) => {\n option.hidden = true\n option.setAttribute('hidden', '')\n option.setAttribute('disabled', 'disabled')\n })\n\n this.element.selectedIndex = 0\n }\n\n autoSelect(option) {\n this.element.selectedIndex = option.index\n this.element.dispatchEvent(new Event(\"change\"))\n }\n\n get allOptions() {\n return this.element.querySelectorAll(\"option\")\n }\n}","import ApplicationController from './application_controller'\n\nexport default class extends ApplicationController {\n\n chainTo(controller) {\n this.chainedController = controller\n this.updateChainedOptions()\n }\n\n updateChainedOptions() {\n this.chainedController.showOptions(this.element.value)\n }\n}","import { Controller } from 'stimulus'\n\nconst easeInStage = ['tw-opacity-100', 'tw-ease-in', 'tw-duration-100'];\nconst easeOutStage = ['tw-opacity-0', 'tw-ease-out', 'tw-duration-100'];\nconst DISABLED_BG = 'tw-bg-gray-200';\nconst ENABLED_BG = 'tw-bg-teal-300';\nconst TRANSLATE_X_0 = 'tw-translate-x-0';\nconst TRANSLATE_X_5 = 'tw-translate-x-5'; \n\nexport default class extends Controller {\n static targets = [\n 'background',\n 'switch',\n 'slider',\n 'disableIcon',\n 'enableIcon',\n 'spinner',\n 'success',\n 'error'\n ]\n\n static outlets = [\n 'toggle',\n 'able'\n ]\n\n addCss(options) {\n this.backgroundTarget.classList.add(options.bgColor);\n this.sliderTarget.classList.add(options.translateX);\n this.disableIconTarget.classList.add(...options.crossIconAnimation);\n this.enableIconTarget.classList.add(...options.checkedIconAnimation);\n }\n\n removeCss(options) {\n this.backgroundTarget.classList.remove(options.bgColor);\n this.sliderTarget.classList.remove(options.translateX);\n this.disableIconTarget.classList.remove(...options.crossIconAnimation);\n this.enableIconTarget.classList.remove(...options.checkedIconAnimation);\n }\n\n toggle(event) {\n if (this.hasAbleOutlet) {\n this.ableOutlets.forEach(outlet => {\n outlet.toggle()\n })\n }\n this.spinnerTarget.classList.remove('tw-hidden');\n\n if (this.switchTarget.checked && this.switchTarget.dataset.params) {\n if (this.url) {\n this.sync(this.url, 'POST', this.switchTarget.checked, this.params)\n } else {\n this.spinnerTarget.classList.add('tw-hidden');\n }\n this.enableSwitch()\n } else if (this.switchTarget.checked) {\n if (this.url) {\n this.sync(this.url, 'PATCH', this.switchTarget.checked, this.params)\n } else {\n this.spinnerTarget.classList.add('tw-hidden');\n }\n this.enableSwitch()\n } else if (this.switchTarget.dataset.params) {\n this.disableSwitch()\n if (this.url) {\n this.sync(this.url, 'DELETE', this.switchTarget.checked, this.params)\n } else {\n this.spinnerTarget.classList.add('tw-hidden');\n }\n } else {\n this.disableSwitch()\n if (this.url) {\n this.sync(this.url, 'PATCH', this.switchTarget.checked, this.params)\n } else {\n this.spinnerTarget.classList.add('tw-hidden');\n }\n }\n if (this.hasToggleOutlet) {\n console.log('has toggle outlet', this.toggleOutlets)\n this.toggleOutlet.toggle(event)\n }\n }\n\n sync(url, method, state, params) {\n fetch(url, {\n method: method,\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: this.switchTarget.dataset.params ? params : JSON.stringify(params)\n })\n .then(response => {\n if (response.ok) {\n setTimeout(() => {\n this.spinnerTarget.classList.add('tw-hidden');\n this.showSuccess();\n }, 250);\n } else {\n setTimeout(() => {\n this.spinnerTarget.classList.add('tw-hidden');\n this.showError();\n this.revertState(state);\n }, 250);\n }\n })\n .catch(_error => {\n this.showError();\n }) \n }\n\n enableSwitch() {\n this.removeCss({\n bgColor: DISABLED_BG,\n translateX: TRANSLATE_X_0,\n crossIconAnimation: easeInStage,\n checkedIconAnimation: easeOutStage,\n });\n this.addCss({\n bgColor: ENABLED_BG,\n translateX: TRANSLATE_X_5,\n crossIconAnimation: easeOutStage,\n checkedIconAnimation: easeInStage,\n });\n }\n\n disableSwitch() {\n this.removeCss({\n bgColor: ENABLED_BG,\n translateX: TRANSLATE_X_5,\n crossIconAnimation: easeOutStage,\n checkedIconAnimation: easeInStage,\n });\n this.addCss({\n bgColor: 'tw-bg-gray-200',\n translateX: 'tw-translate-x-0',\n crossIconAnimation: easeInStage,\n checkedIconAnimation: easeOutStage,\n });\n }\n\n revertState(state) {\n if (state == true) {\n this.disableSwitch()\n this.switchTarget.checked = false\n } else {\n this.enableSwitch()\n this.switchTarget.checked = true\n }\n }\n\n toggleOnly() {\n this.revertState(this.switchTarget.checked)\n }\n\n get params() {\n let data = {}\n data[this.switchTarget.dataset.object] = {\n [this.switchTarget.dataset.attribute]: this.switchTarget.checked\n }\n \n return this.switchTarget.dataset.params ? this.switchTarget.dataset.params : data;\n }\n\n get attribute() {\n return this.switchTarget.dataset.attribute\n }\n\n showError() {\n this.errorTarget.classList.remove('tw-hidden');\n setTimeout(() => {\n this.errorTarget.classList.add('tw-hidden');\n }, 950);\n }\n\n showSuccess() {\n this.successTarget.classList.remove('tw-hidden');\n setTimeout(() => {\n this.successTarget.classList.add('tw-hidden');\n }, 950);\n }\n\n get url() {\n return this.switchTarget.dataset.url\n }\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['toggleable']\n static values = { open: Boolean }\n\n connect() {\n this.toggleClass = this.data.get('class') || 'hidden'\n }\n\n toggle(event) {\n event.preventDefault()\n\n if (event.target.type == 'checkbox') {\n this.openValue = event.target.checked\n } else {\n this.openValue = !this.openValue\n }\n }\n\n hide(event) {\n event.preventDefault();\n\n this.openValue = false;\n }\n\n show(event) {\n event.preventDefault();\n\n this.openValue = true;\n }\n\n openValueChanged() {\n if (!this.toggleClass) { return }\n\n this.toggleableTargets.forEach(target => {\n if (this.openValue) {\n target.classList.add(this.toggleClass)\n } else {\n target.classList.remove(this.toggleClass)\n }\n })\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = {\n condition: Boolean,\n delay: Number,\n intersection: Boolean,\n clearOnDisconnect: Boolean\n }\n\n connect() {\n if (this.hasConditionValue && this.conditionValue) {\n this.timeout = setTimeout(() => { this.click(); }, this.delay)\n }\n if (this.hasIntersectionValue && this.intersectionValue) {\n this.timeout = setTimeout(() => { this.lazyClick(); }, this.delay)\n }\n }\n\n disconnect() {\n if (this.timeout && this.hasClearOnDisconnectValue && this.clearOnDisconnectValue) {\n clearTimeout(this.timeout);\n }\n }\n\n click() {\n this.element.click()\n }\n\n lazyClick () {\n const options = {\n threshold: 1,\n rootMargin: '0px'\n }\n\n const observer = new IntersectionObserver((entries, observer) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n this.element.click()\n observer.unobserve(entry.target)\n }\n })\n }, options)\n\n observer.observe(this.element)\n }\n\n // private\n\n get delay() {\n return this.hasDelayValue ? this.delayValue : 300\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = [\"link\"]\n\n copy() {\n const url = this.linkTarget.href;\n navigator.clipboard.writeText(url).then(() => {\n this.element.querySelector('#send-link-button').textContent = \"Link Copied\";\n })\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['order', 'selected'];\n\n async importSelected(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n\n await fetch('/commerce/orders/import', {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'order_ids': OrderIds }),\n });\n }\n\n async checkImportability(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n\n await fetch(`/commerce/orders/importability_checks`, {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'order_ids': OrderIds }),\n });\n }\n\n toggle(event) {\n var id = event.target.closest('tr').getAttribute('data-id');\n var element = document.getElementById(`commerce-order-${id}-expandable`);\n if (element.hidden) {\n element.hidden = false;\n } else {\n element.hidden = true;\n }\n }\n\n importOrders(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n let id = document.getElementById(\"rutter_connection_id\").value;\n let url = `/integrations/commerce/${id}/setup/import_orders/import`;\n let redirectUrl = `/integrations/commerce/${id}/setup/summary`;\n\n fetch(url, {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'selected_order_ids': OrderIds }),\n });\n window.location.href = redirectUrl;\n }\n\n async updateImportStatus(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n const importStatus = event.target.closest('[data-import-status]').getAttribute('data-import-status');\n\n await fetch('/commerce/orders/import_statuses', {\n method: 'PATCH',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'order_ids': OrderIds, 'import_status': importStatus }),\n });\n }\n\n // private\n\n checkedOrderTargets() {\n return this.orderTargets.filter(order => order.querySelector('input').checked);\n }\n\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n form() {\n var $form = new Forms.Contacts('.contacts-index');\n $form.apply();\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = [\"contactSelect\", \"sendEmailButton\"]\n\n connect() {\n this.customerId = this.data.get(\"customerId\");\n }\n\n updateFormAction() {\n const contactId = this.contactSelectTarget.value;\n\n if (contactId) {\n this.sendEmailButtonTarget.classList.remove(\"tw-hidden\");\n this.sendEmailButtonTarget.setAttribute(\"formaction\", `/contacts/${contactId}/payment_method_emails?customer_id=${this.customerId}`);\n } else {\n this.sendEmailButtonTarget.classList.add(\"tw-hidden\");\n this.sendEmailButtonTarget.setAttribute(\"formaction\", \"#\");\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['container', 'errorContent']\n\n connect() {\n if (this.data.get('wait') != \"true\") {\n this.load()\n } else {\n this.lazyLoad()\n }\n }\n\n load() {\n this.abortPreviousFetchRequest()\n\n this.abortController = new AbortController()\n\n setTimeout(() => {\n this.fetchHTML()\n }, 5)\n }\n\n fetchHTML() {\n fetch(this.data.get(\"url\"))\n .then(response => {\n if (response.ok) {\n response.blob()\n .then(response => response.text())\n .then(html => { this.containerTarget.innerHTML = html })\n } else {\n this.showError();\n }\n })\n .catch(_error => {\n this.showError();\n })\n }\n\n lazyLoad () {\n const options = {\n threshold: this.lazyLoadingThresholdValue,\n rootMargin: this.lazyLoadingRootMarginValue || '0px'\n }\n\n const observer = new IntersectionObserver((entries, observer) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n this.load()\n observer.unobserve(entry.target)\n }\n })\n }, options)\n\n observer.observe(this.element)\n }\n\n // private\n\n showError() {\n this.containerTarget.innerHTML = this.errorNotification\n Honeybadger.notify('Content loader failed to load', this.data.get(\"url\"))\n }\n\n get errorNotification() {\n if (this.hasErrorContentsTarget) {\n return this.errorContentTarget.innerHTML\n }\n else {\n return 'Content could not be loaded.'\n }\n }\n\n abortPreviousFetchRequest() {\n if(this.abortController) {\n this.abortController.abort()\n console.log('Content loader aborted!')\n }\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['container']\n\n connect() {\n }\n\n load(event) {\n this.containerTarget.insertAdjacentHTML('afterbegin','')\n setTimeout(() => {\n const customerId = event.target.options[event.target.selectedIndex].value\n if (customerId) {\n let urlParams = \"\"\n urlParams = `?${this.data.get(\"param-key\")}=${customerId}`\n fetch(this.data.get(\"url\") + urlParams)\n .then(response => response.text())\n .then(html => {\n const parser = new DOMParser();\n\n // Parse the text\n const parsed_html = parser.parseFromString(html, \"text/html\");\n const content = parsed_html.querySelector('[data-content-loader-from-selector-target=\"container\"]');\n this.containerTarget.innerHTML = content.innerHTML;\n })\n } else {\n this.containerTarget.querySelector('.element-spinner').remove()\n }\n }, 5)\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['green', 'roast']\n static values = { ratio: Number }\n\n calculateGreen() {\n this.timeout = setTimeout(() => {\n this.displayGreenResult()\n }, this.delay)\n }\n\n displayGreenResult() {\n if (this.hasGreenTarget) {\n let result = (this.roastTarget.value*this.ratio).toFixed(4)\n console.log(\"Calculated green result:\", result)\n this.greenTarget.value = result\n }\n }\n\n calculateRoast() {\n this.timeout = setTimeout(() => {\n this.displayRoastResult()\n }, this.delay)\n }\n\n displayRoastResult() {\n if (this.hasRoastTarget) {\n let result = (this.greenTarget.value/this.ratio).toFixed(4)\n console.log(\"Calculated roast result:\", result)\n this.roastTarget.value = result\n }\n }\n\n get delay() {\n return 350\n }\n\n get ratio() {\n return this.ratioValue || 1\n }\n}","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = ['source', 'output']\n\n static values = {\n type: { type: Number, default: 0 },\n delay: { type: Number, default: 0 }\n }\n\n static outlets = [\n 'paste'\n ]\n\n clone(event) {\n if (this.hasPasteOutlet) {\n console.log(\"cloning\")\n this.pasteOutlets.forEach(paste => {\n let value = this.getContentValue(event)\n paste.update(paste.outputTarget, value)\n })\n } else {\n this.getContentValue(event)\n }\n }\n\n // Private\n\n getContentValue(event) {\n switch(this.typeValue) {\n case 0:\n // Copy source's value\n return this.sourceTarget.value\n case 1:\n // Copy the event's data-content-value\n return event.target.dataset.contentValue\n }\n }\n\n paste(event) {\n this.timeout = setTimeout(() => {\n this.pasting(event)\n }, this.delayValue)\n }\n\n pasting(event) {\n let contentValue = (this.hasUseTargetInputValue && this.useTargetInputValue) ?\n this.inputTarget.value :\n event.target.dataset.contentValue\n if (this.hasOutputTarget) {\n this.outputTargets.forEach(target => {\n target.value = contentValue\n\n const e = new Event(\"change\");\n target.dispatchEvent(e)\n })\n }\n }\n\n pasting_from_tom_select(event) {\n let contentValue = event.target.value\n if (this.hasOutputTarget) {\n this.outputTargets.forEach(target => {\n target.value = contentValue\n })\n }\n }\n\n selectAll(event) {\n event.target.select()\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['rangeSelect', 'startDate', 'endDate', 'startDiv', 'endDiv']\n\n connect() {\n this.toggleClass = this.data.get('class') || 'tw-invisible'\n this.showInputs()\n }\n\n setDates() {\n if (this.hasStartDateTarget && this.rangeSelectTarget.value != 'custom') {\n const date_array = JSON.parse(this.rangeSelectTarget.value)\n this.startDateTarget.value = date_array[0] || ''\n this.endDateTarget.value = date_array[1] || ''\n console.log(JSON.parse(this.rangeSelectTarget.value))\n console.log(this.rangeSelectTarget.value)\n }\n }\n\n showInputs() {\n if (this.rangeSelectTarget.value != 'custom') {\n this.startDivTarget.classList.add(this.toggleClass)\n this.endDivTarget.classList.add(this.toggleClass)\n } else {\n this.startDivTarget.classList.remove(this.toggleClass)\n this.endDivTarget.classList.remove(this.toggleClass)\n }\n }\n\n}","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['type', 'charge', 'rate', 'createShippingLabelCheckbox'];\n static values = { deliveryMethodTypes: Array };\n\n toggleFields() {\n const deliveryMethodType = this.getDeliveryMethodType(this.typeTarget.value);\n\n if (deliveryMethodType) {\n this.chargeTarget.disabled = !deliveryMethodType.charge_required;\n this.rateTarget.disabled = !deliveryMethodType.rate_required;\n this.createShippingLabelCheckboxTarget.disabled = deliveryMethodType.require_label;\n if (!this.typeTarget.disabled) this.createShippingLabelCheckboxTarget.checked = deliveryMethodType.require_label;\n } else {\n this.chargeTarget.disabled = true;\n this.rateTarget.disabled = true;\n this.createShippingLabelCheckboxTarget.disabled = true;\n this.createShippingLabelCheckboxTarget.checked = false;\n }\n }\n\n getDeliveryMethodType(selectedType) {\n return this.deliveryMethodTypesValue.find(deliveryMethodType => deliveryMethodType.klass_name === selectedType) || null;\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['modal']\n\n connect() {\n }\n\n open() {\n this.modalTarget.classList.add(\"in\");\n this.modalTarget.setAttribute(\"style\", \"display: block;\");\n document.body.classList.add(\"modal-open\");\n const backdrop = document.createElement('div');\n backdrop.classList.add('modal-backdrop', 'fade', 'in');\n document.body.appendChild(backdrop);\n }\n\n close() {\n this.modalTarget.removeAttribute(\"style\", \"display: block;\");\n this.modalTarget.classList.remove(\"in\");\n document.body.classList.remove(\"modal-open\");\n document.body.querySelector('.modal-backdrop').remove();\n this.modalTarget.querySelector(\".modal-body\").innerHTML = ''\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"button\"]\n\n enable() {\n this.buttonTarget.classList.remove(\"tw-invisible\")\n this.buttonTarget.removeAttribute('disabled')\n }\n\n toggle() {\n this.buttonTarget.classList.add(\"tw-invisible\")\n this.buttonTarget.setAttribute('disabled', 'disabled')\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['discountType', 'discountInputField'];\n static classes = ['hidden'];\n\n changeDiscountType() {\n this.hideDiscountTypeTargets();\n this.resetDiscountInputFieldValue();\n this.discountTypeElement.classList.remove(this.hiddenClass);\n }\n\n hideDiscountTypeTargets() {\n this.discountTypeTargets.forEach(target => target.classList.add(this.hiddenClass));\n }\n\n resetDiscountInputFieldValue() {\n this.discountInputFieldTargets.forEach(target => target.value = '');\n }\n\n get discountTypeElement() {\n return this.discountTypeTargets.find(element => element.id === event.target.dataset.discountTypeKind);\n }\n}\n","import { Controller } from \"stimulus\"\nimport Sortable from \"sortablejs\";\n// import { Sortable, MultiDrag, Swap, OnSpill, AutoScroll } from \"sortablejs\";\n\nexport default class extends Controller {\n\n static targets = ['date', 'group', 'index', 'display']\n\n static classes = [ \"handle\", \"draggable\", \"ghost\" ] \n\n static values = {\n type: String,\n page: Number,\n pagyOffset: Number,\n form: Boolean\n }\n\n connect() {\n this.sortable = Sortable.create(this.element, {\n ...(this.hasHandleClass && { handle: `.${this.handleClass}` }),\n ...(this.hasDraggableClass && { draggable: `.${this.draggableClass}` }),\n ...(this.hasGroupTarget && { group: 'group' }),\n ...(this.hasGhostClass && { ghostClass: `${this.ghostClass}` }),\n animation: 150,\n emptyInsertThreshold: 25,\n onEnd: this.persist.bind(this)\n })\n }\n\n // private\n\n persist(event) {\n\n if (this.hasIndexTarget) {\n var index = 0;\n this.indexTargets.forEach(indexTarget => {\n indexTarget.setAttribute('value', index)\n index += 1\n });\n var display_index = 1;\n this.displayTargets.forEach(displayTarget => {\n displayTarget.innerHTML = display_index\n display_index += 1\n });\n }\n\n if (this.hasTypeValue && this.typeValue == 'date') {\n const date = event.to.dataset.draggableDate;\n const resourceId = event.item.dataset.resourceId;\n const url = this.url.replace(\":id\", resourceId);\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"date\": date })\n });\n } else if (this.hasIndexTargets) {\n this.indexTargets.forEach(indexTarget => {\n indexTarget.setAttribute('value', this.calculatedIndex(event))\n });\n } else if (this.url) {\n const resourceId = event.item.dataset.resourceId;\n const url = this.url.replace(\":id\", resourceId);\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"index\": this.calculatedIndex(event) })\n });\n }\n }\n\n calculatedIndex(event) {\n let calculatedIndex = event.newIndex\n if (this.hasPageValue && this.hasPagyOffsetValue) {\n calculatedIndex = this.pagyOffsetValue + event.newIndex\n }\n console.log('calculatedIndex', calculatedIndex)\n return calculatedIndex\n }\n\n get url() {\n return this.data.get(\"url\");\n }\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['menu']\n\n connect() {\n this.toggleClass = this.data.get('class') || 'tw-hidden'\n }\n\n toggle() {\n this.menuTarget.classList.toggle(this.toggleClass)\n }\n\n open() {\n if (this.menuTarget.classList.contains(this.toggleClass)) {\n this.menuTarget.classList.remove(this.toggleClass)\n }\n }\n\n hide(event) {\n if (this.element.contains(event.target) === false && !this.menuTarget.classList.contains(this.toggleClass)) {\n this.menuTarget.classList.add(this.toggleClass)\n }\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['dateInput']\n\n connect() {\n console.log(\"Hello dynamicValueFromInput\")\n }\n\n change(event) {\n const value = event.target.value;\n if (this.hasDateInputTarget) {\n const offset = parseInt(this.dateInputTarget.dataset.offset) || 0;\n let date = new Date(value)\n let tz_offset = new Date(value).getTimezoneOffset()\n\n date.setMinutes(date.getMinutes() + tz_offset)\n date.setDate(date.getDate() + offset)\n\n var fp = this.dateInputTarget._flatpickr\n fp.setDate(date, \"M d Y\")\n\n let formattedDate = fp.formatDate(date, \"M d Y\")\n this.dateInputTarget.value = formattedDate\n }\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"click\" ]\n\n click() {\n this.clickTargets.forEach(target => target.click())\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static values = { target: String }\n\n connect() {\n this.element.style.setProperty(\"opacity\", 0.4)\n this.element.style.setProperty(\"pointer-events\", \"none\")\n }\n\n enable(event) {\n if (event.target.id == this.targetValue) {\n this.element.style.removeProperty(\"opacity\")\n this.element.style.removeProperty(\"pointer-events\")\n }\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"source\", \"filterable\", \"balance\" ]\n static values = { totalCount: Number, filteredCount: Number }\n static classes = [ \"filteredOut\" ]\n\n connect() {\n this.countFilterables();\n }\n\n filter(event) {\n if (event) { event.preventDefault(); }\n let lowerCaseFilterTerm = this.lowerCasedFilterTerm(event);\n let filteredOutCount = 0;\n this.filterableTargets.forEach((filterable) => {\n const keyMatched = filterable.dataset.filterKey.toLowerCase().includes( lowerCaseFilterTerm )\n filterable.classList.toggle(this.filterOutClass, !keyMatched )\n if (!keyMatched) { filteredOutCount +=1; }\n })\n this.filteredCountValue = this.totalCountValue - filteredOutCount;\n\n }\n\n filteredCountValueChanged() {\n if (this.hasBalanceTarget) {\n this.balanceTarget.innerText = `Showing ${this.filteredCountValue} of ${this.totalCountValue}`;\n }\n }\n\n // private\n\n countFilterables() {\n let filteredOutCount = 0;\n this.filterableTargets.forEach(filterable => {\n if (filterable.classList.contains(this.filterOutClass) ) {\n filteredOutCount += 1;\n }\n })\n this.totalCountValue = this.filterableTargets.length;\n this.filteredCountValue = this.totalCountValue - filteredOutCount\n }\n\n lowerCasedFilterTerm(event) {\n if (this.hasSourceTarget) {\n return this.sourceTarget.value.toLowerCase();\n } else if (event) {\n return event.target.value.toLowerCase();\n } else {\n console.log(\"You need to select a sourceTarget\")\n }\n }\n\n get filterOutClass() {\n return this.hasFilteredOutClass ? this.fiteredOutClass : 'tw-hidden'\n }\n\n}\n","import { Controller } from 'stimulus';\nimport flatpickr from 'flatpickr';\nexport default class extends Controller {\n\n static targets = ['input', 'rangeSelect', 'startDate', 'endDate']\n\n static values = {\n minDate: String\n }\n\n connect() {\n if (this.hasInputTarget) {\n this.fp = flatpickr(this.inputTarget, {\n dateFormat: \"M d Y\",\n ...(this.hasMinDateValue && { minDate: `${this.minDateValue}` })\n });\n }\n if (this.hasRangeSelectTarget) {\n console.log('rangeSelect', this.rangeSelectTarget.value)\n }\n }\n\n setDates() {\n if (this.hasRangeSelectTarget && this.hasStartDateTarget) {\n const date_array = JSON.parse(this.rangeSelectTarget.value)\n this.startDateTarget.value = date_array[0]\n console.log(obj[0])\n console.log(JSON.parse(this.rangeSelectTarget.value))\n console.log(Array.from(this.rangeSelectTarget.value))\n console.log(this.rangeSelectTarget.value)\n }\n }\n\n clear() {\n this.fp.clear()\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"item\", \"selected\", \"replacementContainer\", \"replaceable\"]\n\n update(event) {\n event.preventDefault();\n const url = event.currentTarget.dataset.url;\n event.currentTarget.innerHTML = this.replacementContainerTarget.innerHTML;\n fetch(url, { method: 'PUT', headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' }, body: JSON.stringify({}) })\n }\n\n updateGroup(event) {\n event.preventDefault();\n const resourceIds = this.itemTargets.map(element => element.dataset.resourceId);\n this.replaceableTargets.forEach(element => {\n if (element.dataset.fulfilled != 'true') {\n element.innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"resource_ids\": resourceIds, \"fulfill\": true })\n });\n }\n\n updateAll(event) {\n event.preventDefault();\n const url = event.currentTarget.dataset.url;\n fetch(url, { method: 'PUT', headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' }, body: JSON.stringify({}) })\n }\n\n markAllAsComplete(event) {\n event.preventDefault();\n const resourceIds = this.selectedTargets.map(element => element.dataset.resourceId)\n\n this.selectedTargets.forEach(element => {\n let domId = element.dataset.domId\n if (element.dataset.completed != 'true') {\n document.querySelector(`span#${domId}`).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"resource_ids\": resourceIds, \"fulfill\": true })\n });\n }\n\n markSelectedAsComplete(event) {\n event.preventDefault();\n const resourceIds = this.checkedSelectedTargets().map(element => element.dataset.resourceId)\n\n this.checkedSelectedTargets().forEach(element => {\n let domId = element.dataset.domId\n if (element.dataset.completed != 'true') {\n document.querySelector(`span#${domId}`).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"resource_ids\": resourceIds, \"fulfill\": true })\n });\n }\n\n markSelectedAsIncomplete(event) {\n event.preventDefault();\n const resourceIds = this.checkedSelectedTargets().map(element => element.dataset.resourceId)\n\n this.checkedSelectedTargets().forEach(element => {\n let domId = element.dataset.domId\n if (element.dataset.completed == 'true') {\n document.querySelector(`span#${domId}`).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"resource_ids\": resourceIds, \"fulfill\": false })\n });\n }\n\n // private\n\n checkedSelectedTargets() {\n return this.selectedTargets.filter(selected => selected.checked)\n }\n\n replaceableSpans() {\n return document.querySelectorAll()\n }\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n}\n","// Visit The Stimulus Handbook for more details \n// https://stimulusjs.org/handbook/introduction\n// \n// This example controller works with specially annotated HTML like:\n//\n//
\n//

\n//
\n\nimport { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n connect() {\n console.log('Hello, Stimulus!')\n }\n\n fail() {\n pepe.input()\n }\n\n failGracefully() {\n Honeybadger.notify(\"I'm reporting this gracefully\")\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n\n connect() {\n }\n\n feedback() {\n if (typeof Beacon != 'undefined') {\n Beacon('reset'); Beacon('toggle'); Beacon('prefill', { subject: \"Here's some feedback\" }); Beacon('navigate', '/ask/message/');\n }\n }\n\n message() {\n if (typeof Beacon != 'undefined') {\n Beacon('reset'); Beacon('toggle'); Beacon('navigate', '/ask/message/');\n }\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['highlightable']\n\n static classes = [ \"background\" ]\n\n connect() {\n if (this.hasHighlightableTarget && this.highlightableItem()) {\n this.highlight()\n this.highlightableItem().scrollIntoView()\n }\n }\n\n // private\n\n highlight() {\n this.highlightableItem().classList.add('tw-bg-teal-50')\n }\n\n highlightableItem() {\n return this.highlightableTargets.find(item => item.dataset.highlightDomId == this.domId)\n }\n\n get domId() {\n const queryString = window.location.search\n const urlParams = new URLSearchParams(queryString);\n return urlParams.get('highlight')\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"card\"];\n static values = { url: String, delay: Number };\n\n show() {\n const delay = this.delayValue || 0\n\n this.timeout = setTimeout(() => {\n this.showContent()\n }, delay)\n }\n\n showContent() {\n if (this.hasCardTarget) {\n this.cardTarget.classList.remove(\"hidden\");\n } else {\n fetch(this.urlValue)\n .then((r) => r.text())\n .then((html) => {\n const fragment = document\n .createRange()\n .createContextualFragment(html);\n\n this.element.appendChild(fragment);\n });\n }\n }\n\n hide() {\n clearTimeout(this.timeout);\n if (this.hasCardTarget) {\n this.cardTarget.classList.add(\"hidden\");\n }\n }\n\n disconnect() {\n if (this.hasCardTarget) {\n this.cardTarget.remove();\n }\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['customer', 'selected'];\n\n async create() {\n event.preventDefault();\n const customerIds = this.checkedCustomerTargets().map(element => element.dataset.id);\n const accountingId = this.element.getAttribute('data-accounting-id');\n await fetch(`/integrations/accounting/${accountingId}/customers/create_customer`, {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'customer_ids': customerIds }),\n });\n }\n\n checkedCustomerTargets() {\n return this.customerTargets.filter(order => order.querySelector('input').checked);\n }\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['order', 'selected'];\n\n async importSelected(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n const commerceID = this.element.getAttribute('data-commerce-id')\n\n await fetch(`/integrations/commerce/${commerceID}/orders/import`, {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'order_ids': OrderIds }),\n });\n }\n\n async checkImportability(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n\n await fetch(`/commerce/orders/importability_checks`, {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'order_ids': OrderIds }),\n });\n }\n\n async updateImportStatus(event) {\n event.preventDefault();\n const OrderIds = this.checkedOrderTargets().map(element => element.dataset.id);\n const importStatus = event.target.closest('[data-import-status]').getAttribute('data-import-status');\n const commerceID = this.element.getAttribute('data-commerce-id')\n\n await fetch(`/integrations/commerce/${commerceID}/orders/import_statuses`, {\n method: 'PATCH',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'order_ids': OrderIds, 'import_status': importStatus }),\n });\n }\n\n // private\n\n checkedOrderTargets() {\n return this.orderTargets.filter(order => order.querySelector('input').checked);\n }\n\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['variant', 'selected', 'type'];\n\n async skipSelected() {\n event.preventDefault();\n const VariantIds = this.checkedVariantTargets().map(element => element.dataset.id);\n const commerceID = this.element.getAttribute('data-commerce-id');\n const value = event.target.dataset.skip;\n\n await fetch(`/integrations/commerce/${commerceID}/variants/skips`, {\n method: 'PATCH',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ 'variant_ids': VariantIds, 'skip': value }),\n });\n }\n\n checkedVariantTargets() {\n return this.variantTargets.filter(order => order.querySelector('input').checked);\n }\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = [\n \"justifiCreditCardForm\",\n \"creditCardForm\",\n \"submitButton\"\n ];\n\n static values = {\n address: Object,\n accessToken: String,\n accountId: String,\n };\n\n submitPaymentMethod(event) {\n event.preventDefault();\n const submitButton = this.submitButtonTarget;\n\n const { addressValue: address, accessTokenValue: accessToken, accountIdValue: accountId } = this;\n\n const paymentMethodData = {\n address_line1: address.street_1,\n address_city: address.city,\n address_postal_code: address.postal_code,\n address_country: address.country_alpha2,\n };\n\n this.justifiCreditCardFormTarget\n .tokenize(accessToken, paymentMethodData, accountId)\n .then((data) => {\n submitButton.textContent = \"Creating...\";\n submitButton.disabled = true;\n if (data.error) {\n this.notifyError(data.error);\n } else {\n this.appendPaymentMethodId(data.id);\n this.creditCardFormTarget.submit();\n }\n });\n }\n\n /**\n * Handles error notifications.\n * @param {string} error - The error message to notify.\n */\n notifyError(error) {\n if (typeof Honeybadger === \"object\") {\n Honeybadger.notify(error);\n } else {\n console.warn(error);\n }\n }\n\n /**\n * Appends the payment method ID as a hidden input to the payment form.\n * @param {string} paymentMethodId - The ID of the payment method to append.\n */\n appendPaymentMethodId(paymentMethodId) {\n const hiddenInput = document.createElement(\"input\");\n hiddenInput.type = \"hidden\";\n hiddenInput.name = \"payment_method_id\";\n hiddenInput.value = paymentMethodId;\n this.creditCardFormTarget.appendChild(hiddenInput);\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['quantity', 'basePrice', 'discount', 'subtotal', 'isFulfilled', 'inventory', 'fulfilledQuantity']\n\n connect() {\n this.updateSubtotal()\n this.checkIsfulfilled()\n }\n\n updateSubtotal() {\n const num = this.quantity * this.basePrice - this.totalDiscount()\n this.subtotalTarget.value = (Math.round(num * 100) / 100).toFixed(2);\n }\n\n // private\n\n totalDiscount() {\n const discount = parseFloat(this.discountTarget.value || 0);\n if (this.discountTarget.value.indexOf('%') >= 0) {\n return this.quantity * this.basePrice * discount / 100\n } else {\n return this.quantity * discount\n }\n }\n\n checkIsfulfilled() {\n if (this.hasIsFulfilledTarget) {\n this.isFulfilledTarget.querySelectorAll('input').forEach(input => {\n if (this.fulfilledQuantity !== 0 && this.fulfilledQuantity >= this.quantity) {\n input.checked = true\n input.disabled = false\n } else if (this.inventoryCount - (this.quantity - this.fulfilledQuantity ) < 0) {\n input.checked = false\n input.disabled = true\n } else {\n input.disabled = false\n }\n })\n }\n }\n\n get quantity() {\n return parseFloat(this.quantityTarget.value || 0)\n }\n\n get basePrice() {\n return parseFloat(this.basePriceTarget.value || 0)\n }\n\n get inventoryCount() {\n return parseInt(this.inventoryTarget.innerHTML)\n }\n\n get fulfilledQuantity() {\n return parseFloat(this.fulfilledQuantityTarget.value || 0)\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n\n connect() {\n document.addEventListener(\"turbo:before-fetch-request\", (event) => {\n const ignoreLoading = event.target.dataset.ignoreLoading;\n if (ignoreLoading !== \"true\") {\n event.target.classList.add(\"tw-opacity-25\");\n }\n });\n\n document.addEventListener(\"turbo:frame-render\", async (event) => {\n event.target.classList.remove(\"tw-opacity-25\")\n })\n }\n}\n","import { Controller } from 'stimulus';\nimport {enter, leave} from 'el-transition';\nexport default class extends Controller {\n static targets = ['container', 'background', 'frame', 'loader'];\n\n submit(e) {\n if (e.detail.success) {\n this.close(e, true);\n }\n }\n\n open() {\n // Unhide the background\n enter(this.backgroundTarget)\n\n // Unhide the modal\n enter(this.containerTarget)\n // this.containerTarget.classList.remove(\"tw-hidden\");\n }\n\n close(e, isSubmitAction = false) {\n if (e) {\n e.preventDefault();\n }\n\n // Check if transitioning, skip full close logic\n if (isSubmitAction && this.hasFrameTarget && this.frameTarget.hasAttribute('data-transitioning')) {\n this.frameTarget.removeAttribute('data-transitioning');\n return;\n }\n\n // Hide the modal\n leave(this.containerTarget)\n this.frameTarget.removeChild(this.frameTarget.firstElementChild)\n\n // Remove the background\n leave(this.backgroundTarget)\n }\n\n closeBackground(e) {\n if (e.target === this.backgroundTarget) {\n this.close(e);\n }\n }\n\n closeWithKeyboard(e) {\n if (e.keyCode === 27 && !this.containerTarget.classList.contains(\"tw-hidden\")) {\n this.close(e);\n }\n }\n\n replaceContent() {\n if (this.hasFrameTarget) {\n this.frameTarget.setAttribute('data-transitioning', 'true');\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"template\", \"destination\" ]\n static values = {\n wrapperSelector: {\n type: String,\n default: '.nested-form-wrapper'\n }\n }\n\n add(event) {\n event.preventDefault();\n const content = this.templateTarget.innerHTML.replace( /TEMPLATE_RECORD_INDEX/g, new Date().valueOf() );\n this.destinationTarget.insertAdjacentHTML('beforeend', content);\n\n }\n\n reset() {\n const wrapper = event.target.closest(this.wrapperSelectorValue)\n const input = wrapper.querySelector(\"input[name*='_destroy']\");\n input.value = '1';\n\n wrapper.style.display = 'none';\n\n const template = this.templateTarget.innerHTML.replace( /TEMPLATE_RECORD_INDEX/g, new Date().valueOf() );\n wrapper.insertAdjacentHTML('afterend', template);\n }\n\n remove(event) {\n event.preventDefault()\n\n // @ts-ignore\n const wrapper = event.target.closest(this.wrapperSelectorValue)\n\n if (wrapper.dataset.newRecord === 'true') {\n wrapper.remove()\n } else {\n wrapper.style.display = 'none'\n\n const input = wrapper.querySelector(\"input[name*='_destroy']\")\n input.value = '1'\n }\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = [ \"input\" ]\n\n connect() {\n this.inputTarget.style.appearance = \"textfield\"\n }\n\n increment() {\n this.inputTarget.value = this.currentIntegerValue + 1\n }\n\n decrement() {\n let decrementedValue = this.currentIntegerValue - 1\n this.inputTarget.value = Math.max(0, decrementedValue)\n }\n\n get currentIntegerValue() {\n return parseInt(this.inputTarget.value)\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"task\", \"replacementContainer\", \"replaceable\", \"selected\"]\n\n markSelectedAsComplete(event) {\n event.preventDefault();\n const taskIds = this.checkedTaskTargets().map(element => element.dataset.taskId);\n this.checkedTaskTargets().forEach(element => {\n if (element.dataset.completed != 'true') {\n let domId = element.dataset.domId\n document.getElementById(domId).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"task_ids\": taskIds, \"completed\": true })\n });\n }\n\n markSelectedAsIncomplete(event) {\n event.preventDefault();\n const taskIds = this.checkedTaskTargets().map(element => element.dataset.taskId);\n this.checkedTaskTargets().forEach(element => {\n if (element.dataset.completed != 'false') {\n let domId = element.dataset.domId\n document.getElementById(domId).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"task_ids\": taskIds, \"completed\": false })\n });\n }\n\n markAllAsComplete(event) {\n event.preventDefault();\n const taskIds = this.taskTargets.map(element => element.dataset.taskId);\n this.taskTargets.forEach(element => {\n if (element.dataset.completed != 'true') {\n let domId = element.dataset.domId\n document.getElementById(domId).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"task_ids\": taskIds, \"completed\": true })\n });\n }\n\n\n destroySelected(event) {\n event.preventDefault();\n var response = confirm(event.currentTarget.dataset.confirm)\n if (response) {\n const taskIds = this.checkedTaskTargets().map(element => element.dataset.taskId);\n this.replaceableTargets.forEach(element => {\n if (element.dataset.completed != 'false') {\n element.innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'DELETE',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"task_ids\": taskIds })\n });\n } else {\n return\n }\n\n }\n\n // private\n\n checkedTaskTargets() {\n return this.taskTargets.filter(task => task.checked)\n }\n\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n\n toggle(event) {\n var id = event.target.closest('tr').getAttribute('data-id');\n var element = document.getElementById(`order-${id}-expandable`);\n\n element.classList.toggle('tw-hidden')\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = ['output']\n \n static values = { \n delay: Number, default: 0,\n }\n static outlets = [\n 'tom-select',\n 'conversion'\n ]\n\n update(element, value) {\n this.timeout = setTimeout(() => {\n this.updating(element, value)\n }, this.delayValue)\n }\n\n updating(element, value) {\n if (!element.disabled) {\n element.value = value\n if (element.tomselect) {\n element.tomselect.setValue(value)\n }\n }\n \n const e = new Event(\"change\");\n this.outputTarget.dispatchEvent(e)\n }\n\n // Private\n\n\n getContentValue(event) {\n switch(this.inputValue) {\n case 0:\n // Copy source's value\n return event.target.value\n case 1:\n // Copy the event's data-content-value\n return event.target.dataset.contentValue\n }\n }\n\n paste(event) {\n console.log('pasting!')\n console.log('getContentValue', this.getContentValue(event))\n this.timeout = setTimeout(() => {\n this.pasting(event)\n }, this.delayValue)\n }\n\n pasting(event) {\n let contentValue = (this.hasUseTargetInputValue && this.useTargetInputValue) ?\n this.inputTarget.value :\n event.target.dataset.contentValue\n if (this.hasOutputTarget) {\n console.log('has output target', this.outputTargets.length)\n console.log('contentValue', contentValue)\n this.outputTargets.forEach(target => {\n target.value = contentValue\n })\n }\n\n const e = new Event(\"change\");\n this.outputTarget.dispatchEvent(e)\n }\n\n pasting_from_tom_select(event) {\n let contentValue = event.target.value\n if (this.hasOutputTarget) {\n console.log('has output target', this.outputTargets.length)\n console.log('contentValue', contentValue)\n this.outputTargets.forEach(target => {\n target.value = contentValue\n })\n }\n }\n}\n","import { Controller } from \"stimulus\"\nimport intlTelInput from 'intl-tel-input';\n\nexport default class extends Controller {\n\n static targets = [ \"input\" ]\n\n connect() {\n this.inputable = intlTelInput(this.inputTarget, {\n utilsScript: \"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/utils.min.js\",\n hiddenInput: \"phone\",\n initialCountry: \"us\",\n preferredCountries: [\"us\", \"ca\"],\n separateDialCode: true,\n autoPlaceholder: \"aggressive\",\n nationalMode: false,\n formatOnDisplay: true \n }\n )\n }\n\n formatIntlTelInput() {\n var currentText = this.inputable.getNumber(intlTelInputUtils.numberFormat.E164);\n if (typeof currentText === 'string') { // sometimes the currentText is an object :)\n this.inputable.setNumber(currentText); // will autoformat because of formatOnDisplay=true\n }\n }\n}\n","/* global Turbo */\n\nimport { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n async create(event) {\n this.customerId = event.currentTarget.dataset.customerId;\n this.linkUrl = event.currentTarget.dataset.linkUrl;\n this.paymentMethodUrl = event.currentTarget.dataset.payment_methodUrl;\n\n const response = await fetch(this.linkUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": document.querySelector(\"[name='csrf-token']\").content\n },\n body: JSON.stringify({ customer_id: this.customerId }),\n })\n\n const { link_token } = await response.json()\n\n if (typeof Plaid !== 'undefined') {\n const handler = Plaid.create({\n token: link_token,\n onSuccess: this.handleSuccess.bind(this),\n onExit: this.handleExit.bind(this),\n });\n handler.open();\n } else {\n if (typeof Honeybadger === \"object\") {\n Honeybadger.notify(\"Plaid is not defined. Unable to create handler.\");\n }\n }\n }\n\n async handleSuccess(public_token, metadata) {\n const loader = document.getElementById('loader');\n loader.classList.remove('tw-hidden');\n\n try {\n const response = await fetch(this.paymentMethodUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('[name=\\'csrf-token\\']').content,\n },\n body: JSON.stringify({\n public_token: public_token,\n metadata: metadata,\n customer_id: this.customerId,\n }),\n });\n\n if (response.ok) {\n const result = await response.json();\n if (result && result.redirect_url) {\n Turbo.visit(result.redirect_url);\n }\n } else {\n throw new Error(`Server responded with ${response.status}`);\n }\n } catch (error) {\n if (typeof Honeybadger === \"object\") {\n Honeybadger.notify(error);\n }\n } finally {\n loader.classList.add('tw-hidden');\n }\n }\n\n handleExit() {\n // No action needed on exit\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['summaryTasksCount', 'summaryTasksDisplayValue', 'summaryTasksMeasure', 'demandable', 'tasksCount', 'tasksMeasure', 'outstanding', 'carryover', 'operationTask']\n \n connect() {\n console.log('Plans connected!')\n }\n\n operationTaskTargetConnected(target) {\n this.updateRow(target)\n this.updateSummary()\n }\n\n operationTaskTargetDisconnected(target) {\n this.updateRow(target)\n this.updateSummary()\n }\n\n updateRow(target) {\n let parentValue = parseFloat(this.findDemandableTarget(target).dataset.plansParent)\n let inventoryValue = parseFloat(this.findDemandableTarget(target).dataset.plansInventory)\n let incompleteTaskMeasure = parseFloat(this.calculateMeasure(this.filteredIncompleteOperationTaskTargets(target)))\n let outstanding = ((parentValue - inventoryValue - incompleteTaskMeasure)*this.findDemandableTarget(target).dataset.plansRatio).toFixed(2)\n let carryover = (inventoryValue + incompleteTaskMeasure - parentValue).toFixed(2)\n let calculatedOutsanding = Math.max(outstanding, 0)\n let calculatedCarryover = Math.max(carryover, 0)\n this.updateRowTasksCount(target)\n this.updateRowTasksMeasure(target)\n this.updateRowOutstanding(target, calculatedOutsanding)\n this.updateRowCarryover(target, calculatedCarryover)\n }\n\n // Update Summary\n\n updateSummary() {\n this.updateSummaryTasksCount()\n this.updateSummaryTasksMeasure()\n this.updateSummaryTasksDisplayValue()\n }\n\n updateSummaryTasksCount() {\n this.summaryTasksCountTarget.innerHTML = this.operationTaskTargets.length\n }\n\n updateSummaryTasksMeasure() {\n if (this.hasSummaryTasksMeasureTarget) {\n this.summaryTasksMeasureTarget.innerHTML = this.calculateMeasure(this.operationTaskTargets).toFixed(0)\n }\n }\n\n updateSummaryTasksDisplayValue() {\n if (this.hasSummaryTasksDisplayValueTarget) {\n this.summaryTasksDisplayValueTarget.innerHTML = this.calculateDisplayValue(this.operationTaskTargets).toFixed(0)\n }\n }\n\n // Update Row\n\n updateRowOutstanding(target, value) {\n this.findOutstandingTarget(target).innerHTML = value\n }\n\n updateRowCarryover(target, value) {\n this.findCarryoverTarget(target).innerHTML = value\n }\n\n updateRowTasksCount(target) {\n if (this.hasTasksCountTarget) {\n this.findTasksCountTarget(target).innerHTML = this.operationTaskTargets.filter(task => task.dataset.taskableId == target.dataset.taskableId).length\n }\n }\n\n updateRowTasksMeasure(target) {\n if (this.hasTasksMeasureTarget) {\n this.findTasksMeasureTarget(target).innerHTML = this.calculateMeasure(this.filteredOperationTaskTargets(target))\n }\n }\n\n // Calculators\n\n calculateDisplayValue(targets) {\n var totalSum = 0\n\n targets.forEach((target) => {\n totalSum += parseFloat(target.dataset.displayValue)\n })\n return totalSum\n }\n\n calculateMeasure(targets) {\n var totalSum = 0\n\n targets.forEach((target) => {\n totalSum += parseFloat(target.dataset.measure)\n })\n return totalSum\n }\n\n // Finders\n\n findOutstandingTarget(target) {\n return this.outstandingTargets.find(outstanding => outstanding.dataset.plansTaskableId == target.dataset.taskableId)\n }\n\n findCarryoverTarget(target) {\n return this.carryoverTargets.find(carryover => carryover.dataset.plansTaskableId == target.dataset.taskableId)\n }\n\n findDemandableTarget(target) {\n return this.demandableTargets.find(demandable => demandable.dataset.plansTaskableId == target.dataset.taskableId)\n }\n\n findTasksCountTarget(target) {\n return this.tasksCountTargets.find(task => target.dataset.taskableId == task.dataset.plansTaskableId)\n }\n\n findTasksMeasureTarget(target) {\n return this.tasksMeasureTargets.find(task => target.dataset.taskableId == task.dataset.plansTaskableId)\n }\n\n // Filters\n\n filteredOperationTaskTargets(target) {\n return this.operationTaskTargets.filter(task => task.dataset.taskableId == target.dataset.taskableId)\n }\n\n filteredIncompleteOperationTaskTargets(target) {\n return this.operationTaskTargets.filter(task => task.dataset.completed != 'true' && task.dataset.taskableId == target.dataset.taskableId)\n }\n}\n","import { Controller } from 'stimulus'\n\n// This controller is a direct port of the old\n// CoffeeScript logic.\n// https://github.com/roastertools/roastertools/blob/main/app/assets/javascripts/portal/pages/products/show.coffee\n// It's a very brittle way of achieving this use case.\n// Ideally, the client should send the selected options to the server\n// and ask it for the appropriate variant. Perhaps this can happen within a\n// Turbo Frame which is refreshed every time an option is selected.\n// That's a massive refactor, which is why I've replicated the logic for now.\n// This should be addressed sooner rather than later.\nexport default class extends Controller {\n static values = { targetId: String }\n static targets = [ \"select\" ]\n\n updateVariant() {\n let selectedOptions = this.selectTargets.map((select) => {\n return select.value\n }).sort().join(\", \")\n\n let variantSelect = document.getElementById(this.targetIdValue)\n variantSelect.querySelectorAll(\"option\").forEach((option) => {\n\n if (option.dataset.optionValueIds) {\n let valueIds = option.dataset.optionValueIds.toString().split(\", \").sort().join(\", \")\n\n if (selectedOptions == valueIds) {\n variantSelect.selectedIndex = option.index\n variantSelect.dispatchEvent(new Event('change'))\n }\n }\n })\n }\n}","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n setBasePrice(event) {\n const tomSelectInstance = event.target.tomselect;\n const selectedId = tomSelectInstance.items[0];\n const selectedItemData = tomSelectInstance.options[selectedId];\n\n if (selectedItemData) {\n const priceCents = `$${(selectedItemData.price_cents / 100.00).toFixed(2)}`;\n this.element.querySelector('.input.base-price input').value = priceCents;\n } else {\n console.error('Selected variant not found');\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['price', 'variant']\n\n connect() {}\n\n changeAll(event) {\n const customerId = event.target.value;\n if (customerId) {\n this.data.set(\"customerId\", customerId);\n this.variantTargets.forEach(data => {\n const variantSelect = data.querySelector(\".order_line_items_variant_id\");\n const variantId = variantSelect.value;\n const basePriceInput = data.querySelector(\".order_line_items_variant_price\").firstElementChild;\n if (variantId) {\n this.updatePrice(customerId, variantId, basePriceInput);\n }\n })\n }\n }\n\n change(event) {\n const customerId = this.data.get(\"customerId\");\n if (customerId) {\n const variantId = event.target.options[event.target.selectedIndex].value;\n const parentElement = event.target.parentNode.parentNode;\n const fulfillCheckbox = parentElement.querySelector(\".order_line_items_fulfill_checkbox\");\n const basePriceInput = parentElement.querySelector(\".order_line_items_variant_price\").firstElementChild;\n const inventoryElement = parentElement.querySelector(\".inventory\");\n if (variantId) {\n this.updatePrice(customerId, variantId, basePriceInput, inventoryElement, fulfillCheckbox);\n }\n }\n }\n\n // private\n\n updatePrice(customerId, variantId, basePriceInput, inventoryElement, fulfillCheckbox) {\n fetch(`/customers/${customerId}/variants/${variantId}`)\n .then(response => response.json())\n .then(json => {\n if (inventoryElement) {\n inventoryElement.innerHTML = json.available_inventory;\n }\n if (fulfillCheckbox) {\n fulfillCheckbox.checked = json.auto_fulfillable;\n fulfillCheckbox.disabled = false;\n }\n basePriceInput.value = json.price.toFixed(2);\n basePriceInput.dispatchEvent(new Event('change', { bubbles: true }));\n })\n .catch((error) => {\n console.log(error)\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n connect() {\n window.print();\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n connect() {\n this.updatePrice()\n }\n\n updatePrice() {\n let variantId = this.element.value\n\n // My preferred approach is to define the path in a value\n // or `data-` attribute and read it into the controller.\n // However, several `select`s on the same page use this\n // controller in the same way using the same path.\n // In the interest of de-duplication, I've hardcoded the path\n // in the controller.\n if (variantId) {\n let path = '/customer_variants/' + variantId\n\n this.productPriceFrame.setAttribute(\"src\", path)\n }\n }\n\n // This isn't ideal. Stimulus controllers shouldn't usually\n // muck about with elements outside its scope.\n // Replace with the Outlets API when Stimulus 3.2 is released:\n // https://github.com/hotwired/stimulus/pull/576\n get productPriceFrame() {\n return document.querySelector(\"turbo-frame#product_price\")\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"product\", \"selected\"]\n\n connect() {\n console.log(\"Hello Products\")\n console.log(\"product count:\", this.productTargets.length)\n }\n\n addToPortal(event) {\n event.preventDefault();\n const productIds = this.checkedProductTargets().map(element => element.dataset.productId);\n fetch('products/bulk/portal_availability', {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds })\n });\n }\n\n removeFromPortal(event) {\n event.preventDefault();\n const productIds = this.checkedProductTargets().map(element => element.dataset.productId);\n fetch('products/bulk/portal_availability', {\n method: 'DELETE',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds })\n });\n }\n\n deactivate(event) {\n event.preventDefault();\n const productIds = this.checkedProductTargets().map(element => element.dataset.productId);\n fetch('products/bulk/status', {\n method: 'DELETE',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds })\n });\n }\n\n activate(event) {\n event.preventDefault();\n const productIds = this.checkedProductTargets().map(element => element.dataset.productId);\n fetch('products/bulk/status', {\n method: 'POST',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds })\n });\n }\n\n markSelectedAsIncomplete(event) {\n event.preventDefault();\n const productIds = this.checkedProductTargets().map(element => element.dataset.productId);\n this.checkedProductTargets().forEach(element => {\n if (element.dataset.completed != 'false') {\n let domId = element.dataset.domId\n document.getElementById(domId).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds, \"completed\": false })\n });\n }\n\n markAllAsComplete(event) {\n event.preventDefault();\n const productIds = this.productTargets.map(element => element.dataset.productId);\n this.productTargets.forEach(element => {\n if (element.dataset.completed != 'true') {\n let domId = element.dataset.domId\n document.getElementById(domId).innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'PUT',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds, \"completed\": true })\n });\n }\n\n\n destroySelected(event) {\n event.preventDefault();\n var response = confirm(event.currentTarget.dataset.confirm)\n if (response) {\n const productIds = this.checkedProductTargets().map(element => element.dataset.productId);\n this.replaceableTargets.forEach(element => {\n if (element.dataset.completed != 'false') {\n element.innerHTML = this.replacementContainerTarget.innerHTML;\n }\n });\n const url = event.currentTarget.dataset.url;\n fetch(url, {\n method: 'DELETE',\n headers: { 'X-CSRF-Token': this.token, 'Content-Type': 'application/json' },\n body: JSON.stringify({ \"product_ids\": productIds })\n });\n } else {\n return\n }\n\n }\n\n // private\n\n checkedProductTargets() {\n return this.productTargets.filter(product => product.checked)\n }\n\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['input']\n\n connect() {\n this.setName()\n }\n\n setName() {\n if (this.hasInputTarget) {\n this.inputTargets.forEach(target => {\n if (target.value == '') {\n target.name = ''\n } else {\n target.name = target.id\n }\n })\n }\n }\n}","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['toggleable']\n static values = { open: Boolean }\n\n connect() {\n this.toggleClass = this.data.get('class') || 'hidden'\n }\n\n toggle(event) {\n event.preventDefault()\n\n if (event.target.type == 'checkbox') {\n this.openValue = event.target.checked\n } else {\n this.openValue = !this.openValue\n }\n }\n\n hide(event) {\n event.preventDefault();\n\n this.openValue = false;\n }\n\n show(event) {\n event.preventDefault();\n\n this.openValue = true;\n }\n\n openValueChanged() {\n if (!this.toggleClass) { return }\n\n this.toggleableTargets.forEach(target => {\n if (this.openValue) {\n target.classList.add(this.toggleClass)\n } else {\n target.classList.remove(this.toggleClass)\n }\n })\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = [\n \"justifiPaymentProvisioningForm\"\n ];\n\n static values = {\n paymentProcessorId: String\n }\n\n connect() {\n var paymentProvisioning = this.justifiPaymentProvisioningFormTarget;\n paymentProvisioning.addEventListener('submitted', this.handleOnboardingSubmission);\n }\n\n handleOnboardingSubmission = (event) => {\n const data = event.detail.data;\n const { response = {} } = data || {};\n const { error_message, data: { sub_account_id } = {} } = response;\n\n if (error_message) {\n this.notifyError(error_message);\n } else if (sub_account_id) {\n this.handleSuccess(sub_account_id);\n }\n };\n\n handleSuccess(subAccountId) {\n const paymentProcessorId = this.paymentProcessorIdValue;\n\n fetch(`/payment_processors/${paymentProcessorId}/provisionings`, {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').content,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ processor_account_id: subAccountId })\n }).then(\n response => response.json())\n .then(data => {\n if (data.redirect_url) {\n window.location.href = data.redirect_url;\n }\n else\n {\n console.error('No redirect URL found');\n }\n })\n }\n\n notifyError(error) {\n if (typeof Honeybadger === \"object\") {\n Honeybadger.notify(error);\n } else {\n console.warn(error);\n }\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['greenCoffeeFilter', 'preBlendFilter', 'type', 'greenCoffeeIds', 'preBlendIds'];\n\n connect() {\n this.toggleFilters();\n }\n\n toggleFilters() {\n const selectedFilter = this.typeTarget.value;\n if (selectedFilter === 'green_coffee') {\n this.greenCoffeeFilterTarget.style.display = 'block';\n this.preBlendFilterTarget.style.display = 'none';\n this.preBlendIdsTarget.value = null;\n } else if (selectedFilter === 'pre_blend') {\n this.greenCoffeeFilterTarget.style.display = 'none';\n this.preBlendFilterTarget.style.display = 'block';\n this.greenCoffeeIdsTarget.value = null;\n } else {\n this.greenCoffeeFilterTarget.style.display = 'block';\n this.preBlendFilterTarget.style.display = 'block';\n }\n }\n}\n","/* global Rutter */\n\nimport { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n static targets = ['button']\n static values = { platform: String, publicKey: String }\n\n initialize() {\n const script_url = \"https://cdn.jsdelivr.net/npm/@rutter/rutter-link@latest\";\n\n if (!document.querySelector(`script[src=\"${script_url}\"]`)) {\n const script = document.createElement(\"script\");\n script.src = script_url;\n script.async = true;\n script.onload = () => console.log(\"Rutter script loaded\");\n script.onerror = () => console.error(\"Rutter script failed to load\");\n document.head.appendChild(script);\n }\n }\n\n connect() {\n this.disableButtons();\n\n // Wait for the Rutter global to be available.\n const startTime = Date.now();\n const interval = setInterval(() => {\n if (typeof Rutter !== \"undefined\") {\n clearInterval(interval);\n this.enableButtons();\n }\n // If 60 seconds have passed, stop waiting and re-enable the buttons.\n if (Date.now() - startTime > 60000) {\n clearInterval(interval);\n console.error(\"Rutter script failed to load within 1 minute.\");\n }\n }, 100);\n\n }\n\n disableButtons() {\n this.buttonTargets.forEach(button => {\n button.disabled = true;\n });\n }\n\n enableButtons() {\n this.buttonTargets.forEach(button => {\n button.disabled = false;\n });\n }\n\n loadRutter() {\n this.openRutter();\n }\n\n openRutter() {\n this.disableButtons();\n // Create an instance of Rutter and open the widget.\n const rutterInstance = Rutter.create({\n publicKey: this.publicKeyValue,\n onSuccess: (publicToken) => {\n this.callBackendAPI(this.buttonTarget, publicToken);\n },\n onExit: (errorEnum) => {\n console.log(errorEnum);\n this.enableButtons();\n }\n });\n\n if (this.hasPlatformValue) {\n rutterInstance.open({ platform: this.platformValue });\n } else {\n rutterInstance.open();\n }\n }\n\n callBackendAPI(buttonTarget, publicToken) {\n const accountId = buttonTarget.dataset.rutterAccountId;\n const url = buttonTarget.dataset.rutterUrl.replace(\":id\", accountId);\n\n fetch(url, {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.token,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ public_token: publicToken, account_id: accountId })\n })\n .then(response => response.json())\n .then(data => {\n if (data.id != null && data.platform_type === 'commerce') {\n window.location.href = `/integrations/commerce/${data.id}/setup`;\n } else {\n window.location.href = `/integrations/accounting/${data.id}/setup`;\n }\n });\n }\n\n get token() {\n return document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['date', 'customers'];\n\n connect() {\n this.setSalesData();\n }\n\n setSalesData() {\n const date = this.dateTarget.value;\n fetch(`/dashboard/sales?date=${date}`)\n .then((response) => response.json())\n .then((data) => {\n this.customersTarget.innerHTML = data.html;\n });\n }\n}\n","import { Controller } from \"stimulus\"\nimport { useTargetMutation } from 'stimulus-use'\n\nexport default class extends Controller {\n\n static targets = ['container', 'item', 'banner']\n\n static classes = [ \"hidden\" ]\n\n connect() {\n useTargetMutation(this, { targets: [\"item\"] })\n \n this.updateBanner()\n }\n\n itemTargetAdded() {\n this.updateBanner()\n }\n\n itemTargetRemoved() {\n this.updateBanner()\n }\n\n removeBanner() {\n if (this.totalHeight() === this.containerTarget.scrollHeight) {\n this.bannerTarget.classList.add(this.hiddenClass)\n }\n }\n\n addBanner() {\n if (this.totalHeight() != this.containerTarget.scrollHeight) {\n this.bannerTarget.classList.remove(this.hiddenClass)\n }\n }\n\n scrollDown() {\n this.containerTarget.scrollBy({top: this.containerTarget.scrollHeight, left: 0, behavior: 'smooth'})\n }\n\n updateBanner() {\n\n const reducer = (accumulator, currentValue) => accumulator + currentValue;\n\n if (this.hasItemTarget) {\n\n const itemScrollHeights = this.itemTargets.map(element => element.scrollHeight)\n\n const itemScrollHeightsTotal = itemScrollHeights.reduce(reducer)\n \n if (this.containerTarget.clientHeight < itemScrollHeightsTotal) {\n this.bannerTarget.classList.remove(this.hiddenClass)\n } else {\n this.bannerTarget.classList.add(this.hiddenClass)\n }\n\n }\n this.removeBanner()\n }\n\n // private\n\n totalHeight() {\n return (this.containerTarget.scrollTop + this.containerTarget.clientHeight)\n }\n\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"anchor\", \"input\" ]\n\n connect() {\n this.encode()\n }\n\n encode() {\n for (const anchor of this.anchorTargets) {\n const url = this.createUrl(anchor);\n this.inputTargets.forEach(input => {\n if (input.value) {\n this.updateAnchor(url, input.name, input.value)\n }\n })\n anchor.search = url.search\n }\n }\n\n createUrl(anchor) {\n const baseUrl = anchor.tagName === 'BUTTON' ? new URL(anchor.formAction) : new URL(anchor.href);\n const baseUrlWithoutParams = baseUrl.origin + baseUrl.pathname;\n return new URL(baseUrlWithoutParams);\n }\n\n intercept(event) {\n event.preventDefault()\n }\n\n clickButton(event) {\n event.target.click()\n }\n\n updateAnchor(url, name, value) {\n url.searchParams.append(name, value)\n }\n}\n","import { Controller } from \"stimulus\"\n// import { useTargetMutation } from 'stimulus-use'\n\n/*\n\nThis controller enables selecting or unselecting all or multiple checkboxes on the page\n\nTargets:\n@parent - Parent checkbox for select All/None\n@child - Multiple child checkboxes\n*/\nexport default class extends Controller {\n static targets = ['parent', 'child', 'countable', 'selectAction', 'unselectAction', 'selectedCount', 'totalCount', 'link']\n\n static values = { count: Number, params: String }\n\n connect() {\n // useTargetMutation(this, { targets: [\"countable\"] })\n this.toggleClass = this.data.get('class') || 'tw-hidden'\n this.setCount()\n }\n\n childTargetConnected() {\n this.setCount()\n this.sync()\n }\n\n childTargetDisconnected() {\n this.setCount()\n this.sync()\n }\n\n toggleSelection() {\n if (!this.hasParentTarget) return\n\n for (let child of this.childTargets) {\n child.checked = this.parentTarget.checked;\n child.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n this.setCount()\n this.setIds()\n }\n\n selectAll() {\n for (let child of this.childTargets) {\n if (!child.checked) {\n child.checked = true;\n child.dispatchEvent(new Event('change', { bubbles: true }));\n }\n }\n\n this.sync()\n }\n\n unSelectAll() {\n for (let child of this.childTargets) {\n if (child.checked) {\n child.checked = false;\n child.dispatchEvent(new Event('change', { bubbles: true }));\n }\n }\n\n this.sync()\n }\n\n selectCompleted() {\n\n for (let child of this.childTargets) {\n const isCompleted = child.dataset.completed == \"true\";\n if (child.checked != isCompleted) {\n child.checked = isCompleted;\n child.dispatchEvent(new Event('change', { bubbles: true }));\n }\n }\n\n this.sync()\n }\n\n selectIncomplete() {\n\n for (let child of this.childTargets) {\n const isIncomplete = child.dataset.completed == \"false\";\n if (child.checked != isIncomplete) {\n child.checked = isIncomplete;\n child.dispatchEvent(new Event('change', { bubbles: true }));\n }\n }\n\n this.sync()\n }\n\n sync() {\n let allChecked = this.allChildrenChecked()\n if (allChecked && this.childTargets.length != 0) {\n this.parentTarget.indeterminate = false\n this.parentTarget.checked = true\n } else if (this.childTargets.length === 0) {\n this.parentTarget.checked = false\n this.parentTarget.indeterminate = false\n } else {\n this.parentTarget.checked = false\n this.parentTarget.indeterminate = this.someChildrenChecked()\n }\n\n this.parentTarget.dispatchEvent(new Event('change', { bubbles: true }));\n\n this.setCount()\n this.setIds()\n }\n\n allChildrenChecked() {\n return this.checkedChildrenTargets().length === this.childTargets.length\n }\n\n someChildrenChecked() {\n return this.checkedChildrenTargets().length > 0;\n }\n\n noChildrenChecked() {\n return this.checkedChildrenTargets().length == 0\n }\n\n parentChecked() {\n return this.parentTarget.checked == true\n }\n\n checkedChildrenTargets() {\n return this.childTargets.filter(child => child.checked)\n }\n\n setCount() {\n this.countValue = this.checkedChildrenTargets().length\n\n \n if (this.hasSelectedCountTarget) {\n this.selectedCountTarget.innerHTML = this.checkedChildrenTargets().length\n }\n\n if (this.hasTotalCountTarget) {\n this.totalCountTarget.innerHTML = this.childTargets.length\n }\n }\n\n setIds() {\n if (!this.hasLinkTarget) return;\n\n const resourceIds = this.checkedChildrenTargets().map(element => element.dataset.resourceId)\n this.linkTargets.forEach(link => {\n link.dataset.ids = resourceIds\n if (this.hasParamsValue) {\n link.querySelector(`[name='${this.paramsValue}']`).value = resourceIds\n }\n })\n }\n\n countValueChanged() {\n let someChildrenChecked = this.someChildrenChecked()\n\n if (someChildrenChecked) {\n this.selectActionTargets.forEach(target => {\n target.classList.remove(this.toggleClass)\n })\n this.unselectActionTargets.forEach(target => {\n target.classList.add(this.toggleClass)\n })\n } else {\n this.selectActionTargets.forEach(target => {\n target.classList.add(this.toggleClass)\n })\n this.unselectActionTargets.forEach(target => {\n target.classList.remove(this.toggleClass)\n })\n }\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['id', 'shopifyId', 'sku', 'successContainer', 'failureContainer']\n\n connect() {\n if (this.hasSkuTarget) {\n // console.log(this.data.get(\"update-url\"))\n }\n }\n\n updateSku(event) {\n event.preventDefault()\n let formData = new FormData()\n formData.append(\"variant[id]\", this.idTarget.value);\n formData.append(\"external_variant_id\", this.shopifyIdTarget.value)\n\n fetch(this.data.get(\"update-url\"), {\n body: formData,\n method: 'PATCH',\n dataType: 'script',\n credentials: \"include\",\n headers: {\n \"X-CSRF-Token\": this.getMetaValue(\"csrf-token\")\n }\n }).then(response => {\n if (response.ok) {\n console.log('succcess!')\n this.successContainerTarget.classList.remove(\"tw-hidden\")\n this.failureContainerTarget.classList.add(\"tw-hidden\")\n this.skuTarget.innerHTML = ''\n // response.blob()\n // .then(response => response.text())\n // .then(html => { this.containerTarget.innerHTML = html })\n } else {\n console.log('error!')\n this.showError();\n }\n })\n .catch(_error => {\n this.showError();\n })\n }\n\n getMetaValue(name) {\n const element = document.head.querySelector(`meta[name=\"${name}\"]`)\n return element.getAttribute(\"content\")\n }\n\n showError() {\n this.failureContainerTarget.classList.remove(\"tw-hidden\")\n this.successContainerTarget.classList.add(\"tw-hidden\")\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['value', 'result']\n\n connect() {\n this.calculate();\n }\n\n calculate() {\n let elements = [this.valueTarget.value];\n elements.push(this.data.get('operator'))\n elements.push(this.data.get('other-value'))\n const result = eval(elements.join(' '));\n this.resultTarget.innerHTML = this.pluralizedResult(this.addPlus(result.toFixed(2)), this.data.get('unit'));\n if (result < 0) {\n this.resultTarget.classList.add(\"text-danger\")\n this.resultTarget.classList.remove(\"text-warning\")\n this.resultTarget.classList.remove(\"tw-text-zinc-800\")\n } else if (result > 0) {\n this.resultTarget.classList.add(\"text-success\")\n this.resultTarget.classList.remove(\"tw-text-zinc-800\")\n this.resultTarget.classList.remove(\"text-danger\")\n } else {\n this.resultTarget.classList.add(\"tw-text-zinc-800\")\n this.resultTarget.classList.remove(\"text-warning\")\n this.resultTarget.classList.remove(\"text-danger\")\n }\n }\n\n // Private\n\n pluralizedResult(count, noun, suffix = 's') {\n return `${ count } ${ noun }${count !== 1 ? suffix : ''}`\n }\n\n // add a + when the value is positive\n addPlus(value) {\n return value > 0 ? `+${value}` : value\n }\n}\n","import { Controller } from \"stimulus\";\nimport tippy, { roundArrow } from 'tippy.js';\n\nexport default class extends Controller {\n static values = { customProperties: Object };\n\n initialize() {\n tippy.setDefaultProps({\n delay: 50,\n placement: 'bottom',\n arrow: roundArrow,\n touch: ['hold', 500],\n popperOptions: {\n modifiers: [{\n name: 'offset',\n options: {\n offset: [0, 4],\n },\n }],\n }\n });\n\n document.addEventListener(\n \"cable-ready:after-morph\",\n this.initializeTippy.bind(this),\n true\n );\n }\n\n connect() {\n this.initializeTippy();\n }\n\n disconnect() {\n if (this.element._tippy) this.element._tippy.destroy();\n }\n\n initializeTippy() {\n if (this.element._tippy) this.element._tippy.destroy();\n tippy(this.element, this.customProperties);\n }\n\n get customProperties() {\n return this.customPropertiesValue || '{}';\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['cardElement', 'cardErrors', 'form', 'submit']\n\n connect() {\n this.stripe = Stripe(this.data.get('key'))\n this.elements = this.stripe.elements()\n\n this.configureCard()\n\n this.formTarget.addEventListener('turbo:submit-end', () => {\n this.submitTarget.disabled = false\n })\n }\n\n saveCard() {\n this.submitTarget.disabled = true\n\n this.stripe.createToken(this.card).then((result) => {\n if (result.error) {\n this.cardErrorsTarget.textContent = result.error.message\n } else {\n this.submitFormWithToken(result.token)\n }\n })\n }\n\n // PRIVATE\n\n configureCard() {\n this.card = this.elements.create('card', {\n style: this.cardStyle\n });\n\n this.card.mount(this.cardElementTarget)\n\n // Handle real-time validation errors from the card Element.\n this.card.addEventListener('change', (event) => {\n if (event.error) {\n this.cardErrorsTarget.textContent = event.error.message\n } else {\n this.cardErrorsTarget.textContent = ''\n }\n })\n }\n\n submitFormWithToken(token) {\n var hiddenInput = document.createElement('input')\n hiddenInput.setAttribute('type', 'hidden')\n hiddenInput.setAttribute('name', 'stripeToken')\n hiddenInput.setAttribute('value', token.id)\n this.formTarget.appendChild(hiddenInput)\n\n this.formTarget.requestSubmit()\n }\n\n get cardStyle() {\n return {\n base: {\n color: '#32325d',\n fontFamily: '\"Helvetica Neue\", Helvetica, sans-serif',\n fontSmoothing: 'antialiased',\n fontSize: '16px',\n '::placeholder': {\n color: '#aab7c4'\n }\n },\n invalid: {\n color: '#fa755a',\n iconColor: '#fa755a'\n }\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"wrapper\"]\n\n change(event) {\n console.log('change')\n this.element.addEventListener('ajax:before', this.handleBefore.bind(this))\n this.element.addEventListener('ajax:complete', this.handleComplete.bind(this))\n this.element.dispatchEvent(new Event('submit', {bubbles: true}))\n }\n\n handleBefore() {\n this.wrapperTarget.classList.toggle('element-spinner')\n document.body.classList.toggle('no-pointer-events')\n }\n\n handleComplete() {\n this.wrapperTarget.classList.toggle('element-spinner')\n document.body.classList.toggle('no-pointer-events')\n }\n}","import { Controller } from '@hotwired/stimulus';\n\nexport default class extends Controller {\n static targets = ['toggleable', 'disableable'];\n static values = { open: Boolean };\n\n connect() {\n this.toggleClass = this.data.get('class') || 'hidden';\n }\n\n toggle(event) {\n if (event.target.getAttribute('type') != 'checkbox') {\n event.preventDefault();\n }\n this.openValue = !this.openValue;\n }\n\n hide(event) {\n event.preventDefault();\n\n this.openValue = false;\n }\n\n show(event) {\n event.preventDefault();\n\n this.openValue = true;\n }\n\n openValueChanged() {\n if (!this.toggleClass) {\n return;\n }\n\n this.toggleableTargets.forEach(target => {\n target.classList.toggle(this.toggleClass);\n });\n\n this.disableableTargets.forEach(target => {\n if (target.tomselect !== undefined) {\n this.toggleTomSelect(target);\n } else {\n target.disabled = !target.disabled;\n }\n });\n }\n\n toggleTomSelect(target) {\n target.tomselect.isDisabled ? target.tomselect.enable() : target.tomselect.disable();\n }\n}\n","import { Controller } from \"stimulus\";\nimport TomSelect from \"tom-select\";\nimport \"tom-select/dist/css/tom-select.min.css\";\nexport default class extends Controller {\n static targets = ['select', 'option', 'optionTemplate', 'itemTemplate']\n static values = {\n url: String,\n filters: Object,\n searchField: Array\n }\n static outlets = [\n 'copy'\n ]\n\n initialize() {\n this.options = this.options.bind(this)\n this.optionsReducer = this.optionsReducer.bind(this)\n this.remoteLoad = this.remoteLoad.bind(this)\n this.multipleItemsFix = this.multipleItemsFix.bind(this)\n }\n\n connect() {\n setTimeout(this.setup.bind(this), 5)\n }\n\n disconnect() {\n }\n\n setup() {\n let plugins = this.getPlugins()\n this.tomSelect = new TomSelect(this.selectTarget, {\n ...this.mergedOptions,\n plugins: plugins,\n },\n );\n }\n\n setValue(value) {\n this.tomSelect.setValue(value)\n }\n\n disable()\t{\n this.tomSelect.disable()\n }\n\n enable()\t{\n this.tomSelect.enable()\n }\n\n clicked(event) {\n if (this.hasCopyOutlet) {\n this.copyOutlet.pasting_from_tom_select(event)\n }\n }\n\n remoteLoad(urlValue, params = {}) {\n return {\n load: function(query, callback) {\n var url = `${urlValue}?query=${encodeURIComponent(query)}`;\n for (var key in params) {\n if (Object.prototype.hasOwnProperty.call(params, key)) {\n url += `&${key}=${encodeURIComponent(params[key])}`;\n }\n }\n fetch(url)\n .then(response => response.json())\n .then(json => {\n callback(json);\n }).catch(()=>{\n callback();\n });\n }\n }\n }\n\n multipleItemsFix() {\n return {\n onItemAdd: function() {\n this.setTextboxValue('');\n this.refreshOptions();\n }\n }\n }\n\n getPlugins() {\n const plugins = []\n if (typeof this.selectTarget.dataset.tomSelectDropdownInput !== 'undefined') {\n plugins.push('dropdown_input')\n }\n if (typeof this.selectTarget.dataset.tomSelectRemoveButton !== 'undefined') {\n plugins.push('remove_button')\n }\n return plugins\n }\n\n options() {\n return 'dropdownParent create maxOptions sortField maxItems valueField labelField searchField onItemAdd closeAfterSelect optgroupValueField optgroupLabelField'\n .split(' ')\n .reduce(this.optionsReducer, {})\n }\n\n optionsReducer(accumulator, currentValue) {\n if (this.hasOptionTarget && this.optionTarget.dataset[currentValue])\n accumulator[currentValue] = this.optionTarget.dataset[currentValue]\n if (this.hasSearchFieldValue) {\n // searchField: ['title', 'description'] can be an array with multiple values\n accumulator['searchField'] = this.searchFieldValue\n }\n return accumulator\n }\n\n defaultOptions() {\n return {\n dropdownParent: 'body',\n create: false,\n maxOptions: 25,\n valueField: 'id',\n render: {\n loading: () => '' + '' + ' Searching... ' + '',\n },\n };\n }\n\n get mergedOptions() {\n const baseOptions = {\n ...this.defaultOptions(),\n ...(this.selectTarget.multiple == true && this.multipleItemsFix()),\n ...(this.hasUrlValue && this.remoteLoad(this.urlValue, this.filtersValue)),\n ...(this.hasOptionTarget && this.options())\n };\n \n if (this.hasOptionTemplateTarget) {\n baseOptions.render.option = (data, escape) => this.renderTemplate(this.optionTemplateTarget, data, escape);\n }\n \n if (this.hasItemTemplateTarget) {\n baseOptions.render.item = (data, escape) => this.renderTemplate(this.itemTemplateTarget, data, escape);\n }\n \n return baseOptions;\n }\n\n renderTemplate(template, data, escape) {\n const content = template.content.cloneNode(true).firstElementChild;\n const elements = content.querySelectorAll('[data-content-attribute]');\n const parsedData = this.parseDataFromString(data.text);\n \n elements.forEach(element => {\n const attribute = element.getAttribute('data-content-attribute');\n const value = parsedData[attribute];\n if (value) {\n element.textContent = escape(value);\n }\n });\n \n return content;\n }\n\n // Parses a string that mimics a Ruby hash into an object\n parseDataFromString(dataString) {\n let parsedData = {};\n try {\n // Assuming the format: '{:key=>\"value\", :key2=>\"value2\"}'\n const keyValuePairs = dataString.slice(1, -1).split(/,\\s*(?=:)/); // Split by comma followed by a colon\n keyValuePairs.forEach(pair => {\n const [key, value] = pair.split('=>');\n if (key && value) {\n const cleanKey = key.trim().replace(/[:\"]+/g, ''); // Remove colons and quotes from key\n const cleanValue = value.trim().replace(/^\"|\"$/g, ''); // Remove surrounding quotes from value\n parsedData[cleanKey] = cleanValue;\n }\n });\n } catch (error) {\n console.error('Error parsing data:', error);\n }\n return parsedData;\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [\"mainItem\", \"reverting\", \"adjusting\", \"card\", \"adjustmentContainer\", \"transformationContainer\", \"reasonsSelector\"]\n\n connect() {\n this.calculateValue();\n this.showProperArrows()\n this.toggleAdjustmentData()\n }\n\n matchUnit() {\n const selector = this.mainItemTarget.querySelector(\".merged-wrapper-right select\");\n const weight_unit = selector.options[selector.selectedIndex].text;\n this.cardTargets.forEach(card => {\n card.querySelector(\".weight_unit\").innerHTML = weight_unit;\n });\n }\n\n showProperArrows() {\n this.element.querySelector(\".create-arrow\").style.display = this.shouldRevert ? \"none\" : \"block\";\n this.element.querySelector(\".revert-arrow\").style.display = this.shouldRevert ? \"block\" : \"none\";\n this.cardTargets.forEach(card => {\n if ((card.dataset.main && !this.shouldRevert) || (!card.dataset.main && this.shouldRevert)) {\n card.classList.add(\"green-card\");\n } else {\n card.classList.remove(\"green-card\");\n }\n });\n }\n\n toggleAdjustmentData() {\n this.adjustmentContainerTarget.style.display = this.adjusting ? \"block\" : \"none\"\n this.transformationContainerTarget.style.display = this.adjusting ? \"none\" : \"block\"\n this.reasonsSelectorTarget.style.display = this.adjusting ? \"block\" : \"none\"\n }\n\n calculateValue() {\n this.cardTargets.forEach(card => {\n const ratio = card.dataset.ratio;\n card.querySelector(\".weight_value\").innerHTML = this.roundFloat(ratio * this.mainValue);\n });\n }\n\n // Private //\n\n get mainValue() {\n return this.mainItemTarget.querySelector(\".merged-wrapper-left input\").value;\n }\n\n get shouldRevert() {\n return this.revertingTarget.value == \"1\"\n }\n\n get adjusting() {\n return this.adjustingTarget.value == \"1\"\n }\n\n roundFloat(num) {\n return Math.round((num + Number.EPSILON) * 100) / 100\n }\n}\n","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n connect() {\n this.updatePrice()\n }\n\n updatePrice() {\n let variantId = this.element.value\n\n // My preferred approach is to define the path in a value\n // or `data-` attribute and read it into the controller.\n // However, several `select`s on the same page use this\n // controller in the same way using the same path.\n // In the interest of de-duplication, I've hardcoded the path\n // in the controller.\n if (variantId) {\n let path = '/customer_variants/' + variantId\n\n this.productPriceFrame.setAttribute(\"src\", path)\n }\n }\n\n // This isn't ideal. Stimulus controllers shouldn't usually\n // muck about with elements outside its scope.\n // Replace with the Outlets API when Stimulus 3.2 is released:\n // https://github.com/hotwired/stimulus/pull/576\n get productPriceFrame() {\n return document.querySelector(\"turbo-frame#product_price\")\n }\n}\n","import { Controller } from 'stimulus';\n\nexport default class extends Controller {\n static targets = ['video', 'toggleable'];\n open() {\n this.toggleableTarget.classList.remove('tw-hidden');\n this.videoTarget.currentTime = 0;\n this.videoTarget.play();\n }\n\n close() {\n if (event.target === this.videoTarget) {\n event.stopPropagation()\n return\n }\n\n this.toggleableTarget.classList.add('tw-hidden');\n this.videoTarget.pause();\n }\n}\n","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\nimport \"core-js/stable\";\nimport { Turbo } from \"@hotwired/turbo-rails\"\nTurbo.session.drive = false\n\nimport \"regenerator-runtime/runtime\";\nimport 'tippy.js';\nimport 'tippy.js/dist/tippy.css'; // optional for styling\nimport 'tippy.js/dist/svg-arrow.css'; // optional roundArrow\n\nimport \"ahoy.js\"\n\nimport 'intl-tel-input/build/css/intlTelInput.css';\n\nrequire('expose-loader?$!jquery')\n\nimport Rails from \"@rails/ujs\"\nwindow.Rails = Rails\nRails.start()\n\nrequire(\"turbolinks\").start()\nrequire('channels')\n\nimport \"controllers\"\nimport '../css/application.css'\n\nif (document.head.dataset.environment == 'test') {\n window.ajaxCounter = 0;\n (function() {\n var origOpen = XMLHttpRequest.prototype.open;\n XMLHttpRequest.prototype.open = function() {\n window.ajaxCounter++;\n this.addEventListener('loadend', function() {\n window.ajaxCounter--;\n });\n origOpen.apply(this, arguments);\n };\n })();\n}\n","// Load all the controllers within this directory and all subdirectories.\n// Controller files must be named *_controller.js.\n\nimport { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\"\nimport { Alert, Tabs } from \"tailwindcss-stimulus-components\"\n\nconst application = Application.start()\nconst context = require.context(\"controllers\", true, /_controller\\.js$/)\napplication.load(definitionsFromContext(context))\napplication.register('alert', Alert)\napplication.register('tabs', Tabs )\n\n// Fixing Stimulus to report errors\n\napplication.handleError = (error, message, detail) => {\n console.warn(error, message, detail)\n if(typeof Honeybadger === 'object') {\n Honeybadger.notify(error)\n }\n};\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","createConsumer","channels","require","forEach","messagesContainer","document","getElementById","consumer","channel","received","data","insertAdjacentHTML","DISABLED_BG","ENABLED_BG","ENABLED_TEXT","DISABLED_TEXT","options","this","formTargets","element","dataset","disabled","classList","add","bgColor","remove","hasFormTarget","tomSelectTarget","tomselect","enable","disable","removeCss","textColor","addCss","console","log","hasTextTarget","textTargets","toggle","Controller","targets","provinceDropdown","provinceTarget","clear","clearOptions","remoteLoad","tomSelectOutlet","countryTarget","value","settings","load","outlets","placeholder","containerTarget","innerHTML","calculate","setTimeout","refreshOrShowPlaceholder","query_string","getQueryString","length","fetchHTML","checkboxTargets","i","checked","slice","fetch","then","response","ok","blob","text","html","showError","_error","errorContentTarget","controller","application","getControllerForElementAndIdentifier","tagName","querySelector","setAttribute","selectedValue","dispatchEvent","Event","event","hasCheckboxSwitchOutlet","checkboxSwitchOutlets","outlet","switchTarget","toggleClass","get","preventDefault","openValue","buttonTargets","target","values","open","Boolean","demandable_date","demandableDate","account_id","accountId","connected","cableReady","CableReady","operations","ApplicationController","task","resource_id","resourceId","resource_type","resourceType","inventory_count_id","inventoryCountId","controller_name","contName","action_name","actionName","container","user_target","userId","task_name","taskName","page_identifier","pageIdentifier","sourceController","sourceIdValue","chainTo","hideAllOptions","selector","optionSelectorValue","replace","querySelectorAll","option","hidden","removeAttribute","autoSelect","allOptions","selectedIndex","index","sourceId","String","optionSelector","chainedController","updateChainedOptions","showOptions","easeInStage","easeOutStage","TRANSLATE_X_5","backgroundTarget","sliderTarget","translateX","disableIconTarget","crossIconAnimation","enableIconTarget","checkedIconAnimation","hasAbleOutlet","ableOutlets","spinnerTarget","params","url","sync","enableSwitch","disableSwitch","hasToggleOutlet","toggleOutlets","toggleOutlet","method","state","headers","token","body","JSON","stringify","showSuccess","revertState","object","attribute","errorTarget","successTarget","getAttribute","type","toggleableTargets","hasConditionValue","conditionValue","timeout","click","delay","hasIntersectionValue","intersectionValue","lazyClick","hasClearOnDisconnectValue","clearOnDisconnectValue","clearTimeout","IntersectionObserver","entries","observer","entry","isIntersecting","unobserve","threshold","rootMargin","observe","hasDelayValue","delayValue","condition","Number","intersection","clearOnDisconnect","linkTarget","href","navigator","clipboard","writeText","textContent","OrderIds","checkedOrderTargets","closest","redirectUrl","window","location","importStatus","orderTargets","filter","order","Forms","Contacts","apply","customerId","contactId","contactSelectTarget","sendEmailButtonTarget","lazyLoad","abortPreviousFetchRequest","abortController","AbortController","lazyLoadingThresholdValue","lazyLoadingRootMarginValue","errorNotification","Honeybadger","notify","hasErrorContentsTarget","abort","urlParams","content","DOMParser","parseFromString","displayGreenResult","hasGreenTarget","result","roastTarget","ratio","toFixed","greenTarget","displayRoastResult","hasRoastTarget","ratioValue","hasPasteOutlet","pasteOutlets","paste","getContentValue","update","outputTarget","typeValue","sourceTarget","contentValue","pasting","hasUseTargetInputValue","useTargetInputValue","inputTarget","hasOutputTarget","outputTargets","select","default","showInputs","hasStartDateTarget","rangeSelectTarget","date_array","parse","startDateTarget","endDateTarget","startDivTarget","endDivTarget","deliveryMethodType","getDeliveryMethodType","typeTarget","chargeTarget","charge_required","rateTarget","rate_required","createShippingLabelCheckboxTarget","require_label","selectedType","deliveryMethodTypesValue","find","klass_name","deliveryMethodTypes","Array","modalTarget","backdrop","createElement","appendChild","buttonTarget","hideDiscountTypeTargets","resetDiscountInputFieldValue","discountTypeElement","hiddenClass","discountTypeTargets","discountInputFieldTargets","discountTypeKind","classes","sortable","Sortable","hasHandleClass","handle","handleClass","hasDraggableClass","draggable","draggableClass","hasGroupTarget","group","hasGhostClass","ghostClass","animation","emptyInsertThreshold","onEnd","persist","bind","hasIndexTarget","indexTargets","indexTarget","display_index","displayTargets","displayTarget","hasTypeValue","date","to","draggableDate","item","hasIndexTargets","calculatedIndex","newIndex","hasPageValue","hasPagyOffsetValue","pagyOffsetValue","page","pagyOffset","form","menuTarget","contains","hasDateInputTarget","offset","parseInt","dateInputTarget","Date","tz_offset","getTimezoneOffset","setMinutes","getMinutes","setDate","getDate","fp","_flatpickr","formattedDate","formatDate","clickTargets","style","setProperty","targetValue","removeProperty","countFilterables","lowerCaseFilterTerm","lowerCasedFilterTerm","filteredOutCount","filterableTargets","filterable","keyMatched","filterKey","toLowerCase","includes","filterOutClass","filteredCountValue","totalCountValue","hasBalanceTarget","balanceTarget","innerText","hasSourceTarget","hasFilteredOutClass","fiteredOutClass","totalCount","filteredCount","hasInputTarget","flatpickr","dateFormat","hasMinDateValue","minDate","minDateValue","hasRangeSelectTarget","obj","from","currentTarget","replacementContainerTarget","resourceIds","itemTargets","replaceableTargets","fulfilled","selectedTargets","domId","completed","checkedSelectedTargets","selected","pepe","input","Beacon","subject","hasHighlightableTarget","highlightableItem","highlight","scrollIntoView","highlightableTargets","highlightDomId","queryString","search","URLSearchParams","showContent","hasCardTarget","cardTarget","urlValue","r","fragment","createRange","createContextualFragment","customerIds","checkedCustomerTargets","accountingId","customerTargets","commerceID","VariantIds","checkedVariantTargets","skip","variantTargets","submitButton","submitButtonTarget","address","addressValue","accessToken","accessTokenValue","accountIdValue","paymentMethodData","address_line1","street_1","address_city","city","address_postal_code","postal_code","address_country","country_alpha2","justifiCreditCardFormTarget","tokenize","error","notifyError","appendPaymentMethodId","creditCardFormTarget","submit","warn","paymentMethodId","hiddenInput","name","updateSubtotal","checkIsfulfilled","num","quantity","basePrice","totalDiscount","subtotalTarget","Math","round","discount","parseFloat","discountTarget","indexOf","hasIsFulfilledTarget","isFulfilledTarget","fulfilledQuantity","inventoryCount","quantityTarget","basePriceTarget","inventoryTarget","fulfilledQuantityTarget","addEventListener","ignoreLoading","detail","success","close","enter","isSubmitAction","hasFrameTarget","frameTarget","hasAttribute","leave","removeChild","firstElementChild","keyCode","templateTarget","valueOf","destinationTarget","wrapper","wrapperSelectorValue","display","template","newRecord","wrapperSelector","appearance","currentIntegerValue","decrementedValue","max","taskIds","checkedTaskTargets","taskId","taskTargets","confirm","updating","setValue","inputValue","inputable","intlTelInput","utilsScript","initialCountry","preferredCountries","separateDialCode","autoPlaceholder","nationalMode","formatOnDisplay","currentText","getNumber","intlTelInputUtils","numberFormat","E164","setNumber","linkUrl","paymentMethodUrl","payment_methodUrl","customer_id","json","link_token","Plaid","create","onSuccess","handleSuccess","onExit","handleExit","public_token","metadata","loader","redirect_url","Turbo","visit","status","updateRow","updateSummary","parentValue","findDemandableTarget","plansParent","inventoryValue","plansInventory","incompleteTaskMeasure","calculateMeasure","filteredIncompleteOperationTaskTargets","outstanding","plansRatio","carryover","calculatedOutsanding","calculatedCarryover","updateRowTasksCount","updateRowTasksMeasure","updateRowOutstanding","updateRowCarryover","updateSummaryTasksCount","updateSummaryTasksMeasure","updateSummaryTasksDisplayValue","summaryTasksCountTarget","operationTaskTargets","hasSummaryTasksMeasureTarget","summaryTasksMeasureTarget","hasSummaryTasksDisplayValueTarget","summaryTasksDisplayValueTarget","calculateDisplayValue","findOutstandingTarget","findCarryoverTarget","hasTasksCountTarget","findTasksCountTarget","taskableId","hasTasksMeasureTarget","findTasksMeasureTarget","filteredOperationTaskTargets","totalSum","displayValue","measure","outstandingTargets","plansTaskableId","carryoverTargets","demandableTargets","demandable","tasksCountTargets","tasksMeasureTargets","selectedOptions","selectTargets","sort","join","variantSelect","targetIdValue","optionValueIds","valueIds","toString","split","targetId","tomSelectInstance","selectedId","items","selectedItemData","priceCents","price_cents","set","variantId","basePriceInput","updatePrice","parentElement","parentNode","fulfillCheckbox","inventoryElement","available_inventory","auto_fulfillable","price","bubbles","print","path","productPriceFrame","productTargets","productIds","checkedProductTargets","productId","product","setName","inputTargets","handleOnboardingSubmission","error_message","sub_account_id","justifiPaymentProvisioningFormTarget","subAccountId","paymentProcessorId","paymentProcessorIdValue","processor_account_id","toggleFilters","selectedFilter","greenCoffeeFilterTarget","preBlendFilterTarget","preBlendIdsTarget","greenCoffeeIdsTarget","script_url","script","src","async","onload","onerror","head","disableButtons","startTime","now","interval","setInterval","Rutter","clearInterval","enableButtons","button","openRutter","rutterInstance","publicKey","publicKeyValue","publicToken","callBackendAPI","errorEnum","hasPlatformValue","platform","platformValue","rutterAccountId","rutterUrl","platform_type","setSalesData","dateTarget","customersTarget","useTargetMutation","updateBanner","totalHeight","scrollHeight","bannerTarget","scrollBy","top","left","behavior","hasItemTarget","itemScrollHeightsTotal","reduce","accumulator","currentValue","clientHeight","removeBanner","scrollTop","encode","anchorTargets","anchor","createUrl","updateAnchor","baseUrl","URL","formAction","baseUrlWithoutParams","origin","pathname","searchParams","append","setCount","hasParentTarget","childTargets","child","parentTarget","setIds","isCompleted","isIncomplete","allChildrenChecked","indeterminate","someChildrenChecked","checkedChildrenTargets","countValue","hasSelectedCountTarget","selectedCountTarget","hasTotalCountTarget","totalCountTarget","hasLinkTarget","linkTargets","link","ids","hasParamsValue","paramsValue","selectActionTargets","unselectActionTargets","count","hasSkuTarget","formData","FormData","idTarget","shopifyIdTarget","dataType","credentials","getMetaValue","successContainerTarget","failureContainerTarget","skuTarget","elements","valueTarget","push","eval","resultTarget","pluralizedResult","addPlus","noun","suffix","tippy","placement","arrow","roundArrow","touch","popperOptions","modifiers","initializeTippy","_tippy","destroy","customProperties","customPropertiesValue","stripe","Stripe","configureCard","formTarget","submitTarget","createToken","card","cardErrorsTarget","message","submitFormWithToken","cardStyle","mount","cardElementTarget","requestSubmit","base","color","fontFamily","fontSmoothing","fontSize","invalid","iconColor","handleBefore","handleComplete","wrapperTarget","disableableTargets","undefined","toggleTomSelect","isDisabled","optionsReducer","multipleItemsFix","setup","plugins","getPlugins","tomSelect","TomSelect","selectTarget","mergedOptions","hasCopyOutlet","copyOutlet","pasting_from_tom_select","query","callback","encodeURIComponent","key","prototype","hasOwnProperty","call","onItemAdd","setTextboxValue","refreshOptions","tomSelectDropdownInput","tomSelectRemoveButton","hasOptionTarget","optionTarget","hasSearchFieldValue","searchFieldValue","dropdownParent","maxOptions","valueField","render","loading","baseOptions","defaultOptions","multiple","hasUrlValue","filtersValue","hasOptionTemplateTarget","escape","renderTemplate","optionTemplateTarget","hasItemTemplateTarget","itemTemplateTarget","cloneNode","parsedData","parseDataFromString","dataString","pair","cleanKey","trim","cleanValue","filters","searchField","calculateValue","showProperArrows","toggleAdjustmentData","mainItemTarget","weight_unit","cardTargets","shouldRevert","main","adjustmentContainerTarget","adjusting","transformationContainerTarget","reasonsSelectorTarget","roundFloat","mainValue","revertingTarget","adjustingTarget","EPSILON","toggleableTarget","videoTarget","currentTime","play","pause","stopPropagation","origOpen","Application","context","definitionsFromContext","register","Alert","Tabs","handleError","Rails","environment","ajaxCounter","XMLHttpRequest","arguments"],"sourceRoot":""}