{"version":3,"file":"public-PNXCfk8K.js","sources":["../../../app/frontend/javascript/controllers/application.js","../../../app/frontend/javascript/controllers/checkall_controller.js","../../../app/frontend/javascript/controllers/code_editor_controller.js","../../../app/frontend/javascript/controllers/date_range_controller.js","../../../app/frontend/javascript/controllers/header_search_controller.js","../../../app/frontend/javascript/controllers/input_mask_controller.js","../../../node_modules/.pnpm/intl-tel-input@24.8.2/node_modules/intl-tel-input/build/js/intlTelInput.js","../../../node_modules/.pnpm/intl-tel-input@24.8.2/node_modules/intl-tel-input/build/js/utils.js?url","../../../app/frontend/javascript/controllers/international_phone_input_controller.js","../../../app/frontend/javascript/web/dx/components/Swipers.ts","../../../app/frontend/javascript/controllers/jolifish_swiper_controller.js","../../../app/frontend/javascript/controllers/keyboard_controller.js","../../../app/frontend/javascript/controllers/masonry_controller.js","../../../app/frontend/javascript/controllers/measurement_controller.js","../../../app/frontend/javascript/libs/pie.js","../../../app/frontend/javascript/controllers/pie_controller.js","../../../app/frontend/javascript/controllers/popper_controller.js","../../../app/frontend/javascript/controllers/preserve_scroll_controller.js","../../../app/frontend/javascript/controllers/toggle_visibility_controller.js","../../../app/frontend/javascript/libs/tom-select.js","../../../app/frontend/javascript/controllers/tom_select_controller.js","../../../app/frontend/javascript/controllers/update_quantity_controller.js","../../../node_modules/.pnpm/uppy@4.8.0/node_modules/uppy/lib/bundle.js","../../../app/frontend/javascript/controllers/upload_controller.js","../../../app/frontend/javascript/controllers/admin_bar_controller.js","../../../app/frontend/javascript/controllers/form_reload_controller.js","../../../app/frontend/javascript/controllers/instalike_controller.js","../../../app/frontend/javascript/controllers/add_to_cart_controller.js","../../../app/frontend/javascript/controllers/product_variant_card_controller.js","../../../app/frontend/javascript/controllers/turnstile_controller.js","../../../node_modules/.pnpm/gsap@3.12.5/node_modules/gsap/gsap-core.js","../../../node_modules/.pnpm/gsap@3.12.5/node_modules/gsap/CSSPlugin.js","../../../node_modules/.pnpm/gsap@3.12.5/node_modules/gsap/index.js","../../../node_modules/.pnpm/gsap@3.12.5/node_modules/gsap/utils/strings.js","../../../node_modules/.pnpm/gsap@3.12.5/node_modules/gsap/TextPlugin.js","../../../app/frontend/javascript/controllers/text_animation_controller.js","../../../app/frontend/javascript/controllers/send_submission_controller.js","../../../app/frontend/javascript/controllers/index.js"],"sourcesContent":["import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus = application\n\nexport { application }\n","import {Controller} from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"checkall\"\nexport default class extends Controller {\n static targets = [\"checkall\", \"checkboxes\"]\n\n connect() {\n }\n\n checkallTargetConnected(target) {\n target.addEventListener('click', () => {\n const checkboxes = this.checkboxesTargets;\n for (const checkbox of checkboxes) {\n checkbox.checked = target.checked;\n }\n });\n }\n\n checkboxesTargetConnected(target) {\n target.addEventListener(\"click\", () => {\n const checkall = this.checkallTarget;\n\n if (this.checkboxesTargets.every((t) => t.checked)) {\n checkall.checked = true;\n checkall.indeterminate = false;\n } else if (this.checkboxesTargets.some((t) => t.checked)) {\n checkall.checked = false;\n checkall.indeterminate = true;\n } else {\n checkall.checked = false;\n checkall.indeterminate = false;\n }\n });\n }\n}\n","import {Controller} from \"@hotwired/stimulus\"\nimport {indentWithTab} from \"@codemirror/commands\"\nimport {json} from \"@codemirror/lang-json\"\nimport {syntaxHighlighting, defaultHighlightStyle} from \"@codemirror/language\"\nimport {EditorState} from \"@codemirror/state\"\nimport {EditorView, keymap} from \"@codemirror/view\"\n\n// Connects to data-controller=\"code-editor\"\nexport default class extends Controller {\n static targets = [\"textEditor\", \"textInput\"];\n\n connect() {\n const textEditor = this.textEditorTarget;\n const textInput = this.textInputTarget;\n\n const startState = EditorState.create({\n doc: textInput.value,\n extensions: [\n json(),\n keymap.of([indentWithTab]),\n syntaxHighlighting(defaultHighlightStyle)\n ]\n })\n\n const view = new EditorView({\n state: startState,\n parent: textEditor\n })\n\n this.element.addEventListener(\"submit\", function () {\n textInput.value = view.state.doc.toString();\n });\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"start\", \"end\"]\n\n connect() {\n if (!this.hasStartTarget || !this.hasEndTarget) return\n\n this.startTarget.addEventListener(\"change\", this.setMinOnEndDate.bind(this))\n\n this.endTarget.addEventListener(\"focus\", this.fillEndDateIfBlank.bind(this))\n }\n\n setMinOnEndDate(event) {\n const startValue = event.target.value\n if (startValue) {\n this.endTarget.min = startValue\n }\n }\n\n fillEndDateIfBlank() {\n if (!this.endTarget.value && this.startTarget.value) {\n this.endTarget.value = this.startTarget.value\n this.endTarget.min = this.startTarget.value\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport * as R from \"remeda\";\nimport { Offcanvas } from 'bootstrap';\n\n// Connects to data-controller=\"header-search\"\nexport default class extends Controller {\n static targets = [\"search\", \"suggestions\", \"wrapper\"];\n\n connect() {\n const config = (window.outerWidth > 1024) ? { backdrop: true, scroll: false } : { backdrop: false, scroll: true }\n const overlay = new Offcanvas(this.wrapperTarget, config);\n\n const debounceSearch = R.debounce((target) => {\n target.form.requestSubmit();\n overlay.show();\n }, { timing: \"trailing\", waitMs: 300 });\n\n this.searchTargets.forEach((target) => {\n target.addEventListener(\"input\", (e) => {\n debounceSearch.call(target);\n });\n });\n }\n\n suggestionsTargetConnected(element) {\n element.addEventListener(\"click\", () => {\n this.searchTargets.forEach((target) => {\n if (target.value !== \"\") {\n target.value = element.textContent;\n target.form.requestSubmit();\n }\n });\n });\n }\n\n wrapperTargetConnected(element) {\n const searchTargets = this.searchTargets;\n\n element.addEventListener('hidden.bs.offcanvas', function (e) {\n searchTargets.forEach((target) => {\n target.value = \"\";\n });\n })\n\n element.addEventListener('shown.bs.offcanvas', function (e) {\n if (window.outerWidth <= 1024) {\n searchTargets[0].focus();\n } else {\n searchTargets[1].focus();\n }\n })\n }\n}\n","import { Controller } from \"@hotwired/stimulus\";\n\nimport IMask from \"imask\";\n\n// Connects to data-controller=\"input-mask\"\nexport default class extends Controller {\n static targets = [\"format\"];\n\n formatTargetConnected(target) {\n IMask(target, {\n mask: target.dataset.inputMaskFormat,\n lazy: false,\n blocks: {\n money: {\n mask: Number,\n scale: 2,\n thousandsSeparator: \"\",\n padFractionalZeros: true,\n radix: \".\"\n },\n monthYear: {\n mask: \"MM/YYYY\",\n lazy: false,\n blocks: {\n MM: {\n mask: IMask.MaskedRange,\n from: 1,\n to: 12,\n maxLength: 2,\n placeholderChar: \"M\"\n },\n YYYY: {\n mask: IMask.MaskedRange,\n from: 2024,\n to: 2099,\n placeholderChar: document.body.dataset.locale === \"fr\" ? \"A\" : \"Y\"\n }\n }\n },\n anything: {\n mask: /(.*?)/\n }\n }\n });\n }\n}\n","/*\n * International Telephone Input v24.8.2\n * https://github.com/jackocnr/intl-tel-input.git\n * Licensed under the MIT license\n */\n\n// UMD\n(function(factory) {\n if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n window.intlTelInput = factory();\n }\n}(() => {\n\nvar factoryOutput = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // src/js/intl-tel-input.ts\n var intl_tel_input_exports = {};\n __export(intl_tel_input_exports, {\n Iti: () => Iti,\n default: () => intl_tel_input_default\n });\n\n // src/js/intl-tel-input/data.ts\n var rawCountryData = [\n [\n \"af\",\n // Afghanistan\n \"93\"\n ],\n [\n \"ax\",\n // Åland Islands\n \"358\",\n 1,\n [\"18\"]\n ],\n [\n \"al\",\n // Albania\n \"355\"\n ],\n [\n \"dz\",\n // Algeria\n \"213\"\n ],\n [\n \"as\",\n // American Samoa\n \"1\",\n 5,\n [\"684\"]\n ],\n [\n \"ad\",\n // Andorra\n \"376\"\n ],\n [\n \"ao\",\n // Angola\n \"244\"\n ],\n [\n \"ai\",\n // Anguilla\n \"1\",\n 6,\n [\"264\"]\n ],\n [\n \"ag\",\n // Antigua and Barbuda\n \"1\",\n 7,\n [\"268\"]\n ],\n [\n \"ar\",\n // Argentina\n \"54\"\n ],\n [\n \"am\",\n // Armenia\n \"374\"\n ],\n [\n \"aw\",\n // Aruba\n \"297\"\n ],\n [\n \"ac\",\n // Ascension Island\n \"247\"\n ],\n [\n \"au\",\n // Australia\n \"61\",\n 0\n ],\n [\n \"at\",\n // Austria\n \"43\"\n ],\n [\n \"az\",\n // Azerbaijan\n \"994\"\n ],\n [\n \"bs\",\n // Bahamas\n \"1\",\n 8,\n [\"242\"]\n ],\n [\n \"bh\",\n // Bahrain\n \"973\"\n ],\n [\n \"bd\",\n // Bangladesh\n \"880\"\n ],\n [\n \"bb\",\n // Barbados\n \"1\",\n 9,\n [\"246\"]\n ],\n [\n \"by\",\n // Belarus\n \"375\"\n ],\n [\n \"be\",\n // Belgium\n \"32\"\n ],\n [\n \"bz\",\n // Belize\n \"501\"\n ],\n [\n \"bj\",\n // Benin\n \"229\"\n ],\n [\n \"bm\",\n // Bermuda\n \"1\",\n 10,\n [\"441\"]\n ],\n [\n \"bt\",\n // Bhutan\n \"975\"\n ],\n [\n \"bo\",\n // Bolivia\n \"591\"\n ],\n [\n \"ba\",\n // Bosnia and Herzegovina\n \"387\"\n ],\n [\n \"bw\",\n // Botswana\n \"267\"\n ],\n [\n \"br\",\n // Brazil\n \"55\"\n ],\n [\n \"io\",\n // British Indian Ocean Territory\n \"246\"\n ],\n [\n \"vg\",\n // British Virgin Islands\n \"1\",\n 11,\n [\"284\"]\n ],\n [\n \"bn\",\n // Brunei\n \"673\"\n ],\n [\n \"bg\",\n // Bulgaria\n \"359\"\n ],\n [\n \"bf\",\n // Burkina Faso\n \"226\"\n ],\n [\n \"bi\",\n // Burundi\n \"257\"\n ],\n [\n \"kh\",\n // Cambodia\n \"855\"\n ],\n [\n \"cm\",\n // Cameroon\n \"237\"\n ],\n [\n \"ca\",\n // Canada\n \"1\",\n 1,\n [\"204\", \"226\", \"236\", \"249\", \"250\", \"263\", \"289\", \"306\", \"343\", \"354\", \"365\", \"367\", \"368\", \"382\", \"387\", \"403\", \"416\", \"418\", \"428\", \"431\", \"437\", \"438\", \"450\", \"584\", \"468\", \"474\", \"506\", \"514\", \"519\", \"548\", \"579\", \"581\", \"584\", \"587\", \"604\", \"613\", \"639\", \"647\", \"672\", \"683\", \"705\", \"709\", \"742\", \"753\", \"778\", \"780\", \"782\", \"807\", \"819\", \"825\", \"867\", \"873\", \"879\", \"902\", \"905\"]\n ],\n [\n \"cv\",\n // Cape Verde\n \"238\"\n ],\n [\n \"bq\",\n // Caribbean Netherlands\n \"599\",\n 1,\n [\"3\", \"4\", \"7\"]\n ],\n [\n \"ky\",\n // Cayman Islands\n \"1\",\n 12,\n [\"345\"]\n ],\n [\n \"cf\",\n // Central African Republic\n \"236\"\n ],\n [\n \"td\",\n // Chad\n \"235\"\n ],\n [\n \"cl\",\n // Chile\n \"56\"\n ],\n [\n \"cn\",\n // China\n \"86\"\n ],\n [\n \"cx\",\n // Christmas Island\n \"61\",\n 2,\n [\"89164\"]\n ],\n [\n \"cc\",\n // Cocos (Keeling) Islands\n \"61\",\n 1,\n [\"89162\"]\n ],\n [\n \"co\",\n // Colombia\n \"57\"\n ],\n [\n \"km\",\n // Comoros\n \"269\"\n ],\n [\n \"cg\",\n // Congo (Brazzaville)\n \"242\"\n ],\n [\n \"cd\",\n // Congo (Kinshasa)\n \"243\"\n ],\n [\n \"ck\",\n // Cook Islands\n \"682\"\n ],\n [\n \"cr\",\n // Costa Rica\n \"506\"\n ],\n [\n \"ci\",\n // Côte d'Ivoire\n \"225\"\n ],\n [\n \"hr\",\n // Croatia\n \"385\"\n ],\n [\n \"cu\",\n // Cuba\n \"53\"\n ],\n [\n \"cw\",\n // Curaçao\n \"599\",\n 0\n ],\n [\n \"cy\",\n // Cyprus\n \"357\"\n ],\n [\n \"cz\",\n // Czech Republic\n \"420\"\n ],\n [\n \"dk\",\n // Denmark\n \"45\"\n ],\n [\n \"dj\",\n // Djibouti\n \"253\"\n ],\n [\n \"dm\",\n // Dominica\n \"1\",\n 13,\n [\"767\"]\n ],\n [\n \"do\",\n // Dominican Republic\n \"1\",\n 2,\n [\"809\", \"829\", \"849\"]\n ],\n [\n \"ec\",\n // Ecuador\n \"593\"\n ],\n [\n \"eg\",\n // Egypt\n \"20\"\n ],\n [\n \"sv\",\n // El Salvador\n \"503\"\n ],\n [\n \"gq\",\n // Equatorial Guinea\n \"240\"\n ],\n [\n \"er\",\n // Eritrea\n \"291\"\n ],\n [\n \"ee\",\n // Estonia\n \"372\"\n ],\n [\n \"sz\",\n // Eswatini\n \"268\"\n ],\n [\n \"et\",\n // Ethiopia\n \"251\"\n ],\n [\n \"fk\",\n // Falkland Islands (Malvinas)\n \"500\"\n ],\n [\n \"fo\",\n // Faroe Islands\n \"298\"\n ],\n [\n \"fj\",\n // Fiji\n \"679\"\n ],\n [\n \"fi\",\n // Finland\n \"358\",\n 0\n ],\n [\n \"fr\",\n // France\n \"33\"\n ],\n [\n \"gf\",\n // French Guiana\n \"594\"\n ],\n [\n \"pf\",\n // French Polynesia\n \"689\"\n ],\n [\n \"ga\",\n // Gabon\n \"241\"\n ],\n [\n \"gm\",\n // Gambia\n \"220\"\n ],\n [\n \"ge\",\n // Georgia\n \"995\"\n ],\n [\n \"de\",\n // Germany\n \"49\"\n ],\n [\n \"gh\",\n // Ghana\n \"233\"\n ],\n [\n \"gi\",\n // Gibraltar\n \"350\"\n ],\n [\n \"gr\",\n // Greece\n \"30\"\n ],\n [\n \"gl\",\n // Greenland\n \"299\"\n ],\n [\n \"gd\",\n // Grenada\n \"1\",\n 14,\n [\"473\"]\n ],\n [\n \"gp\",\n // Guadeloupe\n \"590\",\n 0\n ],\n [\n \"gu\",\n // Guam\n \"1\",\n 15,\n [\"671\"]\n ],\n [\n \"gt\",\n // Guatemala\n \"502\"\n ],\n [\n \"gg\",\n // Guernsey\n \"44\",\n 1,\n [\"1481\", \"7781\", \"7839\", \"7911\"]\n ],\n [\n \"gn\",\n // Guinea\n \"224\"\n ],\n [\n \"gw\",\n // Guinea-Bissau\n \"245\"\n ],\n [\n \"gy\",\n // Guyana\n \"592\"\n ],\n [\n \"ht\",\n // Haiti\n \"509\"\n ],\n [\n \"hn\",\n // Honduras\n \"504\"\n ],\n [\n \"hk\",\n // Hong Kong SAR China\n \"852\"\n ],\n [\n \"hu\",\n // Hungary\n \"36\"\n ],\n [\n \"is\",\n // Iceland\n \"354\"\n ],\n [\n \"in\",\n // India\n \"91\"\n ],\n [\n \"id\",\n // Indonesia\n \"62\"\n ],\n [\n \"ir\",\n // Iran\n \"98\"\n ],\n [\n \"iq\",\n // Iraq\n \"964\"\n ],\n [\n \"ie\",\n // Ireland\n \"353\"\n ],\n [\n \"im\",\n // Isle of Man\n \"44\",\n 2,\n [\"1624\", \"74576\", \"7524\", \"7924\", \"7624\"]\n ],\n [\n \"il\",\n // Israel\n \"972\"\n ],\n [\n \"it\",\n // Italy\n \"39\",\n 0\n ],\n [\n \"jm\",\n // Jamaica\n \"1\",\n 4,\n [\"876\", \"658\"]\n ],\n [\n \"jp\",\n // Japan\n \"81\"\n ],\n [\n \"je\",\n // Jersey\n \"44\",\n 3,\n [\"1534\", \"7509\", \"7700\", \"7797\", \"7829\", \"7937\"]\n ],\n [\n \"jo\",\n // Jordan\n \"962\"\n ],\n [\n \"kz\",\n // Kazakhstan\n \"7\",\n 1,\n [\"33\", \"7\"]\n ],\n [\n \"ke\",\n // Kenya\n \"254\"\n ],\n [\n \"ki\",\n // Kiribati\n \"686\"\n ],\n [\n \"xk\",\n // Kosovo\n \"383\"\n ],\n [\n \"kw\",\n // Kuwait\n \"965\"\n ],\n [\n \"kg\",\n // Kyrgyzstan\n \"996\"\n ],\n [\n \"la\",\n // Laos\n \"856\"\n ],\n [\n \"lv\",\n // Latvia\n \"371\"\n ],\n [\n \"lb\",\n // Lebanon\n \"961\"\n ],\n [\n \"ls\",\n // Lesotho\n \"266\"\n ],\n [\n \"lr\",\n // Liberia\n \"231\"\n ],\n [\n \"ly\",\n // Libya\n \"218\"\n ],\n [\n \"li\",\n // Liechtenstein\n \"423\"\n ],\n [\n \"lt\",\n // Lithuania\n \"370\"\n ],\n [\n \"lu\",\n // Luxembourg\n \"352\"\n ],\n [\n \"mo\",\n // Macao SAR China\n \"853\"\n ],\n [\n \"mg\",\n // Madagascar\n \"261\"\n ],\n [\n \"mw\",\n // Malawi\n \"265\"\n ],\n [\n \"my\",\n // Malaysia\n \"60\"\n ],\n [\n \"mv\",\n // Maldives\n \"960\"\n ],\n [\n \"ml\",\n // Mali\n \"223\"\n ],\n [\n \"mt\",\n // Malta\n \"356\"\n ],\n [\n \"mh\",\n // Marshall Islands\n \"692\"\n ],\n [\n \"mq\",\n // Martinique\n \"596\"\n ],\n [\n \"mr\",\n // Mauritania\n \"222\"\n ],\n [\n \"mu\",\n // Mauritius\n \"230\"\n ],\n [\n \"yt\",\n // Mayotte\n \"262\",\n 1,\n [\"269\", \"639\"]\n ],\n [\n \"mx\",\n // Mexico\n \"52\"\n ],\n [\n \"fm\",\n // Micronesia\n \"691\"\n ],\n [\n \"md\",\n // Moldova\n \"373\"\n ],\n [\n \"mc\",\n // Monaco\n \"377\"\n ],\n [\n \"mn\",\n // Mongolia\n \"976\"\n ],\n [\n \"me\",\n // Montenegro\n \"382\"\n ],\n [\n \"ms\",\n // Montserrat\n \"1\",\n 16,\n [\"664\"]\n ],\n [\n \"ma\",\n // Morocco\n \"212\",\n 0\n ],\n [\n \"mz\",\n // Mozambique\n \"258\"\n ],\n [\n \"mm\",\n // Myanmar (Burma)\n \"95\"\n ],\n [\n \"na\",\n // Namibia\n \"264\"\n ],\n [\n \"nr\",\n // Nauru\n \"674\"\n ],\n [\n \"np\",\n // Nepal\n \"977\"\n ],\n [\n \"nl\",\n // Netherlands\n \"31\"\n ],\n [\n \"nc\",\n // New Caledonia\n \"687\"\n ],\n [\n \"nz\",\n // New Zealand\n \"64\"\n ],\n [\n \"ni\",\n // Nicaragua\n \"505\"\n ],\n [\n \"ne\",\n // Niger\n \"227\"\n ],\n [\n \"ng\",\n // Nigeria\n \"234\"\n ],\n [\n \"nu\",\n // Niue\n \"683\"\n ],\n [\n \"nf\",\n // Norfolk Island\n \"672\"\n ],\n [\n \"kp\",\n // North Korea\n \"850\"\n ],\n [\n \"mk\",\n // North Macedonia\n \"389\"\n ],\n [\n \"mp\",\n // Northern Mariana Islands\n \"1\",\n 17,\n [\"670\"]\n ],\n [\n \"no\",\n // Norway\n \"47\",\n 0\n ],\n [\n \"om\",\n // Oman\n \"968\"\n ],\n [\n \"pk\",\n // Pakistan\n \"92\"\n ],\n [\n \"pw\",\n // Palau\n \"680\"\n ],\n [\n \"ps\",\n // Palestinian Territories\n \"970\"\n ],\n [\n \"pa\",\n // Panama\n \"507\"\n ],\n [\n \"pg\",\n // Papua New Guinea\n \"675\"\n ],\n [\n \"py\",\n // Paraguay\n \"595\"\n ],\n [\n \"pe\",\n // Peru\n \"51\"\n ],\n [\n \"ph\",\n // Philippines\n \"63\"\n ],\n [\n \"pl\",\n // Poland\n \"48\"\n ],\n [\n \"pt\",\n // Portugal\n \"351\"\n ],\n [\n \"pr\",\n // Puerto Rico\n \"1\",\n 3,\n [\"787\", \"939\"]\n ],\n [\n \"qa\",\n // Qatar\n \"974\"\n ],\n [\n \"re\",\n // Réunion\n \"262\",\n 0\n ],\n [\n \"ro\",\n // Romania\n \"40\"\n ],\n [\n \"ru\",\n // Russia\n \"7\",\n 0\n ],\n [\n \"rw\",\n // Rwanda\n \"250\"\n ],\n [\n \"ws\",\n // Samoa\n \"685\"\n ],\n [\n \"sm\",\n // San Marino\n \"378\"\n ],\n [\n \"st\",\n // São Tomé & Príncipe\n \"239\"\n ],\n [\n \"sa\",\n // Saudi Arabia\n \"966\"\n ],\n [\n \"sn\",\n // Senegal\n \"221\"\n ],\n [\n \"rs\",\n // Serbia\n \"381\"\n ],\n [\n \"sc\",\n // Seychelles\n \"248\"\n ],\n [\n \"sl\",\n // Sierra Leone\n \"232\"\n ],\n [\n \"sg\",\n // Singapore\n \"65\"\n ],\n [\n \"sx\",\n // Sint Maarten\n \"1\",\n 21,\n [\"721\"]\n ],\n [\n \"sk\",\n // Slovakia\n \"421\"\n ],\n [\n \"si\",\n // Slovenia\n \"386\"\n ],\n [\n \"sb\",\n // Solomon Islands\n \"677\"\n ],\n [\n \"so\",\n // Somalia\n \"252\"\n ],\n [\n \"za\",\n // South Africa\n \"27\"\n ],\n [\n \"kr\",\n // South Korea\n \"82\"\n ],\n [\n \"ss\",\n // South Sudan\n \"211\"\n ],\n [\n \"es\",\n // Spain\n \"34\"\n ],\n [\n \"lk\",\n // Sri Lanka\n \"94\"\n ],\n [\n \"bl\",\n // St. Barthélemy\n \"590\",\n 1\n ],\n [\n \"sh\",\n // St. Helena\n \"290\"\n ],\n [\n \"kn\",\n // St. Kitts & Nevis\n \"1\",\n 18,\n [\"869\"]\n ],\n [\n \"lc\",\n // St. Lucia\n \"1\",\n 19,\n [\"758\"]\n ],\n [\n \"mf\",\n // St. Martin\n \"590\",\n 2\n ],\n [\n \"pm\",\n // St. Pierre & Miquelon\n \"508\"\n ],\n [\n \"vc\",\n // St. Vincent & Grenadines\n \"1\",\n 20,\n [\"784\"]\n ],\n [\n \"sd\",\n // Sudan\n \"249\"\n ],\n [\n \"sr\",\n // Suriname\n \"597\"\n ],\n [\n \"sj\",\n // Svalbard & Jan Mayen\n \"47\",\n 1,\n [\"79\"]\n ],\n [\n \"se\",\n // Sweden\n \"46\"\n ],\n [\n \"ch\",\n // Switzerland\n \"41\"\n ],\n [\n \"sy\",\n // Syria\n \"963\"\n ],\n [\n \"tw\",\n // Taiwan\n \"886\"\n ],\n [\n \"tj\",\n // Tajikistan\n \"992\"\n ],\n [\n \"tz\",\n // Tanzania\n \"255\"\n ],\n [\n \"th\",\n // Thailand\n \"66\"\n ],\n [\n \"tl\",\n // Timor-Leste\n \"670\"\n ],\n [\n \"tg\",\n // Togo\n \"228\"\n ],\n [\n \"tk\",\n // Tokelau\n \"690\"\n ],\n [\n \"to\",\n // Tonga\n \"676\"\n ],\n [\n \"tt\",\n // Trinidad & Tobago\n \"1\",\n 22,\n [\"868\"]\n ],\n [\n \"tn\",\n // Tunisia\n \"216\"\n ],\n [\n \"tr\",\n // Turkey\n \"90\"\n ],\n [\n \"tm\",\n // Turkmenistan\n \"993\"\n ],\n [\n \"tc\",\n // Turks & Caicos Islands\n \"1\",\n 23,\n [\"649\"]\n ],\n [\n \"tv\",\n // Tuvalu\n \"688\"\n ],\n [\n \"ug\",\n // Uganda\n \"256\"\n ],\n [\n \"ua\",\n // Ukraine\n \"380\"\n ],\n [\n \"ae\",\n // United Arab Emirates\n \"971\"\n ],\n [\n \"gb\",\n // United Kingdom\n \"44\",\n 0\n ],\n [\n \"us\",\n // United States\n \"1\",\n 0\n ],\n [\n \"uy\",\n // Uruguay\n \"598\"\n ],\n [\n \"vi\",\n // U.S. Virgin Islands\n \"1\",\n 24,\n [\"340\"]\n ],\n [\n \"uz\",\n // Uzbekistan\n \"998\"\n ],\n [\n \"vu\",\n // Vanuatu\n \"678\"\n ],\n [\n \"va\",\n // Vatican City\n \"39\",\n 1,\n [\"06698\"]\n ],\n [\n \"ve\",\n // Venezuela\n \"58\"\n ],\n [\n \"vn\",\n // Vietnam\n \"84\"\n ],\n [\n \"wf\",\n // Wallis & Futuna\n \"681\"\n ],\n [\n \"eh\",\n // Western Sahara\n \"212\",\n 1,\n [\"5288\", \"5289\"]\n ],\n [\n \"ye\",\n // Yemen\n \"967\"\n ],\n [\n \"zm\",\n // Zambia\n \"260\"\n ],\n [\n \"zw\",\n // Zimbabwe\n \"263\"\n ]\n ];\n var allCountries = [];\n for (let i = 0; i < rawCountryData.length; i++) {\n const c = rawCountryData[i];\n allCountries[i] = {\n name: \"\",\n // this is now populated in the plugin\n iso2: c[0],\n dialCode: c[1],\n priority: c[2] || 0,\n areaCodes: c[3] || null,\n nodeById: {}\n };\n }\n var data_default = allCountries;\n\n // src/js/intl-tel-input/i18n/en/countries.ts\n var countryTranslations = {\n ad: \"Andorra\",\n ae: \"United Arab Emirates\",\n af: \"Afghanistan\",\n ag: \"Antigua & Barbuda\",\n ai: \"Anguilla\",\n al: \"Albania\",\n am: \"Armenia\",\n ao: \"Angola\",\n ar: \"Argentina\",\n as: \"American Samoa\",\n at: \"Austria\",\n au: \"Australia\",\n aw: \"Aruba\",\n ax: \"\\xC5land Islands\",\n az: \"Azerbaijan\",\n ba: \"Bosnia & Herzegovina\",\n bb: \"Barbados\",\n bd: \"Bangladesh\",\n be: \"Belgium\",\n bf: \"Burkina Faso\",\n bg: \"Bulgaria\",\n bh: \"Bahrain\",\n bi: \"Burundi\",\n bj: \"Benin\",\n bl: \"St. Barth\\xE9lemy\",\n bm: \"Bermuda\",\n bn: \"Brunei\",\n bo: \"Bolivia\",\n bq: \"Caribbean Netherlands\",\n br: \"Brazil\",\n bs: \"Bahamas\",\n bt: \"Bhutan\",\n bw: \"Botswana\",\n by: \"Belarus\",\n bz: \"Belize\",\n ca: \"Canada\",\n cc: \"Cocos (Keeling) Islands\",\n cd: \"Congo - Kinshasa\",\n cf: \"Central African Republic\",\n cg: \"Congo - Brazzaville\",\n ch: \"Switzerland\",\n ci: \"C\\xF4te d\\u2019Ivoire\",\n ck: \"Cook Islands\",\n cl: \"Chile\",\n cm: \"Cameroon\",\n cn: \"China\",\n co: \"Colombia\",\n cr: \"Costa Rica\",\n cu: \"Cuba\",\n cv: \"Cape Verde\",\n cw: \"Cura\\xE7ao\",\n cx: \"Christmas Island\",\n cy: \"Cyprus\",\n cz: \"Czechia\",\n de: \"Germany\",\n dj: \"Djibouti\",\n dk: \"Denmark\",\n dm: \"Dominica\",\n do: \"Dominican Republic\",\n dz: \"Algeria\",\n ec: \"Ecuador\",\n ee: \"Estonia\",\n eg: \"Egypt\",\n eh: \"Western Sahara\",\n er: \"Eritrea\",\n es: \"Spain\",\n et: \"Ethiopia\",\n fi: \"Finland\",\n fj: \"Fiji\",\n fk: \"Falkland Islands\",\n fm: \"Micronesia\",\n fo: \"Faroe Islands\",\n fr: \"France\",\n ga: \"Gabon\",\n gb: \"United Kingdom\",\n gd: \"Grenada\",\n ge: \"Georgia\",\n gf: \"French Guiana\",\n gg: \"Guernsey\",\n gh: \"Ghana\",\n gi: \"Gibraltar\",\n gl: \"Greenland\",\n gm: \"Gambia\",\n gn: \"Guinea\",\n gp: \"Guadeloupe\",\n gq: \"Equatorial Guinea\",\n gr: \"Greece\",\n gt: \"Guatemala\",\n gu: \"Guam\",\n gw: \"Guinea-Bissau\",\n gy: \"Guyana\",\n hk: \"Hong Kong SAR China\",\n hn: \"Honduras\",\n hr: \"Croatia\",\n ht: \"Haiti\",\n hu: \"Hungary\",\n id: \"Indonesia\",\n ie: \"Ireland\",\n il: \"Israel\",\n im: \"Isle of Man\",\n in: \"India\",\n io: \"British Indian Ocean Territory\",\n iq: \"Iraq\",\n ir: \"Iran\",\n is: \"Iceland\",\n it: \"Italy\",\n je: \"Jersey\",\n jm: \"Jamaica\",\n jo: \"Jordan\",\n jp: \"Japan\",\n ke: \"Kenya\",\n kg: \"Kyrgyzstan\",\n kh: \"Cambodia\",\n ki: \"Kiribati\",\n km: \"Comoros\",\n kn: \"St. Kitts & Nevis\",\n kp: \"North Korea\",\n kr: \"South Korea\",\n kw: \"Kuwait\",\n ky: \"Cayman Islands\",\n kz: \"Kazakhstan\",\n la: \"Laos\",\n lb: \"Lebanon\",\n lc: \"St. Lucia\",\n li: \"Liechtenstein\",\n lk: \"Sri Lanka\",\n lr: \"Liberia\",\n ls: \"Lesotho\",\n lt: \"Lithuania\",\n lu: \"Luxembourg\",\n lv: \"Latvia\",\n ly: \"Libya\",\n ma: \"Morocco\",\n mc: \"Monaco\",\n md: \"Moldova\",\n me: \"Montenegro\",\n mf: \"St. Martin\",\n mg: \"Madagascar\",\n mh: \"Marshall Islands\",\n mk: \"North Macedonia\",\n ml: \"Mali\",\n mm: \"Myanmar (Burma)\",\n mn: \"Mongolia\",\n mo: \"Macao SAR China\",\n mp: \"Northern Mariana Islands\",\n mq: \"Martinique\",\n mr: \"Mauritania\",\n ms: \"Montserrat\",\n mt: \"Malta\",\n mu: \"Mauritius\",\n mv: \"Maldives\",\n mw: \"Malawi\",\n mx: \"Mexico\",\n my: \"Malaysia\",\n mz: \"Mozambique\",\n na: \"Namibia\",\n nc: \"New Caledonia\",\n ne: \"Niger\",\n nf: \"Norfolk Island\",\n ng: \"Nigeria\",\n ni: \"Nicaragua\",\n nl: \"Netherlands\",\n no: \"Norway\",\n np: \"Nepal\",\n nr: \"Nauru\",\n nu: \"Niue\",\n nz: \"New Zealand\",\n om: \"Oman\",\n pa: \"Panama\",\n pe: \"Peru\",\n pf: \"French Polynesia\",\n pg: \"Papua New Guinea\",\n ph: \"Philippines\",\n pk: \"Pakistan\",\n pl: \"Poland\",\n pm: \"St. Pierre & Miquelon\",\n pr: \"Puerto Rico\",\n ps: \"Palestinian Territories\",\n pt: \"Portugal\",\n pw: \"Palau\",\n py: \"Paraguay\",\n qa: \"Qatar\",\n re: \"R\\xE9union\",\n ro: \"Romania\",\n rs: \"Serbia\",\n ru: \"Russia\",\n rw: \"Rwanda\",\n sa: \"Saudi Arabia\",\n sb: \"Solomon Islands\",\n sc: \"Seychelles\",\n sd: \"Sudan\",\n se: \"Sweden\",\n sg: \"Singapore\",\n sh: \"St. Helena\",\n si: \"Slovenia\",\n sj: \"Svalbard & Jan Mayen\",\n sk: \"Slovakia\",\n sl: \"Sierra Leone\",\n sm: \"San Marino\",\n sn: \"Senegal\",\n so: \"Somalia\",\n sr: \"Suriname\",\n ss: \"South Sudan\",\n st: \"S\\xE3o Tom\\xE9 & Pr\\xEDncipe\",\n sv: \"El Salvador\",\n sx: \"Sint Maarten\",\n sy: \"Syria\",\n sz: \"Eswatini\",\n tc: \"Turks & Caicos Islands\",\n td: \"Chad\",\n tg: \"Togo\",\n th: \"Thailand\",\n tj: \"Tajikistan\",\n tk: \"Tokelau\",\n tl: \"Timor-Leste\",\n tm: \"Turkmenistan\",\n tn: \"Tunisia\",\n to: \"Tonga\",\n tr: \"Turkey\",\n tt: \"Trinidad & Tobago\",\n tv: \"Tuvalu\",\n tw: \"Taiwan\",\n tz: \"Tanzania\",\n ua: \"Ukraine\",\n ug: \"Uganda\",\n us: \"United States\",\n uy: \"Uruguay\",\n uz: \"Uzbekistan\",\n va: \"Vatican City\",\n vc: \"St. Vincent & Grenadines\",\n ve: \"Venezuela\",\n vg: \"British Virgin Islands\",\n vi: \"U.S. Virgin Islands\",\n vn: \"Vietnam\",\n vu: \"Vanuatu\",\n wf: \"Wallis & Futuna\",\n ws: \"Samoa\",\n ye: \"Yemen\",\n yt: \"Mayotte\",\n za: \"South Africa\",\n zm: \"Zambia\",\n zw: \"Zimbabwe\"\n };\n var countries_default = countryTranslations;\n\n // src/js/intl-tel-input/i18n/en/interface.ts\n var interfaceTranslations = {\n selectedCountryAriaLabel: \"Selected country\",\n noCountrySelected: \"No country selected\",\n countryListAriaLabel: \"List of countries\",\n searchPlaceholder: \"Search\",\n zeroSearchResults: \"No results found\",\n oneSearchResult: \"1 result found\",\n multipleSearchResults: \"${count} results found\",\n // additional countries (not supported by country-list library)\n ac: \"Ascension Island\",\n xk: \"Kosovo\"\n };\n var interface_default = interfaceTranslations;\n\n // src/js/intl-tel-input/i18n/en/index.ts\n var allTranslations = { ...countries_default, ...interface_default };\n var en_default = allTranslations;\n\n // src/js/intl-tel-input.ts\n for (let i = 0; i < data_default.length; i++) {\n data_default[i].name = en_default[data_default[i].iso2];\n }\n var id = 0;\n var defaults = {\n //* Whether or not to allow the dropdown.\n allowDropdown: true,\n //* Add a placeholder in the input with an example number for the selected country.\n autoPlaceholder: \"polite\",\n //* Modify the parentClass.\n containerClass: \"\",\n //* The order of the countries in the dropdown. Defaults to alphabetical.\n countryOrder: null,\n //* Add a country search input at the top of the dropdown.\n countrySearch: true,\n //* Modify the auto placeholder.\n customPlaceholder: null,\n //* Append menu to specified element.\n dropdownContainer: null,\n //* Don't display these countries.\n excludeCountries: [],\n //* Fix the dropdown width to the input width (rather than being as wide as the longest country name).\n fixDropdownWidth: true,\n //* Format the number as the user types\n formatAsYouType: true,\n //* Format the input value during initialisation and on setNumber.\n formatOnDisplay: true,\n //* geoIp lookup function.\n geoIpLookup: null,\n //* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.\n hiddenInput: null,\n //* Internationalise the plugin text e.g. search input placeholder, country names.\n i18n: {},\n //* Initial country.\n initialCountry: \"\",\n //* Specify the path to the libphonenumber script to enable validation/formatting.\n loadUtilsOnInit: \"\",\n //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.\n nationalMode: true,\n //* Display only these countries.\n onlyCountries: [],\n //* Number type to use for placeholders.\n placeholderNumberType: \"MOBILE\",\n //* Show flags - for both the selected country, and in the country dropdown\n showFlags: true,\n //* Display the international dial code next to the selected flag.\n separateDialCode: false,\n //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.\n strictMode: false,\n //* Use full screen popup instead of dropdown for country list.\n useFullscreenPopup: typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? (\n //* We cannot just test screen size as some smartphones/website meta tags will report desktop resolutions.\n //* Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'\n /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n ) || window.innerWidth <= 500\n ) : false,\n //* Deprecated! Use `loadUtilsOnInit` instead.\n utilsScript: \"\",\n //* The number type to enforce during validation.\n validationNumberType: \"MOBILE\"\n };\n var regionlessNanpNumbers = [\n \"800\",\n \"822\",\n \"833\",\n \"844\",\n \"855\",\n \"866\",\n \"877\",\n \"880\",\n \"881\",\n \"882\",\n \"883\",\n \"884\",\n \"885\",\n \"886\",\n \"887\",\n \"888\",\n \"889\"\n ];\n var getNumeric = (s) => s.replace(/\\D/g, \"\");\n var normaliseString = (s = \"\") => s.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\").toLowerCase();\n var isRegionlessNanp = (number) => {\n const numeric = getNumeric(number);\n if (numeric.charAt(0) === \"1\") {\n const areaCode = numeric.substr(1, 3);\n return regionlessNanpNumbers.indexOf(areaCode) !== -1;\n }\n return false;\n };\n var translateCursorPosition = (relevantChars, formattedValue, prevCaretPos, isDeleteForwards) => {\n if (prevCaretPos === 0 && !isDeleteForwards) {\n return 0;\n }\n let count = 0;\n for (let i = 0; i < formattedValue.length; i++) {\n if (/[+0-9]/.test(formattedValue[i])) {\n count++;\n }\n if (count === relevantChars && !isDeleteForwards) {\n return i + 1;\n }\n if (isDeleteForwards && count === relevantChars + 1) {\n return i;\n }\n }\n return formattedValue.length;\n };\n var createEl = (name, attrs, container) => {\n const el = document.createElement(name);\n if (attrs) {\n Object.entries(attrs).forEach(([key, value]) => el.setAttribute(key, value));\n }\n if (container) {\n container.appendChild(el);\n }\n return el;\n };\n var forEachInstance = (method, ...args) => {\n const { instances } = intlTelInput;\n Object.values(instances).forEach((instance) => instance[method](...args));\n };\n var Iti = class {\n constructor(input, customOptions = {}) {\n this.id = id++;\n this.telInput = input;\n this.highlightedItem = null;\n this.options = Object.assign({}, defaults, customOptions);\n this.hadInitialPlaceholder = Boolean(input.getAttribute(\"placeholder\"));\n }\n //* Can't be private as it's called from intlTelInput convenience wrapper.\n _init() {\n if (this.options.useFullscreenPopup) {\n this.options.fixDropdownWidth = false;\n }\n if (this.options.onlyCountries.length === 1) {\n this.options.initialCountry = this.options.onlyCountries[0];\n }\n if (this.options.separateDialCode) {\n this.options.nationalMode = false;\n }\n if (this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode) {\n this.options.nationalMode = false;\n }\n if (this.options.useFullscreenPopup && !this.options.dropdownContainer) {\n this.options.dropdownContainer = document.body;\n }\n this.isAndroid = typeof navigator !== \"undefined\" ? /Android/i.test(navigator.userAgent) : false;\n this.isRTL = !!this.telInput.closest(\"[dir=rtl]\");\n const showOnDefaultSide = this.options.allowDropdown || this.options.separateDialCode;\n this.showSelectedCountryOnLeft = this.isRTL ? !showOnDefaultSide : showOnDefaultSide;\n if (this.options.separateDialCode) {\n if (this.isRTL) {\n this.originalPaddingRight = this.telInput.style.paddingRight;\n } else {\n this.originalPaddingLeft = this.telInput.style.paddingLeft;\n }\n }\n this.options.i18n = { ...en_default, ...this.options.i18n };\n const autoCountryPromise = new Promise((resolve, reject) => {\n this.resolveAutoCountryPromise = resolve;\n this.rejectAutoCountryPromise = reject;\n });\n const utilsScriptPromise = new Promise((resolve, reject) => {\n this.resolveUtilsScriptPromise = resolve;\n this.rejectUtilsScriptPromise = reject;\n });\n this.promise = Promise.all([autoCountryPromise, utilsScriptPromise]);\n this.selectedCountryData = {};\n this._processCountryData();\n this._generateMarkup();\n this._setInitialState();\n this._initListeners();\n this._initRequests();\n }\n //********************\n //* PRIVATE METHODS\n //********************\n //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.\n _processCountryData() {\n this._processAllCountries();\n this._processDialCodes();\n this._translateCountryNames();\n this._sortCountries();\n }\n //* Sort countries by countryOrder option (if present), then name.\n _sortCountries() {\n if (this.options.countryOrder) {\n this.options.countryOrder = this.options.countryOrder.map((country) => country.toLowerCase());\n }\n this.countries.sort((a, b) => {\n const { countryOrder } = this.options;\n if (countryOrder) {\n const aIndex = countryOrder.indexOf(a.iso2);\n const bIndex = countryOrder.indexOf(b.iso2);\n const aIndexExists = aIndex > -1;\n const bIndexExists = bIndex > -1;\n if (aIndexExists || bIndexExists) {\n if (aIndexExists && bIndexExists) {\n return aIndex - bIndex;\n }\n return aIndexExists ? -1 : 1;\n }\n }\n return a.name.localeCompare(b.name);\n });\n }\n //* Add a dial code to this.dialCodeToIso2Map.\n _addToDialCodeMap(iso2, dialCode, priority) {\n if (dialCode.length > this.dialCodeMaxLen) {\n this.dialCodeMaxLen = dialCode.length;\n }\n if (!this.dialCodeToIso2Map.hasOwnProperty(dialCode)) {\n this.dialCodeToIso2Map[dialCode] = [];\n }\n for (let i = 0; i < this.dialCodeToIso2Map[dialCode].length; i++) {\n if (this.dialCodeToIso2Map[dialCode][i] === iso2) {\n return;\n }\n }\n const index = priority !== void 0 ? priority : this.dialCodeToIso2Map[dialCode].length;\n this.dialCodeToIso2Map[dialCode][index] = iso2;\n }\n //* Process onlyCountries or excludeCountries array if present.\n _processAllCountries() {\n const { onlyCountries, excludeCountries } = this.options;\n if (onlyCountries.length) {\n const lowerCaseOnlyCountries = onlyCountries.map(\n (country) => country.toLowerCase()\n );\n this.countries = data_default.filter(\n (country) => lowerCaseOnlyCountries.indexOf(country.iso2) > -1\n );\n } else if (excludeCountries.length) {\n const lowerCaseExcludeCountries = excludeCountries.map(\n (country) => country.toLowerCase()\n );\n this.countries = data_default.filter(\n (country) => lowerCaseExcludeCountries.indexOf(country.iso2) === -1\n );\n } else {\n this.countries = data_default;\n }\n }\n //* Translate Countries by object literal provided on config.\n _translateCountryNames() {\n for (let i = 0; i < this.countries.length; i++) {\n const iso2 = this.countries[i].iso2.toLowerCase();\n if (this.options.i18n.hasOwnProperty(iso2)) {\n this.countries[i].name = this.options.i18n[iso2];\n }\n }\n }\n //* Generate this.dialCodes and this.dialCodeToIso2Map.\n _processDialCodes() {\n this.dialCodes = {};\n this.dialCodeMaxLen = 0;\n this.dialCodeToIso2Map = {};\n for (let i = 0; i < this.countries.length; i++) {\n const c = this.countries[i];\n if (!this.dialCodes[c.dialCode]) {\n this.dialCodes[c.dialCode] = true;\n }\n this._addToDialCodeMap(c.iso2, c.dialCode, c.priority);\n }\n for (let i = 0; i < this.countries.length; i++) {\n const c = this.countries[i];\n if (c.areaCodes) {\n const rootIso2Code = this.dialCodeToIso2Map[c.dialCode][0];\n for (let j = 0; j < c.areaCodes.length; j++) {\n const areaCode = c.areaCodes[j];\n for (let k = 1; k < areaCode.length; k++) {\n const partialDialCode = c.dialCode + areaCode.substr(0, k);\n this._addToDialCodeMap(rootIso2Code, partialDialCode);\n this._addToDialCodeMap(c.iso2, partialDialCode);\n }\n this._addToDialCodeMap(c.iso2, c.dialCode + areaCode);\n }\n }\n }\n }\n //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.\n _generateMarkup() {\n this.telInput.classList.add(\"iti__tel-input\");\n if (!this.telInput.hasAttribute(\"autocomplete\") && !(this.telInput.form && this.telInput.form.hasAttribute(\"autocomplete\"))) {\n this.telInput.setAttribute(\"autocomplete\", \"off\");\n }\n const {\n allowDropdown,\n separateDialCode,\n showFlags,\n containerClass,\n hiddenInput,\n dropdownContainer,\n fixDropdownWidth,\n useFullscreenPopup,\n countrySearch,\n i18n\n } = this.options;\n let parentClass = \"iti\";\n if (allowDropdown) {\n parentClass += \" iti--allow-dropdown\";\n }\n if (showFlags) {\n parentClass += \" iti--show-flags\";\n }\n if (containerClass) {\n parentClass += ` ${containerClass}`;\n }\n if (!useFullscreenPopup) {\n parentClass += \" iti--inline-dropdown\";\n }\n const wrapper = createEl(\"div\", { class: parentClass });\n this.telInput.parentNode?.insertBefore(wrapper, this.telInput);\n if (allowDropdown || showFlags || separateDialCode) {\n this.countryContainer = createEl(\n \"div\",\n { class: \"iti__country-container\" },\n wrapper\n );\n if (this.showSelectedCountryOnLeft) {\n this.countryContainer.style.left = \"0px\";\n } else {\n this.countryContainer.style.right = \"0px\";\n }\n if (allowDropdown) {\n this.selectedCountry = createEl(\n \"button\",\n {\n type: \"button\",\n class: \"iti__selected-country\",\n \"aria-expanded\": \"false\",\n \"aria-label\": this.options.i18n.selectedCountryAriaLabel,\n \"aria-haspopup\": \"true\",\n \"aria-controls\": `iti-${this.id}__dropdown-content`,\n \"role\": \"combobox\"\n },\n this.countryContainer\n );\n if (this.telInput.disabled) {\n this.selectedCountry.setAttribute(\"disabled\", \"true\");\n }\n } else {\n this.selectedCountry = createEl(\n \"div\",\n { class: \"iti__selected-country\" },\n this.countryContainer\n );\n }\n const selectedCountryPrimary = createEl(\"div\", { class: \"iti__selected-country-primary\" }, this.selectedCountry);\n this.selectedCountryInner = createEl(\"div\", { class: \"iti__flag\" }, selectedCountryPrimary);\n this.selectedCountryA11yText = createEl(\n \"span\",\n { class: \"iti__a11y-text\" },\n this.selectedCountryInner\n );\n if (allowDropdown) {\n this.dropdownArrow = createEl(\n \"div\",\n { class: \"iti__arrow\", \"aria-hidden\": \"true\" },\n selectedCountryPrimary\n );\n }\n if (separateDialCode) {\n this.selectedDialCode = createEl(\n \"div\",\n { class: \"iti__selected-dial-code\" },\n this.selectedCountry\n );\n }\n if (allowDropdown) {\n const extraClasses = fixDropdownWidth ? \"\" : \"iti--flexible-dropdown-width\";\n this.dropdownContent = createEl(\"div\", {\n id: `iti-${this.id}__dropdown-content`,\n class: `iti__dropdown-content iti__hide ${extraClasses}`\n });\n if (countrySearch) {\n this.searchInput = createEl(\n \"input\",\n {\n type: \"text\",\n class: \"iti__search-input\",\n placeholder: i18n.searchPlaceholder,\n role: \"combobox\",\n \"aria-expanded\": \"true\",\n \"aria-label\": i18n.searchPlaceholder,\n \"aria-controls\": `iti-${this.id}__country-listbox`,\n \"aria-autocomplete\": \"list\",\n \"autocomplete\": \"off\"\n },\n this.dropdownContent\n );\n this.searchResultsA11yText = createEl(\n \"span\",\n { class: \"iti__a11y-text\" },\n this.dropdownContent\n );\n }\n this.countryList = createEl(\n \"ul\",\n {\n class: \"iti__country-list\",\n id: `iti-${this.id}__country-listbox`,\n role: \"listbox\",\n \"aria-label\": i18n.countryListAriaLabel\n },\n this.dropdownContent\n );\n this._appendListItems();\n if (countrySearch) {\n this._updateSearchResultsText();\n }\n if (dropdownContainer) {\n let dropdownClasses = \"iti iti--container\";\n if (useFullscreenPopup) {\n dropdownClasses += \" iti--fullscreen-popup\";\n } else {\n dropdownClasses += \" iti--inline-dropdown\";\n }\n this.dropdown = createEl(\"div\", { class: dropdownClasses });\n this.dropdown.appendChild(this.dropdownContent);\n } else {\n this.countryContainer.appendChild(this.dropdownContent);\n }\n }\n }\n wrapper.appendChild(this.telInput);\n this._updateInputPadding();\n if (hiddenInput) {\n const telInputName = this.telInput.getAttribute(\"name\") || \"\";\n const names = hiddenInput(telInputName);\n if (names.phone) {\n this.hiddenInput = createEl(\"input\", {\n type: \"hidden\",\n name: names.phone\n });\n wrapper.appendChild(this.hiddenInput);\n }\n if (names.country) {\n this.hiddenInputCountry = createEl(\"input\", {\n type: \"hidden\",\n name: names.country\n });\n wrapper.appendChild(this.hiddenInputCountry);\n }\n }\n }\n //* For each country: add a country list item