.', list[i]);\n }\n }\n\n addAttr(el, name, JSON.stringify(value), list[i]); // #6887 firefox doesn't update muted state if set via attribute\n // even immediately after element creation\n\n if (!el.component && name === 'muted' && platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n addProp(el, name, 'true', list[i]);\n }\n }\n }\n}\n\nfunction checkInFor(el) {\n var parent = el;\n\n while (parent) {\n if (parent[\"for\"] !== undefined) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n}\n\nfunction parseModifiers(name) {\n var match = name.match(modifierRE);\n\n if (match) {\n var ret = {};\n match.forEach(function (m) {\n ret[m.slice(1)] = true;\n });\n return ret;\n }\n}\n\nfunction makeAttrsMap(attrs) {\n var map = {};\n\n for (var i = 0, l = attrs.length; i < l; i++) {\n if (process.env.NODE_ENV !== 'production' && map[attrs[i].name] && !isIE && !isEdge) {\n warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]);\n }\n\n map[attrs[i].name] = attrs[i].value;\n }\n\n return map;\n} // for script (e.g. type=\"x/template\") or style, do not decode content\n\n\nfunction isTextTag(el) {\n return el.tag === 'script' || el.tag === 'style';\n}\n\nfunction isForbiddenTag(el) {\n return el.tag === 'style' || el.tag === 'script' && (!el.attrsMap.type || el.attrsMap.type === 'text/javascript');\n}\n\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n/* istanbul ignore next */\n\nfunction guardIESVGBug(attrs) {\n var res = [];\n\n for (var i = 0; i < attrs.length; i++) {\n var attr = attrs[i];\n\n if (!ieNSBug.test(attr.name)) {\n attr.name = attr.name.replace(ieNSPrefix, '');\n res.push(attr);\n }\n }\n\n return res;\n}\n\nfunction checkForAliasModel(el, value) {\n var _el = el;\n\n while (_el) {\n if (_el[\"for\"] && _el.alias === value) {\n warn$2(\"<\" + el.tag + \" v-model=\\\"\" + value + \"\\\">: \" + \"You are binding v-model directly to a v-for iteration alias. \" + \"This will not be able to modify the v-for source array because \" + \"writing to the alias is like modifying a function local variable. \" + \"Consider using an array of objects and use v-model on an object property instead.\", el.rawAttrsMap['v-model']);\n }\n\n _el = _el.parent;\n }\n}\n/* */\n\n\nfunction preTransformNode(el, options) {\n if (el.tag === 'input') {\n var map = el.attrsMap;\n\n if (!map['v-model']) {\n return;\n }\n\n var typeBinding;\n\n if (map[':type'] || map['v-bind:type']) {\n typeBinding = getBindingAttr(el, 'type');\n }\n\n if (!map.type && !typeBinding && map['v-bind']) {\n typeBinding = \"(\" + map['v-bind'] + \").type\";\n }\n\n if (typeBinding) {\n var ifCondition = getAndRemoveAttr(el, 'v-if', true);\n var ifConditionExtra = ifCondition ? \"&&(\" + ifCondition + \")\" : \"\";\n var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true); // 1. checkbox\n\n var branch0 = cloneASTElement(el); // process for on the main node\n\n processFor(branch0);\n addRawAttr(branch0, 'type', 'checkbox');\n processElement(branch0, options);\n branch0.processed = true; // prevent it from double-processed\n\n branch0[\"if\"] = \"(\" + typeBinding + \")==='checkbox'\" + ifConditionExtra;\n addIfCondition(branch0, {\n exp: branch0[\"if\"],\n block: branch0\n }); // 2. add radio else-if condition\n\n var branch1 = cloneASTElement(el);\n getAndRemoveAttr(branch1, 'v-for', true);\n addRawAttr(branch1, 'type', 'radio');\n processElement(branch1, options);\n addIfCondition(branch0, {\n exp: \"(\" + typeBinding + \")==='radio'\" + ifConditionExtra,\n block: branch1\n }); // 3. other\n\n var branch2 = cloneASTElement(el);\n getAndRemoveAttr(branch2, 'v-for', true);\n addRawAttr(branch2, ':type', typeBinding);\n processElement(branch2, options);\n addIfCondition(branch0, {\n exp: ifCondition,\n block: branch2\n });\n\n if (hasElse) {\n branch0[\"else\"] = true;\n } else if (elseIfCondition) {\n branch0.elseif = elseIfCondition;\n }\n\n return branch0;\n }\n }\n}\n\nfunction cloneASTElement(el) {\n return createASTElement(el.tag, el.attrsList.slice(), el.parent);\n}\n\nvar model$1 = {\n preTransformNode: preTransformNode\n};\nvar modules$1 = [klass$1, style$1, model$1];\n/* */\n\nfunction text(el, dir) {\n if (dir.value) {\n addProp(el, 'textContent', \"_s(\" + dir.value + \")\", dir);\n }\n}\n/* */\n\n\nfunction html(el, dir) {\n if (dir.value) {\n addProp(el, 'innerHTML', \"_s(\" + dir.value + \")\", dir);\n }\n}\n\nvar directives$1 = {\n model: model,\n text: text,\n html: html\n};\n/* */\n\nvar baseOptions = {\n expectHTML: true,\n modules: modules$1,\n directives: directives$1,\n isPreTag: isPreTag,\n isUnaryTag: isUnaryTag,\n mustUseProp: mustUseProp,\n canBeLeftOpenTag: canBeLeftOpenTag,\n isReservedTag: isReservedTag,\n getTagNamespace: getTagNamespace,\n staticKeys: genStaticKeys(modules$1)\n};\n/* */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\nvar genStaticKeysCached = cached(genStaticKeys$1);\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n * create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\n\nfunction optimize(root, options) {\n if (!root) {\n return;\n }\n\n isStaticKey = genStaticKeysCached(options.staticKeys || '');\n isPlatformReservedTag = options.isReservedTag || no; // first pass: mark all non-static nodes.\n\n markStatic$1(root); // second pass: mark static roots.\n\n markStaticRoots(root, false);\n}\n\nfunction genStaticKeys$1(keys) {\n return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' + (keys ? ',' + keys : ''));\n}\n\nfunction markStatic$1(node) {\n node[\"static\"] = isStatic(node);\n\n if (node.type === 1) {\n // do not make component slot content static. this avoids\n // 1. components not able to mutate slot nodes\n // 2. static slot content fails for hot-reloading\n if (!isPlatformReservedTag(node.tag) && node.tag !== 'slot' && node.attrsMap['inline-template'] == null) {\n return;\n }\n\n for (var i = 0, l = node.children.length; i < l; i++) {\n var child = node.children[i];\n markStatic$1(child);\n\n if (!child[\"static\"]) {\n node[\"static\"] = false;\n }\n }\n\n if (node.ifConditions) {\n for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {\n var block = node.ifConditions[i$1].block;\n markStatic$1(block);\n\n if (!block[\"static\"]) {\n node[\"static\"] = false;\n }\n }\n }\n }\n}\n\nfunction markStaticRoots(node, isInFor) {\n if (node.type === 1) {\n if (node[\"static\"] || node.once) {\n node.staticInFor = isInFor;\n } // For a node to qualify as a static root, it should have children that\n // are not just static text. Otherwise the cost of hoisting out will\n // outweigh the benefits and it's better off to just always render it fresh.\n\n\n if (node[\"static\"] && node.children.length && !(node.children.length === 1 && node.children[0].type === 3)) {\n node.staticRoot = true;\n return;\n } else {\n node.staticRoot = false;\n }\n\n if (node.children) {\n for (var i = 0, l = node.children.length; i < l; i++) {\n markStaticRoots(node.children[i], isInFor || !!node[\"for\"]);\n }\n }\n\n if (node.ifConditions) {\n for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {\n markStaticRoots(node.ifConditions[i$1].block, isInFor);\n }\n }\n }\n}\n\nfunction isStatic(node) {\n if (node.type === 2) {\n // expression\n return false;\n }\n\n if (node.type === 3) {\n // text\n return true;\n }\n\n return !!(node.pre || !node.hasBindings && // no dynamic bindings\n !node[\"if\"] && !node[\"for\"] && // not v-if or v-for or v-else\n !isBuiltInTag(node.tag) && // not a built-in\n isPlatformReservedTag(node.tag) && // not a component\n !isDirectChildOfTemplateFor(node) && Object.keys(node).every(isStaticKey));\n}\n\nfunction isDirectChildOfTemplateFor(node) {\n while (node.parent) {\n node = node.parent;\n\n if (node.tag !== 'template') {\n return false;\n }\n\n if (node[\"for\"]) {\n return true;\n }\n }\n\n return false;\n}\n/* */\n\n\nvar fnExpRE = /^([\\w$_]+|\\([^)]*?\\))\\s*=>|^function(?:\\s+[\\w$]+)?\\s*\\(/;\nvar fnInvokeRE = /\\([^)]*?\\);*$/;\nvar simplePathRE = /^[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['[^']*?']|\\[\"[^\"]*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*$/; // KeyboardEvent.keyCode aliases\n\nvar keyCodes = {\n esc: 27,\n tab: 9,\n enter: 13,\n space: 32,\n up: 38,\n left: 37,\n right: 39,\n down: 40,\n 'delete': [8, 46]\n}; // KeyboardEvent.key aliases\n\nvar keyNames = {\n // #7880: IE11 and Edge use `Esc` for Escape key name.\n esc: ['Esc', 'Escape'],\n tab: 'Tab',\n enter: 'Enter',\n // #9112: IE11 uses `Spacebar` for Space key name.\n space: [' ', 'Spacebar'],\n // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.\n up: ['Up', 'ArrowUp'],\n left: ['Left', 'ArrowLeft'],\n right: ['Right', 'ArrowRight'],\n down: ['Down', 'ArrowDown'],\n // #9112: IE11 uses `Del` for Delete key name.\n 'delete': ['Backspace', 'Delete', 'Del']\n}; // #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\n\nvar genGuard = function genGuard(condition) {\n return \"if(\" + condition + \")return null;\";\n};\n\nvar modifierCode = {\n stop: '$event.stopPropagation();',\n prevent: '$event.preventDefault();',\n self: genGuard(\"$event.target !== $event.currentTarget\"),\n ctrl: genGuard(\"!$event.ctrlKey\"),\n shift: genGuard(\"!$event.shiftKey\"),\n alt: genGuard(\"!$event.altKey\"),\n meta: genGuard(\"!$event.metaKey\"),\n left: genGuard(\"'button' in $event && $event.button !== 0\"),\n middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\n\nfunction genHandlers(events, isNative) {\n var prefix = isNative ? 'nativeOn:' : 'on:';\n var staticHandlers = \"\";\n var dynamicHandlers = \"\";\n\n for (var name in events) {\n var handlerCode = genHandler(events[name]);\n\n if (events[name] && events[name].dynamic) {\n dynamicHandlers += name + \",\" + handlerCode + \",\";\n } else {\n staticHandlers += \"\\\"\" + name + \"\\\":\" + handlerCode + \",\";\n }\n }\n\n staticHandlers = \"{\" + staticHandlers.slice(0, -1) + \"}\";\n\n if (dynamicHandlers) {\n return prefix + \"_d(\" + staticHandlers + \",[\" + dynamicHandlers.slice(0, -1) + \"])\";\n } else {\n return prefix + staticHandlers;\n }\n}\n\nfunction genHandler(handler) {\n if (!handler) {\n return 'function(){}';\n }\n\n if (Array.isArray(handler)) {\n return \"[\" + handler.map(function (handler) {\n return genHandler(handler);\n }).join(',') + \"]\";\n }\n\n var isMethodPath = simplePathRE.test(handler.value);\n var isFunctionExpression = fnExpRE.test(handler.value);\n var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));\n\n if (!handler.modifiers) {\n if (isMethodPath || isFunctionExpression) {\n return handler.value;\n }\n\n return \"function($event){\" + (isFunctionInvocation ? \"return \" + handler.value : handler.value) + \"}\"; // inline statement\n } else {\n var code = '';\n var genModifierCode = '';\n var keys = [];\n\n for (var key in handler.modifiers) {\n if (modifierCode[key]) {\n genModifierCode += modifierCode[key]; // left/right\n\n if (keyCodes[key]) {\n keys.push(key);\n }\n } else if (key === 'exact') {\n var modifiers = handler.modifiers;\n genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta'].filter(function (keyModifier) {\n return !modifiers[keyModifier];\n }).map(function (keyModifier) {\n return \"$event.\" + keyModifier + \"Key\";\n }).join('||'));\n } else {\n keys.push(key);\n }\n }\n\n if (keys.length) {\n code += genKeyFilter(keys);\n } // Make sure modifiers like prevent and stop get executed after key filtering\n\n\n if (genModifierCode) {\n code += genModifierCode;\n }\n\n var handlerCode = isMethodPath ? \"return \" + handler.value + \".apply(null, arguments)\" : isFunctionExpression ? \"return (\" + handler.value + \").apply(null, arguments)\" : isFunctionInvocation ? \"return \" + handler.value : handler.value;\n return \"function($event){\" + code + handlerCode + \"}\";\n }\n}\n\nfunction genKeyFilter(keys) {\n return (// make sure the key filters only apply to KeyboardEvents\n // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake\n // key events that do not have keyCode property...\n \"if(!$event.type.indexOf('key')&&\" + keys.map(genFilterCode).join('&&') + \")return null;\"\n );\n}\n\nfunction genFilterCode(key) {\n var keyVal = parseInt(key, 10);\n\n if (keyVal) {\n return \"$event.keyCode!==\" + keyVal;\n }\n\n var keyCode = keyCodes[key];\n var keyName = keyNames[key];\n return \"_k($event.keyCode,\" + JSON.stringify(key) + \",\" + JSON.stringify(keyCode) + \",\" + \"$event.key,\" + \"\" + JSON.stringify(keyName) + \")\";\n}\n/* */\n\n\nfunction on(el, dir) {\n if (process.env.NODE_ENV !== 'production' && dir.modifiers) {\n warn(\"v-on without argument does not support modifiers.\");\n }\n\n el.wrapListeners = function (code) {\n return \"_g(\" + code + \",\" + dir.value + \")\";\n };\n}\n/* */\n\n\nfunction bind$1(el, dir) {\n el.wrapData = function (code) {\n return \"_b(\" + code + \",'\" + el.tag + \"',\" + dir.value + \",\" + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + \")\";\n };\n}\n/* */\n\n\nvar baseDirectives = {\n on: on,\n bind: bind$1,\n cloak: noop\n};\n/* */\n\nvar CodegenState = function CodegenState(options) {\n this.options = options;\n this.warn = options.warn || baseWarn;\n this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n this.directives = extend(extend({}, baseDirectives), options.directives);\n var isReservedTag = options.isReservedTag || no;\n\n this.maybeComponent = function (el) {\n return !!el.component || !isReservedTag(el.tag);\n };\n\n this.onceId = 0;\n this.staticRenderFns = [];\n this.pre = false;\n};\n\nfunction generate(ast, options) {\n var state = new CodegenState(options); // fix #11483, Root level \n\n","import { render, staticRenderFns } from \"./Notice.vue?vue&type=template&id=17fde6e0&\"\nimport script from \"./Notice.vue?vue&type=script&lang=js&\"\nexport * from \"./Notice.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Notice.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"book-card__notice mb-4 mb-md-0\",class:{'loading':_vm.loading}},[_c('h4',{staticClass:\"uppercase\"},[_vm._v(\"Covid 19\")]),_vm._v(\" \"),_c('h5',{staticClass:\"mt-2\"},[_vm._v(\"Confinement Martinique - Août 2021 \")]),_vm._v(\" \"),_c('p',{staticClass:\"mt-1\"},[_vm._v(\"En raison du confinement, le fonctionnement de certaines activités risque d'être altéré.\")]),_vm._v(\" \"),(false)?_c('div',{staticClass:\"form mt-3\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.email),expression:\"email\"}],staticClass:\"custom-input no-sm mb-0\",class:{'is-invalid':_vm.email_invalid},attrs:{\"type\":\"email\",\"placeholder\":\"nom@exemple.fr\"},domProps:{\"value\":(_vm.email)},on:{\"keyup\":_vm.removeErrors,\"input\":function($event){if($event.target.composing){ return; }_vm.email=$event.target.value}}}),_vm._v(\" \"),(_vm.email_invalid)?_c('span',{staticClass:\"invalid-feedback d-inline-block mt-2 mb-0\"},[_vm._v(\"\\n L'adresse email est invalide\\n \")]):_vm._e(),_vm._v(\" \"),(!_vm.loading)?_c('button',{staticClass:\"button-secondary button-xs uppercase\",on:{\"click\":_vm.submit}},[_vm._v(\"Ok\")]):_vm._e()]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"overlay-loading\",class:{'active':_vm.loading}},[(!_vm.success && !_vm.error)?_c('img',{attrs:{\"src\":require('images/loader.svg')}}):_vm._e(),_vm._v(\" \"),(_vm.success)?_c('div',[_c('svg',{attrs:{\"width\":\"50\",\"height\":\"50\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('g',{attrs:{\"fill\":\"#1289A7\",\"fill-rule\":\"evenodd\"}},[_c('circle',{attrs:{\"stroke\":\"#1289A7\",\"stroke-width\":\"2\",\"fill-opacity\":\".1\",\"cx\":\"25\",\"cy\":\"25\",\"r\":\"24\"}}),_c('path',{attrs:{\"d\":\"M16.146 22.914l6.432 6.432L33.985 17.94l2.122 2.122-13.435 13.435-.069-.068-.093.093-8.485-8.485 2.121-2.122z\"}})])]),_vm._v(\" \"),_c('h6',{staticClass:\"mt-3\"},[_vm._v(\"C'est noté !\")]),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"},[_vm._v(\"Tu seras notifié aussitôt les demandes de réservation réactivées.\")])]):_vm._e(),_vm._v(\" \"),(_vm.error)?_c('div',[_c('h6',{staticClass:\"color-red\"},[_vm._v(\"Une erreur est survenue\")]),_vm._v(\" \"),_c('p',{staticClass:\"mt-2 color-red\"},[_vm._v(\"Merci de réessayer plus tard\")])]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Phone.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Phone.vue?vue&type=script&lang=js&\"","
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./Phone.vue?vue&type=template&id=2006136e&\"\nimport script from \"./Phone.vue?vue&type=script&lang=js&\"\nexport * from \"./Phone.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"book-card__phone__wrapper\"},[_c('label',{staticClass:\"mt-0\"},[_vm._v(_vm._s(_vm.$t('bookcard.book_by_phone', {host:_vm.activityInfos.host.display_name})))]),_vm._v(\" \"),_c('div',{staticClass:\"book-card__phone\",class:{'active':_vm.open}},[_c('div',{staticClass:\"row row-0\"},[_c('div',{staticClass:\"col input-wrap\"},[_c('input',{attrs:{\"type\":\"text\",\"readonly\":\"true\"},domProps:{\"value\":_vm.displayedPhone},on:{\"click\":_vm.revealPhone}})]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[(_vm.open)?_c('a',{staticClass:\"button-secondary-outline button-xs\",attrs:{\"href\":'tel:' + _vm.displayedPhone}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookcard.phone.call'))+\"\\n \")]):_c('button',{staticClass:\"button-secondary button-xs\",on:{\"click\":_vm.revealPhone}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookcard.phone.display_phone'))+\"\\n \")])])])]),_vm._v(\" \"),_c('a',{staticClass:\"button-whatsapp button-xs w-100 mt-3\",attrs:{\"href\":(\"https://api.whatsapp.com/send?lang=fr&phone=\" + (_vm.activityInfos.host.phone.replaceAll(' ', '').replaceAll('+', '')) + \"&text=\" + (encodeURIComponent(_vm.$t('bookcard.whatsapp_intro', {host:_vm.activityInfos.host.display_name, activity_title: _vm.activityInfos.title})))),\"target\":\"_blank\"},on:{\"click\":_vm.contactWhatsapp}},[_c('img',{attrs:{\"src\":require('images/logos/wa-logo.svg'),\"alt\":\"\"}}),_vm._v(\"\\n \"+_vm._s(_vm.$t('bookcard.book_via_whatsap'))+\"\\n \")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./WeekView.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./WeekView.vue?vue&type=script&lang=js&\"","
\n \n
\n\n
\n
\n\n\n\n\n","import { render, staticRenderFns } from \"./WeekView.vue?vue&type=template&id=5b4fe816&\"\nimport script from \"./WeekView.vue?vue&type=script&lang=js&\"\nexport * from \"./WeekView.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"book-card__week mt-4 pt-2\"},[_c('label',{staticClass:\"mt-0\"},[_vm._v(_vm._s(_vm.$t('bookcard.week_slots')))]),_vm._v(\" \"),_c('div',{staticClass:\"week-scroll row row-0\"},_vm._l((_vm.availabilities),function(availability){return _c('div',{staticClass:\"col-auto\"},[_c('div',{staticClass:\"week-scroll__day\"},[_c('span',[_vm._v(_vm._s(_vm.$t((\"bookcard.weekdays.\" + (availability.day)))))]),_vm._v(\" \"),(availability.slots.length > 0)?_c('ul',_vm._l((availability.slots),function(slot){return _c('li',[_vm._v(\"\\n \"+_vm._s(slot.start.replaceAll('00', ''))+\"\\n \"),_c('img',{attrs:{\"src\":require('images/icons/caret-round.svg'),\"alt\":\"\"}}),_vm._v(\"\\n \"+_vm._s(slot.end.replaceAll('00', ''))+\"\\n \")])}),0):_c('div',{staticClass:\"week-scroll__day__closed\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t(\"bookcard.closed\"))+\"\\n \")])])])}),0)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","
\n \n
\n {{ $t('bookcard.back_to_activity') }}\n \n\n
\n {{ $t('bookcard.title') }}
\n {{ $t('bookcard.subtitle', {country: activityInfos.country}) }}\n
\n\n
\n
\n\n
\n
\n
\n {{ rate.title }}
\n\n {{ rate.desc }}\n\n 0\">{{rate.price}} €\n\n {{ $t('bookcard.prices.free') }}\n \n
\n
\n\n
\n \n
\n\n
\n \n
\n \n
\n
\n\n
\n\n
\n\n
\n
\n \n \n
\n
\n
\n\n
\n
\n\n
\n \n
\n
\n\n
\n
\n\n
\n Vous ne pouvez pas réserver cette activité en ce moment.\n
\n
\n\n\n\n\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=44f371be&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nexport var HOOKS = [\"onChange\", \"onClose\", \"onDayCreate\", \"onDestroy\", \"onKeyDown\", \"onMonthChange\", \"onOpen\", \"onParseConfig\", \"onReady\", \"onValueUpdate\", \"onYearChange\", \"onPreCalendarPosition\"];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function errorHandler(err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function getWeek(givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);\n var week1 = new Date(date.getFullYear(), 0, 4);\n return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"
\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"
\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n \"static\": false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false\n};","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n },\n months: {\n shorthand: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n longhand: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function ordinal(nth) {\n var s = nth % 100;\n if (s > 3 && s < 21) return \"th\";\n\n switch (s % 10) {\n case 1:\n return \"st\";\n\n case 2:\n return \"nd\";\n\n case 3:\n return \"rd\";\n\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false\n};\nexport default english;","export var pad = function pad(number, length) {\n if (length === void 0) {\n length = 2;\n }\n\n return (\"000\" + number).slice(length * -1);\n};\n\nvar _int = function _int(bool) {\n return bool === true ? 1 : 0;\n};\n\nexport { _int as int };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () {\n return fn.apply(_this, args);\n }, wait);\n };\n}\nexport var arrayify = function arrayify(obj) {\n return obj instanceof Array ? obj : [obj];\n};","export function toggleClass(elem, className, bool) {\n if (bool === true) return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined) e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n}\nexport function findParent(node, condition) {\n if (condition(node)) return node;else if (node.parentNode) return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"),\n numInput = createElement(\"input\", \"numInput \" + inputClassName),\n arrowUp = createElement(\"span\", \"arrowUp\"),\n arrowDown = createElement(\"span\", \"arrowDown\");\n\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n } else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n\n if (opts !== undefined) for (var key in opts) {\n numInput.setAttribute(key, opts[key]);\n }\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n\n return event.target;\n } catch (error) {\n return event.target;\n }\n}","import { int as _int, pad } from \"../utils\";\n\nvar doNothing = function doNothing() {\n return undefined;\n};\n\nexport var monthToStr = function monthToStr(monthNumber, shorthand, locale) {\n return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber];\n};\nexport var revFormat = {\n D: doNothing,\n F: function F(dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function G(dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function H(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function J(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function K(dateObj, amPM, locale) {\n dateObj.setHours(dateObj.getHours() % 12 + 12 * _int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function M(dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function S(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function U(_, unixSeconds) {\n return new Date(parseFloat(unixSeconds) * 1000);\n },\n W: function W(dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function Y(dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function Z(_, ISODate) {\n return new Date(ISODate);\n },\n d: function d(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function h(dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function i(dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function j(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function m(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function n(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function s(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function u(_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function y(dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n }\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n};\nexport var formats = {\n Z: function Z(date) {\n return date.toISOString();\n },\n D: function D(date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function F(date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function G(date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function H(date) {\n return pad(date.getHours());\n },\n J: function J(date, locale) {\n return locale.ordinal !== undefined ? date.getDate() + locale.ordinal(date.getDate()) : date.getDate();\n },\n K: function K(date, locale) {\n return locale.amPM[_int(date.getHours() > 11)];\n },\n M: function M(date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function S(date) {\n return pad(date.getSeconds());\n },\n U: function U(date) {\n return date.getTime() / 1000;\n },\n W: function W(date, _, options) {\n return options.getWeek(date);\n },\n Y: function Y(date) {\n return pad(date.getFullYear(), 4);\n },\n d: function d(date) {\n return pad(date.getDate());\n },\n h: function h(date) {\n return date.getHours() % 12 ? date.getHours() % 12 : 12;\n },\n i: function i(date) {\n return pad(date.getMinutes());\n },\n j: function j(date) {\n return date.getDate();\n },\n l: function l(date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function m(date) {\n return pad(date.getMonth() + 1);\n },\n n: function n(date) {\n return date.getMonth() + 1;\n },\n s: function s(date) {\n return date.getSeconds();\n },\n u: function u(date) {\n return date.getTime();\n },\n w: function w(date) {\n return date.getDay();\n },\n y: function y(date) {\n return String(date.getFullYear()).substring(2);\n }\n};","import { tokenRegex, revFormat, formats } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function createDateFormatter(_a) {\n var _b = _a.config,\n config = _b === void 0 ? defaults : _b,\n _c = _a.l10n,\n l10n = _c === void 0 ? english : _c,\n _d = _a.isMobile,\n isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n\n return frmt.split(\"\").map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\" ? formats[c](dateObj, locale, config) : c !== \"\\\\\" ? c : \"\";\n }).join(\"\");\n };\n};\nexport var createDateParser = function createDateParser(_a) {\n var _b = _a.config,\n config = _b === void 0 ? defaults : _b,\n _c = _a.l10n,\n l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date) return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date) parsedDate = new Date(date.getTime());else if (typeof date !== \"string\" && date.toFixed !== undefined) parsedDate = new Date(date);else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n } else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n } else if (/Z$/.test(datestr) || /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n } else {\n var matched = void 0,\n ops = [];\n\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex]\n });\n }\n } else if (!isBackSlash) regexStr += \".\";\n }\n\n parsedDate = !config || !config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn,\n val = _a.val;\n return parsedDate = fn(parsedDate, val, locale) || parsedDate;\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n\n if (timeless === true) parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n\n if (timeless !== false) {\n return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0);\n }\n\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return 3600 * (date1.getHours() - date2.getHours()) + 60 * (date1.getMinutes() - date2.getMinutes()) + date1.getSeconds() - date2.getSeconds();\n}\nexport var isBetween = function isBetween(ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function calculateSecondsSinceMidnight(hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function parseSeconds(secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600),\n minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n\n if (hours < minHour) {\n hours = minHour;\n }\n\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds) seconds = config.minDate.getSeconds();\n }\n\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr) minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes) seconds = config.maxDate.getSeconds();\n }\n\n return {\n hours: hours,\n minutes: minutes,\n seconds: seconds\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n};\n\nimport { defaults as defaultOptions, HOOKS } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int as _int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\n\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English\n };\n self.parseDate = createDateParser({\n config: self.config,\n l10n: self.l10n\n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function getDaysInMonth(month, yr) {\n if (month === void 0) {\n month = self.currentMonth;\n }\n\n if (yr === void 0) {\n yr = self.currentYear;\n }\n\n if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;\n return self.l10n.daysInMonth[month];\n }\n };\n }\n\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile) build();\n bindEvents();\n\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n\n updateValue(false);\n }\n\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n\n triggerEvent(\"onReady\");\n }\n\n function getClosestActiveElement() {\n var _a;\n\n return ((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode()).activeElement || document.activeElement;\n }\n\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n\n function setCalendarWidth() {\n var config = self.config;\n\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n } else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width = daysWidth + (self.weekWrapper !== undefined ? self.weekWrapper.offsetWidth : 0) + \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined || compareDates(new Date(), self.config.minDate) >= 0 ? new Date() : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n\n function ampm2military(hour, amPM) {\n return hour % 12 + 12 * _int(amPM === self.l10n.amPM[1]);\n }\n\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n\n default:\n return hour % 12;\n }\n }\n\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined) return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24,\n minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n\n var limitMinHours = self.config.minTime !== undefined || self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate, true) === 0;\n var limitMaxHours = self.config.maxTime !== undefined || self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate, true) === 0;\n\n if (self.config.maxTime !== undefined && self.config.minTime !== undefined && self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n } else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined ? self.config.maxTime : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours()) minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes()) seconds = Math.min(seconds, maxTime.getSeconds());\n }\n\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined ? self.config.minTime : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes()) minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes()) seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n\n setHours(hours, minutes, seconds);\n }\n\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n\n if (!self.hourElement || !self.minuteElement || self.isMobile) return;\n self.hourElement.value = pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * _int(hours % 12 === 0) : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined) self.amPM.textContent = self.l10n.amPM[_int(hours >= 12)];\n if (self.secondElement !== undefined) self.secondElement.value = pad(seconds);\n }\n\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n\n if (year / 1000 > 1 || event.key === \"Enter\" && !/[^\\d]/.test(year.toString())) {\n changeYear(year);\n }\n }\n\n function bind(element, event, handler, options) {\n if (event instanceof Array) return event.forEach(function (ev) {\n return bind(element, ev, handler, options);\n });\n if (element instanceof Array) return element.forEach(function (el) {\n return bind(el, event, handler, options);\n });\n element.addEventListener(event, handler, options);\n\n self._handlers.push({\n remove: function remove() {\n return element.removeEventListener(event, handler, options);\n }\n });\n }\n\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n\n if (self.isMobile) {\n setupMobile();\n return;\n }\n\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\") onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n\n if (!self.config.inline && !self.config[\"static\"]) bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined) bind(window.document, \"touchstart\", documentClick);else bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, {\n capture: true\n });\n\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n\n if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) {\n var selText = function selText(e) {\n return getEventTarget(e).select();\n };\n\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, {\n capture: true\n });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined) bind(self.secondElement, \"focus\", function () {\n return self.secondElement && self.secondElement.select();\n });\n\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined ? self.parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate && self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n } catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n\n if (triggerChange && (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n\n self.redraw();\n }\n\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\")) incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem || target && target.parentNode && target.parentNode.firstChild;\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n\n if (self.config.weekNumbers) {\n var _a = buildWeeks(),\n weekWrapper = _a.weekWrapper,\n weekNumbers = _a.weekNumbers;\n\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined && self.config.appendTo.nodeType !== undefined;\n\n if (self.config.inline || self.config[\"static\"]) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode) self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);else if (self.config.appendTo !== undefined) self.config.appendTo.appendChild(self.calendarContainer);\n }\n\n if (self.config[\"static\"]) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode) self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput) wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n\n if (!self.config[\"static\"] && !self.config.inline) (self.config.appendTo !== undefined ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer);\n }\n\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true),\n dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n\n if (className.indexOf(\"hidden\") === -1 && compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] && compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] && compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\") dayElement.classList.add(\"inRange\");\n }\n }\n } else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add(\"inRange\");\n }\n\n if (self.weekNumbers && self.config.showMonths === 1 && className !== \"prevMonthDay\" && i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"
\" + self.config.getWeek(date) + \"\");\n }\n\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\") onMouseOver(targetNode);\n }\n\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj)) return c;\n }\n }\n\n return undefined;\n }\n\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1 ? current.dateObj.getMonth() : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m ? current.$i + delta : delta < 0 ? month.children.length - 1 : 0;\n var numMonthDays = month.children.length;\n\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj) && Math.abs(current.$i - i) >= Math.abs(delta)) return focusOnDayElem(c);\n }\n }\n\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined ? current : dayFocused ? activeElement : self.selectedDateElem !== undefined && isInView(self.selectedDateElem) ? self.selectedDateElem : self.todayDateElem !== undefined && isInView(self.todayDateElem) ? self.todayDateElem : getFirstAvailableDay(offset > 0 ? 1 : -1);\n\n if (startElem === undefined) {\n self._input.focus();\n } else if (!dayFocused) {\n focusOnDayElem(startElem);\n } else {\n getNextAvailableDay(startElem, offset);\n }\n }\n\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year),\n days = window.document.createDocumentFragment(),\n isMultiMonth = self.config.showMonths > 1,\n prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\",\n nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth,\n dayIndex = 0;\n\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth && (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n\n clearNode(self.daysContainer);\n if (self.weekNumbers) clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 || self.config.monthSelectorType !== \"dropdown\") return;\n\n var shouldBuildMonth = function shouldBuildMonth(month) {\n if (self.config.minDate !== undefined && self.currentYear === self.config.minDate.getFullYear() && month < self.config.minDate.getMonth()) {\n return false;\n }\n\n return !(self.config.maxDate !== undefined && self.currentYear === self.config.maxDate.getFullYear() && month > self.config.maxDate.getMonth());\n };\n\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i)) continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n\n if (self.currentMonth === i) {\n month.selected = true;\n }\n\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n\n if (self.config.showMonths > 1 || self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n } else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n\n var yearInput = createNumberInput(\"cur-year\", {\n tabindex: \"-1\"\n });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled = !!self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement\n };\n }\n\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n\n self.monthNav.appendChild(self.nextMonthNav);\n }\n\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function get() {\n return self.__hidePrevMonthArrow;\n },\n set: function set(bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n }\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function get() {\n return self.__hideNextMonthArrow;\n },\n set: function set(bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n }\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar) self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.time_24hr ? defaults.hours : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr) self.timeContainer.classList.add(\"time24hr\");\n\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getSeconds() : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[_int((self.latestSelectedDateObj ? self.hourElement.value : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n\n return self.timeContainer;\n }\n\n function buildWeekdays() {\n if (!self.weekdayContainer) self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");else clearNode(self.weekdayContainer);\n\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n\n updateWeekdays();\n return self.weekdayContainer;\n }\n\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n
\\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers\n };\n }\n\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) {\n isOffset = true;\n }\n\n var delta = isOffset ? value : value - self.currentMonth;\n if (delta < 0 && self._hidePrevMonthArrow === true || delta > 0 && self._hideNextMonthArrow === true) return;\n self.currentMonth += delta;\n\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) {\n triggerChangeEvent = true;\n }\n\n if (toInitial === void 0) {\n toInitial = true;\n }\n\n self.input.value = \"\";\n if (self.altInput !== undefined) self.altInput.value = \"\";\n if (self.mobileInput !== undefined) self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config),\n hours = _a.hours,\n minutes = _a.minutes,\n seconds = _a.seconds;\n\n setHours(hours, minutes, seconds);\n }\n\n self.redraw();\n if (triggerChangeEvent) triggerEvent(\"onChange\");\n }\n\n function close() {\n self.isOpen = false;\n\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n\n triggerEvent(\"onClose\");\n }\n\n function destroy() {\n if (self.config !== undefined) triggerEvent(\"onDestroy\");\n\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n\n self._handlers = [];\n\n if (self.mobileInput) {\n if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n } else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config[\"static\"] && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n\n if (wrapper.parentNode) {\n while (wrapper.firstChild) {\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n }\n\n wrapper.parentNode.removeChild(wrapper);\n }\n } else self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n\n [\"_showTimeInput\", \"latestSelectedDateObj\", \"_hideNextMonthArrow\", \"_hidePrevMonthArrow\", \"__hideNextMonthArrow\", \"__hidePrevMonthArrow\", \"isMobile\", \"isOpen\", \"selectedDateElem\", \"minDateHasTime\", \"maxDateHasTime\", \"days\", \"daysContainer\", \"_input\", \"_positionElement\", \"innerContainer\", \"rContainer\", \"monthNav\", \"todayDateElem\", \"calendarContainer\", \"weekdayContainer\", \"prevMonthNav\", \"nextMonthNav\", \"monthsDropdownContainer\", \"currentMonthElement\", \"currentYearElement\", \"navigationCurrentMonth\", \"selectedDateElem\", \"config\"].forEach(function (k) {\n try {\n delete self[k];\n } catch (_) {}\n });\n }\n\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input || eventTarget_1 === self.altInput || self.element.contains(eventTarget_1) || e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput));\n var lostFocus = !isInput && !isCalendarElement && !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n }\n\n if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined && self.input.value !== \"\" && self.input.value !== undefined) {\n updateTime();\n }\n\n self.close();\n if (self.config && self.config.mode === \"range\" && self.selectedDates.length === 1) self.clear(false);\n }\n }\n }\n\n function changeYear(newYear) {\n if (!newYear || self.config.minDate && newYear < self.config.minDate.getFullYear() || self.config.maxDate && newYear > self.config.maxDate.getFullYear()) return;\n var newYearNum = newYear,\n isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n\n if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n\n function isEnabled(date, timeless) {\n var _a;\n\n if (timeless === void 0) {\n timeless = true;\n }\n\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if (self.config.minDate && dateToCheck && compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0 || self.config.maxDate && dateToCheck && compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0) return false;\n if (!self.config.enable && self.config.disable.length === 0) return true;\n if (dateToCheck === undefined) return false;\n var bool = !!self.config.enable,\n array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" && d(dateToCheck)) return bool;else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) return bool;else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime() ? bool : !bool;\n } else if (_typeof(d) === \"object\" && dateToCheck !== undefined && d.from && d.to && dateToCheck.getTime() >= d.from.getTime() && dateToCheck.getTime() <= d.to.getTime()) return bool;\n }\n\n return !bool;\n }\n\n function isInView(elem) {\n if (self.daysContainer !== undefined) return elem.className.indexOf(\"hidden\") === -1 && elem.className.indexOf(\"flatpickr-disabled\") === -1 && self.daysContainer.contains(elem);\n return false;\n }\n\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n\n if (isInput && valueChanged && !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat);\n }\n }\n\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap ? element.contains(eventTarget) : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput ? self.config.altFormat : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n } else {\n self.open();\n }\n } else if (isCalendarElem(eventTarget) || allowKeydown || allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer && self.timeContainer.contains(eventTarget);\n\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n } else selectDate(e);\n\n break;\n\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n\n break;\n\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n\n if (self.daysContainer !== undefined && (allowInput === false || activeElement && isInView(activeElement))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey) focusOnDay(undefined, delta_1);else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n } else if (self.hourElement) self.hourElement.focus();\n\n break;\n\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n\n if (self.daysContainer && eventTarget.$i !== undefined || eventTarget === self.input || eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n } else if (!isTimeObj) focusOnDay(undefined, delta * 7);\n } else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n } else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement) self.hourElement.focus();\n updateTime(e);\n\n self._debouncedChange();\n }\n\n break;\n\n case 9:\n if (isTimeObj) {\n var elems = [self.hourElement, self.minuteElement, self.secondElement, self.amPM].concat(self.pluginElements).filter(function (x) {\n return x;\n });\n var i = elems.indexOf(eventTarget);\n\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n\n (target || self._input).focus();\n }\n } else if (!self.config.noCalendar && self.daysContainer && self.daysContainer.contains(eventTarget) && e.shiftKey) {\n e.preventDefault();\n\n self._input.focus();\n }\n\n break;\n\n default:\n break;\n }\n }\n\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) {\n cellClass = \"flatpickr-day\";\n }\n\n if (self.selectedDates.length !== 1 || elem && (!elem.classList.contains(cellClass) || elem.classList.contains(\"flatpickr-disabled\"))) return;\n var hoverDate = elem ? elem.dateObj.getTime() : self.days.firstElementChild.dateObj.getTime(),\n initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(),\n rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()),\n rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0,\n maxRange = 0;\n\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled = containsDisabled || t > rangeStartDate && t < rangeEndDate;\n if (t < initialDate && (!minRange || t > minRange)) minRange = t;else if (t > initialDate && (!maxRange || t < maxRange)) maxRange = t;\n }\n }\n\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = minRange > 0 && timestamp < minRange || maxRange > 0 && timestamp > maxRange;\n\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n } else if (containsDisabled && !outOfRange) return;\n\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime() ? \"startRange\" : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate) dayElem.classList.add(\"startRange\");else if (initialDate > hoverDate && timestamp === initialDate) dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange && (maxRange === 0 || timestamp <= maxRange) && isBetween(timestamp, initialDate, hoverDate)) dayElem.classList.add(\"inRange\");\n }\n });\n }\n\n function onResize() {\n if (self.isOpen && !self.config[\"static\"] && !self.config.inline) positionCalendar();\n }\n\n function open(e, positionElement) {\n if (positionElement === void 0) {\n positionElement = self._positionElement;\n }\n\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n\n triggerEvent(\"onOpen\");\n return;\n } else if (self._input.disabled || self.config.inline) {\n return;\n }\n\n var wasOpen = self.isOpen;\n self.isOpen = true;\n\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n\n self._input.classList.add(\"active\");\n\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false && (e === undefined || !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () {\n return self.hourElement.select();\n }, 50);\n }\n }\n }\n\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat);\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] = dateObj.getHours() > 0 || dateObj.getMinutes() > 0 || dateObj.getSeconds() > 0;\n }\n\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) {\n return isEnabled(d);\n });\n if (!self.selectedDates.length && type === \"min\") setHoursFromDate(dateObj);\n updateValue();\n }\n\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined) self.currentYearElement[type] = dateObj.getFullYear().toString();else self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled = !!inverseDateObj && dateObj !== undefined && inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n\n function parseConfig() {\n var boolOpts = [\"wrap\", \"weekNumbers\", \"allowInput\", \"allowInvalidPreload\", \"clickOpens\", \"time_24hr\", \"enableTime\", \"noCalendar\", \"altInput\", \"shorthandCurrentMonth\", \"inline\", \"static\", \"enableSeconds\", \"disableMobile\"];\n\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function get() {\n return self.config._enable;\n },\n set: function set(dates) {\n self.config._enable = parseDateRules(dates);\n }\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function get() {\n return self.config._disable;\n },\n set: function set(dates) {\n self.config._disable = parseDateRules(dates);\n }\n });\n var timeMode = userConfig.mode === \"time\";\n\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat = userConfig.noCalendar || timeMode ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\") : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n\n if (userConfig.altInput && (userConfig.enableTime || timeMode) && !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat = userConfig.noCalendar || timeMode ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\") : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n\n Object.defineProperty(self.config, \"minDate\", {\n get: function get() {\n return self.config._minDate;\n },\n set: minMaxDateSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function get() {\n return self.config._maxDate;\n },\n set: minMaxDateSetter(\"max\")\n });\n\n var minMaxTimeSetter = function minMaxTimeSetter(type) {\n return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n };\n };\n\n Object.defineProperty(self.config, \"minTime\", {\n get: function get() {\n return self.config._minTime;\n },\n set: minMaxTimeSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function get() {\n return self.config._maxTime;\n },\n set: minMaxTimeSetter(\"max\")\n });\n\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n\n Object.assign(self.config, formats, userConfig);\n\n for (var i = 0; i < boolOpts.length; i++) {\n self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === \"true\";\n }\n\n HOOKS.filter(function (hook) {\n return self.config[hook] !== undefined;\n }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === \"single\" && !self.config.disable.length && !self.config.enable && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]);\n } else if (typeof userConfig[key] === \"undefined\") self.config[key] = pluginConf[key];\n }\n }\n\n if (!userConfig.altInputClass) {\n self.config.altInputClass = getInputElem().className + \" \" + self.config.altInputClass;\n }\n\n triggerEvent(\"onParseConfig\");\n }\n\n function getInputElem() {\n return self.config.wrap ? element.querySelector(\"[data-input]\") : element;\n }\n\n function setupLocale() {\n if (_typeof(self.config.locale) !== \"object\" && typeof flatpickr.l10ns[self.config.locale] === \"undefined\") self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns[\"default\"]), _typeof(self.config.locale) === \"object\" ? self.config.locale : self.config.locale !== \"default\" ? flatpickr.l10ns[self.config.locale] : undefined);\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n\n if (userConfig.time_24hr === undefined && flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({\n config: self.config,\n l10n: self.l10n\n });\n }\n\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n\n if (self.calendarContainer === undefined) return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, function (acc, child) {\n return acc + child.offsetHeight;\n }, 0),\n calendarWidth = self.calendarContainer.offsetWidth,\n configPos = self.config.position.split(\" \"),\n configPosVertical = configPos[0],\n configPosHorizontal = configPos.length > 1 ? configPos[1] : null,\n inputBounds = positionElement.getBoundingClientRect(),\n distanceFromBottom = window.innerHeight - inputBounds.bottom,\n showOnTop = configPosVertical === \"above\" || configPosVertical !== \"below\" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight;\n var top = window.pageYOffset + inputBounds.top + (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline) return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n } else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth - (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config[\"static\"]) return;\n self.calendarContainer.style.top = top + \"px\";\n\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n } else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n } else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined) return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n\n function getDocumentStyleSheet() {\n var editableSheet = null;\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules) continue;\n\n try {\n sheet.cssRules;\n } catch (err) {\n continue;\n }\n\n editableSheet = sheet;\n break;\n }\n\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n\n function redraw() {\n if (self.config.noCalendar || self.isMobile) return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n\n function focusAndClose() {\n self._input.focus();\n\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 || navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n } else {\n self.close();\n }\n }\n\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n\n var isSelectable = function isSelectable(day) {\n return day.classList && day.classList.contains(\"flatpickr-day\") && !day.classList.contains(\"flatpickr-disabled\") && !day.classList.contains(\"notAllowed\");\n };\n\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined) return;\n var target = t;\n var selectedDate = self.latestSelectedDateObj = new Date(target.dateObj.getTime());\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth || selectedDate.getMonth() > self.currentMonth + self.config.showMonths - 1) && self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\") self.selectedDates = [selectedDate];else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex) self.selectedDates.splice(parseInt(selectedIndex), 1);else self.selectedDates.push(selectedDate);\n } else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n setHoursFromInputs();\n\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n\n triggerEvent(\"onMonthChange\");\n }\n\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth && self.config.mode !== \"range\" && self.config.showMonths === 1) focusOnDayElem(target);else if (self.selectedDateElem !== undefined && self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined) self.hourElement !== undefined && self.hourElement.focus();\n\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" && self.selectedDates.length === 2 && !self.config.enableTime;\n\n if (single || range) {\n focusAndClose();\n }\n }\n\n triggerChange();\n }\n\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n } else {\n self._input.removeEventListener(\"focus\", self.open);\n\n self._input.removeEventListener(\"click\", self.open);\n }\n }]\n };\n\n function set(option, value) {\n if (option !== null && _typeof(option) === \"object\") {\n Object.assign(self.config, option);\n\n for (var key in option) {\n if (CALLBACKS[key] !== undefined) CALLBACKS[key].forEach(function (x) {\n return x();\n });\n }\n } else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined) CALLBACKS[option].forEach(function (x) {\n return x();\n });else if (HOOKS.indexOf(option) > -1) self.config[option] = arrayify(value);\n }\n\n self.redraw();\n updateValue(true);\n }\n\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array) dates = inputDate.map(function (d) {\n return self.parseDate(d, format);\n });else if (inputDate instanceof Date || typeof inputDate === \"number\") dates = [self.parseDate(inputDate, format)];else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n\n case \"multiple\":\n dates = inputDate.split(self.config.conjunction).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n case \"range\":\n dates = inputDate.split(self.l10n.rangeSeparator).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n default:\n break;\n }\n } else self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = self.config.allowInvalidPreload ? dates : dates.filter(function (d) {\n return d instanceof Date && isEnabled(d, false);\n });\n if (self.config.mode === \"range\") self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) {\n triggerChange = false;\n }\n\n if (format === void 0) {\n format = self.config.dateFormat;\n }\n\n if (date !== 0 && !date || date instanceof Array && date.length === 0) return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj = self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n\n updateValue(triggerChange);\n if (triggerChange) triggerEvent(\"onChange\");\n }\n\n function parseDateRules(arr) {\n return arr.slice().map(function (rule) {\n if (typeof rule === \"string\" || typeof rule === \"number\" || rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n } else if (rule && _typeof(rule) === \"object\" && rule.from && rule.to) return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined)\n };\n\n return rule;\n }).filter(function (x) {\n return x;\n });\n }\n\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate || ((self.input.nodeName === \"INPUT\" || self.input.nodeName === \"TEXTAREA\") && self.input.placeholder && self.input.value === self.input.placeholder ? null : self.input.value);\n if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate = self.selectedDates.length > 0 ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now.getTime() ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now.getTime() ? self.config.maxDate : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0) self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined) self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined) self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime = !!self.config.minDate && (self.config.minDate.getHours() > 0 || self.config.minDate.getMinutes() > 0 || self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime = !!self.config.maxDate && (self.config.maxDate.getHours() > 0 || self.config.maxDate.getMinutes() > 0 || self.config.maxDate.getSeconds() > 0);\n }\n\n function setupInputs() {\n self.input = getInputElem();\n\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config[\"static\"] && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n\n if (!self.config.allowInput) self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n\n function setupMobile() {\n var inputType = self.config.enableTime ? self.config.noCalendar ? \"time\" : \"datetime-local\" : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr = inputType === \"datetime-local\" ? \"Y-m-d\\\\TH:i:S\" : inputType === \"date\" ? \"Y-m-d\" : \"H:i:S\";\n\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n\n if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\")) self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined) self.altInput.type = \"hidden\";\n\n try {\n if (self.input.parentNode) self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n } catch (_a) {}\n\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n\n function toggle(e) {\n if (self.isOpen === true) return self.close();\n self.open(e);\n }\n\n function triggerEvent(event, data) {\n if (self.config === undefined) return;\n var hooks = self.config[event];\n\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++) {\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n }\n\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date && compareDates(selectedDate, date) === 0) return \"\" + i;\n }\n\n return false;\n }\n\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2) return false;\n return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0;\n }\n\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav) return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n\n if (self.config.showMonths > 1 || self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent = monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n } else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow = self.config.minDate !== undefined && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow = self.config.maxDate !== undefined && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear());\n }\n\n function getDateStr(specificFormat) {\n var format = specificFormat || (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates.map(function (dObj) {\n return self.formatDate(dObj, format);\n }).filter(function (d, i, arr) {\n return self.config.mode !== \"range\" || self.config.enableTime || arr.indexOf(d) === i;\n }).join(self.config.mode !== \"range\" ? self.config.conjunction : self.l10n.rangeSeparator);\n }\n\n function updateValue(triggerChange) {\n if (triggerChange === void 0) {\n triggerChange = true;\n }\n\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value = self.latestSelectedDateObj !== undefined ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : \"\";\n }\n\n self.input.value = getDateStr(self.config.dateFormat);\n\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n\n if (triggerChange !== false) triggerEvent(\"onValueUpdate\");\n }\n\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n } else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n } else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n } else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\",\n eventTarget = getEventTarget(e),\n input = eventTarget;\n\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent = self.l10n.amPM[_int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n\n var min = parseFloat(input.getAttribute(\"min\")),\n max = parseFloat(input.getAttribute(\"max\")),\n step = parseFloat(input.getAttribute(\"step\")),\n curValue = parseInt(input.value, 10),\n delta = e.delta || (isKeyDown ? e.which === 38 ? 1 : -1 : 0);\n var newValue = curValue + step * delta;\n\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement,\n isMinuteElem = input === self.minuteElement;\n\n if (newValue < min) {\n newValue = max + newValue + _int(!isHourElem) + (_int(isHourElem) && _int(!self.amPM));\n if (isMinuteElem) incrementNumInput(undefined, -1, self.hourElement);\n } else if (newValue > max) {\n newValue = input === self.hourElement ? newValue - max - _int(!self.amPM) : min;\n if (isMinuteElem) incrementNumInput(undefined, 1, self.hourElement);\n }\n\n if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent = self.l10n.amPM[_int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n\n input.value = pad(newValue);\n }\n }\n\n init();\n return self;\n}\n\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice.call(nodeList).filter(function (x) {\n return x instanceof HTMLElement;\n });\n var instances = [];\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null) continue;\n\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n\n node._flatpickr = undefined;\n }\n\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n } catch (e) {\n console.error(e);\n }\n }\n\n return instances.length === 1 ? instances[0] : instances;\n}\n\nif (typeof HTMLElement !== \"undefined\" && typeof HTMLCollection !== \"undefined\" && typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\n\nvar flatpickr = function flatpickr(selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n } else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n } else {\n return _flatpickr(selector, config);\n }\n};\n\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n \"default\": __assign({}, English)\n};\n\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns[\"default\"] = __assign(__assign({}, flatpickr.l10ns[\"default\"]), l10n);\n};\n\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\n\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\n\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\n\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\n\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\n\nexport default flatpickr;","\"use strict\";\n/*jshint esversion: 6 */\n\nvar Distance = require(\"./distance.js\"),\n ClusterInit = require(\"./kinit.js\"),\n eudist = Distance.eudist,\n mandist = Distance.mandist,\n dist = Distance.dist,\n kmrand = ClusterInit.kmrand,\n kmpp = ClusterInit.kmpp;\n\nvar MAX = 10000;\n/**\n * Inits an array with values\n */\n\nfunction init(len, val, v) {\n v = v || [];\n\n for (var i = 0; i < len; i++) {\n v[i] = val;\n }\n\n return v;\n}\n\nfunction skmeans(data, k, initial, maxit) {\n var ks = [],\n old = [],\n idxs = [],\n dist = [];\n var conv = false,\n it = maxit || MAX;\n var len = data.length,\n vlen = data[0].length,\n multi = vlen > 0;\n var count = [];\n\n if (!initial) {\n var _idxs = {};\n\n while (ks.length < k) {\n var idx = Math.floor(Math.random() * len);\n\n if (!_idxs[idx]) {\n _idxs[idx] = true;\n ks.push(data[idx]);\n }\n }\n } else if (initial == \"kmrand\") {\n ks = kmrand(data, k);\n } else if (initial == \"kmpp\") {\n ks = kmpp(data, k);\n } else {\n ks = initial;\n }\n\n do {\n // Reset k count\n init(k, 0, count); // For each value in data, find the nearest centroid\n\n for (var i = 0; i < len; i++) {\n var min = Infinity,\n _idx = 0;\n\n for (var j = 0; j < k; j++) {\n // Multidimensional or unidimensional\n var dist = multi ? eudist(data[i], ks[j]) : Math.abs(data[i] - ks[j]);\n\n if (dist <= min) {\n min = dist;\n _idx = j;\n }\n }\n\n idxs[i] = _idx; // Index of the selected centroid for that value\n\n count[_idx]++; // Number of values for this centroid\n } // Recalculate centroids\n\n\n var sum = [],\n old = [],\n dif = 0;\n\n for (var _j = 0; _j < k; _j++) {\n // Multidimensional or unidimensional\n sum[_j] = multi ? init(vlen, 0, sum[_j]) : 0;\n old[_j] = ks[_j];\n } // If multidimensional\n\n\n if (multi) {\n for (var _j2 = 0; _j2 < k; _j2++) {\n ks[_j2] = [];\n } // Sum values and count for each centroid\n\n\n for (var _i = 0; _i < len; _i++) {\n var _idx2 = idxs[_i],\n // Centroid for that item\n vsum = sum[_idx2],\n // Sum values for this centroid\n vect = data[_i]; // Current vector\n // Accumulate value on the centroid for current vector\n\n for (var h = 0; h < vlen; h++) {\n vsum[h] += vect[h];\n }\n } // Calculate the average for each centroid\n\n\n conv = true;\n\n for (var _j3 = 0; _j3 < k; _j3++) {\n var ksj = ks[_j3],\n // Current centroid\n sumj = sum[_j3],\n // Accumulated centroid values\n oldj = old[_j3],\n // Old centroid value\n cj = count[_j3]; // Number of elements for this centroid\n // New average\n\n for (var _h = 0; _h < vlen; _h++) {\n ksj[_h] = sumj[_h] / cj || 0; // New centroid\n } // Find if centroids have moved\n\n\n if (conv) {\n for (var _h2 = 0; _h2 < vlen; _h2++) {\n if (oldj[_h2] != ksj[_h2]) {\n conv = false;\n break;\n }\n }\n }\n }\n } // If unidimensional\n else {\n // Sum values and count for each centroid\n for (var _i2 = 0; _i2 < len; _i2++) {\n var _idx3 = idxs[_i2];\n sum[_idx3] += data[_i2];\n } // Calculate the average for each centroid\n\n\n for (var _j4 = 0; _j4 < k; _j4++) {\n ks[_j4] = sum[_j4] / count[_j4] || 0; // New centroid\n } // Find if centroids have moved\n\n\n conv = true;\n\n for (var _j5 = 0; _j5 < k; _j5++) {\n if (old[_j5] != ks[_j5]) {\n conv = false;\n break;\n }\n }\n }\n\n conv = conv || --it <= 0;\n } while (!conv);\n\n return {\n it: MAX - it,\n k: k,\n idxs: idxs,\n centroids: ks\n };\n}\n\nmodule.exports = skmeans;","if (typeof module !== 'undefined' && module.exports) {\n module.exports = {\n DBSCAN: require('./DBSCAN.js'),\n KMEANS: require('./KMEANS.js'),\n OPTICS: require('./OPTICS.js'),\n PriorityQueue: require('./PriorityQueue.js')\n };\n}","import { render, staticRenderFns } from \"./HowItWorks.vue?vue&type=template&id=1ed61f8c&\"\nimport script from \"./HowItWorks.vue?vue&type=script&lang=js&\"\nexport * from \"./HowItWorks.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\"use strict\";\n\nfunction _typeof2(obj) { \"@babel/helpers - typeof\"; return _typeof2 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof2(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: !0\n});\n\nvar DEFAULT_LOCALE = \"auto\",\n SUPPORTED_LOCALES = [\"auto\", \"bg\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"en-GB\", \"es\", \"es-419\", \"et\", \"fi\", \"fr\", \"fr-CA\", \"hu\", \"id\", \"it\", \"ja\", \"lt\", \"lv\", \"ms\", \"mt\", \"nb\", \"nl\", \"pl\", \"pt\", \"pt-BR\", \"ro\", \"ru\", \"sk\", \"sl\", \"sv\", \"tr\", \"zh\", \"zh-HK\", \"zh-TW\"],\n SUPPORTED_SUBMIT_TYPES = [\"auto\", \"book\", \"donate\", \"pay\"],\n BILLING_ADDRESS_COLLECTION_TYPES = [\"required\", \"auto\"],\n DEFAULT_ELEMENT_STYLE = {\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 VUE_STRIPE_VERSION = require(\"../package.json\").version,\n STRIPE_PARTNER_DETAILS = {\n name: \"vue-stripe\",\n version: VUE_STRIPE_VERSION,\n url: \"https://vuestripe.com\",\n partner_id: \"pp_partner_IqtOXpBSuz0IE2\"\n},\n INSECURE_HOST_ERROR_MESSAGE = \"Vue Stripe will not work on an insecure host. Make sure that your site is using TCP/SSL.\",\n isSecureHost = function isSecureHost(e) {\n return !!e || \"localhost\" === window.location.hostname || \"https:\" === window.location.protocol;\n},\n index = {\n install: function install(e, n) {\n isSecureHost(n.testMode) || console.warn(INSECURE_HOST_ERROR_MESSAGE);\n var t = n.pk,\n r = n.stripeAccount,\n i = n.apiVersion,\n o = n.locale,\n s = window.Stripe(t, {\n stripeAccount: r,\n apiVersion: i,\n locale: o\n });\n s.registerAppInfo(STRIPE_PARTNER_DETAILS), e.prototype.$stripe = s;\n }\n};\n\nfunction createCommonjsModule(e, n) {\n return e(n = {\n exports: {}\n }, n.exports), n.exports;\n}\n\nvar runtime_1 = createCommonjsModule(function (e) {\n var n = function (e) {\n var n,\n t = Object.prototype,\n r = t.hasOwnProperty,\n i = \"function\" == typeof Symbol ? Symbol : {},\n o = i.iterator || \"@@iterator\",\n s = i.asyncIterator || \"@@asyncIterator\",\n a = i.toStringTag || \"@@toStringTag\";\n\n function l(e, n, t, r) {\n var i = n && n.prototype instanceof f ? n : f,\n o = Object.create(i.prototype),\n s = new P(r || []);\n return o._invoke = function (e, n, t) {\n var r = u;\n return function (i, o) {\n if (r === p) throw new Error(\"Generator is already running\");\n\n if (r === m) {\n if (\"throw\" === i) throw o;\n return O();\n }\n\n for (t.method = i, t.arg = o;;) {\n var s = t.delegate;\n\n if (s) {\n var a = w(s, t);\n\n if (a) {\n if (a === h) continue;\n return a;\n }\n }\n\n if (\"next\" === t.method) t.sent = t._sent = t.arg;else if (\"throw\" === t.method) {\n if (r === u) throw r = m, t.arg;\n t.dispatchException(t.arg);\n } else \"return\" === t.method && t.abrupt(\"return\", t.arg);\n r = p;\n var l = c(e, n, t);\n\n if (\"normal\" === l.type) {\n if (r = t.done ? m : d, l.arg === h) continue;\n return {\n value: l.arg,\n done: t.done\n };\n }\n\n \"throw\" === l.type && (r = m, t.method = \"throw\", t.arg = l.arg);\n }\n };\n }(e, t, s), o;\n }\n\n function c(e, n, t) {\n try {\n return {\n type: \"normal\",\n arg: e.call(n, t)\n };\n } catch (e) {\n return {\n type: \"throw\",\n arg: e\n };\n }\n }\n\n e.wrap = l;\n var u = \"suspendedStart\",\n d = \"suspendedYield\",\n p = \"executing\",\n m = \"completed\",\n h = {};\n\n function f() {}\n\n function y() {}\n\n function v() {}\n\n var E = {};\n\n E[o] = function () {\n return this;\n };\n\n var g = Object.getPrototypeOf,\n _ = g && g(g(R([])));\n\n _ && _ !== t && r.call(_, o) && (E = _);\n var S = v.prototype = f.prototype = Object.create(E);\n\n function b(e) {\n [\"next\", \"throw\", \"return\"].forEach(function (n) {\n e[n] = function (e) {\n return this._invoke(n, e);\n };\n });\n }\n\n function A(e) {\n var n;\n\n this._invoke = function (t, i) {\n function o() {\n return new Promise(function (n, o) {\n !function n(t, i, o, s) {\n var a = c(e[t], e, i);\n\n if (\"throw\" !== a.type) {\n var l = a.arg,\n u = l.value;\n return u && \"object\" == _typeof2(u) && r.call(u, \"__await\") ? Promise.resolve(u.__await).then(function (e) {\n n(\"next\", e, o, s);\n }, function (e) {\n n(\"throw\", e, o, s);\n }) : Promise.resolve(u).then(function (e) {\n l.value = e, o(l);\n }, function (e) {\n return n(\"throw\", e, o, s);\n });\n }\n\n s(a.arg);\n }(t, i, n, o);\n });\n }\n\n return n = n ? n.then(o, o) : o();\n };\n }\n\n function w(e, t) {\n var r = e.iterator[t.method];\n\n if (r === n) {\n if (t.delegate = null, \"throw\" === t.method) {\n if (e.iterator[\"return\"] && (t.method = \"return\", t.arg = n, w(e, t), \"throw\" === t.method)) return h;\n t.method = \"throw\", t.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n\n return h;\n }\n\n var i = c(r, e.iterator, t.arg);\n if (\"throw\" === i.type) return t.method = \"throw\", t.arg = i.arg, t.delegate = null, h;\n var o = i.arg;\n return o ? o.done ? (t[e.resultName] = o.value, t.next = e.nextLoc, \"return\" !== t.method && (t.method = \"next\", t.arg = n), t.delegate = null, h) : o : (t.method = \"throw\", t.arg = new TypeError(\"iterator result is not an object\"), t.delegate = null, h);\n }\n\n function C(e) {\n var n = {\n tryLoc: e[0]\n };\n 1 in e && (n.catchLoc = e[1]), 2 in e && (n.finallyLoc = e[2], n.afterLoc = e[3]), this.tryEntries.push(n);\n }\n\n function T(e) {\n var n = e.completion || {};\n n.type = \"normal\", delete n.arg, e.completion = n;\n }\n\n function P(e) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], e.forEach(C, this), this.reset(!0);\n }\n\n function R(e) {\n if (e) {\n var t = e[o];\n if (t) return t.call(e);\n if (\"function\" == typeof e.next) return e;\n\n if (!isNaN(e.length)) {\n var i = -1,\n s = function t() {\n for (; ++i < e.length;) {\n if (r.call(e, i)) return t.value = e[i], t.done = !1, t;\n }\n\n return t.value = n, t.done = !0, t;\n };\n\n return s.next = s;\n }\n }\n\n return {\n next: O\n };\n }\n\n function O() {\n return {\n value: n,\n done: !0\n };\n }\n\n return y.prototype = S.constructor = v, v.constructor = y, v[a] = y.displayName = \"GeneratorFunction\", e.isGeneratorFunction = function (e) {\n var n = \"function\" == typeof e && e.constructor;\n return !!n && (n === y || \"GeneratorFunction\" === (n.displayName || n.name));\n }, e.mark = function (e) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(e, v) : (e.__proto__ = v, a in e || (e[a] = \"GeneratorFunction\")), e.prototype = Object.create(S), e;\n }, e.awrap = function (e) {\n return {\n __await: e\n };\n }, b(A.prototype), A.prototype[s] = function () {\n return this;\n }, e.AsyncIterator = A, e.async = function (n, t, r, i) {\n var o = new A(l(n, t, r, i));\n return e.isGeneratorFunction(t) ? o : o.next().then(function (e) {\n return e.done ? e.value : o.next();\n });\n }, b(S), S[a] = \"Generator\", S[o] = function () {\n return this;\n }, S.toString = function () {\n return \"[object Generator]\";\n }, e.keys = function (e) {\n var n = [];\n\n for (var t in e) {\n n.push(t);\n }\n\n return n.reverse(), function t() {\n for (; n.length;) {\n var r = n.pop();\n if (r in e) return t.value = r, t.done = !1, t;\n }\n\n return t.done = !0, t;\n };\n }, e.values = R, P.prototype = {\n constructor: P,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = n, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = n, this.tryEntries.forEach(T), !e) for (var t in this) {\n \"t\" === t.charAt(0) && r.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = n);\n }\n },\n stop: function stop() {\n this.done = !0;\n var e = this.tryEntries[0].completion;\n if (\"throw\" === e.type) throw e.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var t = this;\n\n function i(r, i) {\n return a.type = \"throw\", a.arg = e, t.next = r, i && (t.method = \"next\", t.arg = n), !!i;\n }\n\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var s = this.tryEntries[o],\n a = s.completion;\n if (\"root\" === s.tryLoc) return i(\"end\");\n\n if (s.tryLoc <= this.prev) {\n var l = r.call(s, \"catchLoc\"),\n c = r.call(s, \"finallyLoc\");\n\n if (l && c) {\n if (this.prev < s.catchLoc) return i(s.catchLoc, !0);\n if (this.prev < s.finallyLoc) return i(s.finallyLoc);\n } else if (l) {\n if (this.prev < s.catchLoc) return i(s.catchLoc, !0);\n } else {\n if (!c) throw new Error(\"try statement without catch or finally\");\n if (this.prev < s.finallyLoc) return i(s.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(e, n) {\n for (var t = this.tryEntries.length - 1; t >= 0; --t) {\n var i = this.tryEntries[t];\n\n if (i.tryLoc <= this.prev && r.call(i, \"finallyLoc\") && this.prev < i.finallyLoc) {\n var o = i;\n break;\n }\n }\n\n o && (\"break\" === e || \"continue\" === e) && o.tryLoc <= n && n <= o.finallyLoc && (o = null);\n var s = o ? o.completion : {};\n return s.type = e, s.arg = n, o ? (this.method = \"next\", this.next = o.finallyLoc, h) : this.complete(s);\n },\n complete: function complete(e, n) {\n if (\"throw\" === e.type) throw e.arg;\n return \"break\" === e.type || \"continue\" === e.type ? this.next = e.arg : \"return\" === e.type ? (this.rval = this.arg = e.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === e.type && n && (this.next = n), h;\n },\n finish: function finish(e) {\n for (var n = this.tryEntries.length - 1; n >= 0; --n) {\n var t = this.tryEntries[n];\n if (t.finallyLoc === e) return this.complete(t.completion, t.afterLoc), T(t), h;\n }\n },\n \"catch\": function _catch(e) {\n for (var n = this.tryEntries.length - 1; n >= 0; --n) {\n var t = this.tryEntries[n];\n\n if (t.tryLoc === e) {\n var r = t.completion;\n\n if (\"throw\" === r.type) {\n var i = r.arg;\n T(t);\n }\n\n return i;\n }\n }\n\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, t, r) {\n return this.delegate = {\n iterator: R(e),\n resultName: t,\n nextLoc: r\n }, \"next\" === this.method && (this.arg = n), h;\n }\n }, e;\n }(e.exports);\n\n try {\n regeneratorRuntime = n;\n } catch (e) {\n Function(\"r\", \"regeneratorRuntime = r\")(n);\n }\n}),\n regenerator = runtime_1;\n\nfunction _typeof(e) {\n return (_typeof = \"function\" == typeof Symbol && \"symbol\" == _typeof2(Symbol.iterator) ? function (e) {\n return _typeof2(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : _typeof2(e);\n })(e);\n}\n\nvar loadParams,\n V3_URL = \"https://js.stripe.com/v3\",\n V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/,\n EXISTING_SCRIPT_MESSAGE = \"loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used\",\n findScript = function findScript() {\n for (var e = document.querySelectorAll('script[src^=\"'.concat(V3_URL, '\"]')), n = 0; n < e.length; n++) {\n var t = e[n];\n if (V3_URL_REGEX.test(t.src)) return t;\n }\n\n return null;\n},\n injectScript = function injectScript(e) {\n var n = e && !e.advancedFraudSignals ? \"?advancedFraudSignals=false\" : \"\",\n t = document.createElement(\"script\");\n t.src = \"\".concat(V3_URL).concat(n);\n var r = document.head || document.body;\n if (!r) throw new Error(\"Expected document.body not to be null. Stripe.js requires a element.\");\n return r.appendChild(t), t;\n},\n registerWrapper = function registerWrapper(e, n) {\n e && e._registerWrapper && e._registerWrapper({\n name: \"stripe-js\",\n version: \"1.13.2\",\n startTime: n\n });\n},\n stripePromise = null,\n loadScript = function loadScript(e) {\n return null !== stripePromise ? stripePromise : stripePromise = new Promise(function (n, t) {\n if (\"undefined\" != typeof window) {\n if (window.Stripe && e && console.warn(EXISTING_SCRIPT_MESSAGE), window.Stripe) n(window.Stripe);else try {\n var r = findScript();\n r && e ? console.warn(EXISTING_SCRIPT_MESSAGE) : r || (r = injectScript(e)), r.addEventListener(\"load\", function () {\n window.Stripe ? n(window.Stripe) : t(new Error(\"Stripe.js not available\"));\n }), r.addEventListener(\"error\", function () {\n t(new Error(\"Failed to load Stripe.js\"));\n });\n } catch (e) {\n return void t(e);\n }\n } else n(null);\n });\n},\n initStripe = function initStripe(e, n, t) {\n if (null === e) return null;\n var r = e.apply(void 0, n);\n return registerWrapper(r, t), r;\n},\n validateLoadParams = function validateLoadParams(e) {\n var n = \"invalid load parameters; expected object of shape\\n\\n {advancedFraudSignals: boolean}\\n\\nbut received\\n\\n \".concat(JSON.stringify(e), \"\\n\");\n if (null === e || \"object\" !== _typeof(e)) throw new Error(n);\n if (1 === Object.keys(e).length && \"boolean\" == typeof e.advancedFraudSignals) return e;\n throw new Error(n);\n},\n loadStripeCalled = !1,\n loadStripe = function loadStripe() {\n for (var e = arguments.length, n = new Array(e), t = 0; t < e; t++) {\n n[t] = arguments[t];\n }\n\n loadStripeCalled = !0;\n var r = Date.now();\n return loadScript(loadParams).then(function (e) {\n return initStripe(e, n, r);\n });\n};\n\nloadStripe.setLoadParameters = function (e) {\n if (loadStripeCalled) throw new Error(\"You cannot change load parameters after calling loadStripe\");\n loadParams = validateLoadParams(e);\n};\n/**\n * vue-coerce-props v1.0.0\n * (c) 2018 Eduardo San Martin Morote
\n * @license MIT\n */\n\n\nvar index$1 = {\n beforeCreate: function beforeCreate() {\n var e = this.$options.props;\n e && (this._$coertions = Object.keys(e).filter(function (n) {\n return e[n].coerce;\n }).map(function (n) {\n return [n, e[n].coerce];\n }));\n },\n computed: {\n $coerced: function $coerced() {\n var e = this;\n return this._$coertions.reduce(function (n, t) {\n var r = t[0],\n i = t[1];\n return n[r] = i.call(e, e.$props[r]), n;\n }, {});\n }\n }\n},\n props = {\n pk: {\n type: String,\n required: !0\n },\n mode: {\n type: String,\n validator: function validator(e) {\n return [\"payment\", \"subscription\"].includes(e);\n }\n },\n lineItems: {\n type: Array,\n \"default\": void 0\n },\n items: {\n type: Array\n },\n successUrl: {\n type: String,\n \"default\": window.location.href\n },\n cancelUrl: {\n type: String,\n \"default\": window.location.href\n },\n submitType: {\n type: String,\n validator: function validator(e) {\n return SUPPORTED_SUBMIT_TYPES.includes(e);\n }\n },\n billingAddressCollection: {\n type: String,\n \"default\": \"auto\",\n validator: function validator(e) {\n return BILLING_ADDRESS_COLLECTION_TYPES.includes(e);\n }\n },\n clientReferenceId: {\n type: String\n },\n customerEmail: {\n type: String\n },\n sessionId: {\n type: String\n },\n stripeAccount: {\n type: String,\n \"default\": void 0\n },\n apiVersion: {\n type: String,\n \"default\": void 0\n },\n locale: {\n type: String,\n \"default\": DEFAULT_LOCALE,\n coerce: function coerce(e) {\n return SUPPORTED_LOCALES.includes(e) ? e : (console.warn(\"VueStripe Warning: '\".concat(e, \"' is not supported by Stripe yet. Falling back to default '\").concat(DEFAULT_LOCALE, \"'.\")), DEFAULT_LOCALE);\n }\n },\n shippingAddressCollection: {\n type: Object,\n validator: function validator(e) {\n return Object.prototype.hasOwnProperty.call(e, \"allowedCountries\");\n }\n },\n disableAdvancedFraudDetection: {\n type: Boolean\n },\n stripeOptions: {\n type: Object,\n \"default\": null\n }\n},\n index$2 = {\n props: props,\n mixins: [index$1],\n render: function render(e) {\n return e;\n },\n mounted: function mounted() {\n isSecureHost() || console.warn(INSECURE_HOST_ERROR_MESSAGE);\n },\n methods: {\n redirectToCheckout: function redirectToCheckout() {\n var e, n, t;\n return regenerator.async(function (r) {\n for (;;) {\n switch (r.prev = r.next) {\n case 0:\n if (r.prev = 0, isSecureHost()) {\n r.next = 3;\n break;\n }\n\n throw Error(INSECURE_HOST_ERROR_MESSAGE);\n\n case 3:\n return this.$emit(\"loading\", !0), this.disableAdvancedFraudDetection && loadStripe.setLoadParameters({\n advancedFraudSignals: !1\n }), e = {\n stripeAccount: this.stripeAccount,\n apiVersion: this.apiVersion,\n locale: this.locale\n }, r.next = 8, regenerator.awrap(loadStripe(this.pk, e));\n\n case 8:\n if ((n = r.sent).registerAppInfo(STRIPE_PARTNER_DETAILS), !this.sessionId) {\n r.next = 13;\n break;\n }\n\n return n.redirectToCheckout({\n sessionId: this.sessionId\n }), r.abrupt(\"return\");\n\n case 13:\n if (!this.lineItems || !this.lineItems.length || this.mode) {\n r.next = 16;\n break;\n }\n\n return console.error(\"Error: Property 'mode' is required when using 'lineItems'. See https://stripe.com/docs/js/checkout/redirect_to_checkout#stripe_checkout_redirect_to_checkout-options-mode\"), r.abrupt(\"return\");\n\n case 16:\n return t = {\n billingAddressCollection: this.billingAddressCollection,\n cancelUrl: this.cancelUrl,\n clientReferenceId: this.clientReferenceId,\n customerEmail: this.customerEmail,\n items: this.items,\n lineItems: this.lineItems,\n locale: this.$coerced.locale,\n mode: this.mode,\n shippingAddressCollection: this.shippingAddressCollection,\n submitType: this.submitType,\n successUrl: this.successUrl\n }, r.abrupt(\"return\", n.redirectToCheckout(t));\n\n case 20:\n r.prev = 20, r.t0 = r[\"catch\"](0), console.error(r.t0), this.$emit(\"error\", r.t0);\n\n case 24:\n case \"end\":\n return r.stop();\n }\n }\n }, null, this, [[0, 20]]);\n }\n }\n};\n\nfunction _defineProperty(e, n, t) {\n return n in e ? Object.defineProperty(e, n, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[n] = t, e;\n}\n\nvar defineProperty = _defineProperty;\n\nfunction ownKeys(e, n) {\n var t = Object.keys(e);\n\n if (Object.getOwnPropertySymbols) {\n var r = Object.getOwnPropertySymbols(e);\n n && (r = r.filter(function (n) {\n return Object.getOwnPropertyDescriptor(e, n).enumerable;\n })), t.push.apply(t, r);\n }\n\n return t;\n}\n\nfunction _objectSpread(e) {\n for (var n = 1; n < arguments.length; n++) {\n var t = null != arguments[n] ? arguments[n] : {};\n n % 2 ? ownKeys(Object(t), !0).forEach(function (n) {\n defineProperty(e, n, t[n]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (n) {\n Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));\n });\n }\n\n return e;\n}\n\nvar ELEMENT_TYPE = \"card\",\n script = {\n props: {\n pk: {\n type: String,\n required: !0\n },\n testMode: {\n type: Boolean,\n \"default\": !1\n },\n stripeAccount: {\n type: String,\n \"default\": void 0\n },\n apiVersion: {\n type: String,\n \"default\": void 0\n },\n locale: {\n type: String,\n \"default\": \"auto\"\n },\n elementsOptions: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n tokenData: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n disableAdvancedFraudDetection: {\n type: Boolean\n },\n classes: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n elementStyle: {\n type: Object,\n \"default\": function _default() {\n return DEFAULT_ELEMENT_STYLE;\n }\n },\n value: {\n type: String,\n \"default\": void 0\n },\n hidePostalCode: Boolean,\n iconStyle: {\n type: String,\n \"default\": \"default\",\n validator: function validator(e) {\n return [\"solid\", \"default\"].includes(e);\n }\n },\n hideIcon: Boolean,\n disabled: Boolean\n },\n data: function data() {\n return {\n loading: !1,\n stripe: null,\n elements: null,\n element: null,\n card: null\n };\n },\n computed: {\n form: function form() {\n return document.getElementById(\"stripe-element-form\");\n }\n },\n mounted: function mounted() {\n var e,\n n,\n t = this;\n return regenerator.async(function (r) {\n for (;;) {\n switch (r.prev = r.next) {\n case 0:\n if (isSecureHost(this.testMode)) {\n r.next = 3;\n break;\n }\n\n return document.getElementById(\"stripe-element-mount-point\").innerHTML = ''.concat(INSECURE_HOST_ERROR_MESSAGE, \"
\"), r.abrupt(\"return\");\n\n case 3:\n return this.disableAdvancedFraudDetection && loadStripe.setLoadParameters({\n advancedFraudSignals: !1\n }), e = {\n stripeAccount: this.stripeAccount,\n apiVersion: this.apiVersion,\n locale: this.locale\n }, n = {\n classes: this.classes,\n style: this.elementStyle,\n value: this.value,\n hidePostalCode: this.hidePostalCode,\n iconStyle: this.iconStyle,\n hideIcon: this.hideIcon,\n disabled: this.disabled\n }, r.next = 8, regenerator.awrap(loadStripe(this.pk, e));\n\n case 8:\n this.stripe = r.sent, this.stripe.registerAppInfo(STRIPE_PARTNER_DETAILS), this.elements = this.stripe.elements(this.elementsOptions), this.element = this.elements.create(ELEMENT_TYPE, n), this.element.mount(\"#stripe-element-mount-point\"), this.element.on(\"change\", function (e) {\n var n = document.getElementById(\"stripe-element-errors\");\n e.error ? n.textContent = e.error.message : n.textContent = \"\", t.onChange(e);\n }), this.element.on(\"blur\", this.onBlur), this.element.on(\"click\", this.onClick), this.element.on(\"escape\", this.onEscape), this.element.on(\"focus\", this.onFocus), this.element.on(\"ready\", this.onReady), this.form.addEventListener(\"submit\", function (e) {\n var n, r, i, o;\n return regenerator.async(function (s) {\n for (;;) {\n switch (s.prev = s.next) {\n case 0:\n return s.prev = 0, t.$emit(\"loading\", !0), e.preventDefault(), n = _objectSpread({}, t.element), t.amount && (n.amount = t.amount), s.next = 7, regenerator.awrap(t.stripe.createToken(n, t.tokenData));\n\n case 7:\n if (r = s.sent, i = r.token, !(o = r.error)) {\n s.next = 15;\n break;\n }\n\n return document.getElementById(\"stripe-element-errors\").textContent = o.message, t.$emit(\"error\", o), s.abrupt(\"return\");\n\n case 15:\n t.$emit(\"token\", i), s.next = 22;\n break;\n\n case 18:\n s.prev = 18, s.t0 = s[\"catch\"](0), console.error(s.t0), t.$emit(\"error\", s.t0);\n\n case 22:\n return s.prev = 22, t.$emit(\"loading\", !1), s.finish(22);\n\n case 25:\n case \"end\":\n return s.stop();\n }\n }\n }, null, null, [[0, 18, 22, 25]]);\n });\n\n case 20:\n case \"end\":\n return r.stop();\n }\n }\n }, null, this);\n },\n methods: {\n submit: function submit() {\n this.$refs.submitButtonRef.click();\n },\n clear: function clear() {\n this.element.clear();\n },\n destroy: function destroy() {\n this.element.destroy();\n },\n focus: function focus() {\n console.warn(\"This method will currently not work on iOS 13+ due to a system limitation.\"), this.element.focus();\n },\n unmount: function unmount() {\n this.element.unmount();\n },\n update: function update(e) {\n this.element.update(e);\n },\n onChange: function onChange(e) {\n this.$emit(\"element-change\", e);\n },\n onReady: function onReady(e) {\n this.$emit(\"element-ready\", e);\n },\n onFocus: function onFocus(e) {\n this.$emit(\"element-focus\", e);\n },\n onBlur: function onBlur(e) {\n this.$emit(\"element-blur\", e);\n },\n onEscape: function onEscape(e) {\n this.$emit(\"element-escape\", e);\n },\n onClick: function onClick(e) {\n this.$emit(\"element-click\", e);\n }\n }\n};\n\nfunction normalizeComponent(e, n, t, r, i, o, s, a, l, c) {\n \"boolean\" != typeof s && (l = a, a = s, s = !1);\n var u = \"function\" == typeof t ? t.options : t;\n var d;\n if (e && e.render && (u.render = e.render, u.staticRenderFns = e.staticRenderFns, u._compiled = !0, i && (u.functional = !0)), r && (u._scopeId = r), o ? (d = function d(e) {\n (e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || \"undefined\" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__), n && n.call(this, l(e)), e && e._registeredComponents && e._registeredComponents.add(o);\n }, u._ssrRegister = d) : n && (d = s ? function (e) {\n n.call(this, c(e, this.$root.$options.shadowRoot));\n } : function (e) {\n n.call(this, a(e));\n }), d) if (u.functional) {\n var _e = u.render;\n\n u.render = function (n, t) {\n return d.call(t), _e(n, t);\n };\n } else {\n var _e2 = u.beforeCreate;\n u.beforeCreate = _e2 ? [].concat(_e2, d) : [d];\n }\n return t;\n}\n\nvar isOldIE = \"undefined\" != typeof navigator && /msie [6-9]\\\\b/.test(navigator.userAgent.toLowerCase());\n\nfunction createInjector(e) {\n return function (e, n) {\n return addStyle(e, n);\n };\n}\n\nvar HEAD;\nvar styles = {};\n\nfunction addStyle(e, n) {\n var t = isOldIE ? n.media || \"default\" : e,\n r = styles[t] || (styles[t] = {\n ids: new Set(),\n styles: []\n });\n\n if (!r.ids.has(e)) {\n r.ids.add(e);\n var _t = n.source;\n if (n.map && (_t += \"\\n/*# sourceURL=\" + n.map.sources[0] + \" */\", _t += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(n.map)))) + \" */\"), r.element || (r.element = document.createElement(\"style\"), r.element.type = \"text/css\", n.media && r.element.setAttribute(\"media\", n.media), void 0 === HEAD && (HEAD = document.head || document.getElementsByTagName(\"head\")[0]), HEAD.appendChild(r.element)), \"styleSheet\" in r.element) r.styles.push(_t), r.element.styleSheet.cssText = r.styles.filter(Boolean).join(\"\\n\");else {\n var _e3 = r.ids.size - 1,\n _n = document.createTextNode(_t),\n i = r.element.childNodes;\n\n i[_e3] && r.element.removeChild(i[_e3]), i.length ? r.element.insertBefore(_n, i[_e3]) : r.element.appendChild(_n);\n }\n }\n}\n\nvar __vue_script__ = script;\n\nvar __vue_render__ = function __vue_render__() {\n var e = this.$createElement,\n n = this._self._c || e;\n return n(\"div\", [n(\"form\", {\n attrs: {\n id: \"stripe-element-form\"\n }\n }, [n(\"div\", {\n attrs: {\n id: \"stripe-element-mount-point\"\n }\n }), this._v(\" \"), this._t(\"stripe-element-errors\", [n(\"div\", {\n attrs: {\n id: \"stripe-element-errors\",\n role: \"alert\"\n }\n })]), this._v(\" \"), n(\"button\", {\n ref: \"submitButtonRef\",\n staticClass: \"hide\",\n attrs: {\n type: \"submit\"\n }\n })], 2)]);\n},\n __vue_staticRenderFns__ = [];\n\n__vue_render__._withStripped = !0;\n\nvar __vue_inject_styles__ = function __vue_inject_styles__(e) {\n e && e(\"data-v-44ec472e_0\", {\n source: \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n/**\\n * The CSS shown here will not be introduced in the Quickstart guide, but shows\\n * how you can use CSS to style your Element's container.\\n */\\n.StripeElement[data-v-44ec472e] {\\n box-sizing: border-box;\\n\\n height: 40px;\\n\\n padding: 10px 12px;\\n\\n border: 1px solid transparent;\\n border-radius: 4px;\\n background-color: white;\\n\\n box-shadow: 0 1px 3px 0 #e6ebf1;\\n -webkit-transition: box-shadow 150ms ease;\\n transition: box-shadow 150ms ease;\\n}\\n.StripeElement--focus[data-v-44ec472e] {\\n box-shadow: 0 1px 3px 0 #cfd7df;\\n}\\n.StripeElement--invalid[data-v-44ec472e] {\\n border-color: #fa755a;\\n}\\n.StripeElement--webkit-autofill[data-v-44ec472e] {\\n background-color: #fefde5 !important;\\n}\\n.hide[data-v-44ec472e] {\\n display: none;\\n}\\n\",\n map: {\n version: 3,\n sources: [\"/home/runner/work/vue-stripe/vue-stripe/src/elements/Card.vue\"],\n names: [],\n mappings: \";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqPA;;;EAGA;AACA;EACA,sBAAA;;EAEA,YAAA;;EAEA,kBAAA;;EAEA,6BAAA;EACA,kBAAA;EACA,uBAAA;;EAEA,+BAAA;EACA,yCAAA;EACA,iCAAA;AACA;AAEA;EACA,+BAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,oCAAA;AACA;AAEA;EACA,aAAA;AACA\",\n file: \"Card.vue\",\n sourcesContent: [\"\\n \\n\\n\\n\n\n","import { render, staticRenderFns } from \"./ActivityRecap.vue?vue&type=template&id=6cf0178b&\"\nimport script from \"./ActivityRecap.vue?vue&type=script&lang=js&\"\nexport * from \"./ActivityRecap.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('article',{staticClass:\"book__activity-recap\"},[_c('div',{staticClass:\"row row-0\"},[_c('div',{staticClass:\"col-5 d-none d-lg-block\"},[_c('figure',{style:({backgroundImage:(\"url(\" + _vm.encodedThumbnailUrl + \")\")})})]),_vm._v(\" \"),_c('div',{staticClass:\"col-lg-7\"},[_c('div',{staticClass:\"content\"},[_c('h2',[_vm._v(_vm._s(_vm.activity.title))]),_vm._v(\" \"),_c('h3',{domProps:{\"innerHTML\":_vm._s(_vm.$t('bookpage.activity_recap.location_host', {city:_vm.activity.city, country: _vm.activity.country, host_name:_vm.activity.host.display_name}))}}),_vm._v(\" \"),_c('p',{staticClass:\"d-flex align-items-center mt-3\"},[_c('img',{staticClass:\"me-2\",attrs:{\"src\":require('images/icons/activity/time.svg'),\"alt\":\"\"}}),_vm._v(\" \"),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.$t('bookpage.activity_recap.duration', {duration:_vm.activity.duration}))}})]),_vm._v(\" \"),_c('p',{staticClass:\"d-flex align-items-center mt-2 pt-1\"},[_c('img',{staticClass:\"me-2\",attrs:{\"src\":require('images/icons/activity/pax.svg'),\"alt\":\"\"}}),_vm._v(\" \"),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.$t('bookpage.activity_recap.pax_count', {max_pax:_vm.activity.max_pax}))}})]),_vm._v(\" \"),(_vm.activity.reviews.average > 0)?_c('p',{staticClass:\"d-inline-flex align-items-center activity__details__rating mt-3\"},[_c('span',{staticClass:\"d-inline-flex align-items-center\"},[_vm._l((_vm.fullStars),function(i){return _c('img',{key:'full' + i,attrs:{\"src\":require('images/icons/activity/star.svg'),\"alt\":\"\"}})}),_vm._v(\" \"),(_vm.halfStars)?_c('img',{attrs:{\"src\":require('images/icons/activity/star-half.svg'),\"alt\":\"\"}}):_vm._e(),_vm._v(\" \"),_vm._l((_vm.emptyStars),function(i){return _c('img',{key:'empty' + i,attrs:{\"src\":require('images/icons/activity/star-empty.svg'),\"alt\":\"\"}})}),_vm._v(\" \"),_c('span',{staticClass:\"mt1 ms-2\"},[_vm._v(_vm._s(_vm.activity.reviews.average)+\"/5 \"+_vm._s(_vm.$t('bookpage.activity_recap.rating', {reviews_count: _vm.activity.reviews.count})))])],2)]):_vm._e(),_vm._v(\" \"),_c('p',{staticClass:\"time-slot mt-3\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.activity_recap.time_slot', {datetime:new Date(_vm.date*1000).toLocaleDateString(_vm.$i18n.locale, { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' }), time_start: _vm.availability.start, time_end:_vm.availability.end}))+\"\\n \")]),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"},[_vm._v(\"\\n \"+_vm._s(_vm.bookingInfos.days_until_display)+\"\\n \")])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ActivityRecap-skeleton.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ActivityRecap-skeleton.vue?vue&type=script&lang=js&\"","\n \n \n
\n \n
\n\n
\n
\n
\n\n
\n\n
\n
\n\n \n
\n\n
\n
\n\n \n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n
\n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./ActivityRecap-skeleton.vue?vue&type=template&id=63530692&\"\nimport script from \"./ActivityRecap-skeleton.vue?vue&type=script&lang=js&\"\nexport * from \"./ActivityRecap-skeleton.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('article',{staticClass:\"book__activity-recap book__skeleton\"},[_c('div',{staticClass:\"row row-0\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"col-lg-7\"},[_c('div',{staticClass:\"content\"},[_c('h2'),_vm._v(\" \"),_c('h3'),_vm._v(\" \"),_c('p',{staticClass:\"d-flex align-items-center mt-3\"},[_c('img',{staticClass:\"me-2\",attrs:{\"src\":require('images/icons/activity/time.svg'),\"alt\":\"\"}}),_vm._v(\" \"),_c('span')]),_vm._v(\" \"),_c('p',{staticClass:\"d-flex align-items-center mt-2 pt-1\"},[_c('img',{staticClass:\"me-2\",attrs:{\"src\":require('images/icons/activity/pax.svg'),\"alt\":\"\"}}),_vm._v(\" \"),_c('span')]),_vm._v(\" \"),_c('p',{staticClass:\"mt-3\"}),_vm._v(\" \"),_c('p',{staticClass:\"time-slot mt-3\"}),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"})])])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"col-5 d-none d-lg-block\"},[_c('figure')])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Summary.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Summary.vue?vue&type=script&lang=js&\"","\n \n \n
![]()
\n
\n\n {{activity.title}}
\n\n {{new Date(parseInt(date*1000)).toLocaleDateString('fr', { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' })}} - de {{availability.start}} à {{availability.end}}
\n \n {{booking.booking_activity_rates_attributes.filter(e => e.pax_count > 0).map(r => `${r.pax_count} x ${activity.rates.find(a => a.id === r.activity_rate_id).title}`).join(', ')}}
\n\n \n\n \n
\n\n {{$t('bookpage.summary.use_coupon')}}\n \n\n \n
\n\n
\n
\n {{$t('bookpage.summary.subtotal')}}\n
\n\n
\n {{formatMoney(totals.subtotal)}}\n
\n
\n\n
\n
\n {{$t('bookpage.summary.fees')}}\n
\n\n
\n {{$t('bookcard.prices.free')}}\n
\n
\n\n
0\">\n
\n {{$t('bookpage.summary.discount', {discount:validCoupon.amount})}}\n\n {{$t('bookpage.summary.delete')}}\n
\n\n
\n - {{formatMoney(totals.discount)}}\n
\n
\n\n
\n
\n {{$t('bookpage.summary.total')}}\n
\n\n
\n {{formatMoney(totals.total)}}\n
\n
\n
\n\n \n \n\n\n\n\n","import { render, staticRenderFns } from \"./Summary.vue?vue&type=template&id=0076cb83&\"\nimport script from \"./Summary.vue?vue&type=script&lang=js&\"\nexport * from \"./Summary.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.activity)?_c('article',{staticClass:\"book__summary\"},[_c('div',{staticClass:\"overlay-loading\",class:{'active':_vm.loading}},[_c('img',{attrs:{\"src\":require('images/loader.svg')}})]),_vm._v(\" \"),_c('h2',[_vm._v(_vm._s(_vm.activity.title))]),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"},[_c('span',[_vm._v(_vm._s(new Date(parseInt(_vm.date*1000)).toLocaleDateString('fr', { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' })))]),_vm._v(\" - \"),_c('span',[_vm._v(\"de \"+_vm._s(_vm.availability.start)+\" à \"+_vm._s(_vm.availability.end))])]),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"},[_vm._v(_vm._s(_vm.booking.booking_activity_rates_attributes.filter(function (e) { return e.pax_count > 0; }).map(function (r) { return ((r.pax_count) + \" x \" + (_vm.activity.rates.find(function (a) { return a.id === r.activity_rate_id; }).title)); }).join(', ')))]),_vm._v(\" \"),_c('form',{staticClass:\"coupon-form\",class:{'d-none':!_vm.coupon_entry},on:{\"submit\":function($event){$event.preventDefault();return _vm.validateCoupon.apply(null, arguments)}}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.coupon_code),expression:\"coupon_code\"}],ref:\"coupon\",staticClass:\"custom-input\",class:{'error':_vm.coupon_error},attrs:{\"type\":\"text\",\"placeholder\":\"Code promo\"},domProps:{\"value\":(_vm.coupon_code)},on:{\"input\":[function($event){if($event.target.composing){ return; }_vm.coupon_code=$event.target.value},_vm.triggerNewTyping]}}),_vm._v(\" \"),(_vm.new_typing || !_vm.coupon.valid)?_c('button',{staticClass:\"button-primary button-xs\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.validateCoupon}},[_vm._v(_vm._s(_vm.$t('bookpage.summary.validate')))]):_vm._e(),_vm._v(\" \"),_c('small',{staticClass:\"color-red d-block error-message\",class:{'on':_vm.coupon_error}},[_vm._v(_vm._s(_vm.$t('bookpage.summary.invalid_coupon')))]),_vm._v(\" \"),_c('small',{staticClass:\"color-green d-block success-message\",class:{'on':_vm.totals.discount > 0 && !_vm.new_typing && !_vm.coupon_error}},[_vm._v(_vm._s(_vm.$t('bookpage.summary.valid_coupon')))])]),_vm._v(\" \"),(false)?_c('div',{class:{'d-none':_vm.coupon_entry}},[_c('hr'),_vm._v(\" \"),_c('span',{staticClass:\"link-primary hover-trans\",on:{\"click\":_vm.triggerCouponEntry}},[_vm._v(_vm._s(_vm.$t('bookpage.summary.use_coupon')))])]):_vm._e(),_vm._v(\" \"),(_vm.totals)?_c('div',[_c('hr'),_vm._v(\" \"),_c('div',{staticClass:\"row justify-content-between subtotal\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.summary.subtotal'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[_vm._v(\"\\n \"+_vm._s(_vm.formatMoney(_vm.totals.subtotal))+\"\\n \")])]),_vm._v(\" \"),_c('div',{staticClass:\"row justify-content-between subtotal\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.summary.fees'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto fw-bold color-green\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookcard.prices.free'))+\"\\n \")])]),_vm._v(\" \"),(_vm.totals.discount > 0)?_c('div',{staticClass:\"row justify-content-between discount\"},[_c('div',{staticClass:\"col\"},[_c('span',{staticClass:\"d-inline-block me-1\"},[_vm._v(_vm._s(_vm.$t('bookpage.summary.discount', {discount:_vm.validCoupon.amount})))]),_vm._v(\" \"),_c('span',{staticClass:\"link-primary hover-trans\",on:{\"click\":_vm.cancelCoupon}},[_vm._v(_vm._s(_vm.$t('bookpage.summary.delete')))])]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto val\"},[_vm._v(\"\\n - \"+_vm._s(_vm.formatMoney(_vm.totals.discount))+\"\\n \")])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"row justify-content-between total\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.summary.total'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[_vm._v(\"\\n \"+_vm._s(_vm.formatMoney(_vm.totals.total))+\"\\n \")])])]):_vm._e(),_vm._v(\" \"),_c('footer',[_c('hr'),_vm._v(\" \"),_c('h3',[_vm._v(_vm._s(_vm.$t('bookpage.summary.cancellation_policy')))]),_vm._v(\" \"),_c('p',{domProps:{\"innerHTML\":_vm._s(_vm.$t('bookpage.summary.cancellation_policy_desc'))}})])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Summary-skeleton.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Summary-skeleton.vue?vue&type=script&lang=js&\"","\n \n \n
![]()
\n
\n\n \n\n \n \n \n\n \n
\n\n
\n
\n {{$t('bookpage.summary.subtotal')}}\n
\n\n
\n \n
\n
\n\n
\n
\n {{$t('bookpage.summary.total')}}\n
\n\n
\n \n
\n
\n
\n\n \n
\n\n
{{$t('bookpage.summary.cancellation_policy')}}
\n\n
\n\n
\n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./Summary-skeleton.vue?vue&type=template&id=546e271e&\"\nimport script from \"./Summary-skeleton.vue?vue&type=script&lang=js&\"\nexport * from \"./Summary-skeleton.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('article',{staticClass:\"book__summary book__skeleton\"},[_c('div',{staticClass:\"overlay-loading\"},[_c('img',{attrs:{\"src\":require('images/loader.svg')}})]),_vm._v(\" \"),_c('h2'),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"}),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\"}),_vm._v(\" \"),_c('div',[_c('hr'),_vm._v(\" \"),_c('div',{staticClass:\"row row-0 justify-content-between subtotal\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.summary.subtotal'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"})]),_vm._v(\" \"),_c('div',{staticClass:\"row row-0 justify-content-between total\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.summary.total'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"})])]),_vm._v(\" \"),_c('div',[_c('hr'),_vm._v(\" \"),_c('h3',[_vm._v(_vm._s(_vm.$t('bookpage.summary.cancellation_policy')))]),_vm._v(\" \"),_c('p',{staticClass:\"mt-2\",domProps:{\"innerHTML\":_vm._s(_vm.$t('bookpage.summary.cancellation_policy_desc'))}})])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RateCountSelect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RateCountSelect.vue?vue&type=script&lang=js&\"","\n \n
\n
\n
\n {{`${value} x ${rate.title}`}}\n
\n\n
\n \n
\n\n
\n \n
\n
\n
\n\n
\n
0\">\n {{rate.price}} €/{{rate.title.toLowerCase()}}\n \n ({{rate.desc}})\n
\n \n
{{$t('bookcard.prices.free')}}\n
\n
\n\n\n\n\n","import { render, staticRenderFns } from \"./RateCountSelect.vue?vue&type=template&id=6742501e&\"\nimport script from \"./RateCountSelect.vue?vue&type=script&lang=js&\"\nexport * from \"./RateCountSelect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"book__pax-select\"},[_c('div',{staticClass:\"row row-10 align-items-center\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s((_vm.value + \" x \" + (_vm.rate.title)))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[_c('button',{staticClass:\"minus\",class:{'disabled':_vm.value <= 0 || _vm.value <= _vm.min_pax},on:{\"click\":function($event){return _vm.$emit('decrementCount')}}})]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[_c('button',{staticClass:\"plus\",class:{'disabled':_vm.is_maxed},on:{\"click\":function($event){return _vm.$emit('incrementCount')}}})])])]),_vm._v(\" \"),_c('div',[(_vm.rate.price > 0)?_c('div',{staticClass:\"price d-flex align-items-end\"},[_c('span',[_c('strong',[_vm._v(_vm._s(_vm.rate.price)+\" €\")]),_vm._v(\"/\"+_vm._s(_vm.rate.title.toLowerCase()))]),_vm._v(\" \"),(_vm.rate.desc)?_c('small',{staticClass:\"ms-2 d-inline-block\"},[_vm._v(\"(\"+_vm._s(_vm.rate.desc)+\")\")]):_vm._e()]):_c('span',{staticClass:\"price fw-bold\"},[_vm._v(_vm._s(_vm.$t('bookcard.prices.free')))])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RateCountSelect-skeleton.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RateCountSelect-skeleton.vue?vue&type=script&lang=js&\"","\n \n
\n
\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n
\n\n
\n
\n\n\n\n\n","import { render, staticRenderFns } from \"./RateCountSelect-skeleton.vue?vue&type=template&id=8bf93c40&scoped=true&\"\nimport script from \"./RateCountSelect-skeleton.vue?vue&type=script&lang=js&\"\nexport * from \"./RateCountSelect-skeleton.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8bf93c40\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"book__skeleton\"},[_c('div',{staticClass:\"book__pax-select\"},[_c('div',{staticClass:\"row row-10 align-items-center\"},[_c('div',{staticClass:\"col\"}),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[_c('button',{staticClass:\"minus\"})]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto\"},[_c('button',{staticClass:\"plus\"})])])]),_vm._v(\" \"),_c('div',[_c('div',{staticClass:\"price d-flex align-items-end\"},[_c('div')])])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TourcribHelp.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TourcribHelp.vue?vue&type=script&lang=js&\"","\n \n\n \n \n
\n
![\"\"]()
\n
\n\n
\n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./TourcribHelp.vue?vue&type=template&id=422b4e19&\"\nimport script from \"./TourcribHelp.vue?vue&type=script&lang=js&\"\nexport * from \"./TourcribHelp.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"book__tourcrib-help\"},[_c('div',{staticClass:\"row row-20 align-items-center\"},[_c('div',{staticClass:\"col-auto d-md-none d-xl-block\"},[_c('img',{attrs:{\"src\":require('images/illus/book-tourcrib-help.png'),\"alt\":\"\"}})]),_vm._v(\" \"),_c('div',{staticClass:\"col\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('bookpage.tourcrib_help.title')))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.$t('bookpage.tourcrib_help.subtitle')))]),_vm._v(\" \"),_c('a',{staticClass:\"d-inline-flex align-items-center hover-trans\",attrs:{\"href\":\"https://api.whatsapp.com/send?phone=596696775526\",\"target\":\"_blank\"}},[_c('img',{staticClass:\"me-1\",staticStyle:{\"height\":\"18px\"},attrs:{\"src\":require('images/logos/wa-logo.svg')}}),_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.tourcrib_help.contact_us'))+\"\\n \")])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentStripe.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PaymentStripe.vue?vue&type=script&lang=js&\"","\n \n \n
\n
{{ $t('bookpage.payment.title') }}
\n \n\n
\n
\n
\n
\n {{ $t('bookpage.payment.payment_differed') }}\n
\n
\n
\n
\n
\n \n \n
\n\n
\n
![]()
\n
\n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./PaymentStripe.vue?vue&type=template&id=21f2599e&\"\nimport script from \"./PaymentStripe.vue?vue&type=script&lang=js&\"\nexport * from \"./PaymentStripe.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"book__stripe-payment mt-md-5 mt-4\"},[_c('div',{staticClass:\"row row-20 justify-content-between align-items-center\"},[_c('div',{staticClass:\"col-auto mt-3\"},[_c('h2',[_vm._v(_vm._s(_vm.$t('bookpage.payment.title')))])]),_vm._v(\" \"),_c('div',{staticClass:\"col-auto mt-3\"},[_c('div',{staticClass:\"book__stripe-payment__info\"},[_c('div',{staticClass:\"row row-10 align-items-center\"},[_c('div',{staticClass:\"col\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('bookpage.payment.payment_differed'))+\"\\n \")])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"book__stripe-payment__content mt-4\",class:{'error':_vm.error}},[_c('StripeElementPayment',{ref:\"paymentRef\",attrs:{\"pk\":_vm.stripe_pk,\"elements-options\":_vm.elementsOptions,\"confirm-params\":_vm.confirmParams,\"locale\":_vm.$i18n.locale},on:{\"error\":function($event){return _vm.errorTrigger()},\"loading\":function($event){return _vm.loading($event)},\"element-ready\":function($event){return _vm.ready()},\"element-change\":function($event){return _vm.change()}}}),_vm._v(\" \"),_c('div',{staticClass:\"d-flex justify-content-sm-end mt-3\"},[_c('img',{attrs:{\"src\":require('images/logos/stripe.svg')}})])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","\n \n
\n\n
\n
\n
\n
\n
\n
{{ $t('bookpage.title') }}
\n \n\n
\n
\n\n
\n
\n
\n\n
\n\n
\n
{{ $t('bookpage.what_are_your_choices') }}
\n\n
\n
\n
\n {{ $t('bookpage.personnalize_your_booking') }}\n
\n
\n
\n\n
\n
\n r.activity_rate_id === rate.id).pax_count\" :min_pax=\"0\" :is_max=\"is_maxed_count\" @incrementCount=\"incrementCount(rate.id)\" @decrementCount=\"decrementCount(rate.id)\" />\n
\n
\n\n
\n
\n\n
\n
\n
\n
{{$t('bookpage.transmit_info_to_host')}}
\n \n\n
\n {{$t('bookpage.optional')}}\n
\n
\n\n
\n\n
\n
\n
{{$t('bookpage.your_departure_date')}}
\n \n\n
\n {{$t('bookpage.optional')}}\n
\n
\n\n
\n
\n\n
\n
\n {{$t('bookpage.your_departure_date_infos')}}\n
\n
\n
\n
\n\n
\n
\n\n
\n
\n
\n\n
\n\n
\n \n
\n \n
\n
\n \n
\n
\n\n
\n
\n
\n \n
\n\n
\n
\n
\n
\n\n
\n
![]()
\n
\n
\n
\n
\n
\n\n\n\n\n","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=53a8ed97&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/*!\n * vue-resource v1.5.3\n * https://github.com/pagekit/vue-resource\n * Released under the MIT License.\n */\n\n/**\n * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)\n */\nvar RESOLVED = 0;\nvar REJECTED = 1;\nvar PENDING = 2;\n\nfunction Promise$1(executor) {\n this.state = PENDING;\n this.value = undefined;\n this.deferred = [];\n var promise = this;\n\n try {\n executor(function (x) {\n promise.resolve(x);\n }, function (r) {\n promise.reject(r);\n });\n } catch (e) {\n promise.reject(e);\n }\n}\n\nPromise$1.reject = function (r) {\n return new Promise$1(function (resolve, reject) {\n reject(r);\n });\n};\n\nPromise$1.resolve = function (x) {\n return new Promise$1(function (resolve, reject) {\n resolve(x);\n });\n};\n\nPromise$1.all = function all(iterable) {\n return new Promise$1(function (resolve, reject) {\n var count = 0,\n result = [];\n\n if (iterable.length === 0) {\n resolve(result);\n }\n\n function resolver(i) {\n return function (x) {\n result[i] = x;\n count += 1;\n\n if (count === iterable.length) {\n resolve(result);\n }\n };\n }\n\n for (var i = 0; i < iterable.length; i += 1) {\n Promise$1.resolve(iterable[i]).then(resolver(i), reject);\n }\n });\n};\n\nPromise$1.race = function race(iterable) {\n return new Promise$1(function (resolve, reject) {\n for (var i = 0; i < iterable.length; i += 1) {\n Promise$1.resolve(iterable[i]).then(resolve, reject);\n }\n });\n};\n\nvar p = Promise$1.prototype;\n\np.resolve = function resolve(x) {\n var promise = this;\n\n if (promise.state === PENDING) {\n if (x === promise) {\n throw new TypeError('Promise settled with itself.');\n }\n\n var called = false;\n\n try {\n var then = x && x['then'];\n\n if (x !== null && _typeof(x) === 'object' && typeof then === 'function') {\n then.call(x, function (x) {\n if (!called) {\n promise.resolve(x);\n }\n\n called = true;\n }, function (r) {\n if (!called) {\n promise.reject(r);\n }\n\n called = true;\n });\n return;\n }\n } catch (e) {\n if (!called) {\n promise.reject(e);\n }\n\n return;\n }\n\n promise.state = RESOLVED;\n promise.value = x;\n promise.notify();\n }\n};\n\np.reject = function reject(reason) {\n var promise = this;\n\n if (promise.state === PENDING) {\n if (reason === promise) {\n throw new TypeError('Promise settled with itself.');\n }\n\n promise.state = REJECTED;\n promise.value = reason;\n promise.notify();\n }\n};\n\np.notify = function notify() {\n var promise = this;\n nextTick(function () {\n if (promise.state !== PENDING) {\n while (promise.deferred.length) {\n var deferred = promise.deferred.shift(),\n onResolved = deferred[0],\n onRejected = deferred[1],\n resolve = deferred[2],\n reject = deferred[3];\n\n try {\n if (promise.state === RESOLVED) {\n if (typeof onResolved === 'function') {\n resolve(onResolved.call(undefined, promise.value));\n } else {\n resolve(promise.value);\n }\n } else if (promise.state === REJECTED) {\n if (typeof onRejected === 'function') {\n resolve(onRejected.call(undefined, promise.value));\n } else {\n reject(promise.value);\n }\n }\n } catch (e) {\n reject(e);\n }\n }\n }\n });\n};\n\np.then = function then(onResolved, onRejected) {\n var promise = this;\n return new Promise$1(function (resolve, reject) {\n promise.deferred.push([onResolved, onRejected, resolve, reject]);\n promise.notify();\n });\n};\n\np[\"catch\"] = function (onRejected) {\n return this.then(undefined, onRejected);\n};\n/**\n * Promise adapter.\n */\n\n\nif (typeof Promise === 'undefined') {\n window.Promise = Promise$1;\n}\n\nfunction PromiseObj(executor, context) {\n if (executor instanceof Promise) {\n this.promise = executor;\n } else {\n this.promise = new Promise(executor.bind(context));\n }\n\n this.context = context;\n}\n\nPromiseObj.all = function (iterable, context) {\n return new PromiseObj(Promise.all(iterable), context);\n};\n\nPromiseObj.resolve = function (value, context) {\n return new PromiseObj(Promise.resolve(value), context);\n};\n\nPromiseObj.reject = function (reason, context) {\n return new PromiseObj(Promise.reject(reason), context);\n};\n\nPromiseObj.race = function (iterable, context) {\n return new PromiseObj(Promise.race(iterable), context);\n};\n\nvar p$1 = PromiseObj.prototype;\n\np$1.bind = function (context) {\n this.context = context;\n return this;\n};\n\np$1.then = function (fulfilled, rejected) {\n if (fulfilled && fulfilled.bind && this.context) {\n fulfilled = fulfilled.bind(this.context);\n }\n\n if (rejected && rejected.bind && this.context) {\n rejected = rejected.bind(this.context);\n }\n\n return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);\n};\n\np$1[\"catch\"] = function (rejected) {\n if (rejected && rejected.bind && this.context) {\n rejected = rejected.bind(this.context);\n }\n\n return new PromiseObj(this.promise[\"catch\"](rejected), this.context);\n};\n\np$1[\"finally\"] = function (callback) {\n return this.then(function (value) {\n callback.call(this);\n return value;\n }, function (reason) {\n callback.call(this);\n return Promise.reject(reason);\n });\n};\n/**\n * Utility functions.\n */\n\n\nvar _ref = {},\n hasOwnProperty = _ref.hasOwnProperty,\n slice = [].slice,\n debug = false,\n ntick;\nvar inBrowser = typeof window !== 'undefined';\n\nfunction Util(_ref2) {\n var config = _ref2.config,\n nextTick = _ref2.nextTick;\n ntick = nextTick;\n debug = config.debug || !config.silent;\n}\n\nfunction warn(msg) {\n if (typeof console !== 'undefined' && debug) {\n console.warn('[VueResource warn]: ' + msg);\n }\n}\n\nfunction error(msg) {\n if (typeof console !== 'undefined') {\n console.error(msg);\n }\n}\n\nfunction nextTick(cb, ctx) {\n return ntick(cb, ctx);\n}\n\nfunction trim(str) {\n return str ? str.replace(/^\\s*|\\s*$/g, '') : '';\n}\n\nfunction trimEnd(str, chars) {\n if (str && chars === undefined) {\n return str.replace(/\\s+$/, '');\n }\n\n if (!str || !chars) {\n return str;\n }\n\n return str.replace(new RegExp(\"[\" + chars + \"]+$\"), '');\n}\n\nfunction toLower(str) {\n return str ? str.toLowerCase() : '';\n}\n\nfunction toUpper(str) {\n return str ? str.toUpperCase() : '';\n}\n\nvar isArray = Array.isArray;\n\nfunction isString(val) {\n return typeof val === 'string';\n}\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\n\nfunction isObject(obj) {\n return obj !== null && _typeof(obj) === 'object';\n}\n\nfunction isPlainObject(obj) {\n return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;\n}\n\nfunction isBlob(obj) {\n return typeof Blob !== 'undefined' && obj instanceof Blob;\n}\n\nfunction isFormData(obj) {\n return typeof FormData !== 'undefined' && obj instanceof FormData;\n}\n\nfunction when(value, fulfilled, rejected) {\n var promise = PromiseObj.resolve(value);\n\n if (arguments.length < 2) {\n return promise;\n }\n\n return promise.then(fulfilled, rejected);\n}\n\nfunction options(fn, obj, opts) {\n opts = opts || {};\n\n if (isFunction(opts)) {\n opts = opts.call(obj);\n }\n\n return merge(fn.bind({\n $vm: obj,\n $options: opts\n }), fn, {\n $options: opts\n });\n}\n\nfunction each(obj, iterator) {\n var i, key;\n\n if (isArray(obj)) {\n for (i = 0; i < obj.length; i++) {\n iterator.call(obj[i], obj[i], i);\n }\n } else if (isObject(obj)) {\n for (key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n iterator.call(obj[key], obj[key], key);\n }\n }\n }\n\n return obj;\n}\n\nvar assign = Object.assign || _assign;\n\nfunction merge(target) {\n var args = slice.call(arguments, 1);\n args.forEach(function (source) {\n _merge(target, source, true);\n });\n return target;\n}\n\nfunction defaults(target) {\n var args = slice.call(arguments, 1);\n args.forEach(function (source) {\n for (var key in source) {\n if (target[key] === undefined) {\n target[key] = source[key];\n }\n }\n });\n return target;\n}\n\nfunction _assign(target) {\n var args = slice.call(arguments, 1);\n args.forEach(function (source) {\n _merge(target, source);\n });\n return target;\n}\n\nfunction _merge(target, source, deep) {\n for (var key in source) {\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key])) {\n target[key] = {};\n }\n\n if (isArray(source[key]) && !isArray(target[key])) {\n target[key] = [];\n }\n\n _merge(target[key], source[key], deep);\n } else if (source[key] !== undefined) {\n target[key] = source[key];\n }\n }\n}\n/**\n * Root Prefix Transform.\n */\n\n\nfunction root(options$$1, next) {\n var url = next(options$$1);\n\n if (isString(options$$1.root) && !/^(https?:)?\\//.test(url)) {\n url = trimEnd(options$$1.root, '/') + '/' + url;\n }\n\n return url;\n}\n/**\n * Query Parameter Transform.\n */\n\n\nfunction query(options$$1, next) {\n var urlParams = Object.keys(Url.options.params),\n query = {},\n url = next(options$$1);\n each(options$$1.params, function (value, key) {\n if (urlParams.indexOf(key) === -1) {\n query[key] = value;\n }\n });\n query = Url.params(query);\n\n if (query) {\n url += (url.indexOf('?') == -1 ? '?' : '&') + query;\n }\n\n return url;\n}\n/**\n * URL Template v2.0.6 (https://github.com/bramstein/url-template)\n */\n\n\nfunction expand(url, params, variables) {\n var tmpl = parse(url),\n expanded = tmpl.expand(params);\n\n if (variables) {\n variables.push.apply(variables, tmpl.vars);\n }\n\n return expanded;\n}\n\nfunction parse(template) {\n var operators = ['+', '#', '.', '/', ';', '?', '&'],\n variables = [];\n return {\n vars: variables,\n expand: function expand(context) {\n return template.replace(/\\{([^{}]+)\\}|([^{}]+)/g, function (_, expression, literal) {\n if (expression) {\n var operator = null,\n values = [];\n\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n variables.push(tmp[1]);\n });\n\n if (operator && operator !== '+') {\n var separator = ',';\n\n if (operator === '?') {\n separator = '&';\n } else if (operator !== '#') {\n separator = operator;\n }\n\n return (values.length !== 0 ? operator : '') + values.join(separator);\n } else {\n return values.join(',');\n }\n } else {\n return encodeReserved(literal);\n }\n });\n }\n };\n}\n\nfunction getValues(context, operator, key, modifier) {\n var value = context[key],\n result = [];\n\n if (isDefined(value) && value !== '') {\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n value = value.toString();\n\n if (modifier && modifier !== '*') {\n value = value.substring(0, parseInt(modifier, 10));\n }\n\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));\n } else {\n if (modifier === '*') {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n var tmp = [];\n\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeURIComponent(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n\n if (isKeyOperator(operator)) {\n result.push(encodeURIComponent(key) + '=' + tmp.join(','));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(','));\n }\n }\n }\n } else {\n if (operator === ';') {\n result.push(encodeURIComponent(key));\n } else if (value === '' && (operator === '&' || operator === '?')) {\n result.push(encodeURIComponent(key) + '=');\n } else if (value === '') {\n result.push('');\n }\n }\n\n return result;\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nfunction isKeyOperator(operator) {\n return operator === ';' || operator === '&' || operator === '?';\n}\n\nfunction encodeValue(operator, value, key) {\n value = operator === '+' || operator === '#' ? encodeReserved(value) : encodeURIComponent(value);\n\n if (key) {\n return encodeURIComponent(key) + '=' + value;\n } else {\n return value;\n }\n}\n\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part);\n }\n\n return part;\n }).join('');\n}\n/**\n * URL Template (RFC 6570) Transform.\n */\n\n\nfunction template(options) {\n var variables = [],\n url = expand(options.url, options.params, variables);\n variables.forEach(function (key) {\n delete options.params[key];\n });\n return url;\n}\n/**\n * Service for URL templating.\n */\n\n\nfunction Url(url, params) {\n var self = this || {},\n options$$1 = url,\n transform;\n\n if (isString(url)) {\n options$$1 = {\n url: url,\n params: params\n };\n }\n\n options$$1 = merge({}, Url.options, self.$options, options$$1);\n Url.transforms.forEach(function (handler) {\n if (isString(handler)) {\n handler = Url.transform[handler];\n }\n\n if (isFunction(handler)) {\n transform = factory(handler, transform, self.$vm);\n }\n });\n return transform(options$$1);\n}\n/**\n * Url options.\n */\n\n\nUrl.options = {\n url: '',\n root: null,\n params: {}\n};\n/**\n * Url transforms.\n */\n\nUrl.transform = {\n template: template,\n query: query,\n root: root\n};\nUrl.transforms = ['template', 'query', 'root'];\n/**\n * Encodes a Url parameter string.\n *\n * @param {Object} obj\n */\n\nUrl.params = function (obj) {\n var params = [],\n escape = encodeURIComponent;\n\n params.add = function (key, value) {\n if (isFunction(value)) {\n value = value();\n }\n\n if (value === null) {\n value = '';\n }\n\n this.push(escape(key) + '=' + escape(value));\n };\n\n serialize(params, obj);\n return params.join('&').replace(/%20/g, '+');\n};\n/**\n * Parse a URL and return its components.\n *\n * @param {String} url\n */\n\n\nUrl.parse = function (url) {\n var el = document.createElement('a');\n\n if (document.documentMode) {\n el.href = url;\n url = el.href;\n }\n\n el.href = url;\n return {\n href: el.href,\n protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',\n port: el.port,\n host: el.host,\n hostname: el.hostname,\n pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,\n search: el.search ? el.search.replace(/^\\?/, '') : '',\n hash: el.hash ? el.hash.replace(/^#/, '') : ''\n };\n};\n\nfunction factory(handler, next, vm) {\n return function (options$$1) {\n return handler.call(vm, options$$1, next);\n };\n}\n\nfunction serialize(params, obj, scope) {\n var array = isArray(obj),\n plain = isPlainObject(obj),\n hash;\n each(obj, function (value, key) {\n hash = isObject(value) || isArray(value);\n\n if (scope) {\n key = scope + '[' + (plain || hash ? key : '') + ']';\n }\n\n if (!scope && array) {\n params.add(value.name, value.value);\n } else if (hash) {\n serialize(params, value, key);\n } else {\n params.add(key, value);\n }\n });\n}\n/**\n * XDomain client (Internet Explorer).\n */\n\n\nfunction xdrClient(request) {\n return new PromiseObj(function (resolve) {\n var xdr = new XDomainRequest(),\n handler = function handler(_ref) {\n var type = _ref.type;\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {\n status: status\n }));\n };\n\n request.abort = function () {\n return xdr.abort();\n };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n\n xdr.onprogress = function () {};\n\n xdr.send(request.getBody());\n });\n}\n/**\n * CORS Interceptor.\n */\n\n\nvar SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();\n\nfunction cors(request) {\n if (inBrowser) {\n var orgUrl = Url.parse(location.href);\n var reqUrl = Url.parse(request.getUrl());\n\n if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {\n request.crossOrigin = true;\n request.emulateHTTP = false;\n\n if (!SUPPORTS_CORS) {\n request.client = xdrClient;\n }\n }\n }\n}\n/**\n * Form data Interceptor.\n */\n\n\nfunction form(request) {\n if (isFormData(request.body)) {\n request.headers[\"delete\"]('Content-Type');\n } else if (isObject(request.body) && request.emulateJSON) {\n request.body = Url.params(request.body);\n request.headers.set('Content-Type', 'application/x-www-form-urlencoded');\n }\n}\n/**\n * JSON Interceptor.\n */\n\n\nfunction json(request) {\n var type = request.headers.get('Content-Type') || '';\n\n if (isObject(request.body) && type.indexOf('application/json') === 0) {\n request.body = JSON.stringify(request.body);\n }\n\n return function (response) {\n return response.bodyText ? when(response.text(), function (text) {\n var type = response.headers.get('Content-Type') || '';\n\n if (type.indexOf('application/json') === 0 || isJson(text)) {\n try {\n response.body = JSON.parse(text);\n } catch (e) {\n response.body = null;\n }\n } else {\n response.body = text;\n }\n\n return response;\n }) : response;\n };\n}\n\nfunction isJson(str) {\n var start = str.match(/^\\s*(\\[|\\{)/);\n var end = {\n '[': /]\\s*$/,\n '{': /}\\s*$/\n };\n return start && end[start[1]].test(str);\n}\n/**\n * JSONP client (Browser).\n */\n\n\nfunction jsonpClient(request) {\n return new PromiseObj(function (resolve) {\n var name = request.jsonp || 'callback',\n callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2),\n body = null,\n handler,\n script;\n\n handler = function handler(_ref) {\n var type = _ref.type;\n var status = 0;\n\n if (type === 'load' && body !== null) {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n if (status && window[callback]) {\n delete window[callback];\n document.body.removeChild(script);\n }\n\n resolve(request.respondWith(body, {\n status: status\n }));\n };\n\n window[callback] = function (result) {\n body = JSON.stringify(result);\n };\n\n request.abort = function () {\n handler({\n type: 'abort'\n });\n };\n\n request.params[name] = callback;\n\n if (request.timeout) {\n setTimeout(request.abort, request.timeout);\n }\n\n script = document.createElement('script');\n script.src = request.getUrl();\n script.type = 'text/javascript';\n script.async = true;\n script.onload = handler;\n script.onerror = handler;\n document.body.appendChild(script);\n });\n}\n/**\n * JSONP Interceptor.\n */\n\n\nfunction jsonp(request) {\n if (request.method == 'JSONP') {\n request.client = jsonpClient;\n }\n}\n/**\n * Before Interceptor.\n */\n\n\nfunction before(request) {\n if (isFunction(request.before)) {\n request.before.call(this, request);\n }\n}\n/**\n * HTTP method override Interceptor.\n */\n\n\nfunction method(request) {\n if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {\n request.headers.set('X-HTTP-Method-Override', request.method);\n request.method = 'POST';\n }\n}\n/**\n * Header Interceptor.\n */\n\n\nfunction header(request) {\n var headers = assign({}, Http.headers.common, !request.crossOrigin ? Http.headers.custom : {}, Http.headers[toLower(request.method)]);\n each(headers, function (value, name) {\n if (!request.headers.has(name)) {\n request.headers.set(name, value);\n }\n });\n}\n/**\n * XMLHttp client (Browser).\n */\n\n\nfunction xhrClient(request) {\n return new PromiseObj(function (resolve) {\n var xhr = new XMLHttpRequest(),\n handler = function handler(event) {\n var response = request.respondWith('response' in xhr ? xhr.response : xhr.responseText, {\n status: xhr.status === 1223 ? 204 : xhr.status,\n // IE9 status bug\n statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)\n });\n each(trim(xhr.getAllResponseHeaders()).split('\\n'), function (row) {\n response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));\n });\n resolve(response);\n };\n\n request.abort = function () {\n return xhr.abort();\n };\n\n xhr.open(request.method, request.getUrl(), true);\n\n if (request.timeout) {\n xhr.timeout = request.timeout;\n }\n\n if (request.responseType && 'responseType' in xhr) {\n xhr.responseType = request.responseType;\n }\n\n if (request.withCredentials || request.credentials) {\n xhr.withCredentials = true;\n }\n\n if (!request.crossOrigin) {\n request.headers.set('X-Requested-With', 'XMLHttpRequest');\n } // deprecated use downloadProgress\n\n\n if (isFunction(request.progress) && request.method === 'GET') {\n xhr.addEventListener('progress', request.progress);\n }\n\n if (isFunction(request.downloadProgress)) {\n xhr.addEventListener('progress', request.downloadProgress);\n } // deprecated use uploadProgress\n\n\n if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) {\n xhr.upload.addEventListener('progress', request.progress);\n }\n\n if (isFunction(request.uploadProgress) && xhr.upload) {\n xhr.upload.addEventListener('progress', request.uploadProgress);\n }\n\n request.headers.forEach(function (value, name) {\n xhr.setRequestHeader(name, value);\n });\n xhr.onload = handler;\n xhr.onabort = handler;\n xhr.onerror = handler;\n xhr.ontimeout = handler;\n xhr.send(request.getBody());\n });\n}\n/**\n * Http client (Node).\n */\n\n\nfunction nodeClient(request) {\n var client = require('got');\n\n return new PromiseObj(function (resolve) {\n var url = request.getUrl();\n var body = request.getBody();\n var method = request.method;\n var headers = {},\n handler;\n request.headers.forEach(function (value, name) {\n headers[name] = value;\n });\n client(url, {\n body: body,\n method: method,\n headers: headers\n }).then(handler = function handler(resp) {\n var response = request.respondWith(resp.body, {\n status: resp.statusCode,\n statusText: trim(resp.statusMessage)\n });\n each(resp.headers, function (value, name) {\n response.headers.set(name, value);\n });\n resolve(response);\n }, function (error$$1) {\n return handler(error$$1.response);\n });\n });\n}\n/**\n * Base client.\n */\n\n\nfunction Client(context) {\n var reqHandlers = [sendRequest],\n resHandlers = [];\n\n if (!isObject(context)) {\n context = null;\n }\n\n function Client(request) {\n while (reqHandlers.length) {\n var handler = reqHandlers.pop();\n\n if (isFunction(handler)) {\n var _ret = function () {\n var response = void 0,\n next = void 0;\n response = handler.call(context, request, function (val) {\n return next = val;\n }) || next;\n\n if (isObject(response)) {\n return {\n v: new PromiseObj(function (resolve, reject) {\n resHandlers.forEach(function (handler) {\n response = when(response, function (response) {\n return handler.call(context, response) || response;\n }, reject);\n });\n when(response, resolve, reject);\n }, context)\n };\n }\n\n if (isFunction(response)) {\n resHandlers.unshift(response);\n }\n }();\n\n if (_typeof(_ret) === \"object\") return _ret.v;\n } else {\n warn(\"Invalid interceptor of type \" + _typeof(handler) + \", must be a function\");\n }\n }\n }\n\n Client.use = function (handler) {\n reqHandlers.push(handler);\n };\n\n return Client;\n}\n\nfunction sendRequest(request) {\n var client = request.client || (inBrowser ? xhrClient : nodeClient);\n return client(request);\n}\n/**\n * HTTP Headers.\n */\n\n\nvar Headers = /*#__PURE__*/function () {\n function Headers(headers) {\n var _this = this;\n\n this.map = {};\n each(headers, function (value, name) {\n return _this.append(name, value);\n });\n }\n\n var _proto = Headers.prototype;\n\n _proto.has = function has(name) {\n return getName(this.map, name) !== null;\n };\n\n _proto.get = function get(name) {\n var list = this.map[getName(this.map, name)];\n return list ? list.join() : null;\n };\n\n _proto.getAll = function getAll(name) {\n return this.map[getName(this.map, name)] || [];\n };\n\n _proto.set = function set(name, value) {\n this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];\n };\n\n _proto.append = function append(name, value) {\n var list = this.map[getName(this.map, name)];\n\n if (list) {\n list.push(trim(value));\n } else {\n this.set(name, value);\n }\n };\n\n _proto[\"delete\"] = function _delete(name) {\n delete this.map[getName(this.map, name)];\n };\n\n _proto.deleteAll = function deleteAll() {\n this.map = {};\n };\n\n _proto.forEach = function forEach(callback, thisArg) {\n var _this2 = this;\n\n each(this.map, function (list, name) {\n each(list, function (value) {\n return callback.call(thisArg, value, name, _this2);\n });\n });\n };\n\n return Headers;\n}();\n\nfunction getName(map, name) {\n return Object.keys(map).reduce(function (prev, curr) {\n return toLower(name) === toLower(curr) ? curr : prev;\n }, null);\n}\n\nfunction normalizeName(name) {\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name');\n }\n\n return trim(name);\n}\n/**\n * HTTP Response.\n */\n\n\nvar Response = /*#__PURE__*/function () {\n function Response(body, _ref) {\n var url = _ref.url,\n headers = _ref.headers,\n status = _ref.status,\n statusText = _ref.statusText;\n this.url = url;\n this.ok = status >= 200 && status < 300;\n this.status = status || 0;\n this.statusText = statusText || '';\n this.headers = new Headers(headers);\n this.body = body;\n\n if (isString(body)) {\n this.bodyText = body;\n } else if (isBlob(body)) {\n this.bodyBlob = body;\n\n if (isBlobText(body)) {\n this.bodyText = blobText(body);\n }\n }\n }\n\n var _proto = Response.prototype;\n\n _proto.blob = function blob() {\n return when(this.bodyBlob);\n };\n\n _proto.text = function text() {\n return when(this.bodyText);\n };\n\n _proto.json = function json() {\n return when(this.text(), function (text) {\n return JSON.parse(text);\n });\n };\n\n return Response;\n}();\n\nObject.defineProperty(Response.prototype, 'data', {\n get: function get() {\n return this.body;\n },\n set: function set(body) {\n this.body = body;\n }\n});\n\nfunction blobText(body) {\n return new PromiseObj(function (resolve) {\n var reader = new FileReader();\n reader.readAsText(body);\n\n reader.onload = function () {\n resolve(reader.result);\n };\n });\n}\n\nfunction isBlobText(body) {\n return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;\n}\n/**\n * HTTP Request.\n */\n\n\nvar Request = /*#__PURE__*/function () {\n function Request(options$$1) {\n this.body = null;\n this.params = {};\n assign(this, options$$1, {\n method: toUpper(options$$1.method || 'GET')\n });\n\n if (!(this.headers instanceof Headers)) {\n this.headers = new Headers(this.headers);\n }\n }\n\n var _proto = Request.prototype;\n\n _proto.getUrl = function getUrl() {\n return Url(this);\n };\n\n _proto.getBody = function getBody() {\n return this.body;\n };\n\n _proto.respondWith = function respondWith(body, options$$1) {\n return new Response(body, assign(options$$1 || {}, {\n url: this.getUrl()\n }));\n };\n\n return Request;\n}();\n/**\n * Service for sending network requests.\n */\n\n\nvar COMMON_HEADERS = {\n 'Accept': 'application/json, text/plain, */*'\n};\nvar JSON_CONTENT_TYPE = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nfunction Http(options$$1) {\n var self = this || {},\n client = Client(self.$vm);\n defaults(options$$1 || {}, self.$options, Http.options);\n Http.interceptors.forEach(function (handler) {\n if (isString(handler)) {\n handler = Http.interceptor[handler];\n }\n\n if (isFunction(handler)) {\n client.use(handler);\n }\n });\n return client(new Request(options$$1)).then(function (response) {\n return response.ok ? response : PromiseObj.reject(response);\n }, function (response) {\n if (response instanceof Error) {\n error(response);\n }\n\n return PromiseObj.reject(response);\n });\n}\n\nHttp.options = {};\nHttp.headers = {\n put: JSON_CONTENT_TYPE,\n post: JSON_CONTENT_TYPE,\n patch: JSON_CONTENT_TYPE,\n \"delete\": JSON_CONTENT_TYPE,\n common: COMMON_HEADERS,\n custom: {}\n};\nHttp.interceptor = {\n before: before,\n method: method,\n jsonp: jsonp,\n json: json,\n form: form,\n header: header,\n cors: cors\n};\nHttp.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];\n['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {\n Http[method$$1] = function (url, options$$1) {\n return this(assign(options$$1 || {}, {\n url: url,\n method: method$$1\n }));\n };\n});\n['post', 'put', 'patch'].forEach(function (method$$1) {\n Http[method$$1] = function (url, body, options$$1) {\n return this(assign(options$$1 || {}, {\n url: url,\n method: method$$1,\n body: body\n }));\n };\n});\n/**\n * Service for interacting with RESTful services.\n */\n\nfunction Resource(url, params, actions, options$$1) {\n var self = this || {},\n resource = {};\n actions = assign({}, Resource.actions, actions);\n each(actions, function (action, name) {\n action = merge({\n url: url,\n params: assign({}, params)\n }, options$$1, action);\n\n resource[name] = function () {\n return (self.$http || Http)(opts(action, arguments));\n };\n });\n return resource;\n}\n\nfunction opts(action, args) {\n var options$$1 = assign({}, action),\n params = {},\n body;\n\n switch (args.length) {\n case 2:\n params = args[0];\n body = args[1];\n break;\n\n case 1:\n if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {\n body = args[0];\n } else {\n params = args[0];\n }\n\n break;\n\n case 0:\n break;\n\n default:\n throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';\n }\n\n options$$1.body = body;\n options$$1.params = assign({}, options$$1.params, params);\n return options$$1;\n}\n\nResource.actions = {\n get: {\n method: 'GET'\n },\n save: {\n method: 'POST'\n },\n query: {\n method: 'GET'\n },\n update: {\n method: 'PUT'\n },\n remove: {\n method: 'DELETE'\n },\n \"delete\": {\n method: 'DELETE'\n }\n};\n/**\n * Install plugin.\n */\n\nfunction plugin(Vue) {\n if (plugin.installed) {\n return;\n }\n\n Util(Vue);\n Vue.url = Url;\n Vue.http = Http;\n Vue.resource = Resource;\n Vue.Promise = PromiseObj;\n Object.defineProperties(Vue.prototype, {\n $url: {\n get: function get() {\n return options(Vue.url, this, this.$options.url);\n }\n },\n $http: {\n get: function get() {\n return options(Vue.http, this, this.$options.http);\n }\n },\n $resource: {\n get: function get() {\n return Vue.resource.bind(this);\n }\n },\n $promise: {\n get: function get() {\n var _this = this;\n\n return function (executor) {\n return new Vue.Promise(executor, _this);\n };\n }\n }\n });\n}\n\nif (typeof window !== 'undefined' && window.Vue && !window.Vue.resource) {\n window.Vue.use(plugin);\n}\n\nexport default plugin;\nexport { Url, Http, Resource };","function handleVueDestruction(vue) {\n var event = vue.$options.destroyEvent || defaultEvent();\n document.addEventListener(event, function teardown() {\n vue.$destroy();\n document.removeEventListener(event, teardown);\n });\n}\n\nvar Mixin = {\n beforeMount: function beforeMount() {\n // If this is the root component, we want to cache the original element contents to replace later\n // We don't care about sub-components, just the root\n if (this === this.$root && this.$el) {\n handleVueDestruction(this); // cache original element\n\n this.$cachedHTML = this.$el.outerHTML; // register root hook to restore original element on destroy\n\n this.$once('hook:destroyed', function () {\n if (this.$el.parentNode) this.$el.outerHTML = this.$cachedHTML;\n });\n }\n }\n};\n\nfunction plugin(Vue, options) {\n // Install a global mixin\n Vue.mixin(Mixin);\n}\n\nfunction defaultEvent() {\n if (typeof Turbo !== 'undefined') {\n return 'turbo:visit';\n }\n\n return 'turbolinks:visit';\n}\n\nexport { Mixin as turbolinksAdapterMixin };\nexport default plugin;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/*!\n * vue-i18n v8.27.1 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n\n/* */\n\n/**\n * constants\n */\nvar numberFormatKeys = ['compactDisplay', 'currency', 'currencyDisplay', 'currencySign', 'localeMatcher', 'notation', 'numberingSystem', 'signDisplay', 'style', 'unit', 'unitDisplay', 'useGrouping', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits'];\n/**\n * utilities\n */\n\nfunction warn(msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error(msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject(obj) {\n return obj !== null && _typeof(obj) === 'object';\n}\n\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\n\nfunction isString(val) {\n return typeof val === 'string';\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\n\nfunction isPlainObject(obj) {\n return toString.call(obj) === OBJECT_STRING;\n}\n\nfunction isNull(val) {\n return val === null || val === undefined;\n}\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\n\nfunction parseArgs() {\n var args = [],\n len = arguments.length;\n\n while (len--) {\n args[len] = arguments[len];\n }\n\n var locale = null;\n var params = null;\n\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n\n\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return {\n locale: locale,\n params: params\n };\n}\n\nfunction looseClone(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n\nfunction remove(arr, item) {\n if (arr[\"delete\"](item)) {\n return arr;\n }\n}\n\nfunction arrayFrom(arr) {\n var ret = [];\n arr.forEach(function (a) {\n return ret.push(a);\n });\n return ret;\n}\n\nfunction includes(arr, item) {\n return !!~arr.indexOf(item);\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n\nfunction merge(target) {\n var arguments$1 = arguments;\n var output = Object(target);\n\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n\n if (source !== undefined && source !== null) {\n var key = void 0;\n\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n\n return output;\n}\n\nfunction looseEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i]);\n });\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key]);\n });\n } else {\n /* istanbul ignore next */\n return false;\n }\n } catch (e) {\n /* istanbul ignore next */\n return false;\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n}\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\n\n\nfunction escapeHtml(rawText) {\n return rawText.replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''');\n}\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\n\n\nfunction escapeParams(params) {\n if (params != null) {\n Object.keys(params).forEach(function (key) {\n if (typeof params[key] == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n\n return params;\n}\n/* */\n\n\nfunction extend(Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get() {\n return this._i18n;\n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [],\n len = arguments.length - 1;\n\n while (len-- > 0) {\n values[len] = arguments[len + 1];\n }\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [key, i18n.locale, i18n._getMessages(), this].concat(values));\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [],\n len = arguments.length - 2;\n\n while (len-- > 0) {\n values[len] = arguments[len + 2];\n }\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [key, i18n.locale, i18n._getMessages(), this, choice].concat(values));\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale);\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n var args = [],\n len = arguments.length - 1;\n\n while (len-- > 0) {\n args[len] = arguments[len + 1];\n }\n\n return (ref = this.$i18n).d.apply(ref, [value].concat(args));\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n var args = [],\n len = arguments.length - 1;\n\n while (len-- > 0) {\n args[len] = arguments[len + 1];\n }\n\n return (ref = this.$i18n).n.apply(ref, [value].concat(args));\n };\n}\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\n\n\nfunction defineMixin(bridge) {\n if (bridge === void 0) bridge = false;\n\n function mounted() {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge ? {\n mounted: mounted\n } // delegate `vue-i18n-bridge` mixin implementation\n : {\n // regulary \n beforeCreate: function beforeCreate() {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18nBridge || options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if (options.__i18nBridge || options.__i18n) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n\n var _i18n = options.__i18nBridge || options.__i18n;\n\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n ? this.$root.$i18n : null; // component local i18n\n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n } // init locale messages via custom blocks\n\n\n if (options.__i18nBridge || options.__i18n) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n beforeMount: function beforeMount() {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18nBridge || options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n\n this._subscribing = true;\n }\n },\n mounted: mounted,\n beforeDestroy: function beforeDestroy() {\n if (!this._i18n) {\n return;\n }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n\n self._i18n.destroyVM();\n\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n\n delete self._localeWatcher;\n }\n });\n }\n };\n}\n/* */\n\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n \"default\": 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render(h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n var $i18n = parent.$i18n;\n\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n\n return;\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(path, locale, onlyHasDefaultPlace(params) || places ? useLegacyPlaces(params[\"default\"], places) : params);\n var tag = !!props.tag && props.tag !== true || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children;\n }\n};\n\nfunction onlyHasDefaultPlace(params) {\n var prop;\n\n for (prop in params) {\n if (prop !== 'default') {\n return false;\n }\n }\n\n return Boolean(prop);\n}\n\nfunction useLegacyPlaces(children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) {\n return params;\n } // Filter empty text nodes\n\n\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== '';\n });\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(everyPlace ? assignChildPlace : assignChildIndex, params);\n}\n\nfunction createParamsFromPlaces(places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places) ? places.reduce(assignChildIndex, {}) : Object.assign({}, places);\n}\n\nfunction assignChildPlace(params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n\n return params;\n}\n\nfunction assignChildIndex(params, child, index) {\n params[index] = child;\n return params;\n}\n\nfunction vnodeHasPlaceAttribute(vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place);\n}\n/* */\n\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n \"default\": 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render(h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n\n return null;\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n } // Filter out number format options only\n\n\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, (obj = {}, obj[prop] = props.format[prop], obj));\n }\n\n return acc;\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot((obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj)) : part.value;\n });\n var tag = !!props.tag && props.tag !== true || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values) : values;\n }\n};\n/* */\n\nfunction bind(el, binding, vnode) {\n if (!assert(el, vnode)) {\n return;\n }\n\n t(el, binding, vnode);\n}\n\nfunction update(el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) {\n return;\n }\n\n var i18n = vnode.context.$i18n;\n\n if (localeEqual(el, vnode) && looseEqual(binding.value, binding.oldValue) && looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale))) {\n return;\n }\n\n t(el, binding, vnode);\n}\n\nfunction unbind(el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return;\n }\n\n var i18n = vnode.context.$i18n || {};\n\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert(el, vnode) {\n var vm = vnode.context;\n\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false;\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false;\n }\n\n return true;\n}\n\nfunction localeEqual(el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale;\n}\n\nfunction t(el, binding, vnode) {\n var ref$1, ref$2;\n var value = binding.value;\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n\n if (!path && !locale && !args) {\n warn('value type not supported');\n return;\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return;\n }\n\n var vm = vnode.context;\n\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [path, choice].concat(makeParams(locale, args)));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [path].concat(makeParams(locale, args)));\n }\n\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue(value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return {\n path: path,\n locale: locale,\n args: args,\n choice: choice\n };\n}\n\nfunction makeParams(locale, args) {\n var params = [];\n locale && params.push(locale);\n\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params;\n}\n\nvar Vue;\n\nfunction install(_Vue, options) {\n if (options === void 0) options = {\n bridge: false\n };\n /* istanbul ignore if */\n\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return;\n }\n\n install.installed = true;\n Vue = _Vue;\n var version = Vue.version && Number(Vue.version.split('.')[0]) || -1;\n /* istanbul ignore if */\n\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn(\"vue-i18n (\" + install.version + \") need to use Vue 2.0 or later (Vue: \" + Vue.version + \").\");\n return;\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', {\n bind: bind,\n update: update,\n unbind: unbind\n });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent); // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n\n var strats = Vue.config.optionMergeStrategies;\n\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined ? parentVal : childVal;\n };\n}\n/* */\n\n\nvar BaseFormatter = function BaseFormatter() {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate(message, values) {\n if (!values) {\n return [message];\n }\n\n var tokens = this._caches[message];\n\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n\n return compile(tokens, values);\n};\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse(format) {\n var tokens = [];\n var position = 0;\n var text = '';\n\n while (position < format.length) {\n var _char = format[position++];\n\n if (_char === '{') {\n if (text) {\n tokens.push({\n type: 'text',\n value: text\n });\n }\n\n text = '';\n var sub = '';\n _char = format[position++];\n\n while (_char !== undefined && _char !== '}') {\n sub += _char;\n _char = format[position++];\n }\n\n var isClosed = _char === '}';\n var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';\n tokens.push({\n value: sub,\n type: type\n });\n } else if (_char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[position] !== '{') {\n text += _char;\n }\n } else {\n text += _char;\n }\n }\n\n text && tokens.push({\n type: 'text',\n value: text\n });\n return tokens;\n}\n\nfunction compile(tokens, values) {\n var compiled = [];\n var index = 0;\n var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';\n\n if (mode === 'unknown') {\n return compiled;\n }\n\n while (index < tokens.length) {\n var token = tokens[index];\n\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break;\n\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break;\n\n case 'named':\n if (mode === 'named') {\n compiled.push(values[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Type of token '\" + token.type + \"' and format of value '\" + mode + \"' don't match!\");\n }\n }\n\n break;\n\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n\n break;\n }\n\n index++;\n }\n\n return compiled;\n}\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n// actions\n\n\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3; // states\n\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\nvar pathStateMachine = [];\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\n\nfunction isLiteral(exp) {\n return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\n\n\nfunction stripQuotes(str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\n\n\nfunction getPathCharType(ch) {\n if (ch === undefined || ch === null) {\n return 'eof';\n }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n\n case 0x5D: // ]\n\n case 0x2E: // .\n\n case 0x22: // \"\n\n case 0x27:\n // '\n return ch;\n\n case 0x5F: // _\n\n case 0x24: // $\n\n case 0x2D:\n // -\n return 'ident';\n\n case 0x09: // Tab\n\n case 0x0A: // Newline\n\n case 0x0D: // Return\n\n case 0xA0: // No-break space\n\n case 0xFEFF: // Byte Order Mark\n\n case 0x2028: // Line Separator\n\n case 0x2029:\n // Paragraph Separator\n return 'ws';\n }\n\n return 'ident';\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\n\nfunction formatSubPath(path) {\n var trimmed = path.trim(); // invalid leading 0\n\n if (path.charAt(0) === '0' && isNaN(path)) {\n return false;\n }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\n\n\nfunction parse$1(path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n\n if (key === undefined) {\n return false;\n }\n\n key = formatSubPath(key);\n\n if (key === false) {\n return false;\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote() {\n var nextChar = path[index + 1];\n\n if (mode === IN_SINGLE_QUOTE && nextChar === \"'\" || mode === IN_DOUBLE_QUOTE && nextChar === '\"') {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true;\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue;\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return; // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined ? c : newChar;\n\n if (action() === false) {\n return;\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys;\n }\n }\n}\n\nvar I18nPath = function I18nPath() {\n this._cache = Object.create(null);\n};\n/**\n * External parse that check for a cache hit first\n */\n\n\nI18nPath.prototype.parsePath = function parsePath(path) {\n var hit = this._cache[path];\n\n if (!hit) {\n hit = parse$1(path);\n\n if (hit) {\n this._cache[path] = hit;\n }\n }\n\n return hit || [];\n};\n/**\n * Get path value from path string\n */\n\n\nI18nPath.prototype.getPathValue = function getPathValue(obj, path) {\n if (!isObject(obj)) {\n return null;\n }\n\n var paths = this.parsePath(path);\n\n if (paths.length === 0) {\n return null;\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n\n while (i < length) {\n var value = last[paths[i]];\n\n if (value === undefined || value === null) {\n return null;\n }\n\n last = value;\n i++;\n }\n\n return last;\n }\n};\n/* */\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function upper(str) {\n return str.toLocaleUpperCase();\n },\n 'lower': function lower(str) {\n return str.toLocaleLowerCase();\n },\n 'capitalize': function capitalize(str) {\n return \"\" + str.charAt(0).toLocaleUpperCase() + str.substr(1);\n }\n};\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n(options) {\n var this$1 = this;\n if (options === void 0) options = {}; // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n\n /* istanbul ignore if */\n\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false ? false : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined ? true : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined ? true : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined ? false : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined ? false : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined ? false : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined ? false : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n\n\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = thisPrototype.getChoiceIndex;\n return prototypeGetChoiceIndex.call(this$1, choice, choicesLength);\n } // Default (old) getChoiceIndex implementation - english-compatible\n\n\n var defaultImpl = function defaultImpl(_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice ? _choice > 1 ? 1 : 0 : 1;\n }\n\n return _choice ? Math.min(_choice, 2) : 0;\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength]);\n } else {\n return defaultImpl(choice, choicesLength);\n }\n };\n\n this._exist = function (message, key) {\n if (!message || !key) {\n return false;\n }\n\n if (!isNull(this$1._path.getPathValue(message, key))) {\n return true;\n } // fallback for flat key\n\n\n if (message[key]) {\n return true;\n }\n\n return false;\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = {\n vm: {\n configurable: true\n },\n messages: {\n configurable: true\n },\n dateTimeFormats: {\n configurable: true\n },\n numberFormats: {\n configurable: true\n },\n availableLocales: {\n configurable: true\n },\n locale: {\n configurable: true\n },\n fallbackLocale: {\n configurable: true\n },\n formatFallbackMessages: {\n configurable: true\n },\n missing: {\n configurable: true\n },\n formatter: {\n configurable: true\n },\n silentTranslationWarn: {\n configurable: true\n },\n silentFallbackWarn: {\n configurable: true\n },\n preserveDirectiveContent: {\n configurable: true\n },\n warnHtmlInMessage: {\n configurable: true\n },\n postTranslation: {\n configurable: true\n },\n sync: {\n configurable: true\n }\n};\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage(locale, level, message) {\n var paths = [];\n\n var fn = function fn(level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push(\"[\" + index + \"]\");\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(\"[\" + index + \"]\");\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + paths.join('') + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM(data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({\n data: data,\n __VUE18N__INSTANCE__: true\n });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM() {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging(vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging(vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData() {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n\n while (i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, {\n deep: true\n });\n};\n\nVueI18n.prototype.watchLocale = function watchLocale(composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) {\n return null;\n }\n\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, {\n immediate: true\n });\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) {\n return null;\n }\n\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n\n target$1.$forceUpdate();\n }, {\n immediate: true\n });\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated(newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () {\n return this._vm;\n};\n\nprototypeAccessors.messages.get = function () {\n return looseClone(this._getMessages());\n};\n\nprototypeAccessors.dateTimeFormats.get = function () {\n return looseClone(this._getDateTimeFormats());\n};\n\nprototypeAccessors.numberFormats.get = function () {\n return looseClone(this._getNumberFormats());\n};\n\nprototypeAccessors.availableLocales.get = function () {\n return Object.keys(this.messages).sort();\n};\n\nprototypeAccessors.locale.get = function () {\n return this._vm.locale;\n};\n\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () {\n return this._vm.fallbackLocale;\n};\n\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () {\n return this._formatFallbackMessages;\n};\n\nprototypeAccessors.formatFallbackMessages.set = function (fallback) {\n this._formatFallbackMessages = fallback;\n};\n\nprototypeAccessors.missing.get = function () {\n return this._missing;\n};\n\nprototypeAccessors.missing.set = function (handler) {\n this._missing = handler;\n};\n\nprototypeAccessors.formatter.get = function () {\n return this._formatter;\n};\n\nprototypeAccessors.formatter.set = function (formatter) {\n this._formatter = formatter;\n};\n\nprototypeAccessors.silentTranslationWarn.get = function () {\n return this._silentTranslationWarn;\n};\n\nprototypeAccessors.silentTranslationWarn.set = function (silent) {\n this._silentTranslationWarn = silent;\n};\n\nprototypeAccessors.silentFallbackWarn.get = function () {\n return this._silentFallbackWarn;\n};\n\nprototypeAccessors.silentFallbackWarn.set = function (silent) {\n this._silentFallbackWarn = silent;\n};\n\nprototypeAccessors.preserveDirectiveContent.get = function () {\n return this._preserveDirectiveContent;\n};\n\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) {\n this._preserveDirectiveContent = preserve;\n};\n\nprototypeAccessors.warnHtmlInMessage.get = function () {\n return this._warnHtmlInMessage;\n};\n\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () {\n return this._postTranslation;\n};\n\nprototypeAccessors.postTranslation.set = function (handler) {\n this._postTranslation = handler;\n};\n\nprototypeAccessors.sync.get = function () {\n return this._sync;\n};\n\nprototypeAccessors.sync.set = function (val) {\n this._sync = val;\n};\n\nVueI18n.prototype._getMessages = function _getMessages() {\n return this._vm.messages;\n};\n\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats() {\n return this._vm.dateTimeFormats;\n};\n\nVueI18n.prototype._getNumberFormats = function _getNumberFormats() {\n return this._vm.numberFormats;\n};\n\nVueI18n.prototype._warnDefault = function _warnDefault(locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) {\n return result;\n }\n\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n\n if (isString(missingRet)) {\n return missingRet;\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\"Cannot translate the value of keypath '\" + key + \"'. \" + 'Use the value of keypath as default.');\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key);\n } else {\n return key;\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot(val) {\n return (this._fallbackRootWithEmptyString ? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot;\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn(key) {\n return this._silentFallbackWarn instanceof RegExp ? this._silentFallbackWarn.test(key) : this._silentFallbackWarn;\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback(locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale);\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn(key) {\n return this._silentTranslationWarn instanceof RegExp ? this._silentTranslationWarn.test(key) : this._silentTranslationWarn;\n};\n\nVueI18n.prototype._interpolate = function _interpolate(locale, message, key, host, interpolateMode, values, visitedLinkStack) {\n if (!message) {\n return null;\n }\n\n var pathRet = this._path.getPathValue(message, key);\n\n if (isArray(pathRet) || isPlainObject(pathRet)) {\n return pathRet;\n }\n\n var ret;\n\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn(\"Value of key '\" + key + \"' is not a string or function !\");\n }\n\n return null;\n }\n } else {\n return null;\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn(\"Value of key '\" + key + \"' is not a string or function!\");\n }\n\n return null;\n }\n } // Check for the existence of links within the translated string\n\n\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key);\n};\n\nVueI18n.prototype._link = function _link(locale, message, str, host, interpolateMode, values, visitedLinkStack) {\n var ret = str; // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n\n var matches = ret.match(linkKeyMatcher); // eslint-disable-next-line no-autofix/prefer-const\n\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue;\n }\n\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1]; // Remove the leading @:, @.case: and the brackets\n\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + visitedLinkStack.reverse().join(' <- '));\n }\n\n return ret;\n }\n\n visitedLinkStack.push(linkPlaceholder); // Translate the link\n\n var translated = this._interpolate(locale, message, linkPlaceholder, host, interpolateMode === 'raw' ? 'string' : interpolateMode, interpolateMode === 'raw' ? undefined : values, visitedLinkStack);\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn(\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\");\n }\n /* istanbul ignore if */\n\n\n if (!this._root) {\n throw Error('unexpected error');\n }\n\n var root = this._root.$i18n;\n translated = root._translate(root._getMessages(), root.locale, root.fallbackLocale, linkPlaceholder, host, interpolateMode, values);\n }\n\n translated = this._warnDefault(locale, linkPlaceholder, translated, host, isArray(values) ? values : [values], interpolateMode);\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop(); // Replace the link with the translated\n\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret;\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext(values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n\n var _named = isObject(values) ? values : {};\n\n var list = function list(index) {\n return _list[index];\n };\n\n var named = function named(key) {\n return _named[key];\n };\n\n var messages = this._getMessages();\n\n var locale = this.locale;\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function linked(linkedKey) {\n return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]);\n }\n };\n};\n\nVueI18n.prototype._render = function _render(message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode));\n }\n\n var ret = this._formatter.interpolate(message, values, path); // If the custom formatter refuses to work - apply the default one\n\n\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n } // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n\n\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret;\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain(chain, item, blocks) {\n var follow = false;\n\n if (!includes(chain, item)) {\n follow = true;\n\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n\n return follow;\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain(chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && follow === true);\n\n return follow;\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain(chain, block, blocks) {\n var follow = true;\n\n for (var i = 0; i < block.length && isBoolean(follow); i++) {\n var locale = block[i];\n\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n\n return follow;\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain(start, fallbackLocale) {\n if (start === '') {\n return [];\n }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n\n chain = []; // first block defined by start\n\n var block = [start]; // while any intervening block found\n\n while (isArray(block)) {\n block = this._appendBlockToChain(chain, block, fallbackLocale);\n } // last block defined by default\n\n\n var defaults;\n\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n } // convert defaults to array\n\n\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n\n if (block) {\n this._appendBlockToChain(chain, block, null);\n }\n\n this._localeChainCache[start] = chain;\n }\n\n return chain;\n};\n\nVueI18n.prototype._translate = function _translate(messages, locale, fallback, key, host, interpolateMode, args) {\n var chain = this._getLocaleChain(locale, fallback);\n\n var res;\n\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res = this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn(\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\");\n }\n\n return res;\n }\n }\n\n return null;\n};\n\nVueI18n.prototype._t = function _t(key, _locale, messages, host) {\n var ref;\n var values = [],\n len = arguments.length - 4;\n\n while (len-- > 0) {\n values[len] = arguments[len + 4];\n }\n\n if (!key) {\n return '';\n }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n\n if (this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(messages, locale, this.fallbackLocale, key, host, 'string', parsedArgs.params);\n\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn(\"Fall back to translate the keypath '\" + key + \"' with root locale.\");\n }\n /* istanbul ignore if */\n\n\n if (!this._root) {\n throw Error('unexpected error');\n }\n\n return (ref = this._root).$t.apply(ref, [key].concat(values));\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n\n return ret;\n }\n};\n\nVueI18n.prototype.t = function t(key) {\n var ref;\n var values = [],\n len = arguments.length - 1;\n\n while (len-- > 0) {\n values[len] = arguments[len + 1];\n }\n\n return (ref = this)._t.apply(ref, [key, this.locale, this._getMessages(), null].concat(values));\n};\n\nVueI18n.prototype._i = function _i(key, locale, messages, host, values) {\n var ret = this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\");\n }\n\n if (!this._root) {\n throw Error('unexpected error');\n }\n\n return this._root.$i18n.i(key, locale, values);\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw');\n }\n};\n\nVueI18n.prototype.i = function i(key, locale, values) {\n /* istanbul ignore if */\n if (!key) {\n return '';\n }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values);\n};\n\nVueI18n.prototype._tc = function _tc(key, _locale, messages, host, choice) {\n var ref;\n var values = [],\n len = arguments.length - 5;\n\n while (len-- > 0) {\n values[len] = arguments[len + 5];\n }\n\n if (!key) {\n return '';\n }\n\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = {\n 'count': choice,\n 'n': choice\n };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [key, _locale, messages, host].concat(values)), choice);\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice(message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) {\n return null;\n }\n\n var choices = message.split('|');\n choice = this.getChoiceIndex(choice, choices.length);\n\n if (!choices[choice]) {\n return message;\n }\n\n return choices[choice].trim();\n};\n\nVueI18n.prototype.tc = function tc(key, choice) {\n var ref;\n var values = [],\n len = arguments.length - 2;\n\n while (len-- > 0) {\n values[len] = arguments[len + 2];\n }\n\n return (ref = this)._tc.apply(ref, [key, this.locale, this._getMessages(), null, choice].concat(values));\n};\n\nVueI18n.prototype._te = function _te(key, locale, messages) {\n var args = [],\n len = arguments.length - 3;\n\n while (len-- > 0) {\n args[len] = arguments[len + 3];\n }\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n\n return this._exist(messages[_locale], key);\n};\n\nVueI18n.prototype.te = function te(key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale);\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage(locale) {\n return looseClone(this._vm.messages[locale] || {});\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage(locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage(locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n\n this._vm.$set(this._vm.messages, locale, merge(typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length ? Object.assign({}, this._vm.messages[locale]) : {}, message));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat(locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {});\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat(locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat(locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat(locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue;\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime(value, locale, fallback, dateTimeFormats, key) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step; // fallback locale\n\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn(\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\");\n }\n } else {\n break;\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null;\n } else {\n var format = formats[key];\n var id = _locale + \"__\" + key;\n var formatter = this._dateTimeFormatters[id];\n\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n\n return formatter.format(value);\n }\n};\n\nVueI18n.prototype._d = function _d(value, locale, key) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return '';\n }\n\n if (!key) {\n return new Intl.DateTimeFormat(locale).format(value);\n }\n\n var ret = this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key);\n\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn(\"Fall back to datetime localization of root: key '\" + key + \"'.\");\n }\n /* istanbul ignore if */\n\n\n if (!this._root) {\n throw Error('unexpected error');\n }\n\n return this._root.$i18n.d(value, key, locale);\n } else {\n return ret || '';\n }\n};\n\nVueI18n.prototype.d = function d(value) {\n var args = [],\n len = arguments.length - 1;\n\n while (len-- > 0) {\n args[len] = arguments[len + 1];\n }\n\n var locale = this.locale;\n var key = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n\n if (args[0].key) {\n key = args[0].key;\n }\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key);\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat(locale) {\n return looseClone(this._vm.numberFormats[locale] || {});\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat(locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat(locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat(locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue;\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter(value, locale, fallback, numberFormats, key, options) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step; // fallback locale\n\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn(\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\");\n }\n } else {\n break;\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null;\n } else {\n var format = formats[key];\n var formatter;\n\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n\n return formatter;\n }\n};\n\nVueI18n.prototype._n = function _n(value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n\n return '';\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value);\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n\n var ret = formatter && formatter.format(value);\n\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn(\"Fall back to number localization of root: key '\" + key + \"'.\");\n }\n /* istanbul ignore if */\n\n\n if (!this._root) {\n throw Error('unexpected error');\n }\n\n return this._root.$i18n.n(value, Object.assign({}, {\n key: key,\n locale: locale\n }, options));\n } else {\n return ret || '';\n }\n};\n\nVueI18n.prototype.n = function n(value) {\n var args = [],\n len = arguments.length - 1;\n\n while (len-- > 0) {\n args[len] = arguments[len + 1];\n }\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n\n if (args[0].key) {\n key = args[0].key;\n } // Filter out number format options only\n\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, (obj = {}, obj[key] = args[0][key], obj));\n }\n\n return acc;\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options);\n};\n\nVueI18n.prototype._ntp = function _ntp(value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n\n return [];\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value);\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n\n var ret = formatter && formatter.formatToParts(value);\n\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\"Fall back to format number to parts of root: key '\" + key + \"' .\");\n }\n /* istanbul ignore if */\n\n\n if (!this._root) {\n throw Error('unexpected error');\n }\n\n return this._root.$i18n._ntp(value, locale, key, options);\n } else {\n return ret || [];\n }\n};\n\nObject.defineProperties(VueI18n.prototype, prototypeAccessors);\nvar availabilities; // $FlowFixMe\n\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get() {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities;\n }\n});\nVueI18n.install = install;\nVueI18n.version = '8.27.1';\nexport default VueI18n;","export default function sortKD(ids, coords, nodeSize, left, right, depth) {\n if (right - left <= nodeSize) return;\n var m = left + right >> 1;\n select(ids, coords, m, left, right, depth % 2);\n sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n}\n\nfunction select(ids, coords, k, left, right, inc) {\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, inc);\n }\n\n var t = coords[2 * k + inc];\n var i = left;\n var j = right;\n swapItem(ids, coords, left, k);\n if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n\n while (coords[2 * i + inc] < t) {\n i++;\n }\n\n while (coords[2 * j + inc] > t) {\n j--;\n }\n }\n\n if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j);else {\n j++;\n swapItem(ids, coords, j, right);\n }\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}","export default function within(ids, coords, qx, qy, r, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var r2 = r * r;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n var x = coords[2 * m];\n var y = coords[2 * m + 1];\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}\n\nfunction sqDist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport sort from './sort';\nimport _range from './range';\nimport _within from './within';\n\nvar defaultGetX = function defaultGetX(p) {\n return p[0];\n};\n\nvar defaultGetY = function defaultGetY(p) {\n return p[1];\n};\n\nvar KDBush = /*#__PURE__*/function () {\n function KDBush(points) {\n var getX = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetX;\n var getY = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultGetY;\n var nodeSize = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 64;\n var ArrayType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Float64Array;\n\n _classCallCheck(this, KDBush);\n\n this.nodeSize = nodeSize;\n this.points = points;\n var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array;\n var ids = this.ids = new IndexArrayType(points.length);\n var coords = this.coords = new ArrayType(points.length * 2);\n\n for (var i = 0; i < points.length; i++) {\n ids[i] = i;\n coords[2 * i] = getX(points[i]);\n coords[2 * i + 1] = getY(points[i]);\n }\n\n sort(ids, coords, nodeSize, 0, ids.length - 1, 0);\n }\n\n _createClass(KDBush, [{\n key: \"range\",\n value: function range(minX, minY, maxX, maxY) {\n return _range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n }\n }, {\n key: \"within\",\n value: function within(x, y, r) {\n return _within(this.ids, this.coords, x, y, r, this.nodeSize);\n }\n }]);\n\n return KDBush;\n}();\n\nexport { KDBush as default };","export default function range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n var stack = [0, ids.length - 1, 0];\n var result = [];\n var x, y;\n\n while (stack.length) {\n var axis = stack.pop();\n var right = stack.pop();\n var left = stack.pop();\n\n if (right - left <= nodeSize) {\n for (var i = left; i <= right; i++) {\n x = coords[2 * i];\n y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n\n continue;\n }\n\n var m = Math.floor((left + right) / 2);\n x = coords[2 * m];\n y = coords[2 * m + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n var nextAxis = (axis + 1) % 2;\n\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(nextAxis);\n }\n\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(nextAxis);\n }\n }\n\n return result;\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport KDBush from 'kdbush';\nvar defaultOptions = {\n minZoom: 0,\n // min zoom to generate clusters on\n maxZoom: 16,\n // max zoom level to cluster the points on\n minPoints: 2,\n // minimum points to form a cluster\n radius: 40,\n // cluster radius in pixels\n extent: 512,\n // tile extent (radius is calculated relative to it)\n nodeSize: 64,\n // size of the KD-tree leaf node, affects performance\n log: false,\n // whether to log timing info\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n // a reduce function for calculating custom cluster properties\n reduce: null,\n // (accumulated, props) => { accumulated.sum += props.sum; }\n // properties to use for individual points when running the reducer\n map: function map(props) {\n return props;\n } // props => ({sum: props.my_value})\n\n};\n\nvar fround = Math.fround || function (tmp) {\n return function (x) {\n tmp[0] = +x;\n return tmp[0];\n };\n}(new Float32Array(1));\n\nvar Supercluster = /*#__PURE__*/function () {\n function Supercluster(options) {\n _classCallCheck(this, Supercluster);\n\n this.options = extend(Object.create(defaultOptions), options);\n this.trees = new Array(this.options.maxZoom + 1);\n }\n\n _createClass(Supercluster, [{\n key: \"load\",\n value: function load(points) {\n var _this$options = this.options,\n log = _this$options.log,\n minZoom = _this$options.minZoom,\n maxZoom = _this$options.maxZoom,\n nodeSize = _this$options.nodeSize;\n if (log) console.time('total time');\n var timerId = \"prepare \".concat(points.length, \" points\");\n if (log) console.time(timerId);\n this.points = points; // generate a cluster object for each point and index input points into a KD-tree\n\n var clusters = [];\n\n for (var i = 0; i < points.length; i++) {\n if (!points[i].geometry) continue;\n clusters.push(createPointCluster(points[i], i));\n }\n\n this.trees[maxZoom + 1] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);\n if (log) console.timeEnd(timerId); // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n\n for (var z = maxZoom; z >= minZoom; z--) {\n var now = +Date.now(); // create a new set of clusters for the zoom and index them with a KD-tree\n\n clusters = this._cluster(clusters, z);\n this.trees[z] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);\n if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);\n }\n\n if (log) console.timeEnd('total time');\n return this;\n }\n }, {\n key: \"getClusters\",\n value: function getClusters(bbox, zoom) {\n var minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n var minLat = Math.max(-90, Math.min(90, bbox[1]));\n var maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n var maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n var easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n var westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n var tree = this.trees[this._limitZoom(zoom)];\n\n var ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n var clusters = [];\n\n var _iterator = _createForOfIteratorHelper(ids),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var id = _step.value;\n var c = tree.points[id];\n clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return clusters;\n }\n }, {\n key: \"getChildren\",\n value: function getChildren(clusterId) {\n var originId = this._getOriginId(clusterId);\n\n var originZoom = this._getOriginZoom(clusterId);\n\n var errorMsg = 'No cluster with the specified id.';\n var index = this.trees[originZoom];\n if (!index) throw new Error(errorMsg);\n var origin = index.points[originId];\n if (!origin) throw new Error(errorMsg);\n var r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n var ids = index.within(origin.x, origin.y, r);\n var children = [];\n\n var _iterator2 = _createForOfIteratorHelper(ids),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var id = _step2.value;\n var c = index.points[id];\n\n if (c.parentId === clusterId) {\n children.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n if (children.length === 0) throw new Error(errorMsg);\n return children;\n }\n }, {\n key: \"getLeaves\",\n value: function getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n var leaves = [];\n\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n }\n }, {\n key: \"getTile\",\n value: function getTile(z, x, y) {\n var tree = this.trees[this._limitZoom(z)];\n\n var z2 = Math.pow(2, z);\n var _this$options2 = this.options,\n extent = _this$options2.extent,\n radius = _this$options2.radius;\n var p = radius / extent;\n var top = (y - p) / z2;\n var bottom = (y + 1 + p) / z2;\n var tile = {\n features: []\n };\n\n this._addTileFeatures(tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), tree.points, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(tree.range(1 - p / z2, top, 1, bottom), tree.points, z2, y, z2, tile);\n }\n\n if (x === z2 - 1) {\n this._addTileFeatures(tree.range(0, top, p / z2, bottom), tree.points, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n }\n }, {\n key: \"getClusterExpansionZoom\",\n value: function getClusterExpansionZoom(clusterId) {\n var expansionZoom = this._getOriginZoom(clusterId) - 1;\n\n while (expansionZoom <= this.options.maxZoom) {\n var children = this.getChildren(clusterId);\n expansionZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n\n return expansionZoom;\n }\n }, {\n key: \"_appendLeaves\",\n value: function _appendLeaves(result, clusterId, limit, offset, skipped) {\n var children = this.getChildren(clusterId);\n\n var _iterator3 = _createForOfIteratorHelper(children),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var child = _step3.value;\n var props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped); // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n\n if (result.length === limit) break;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return skipped;\n }\n }, {\n key: \"_addTileFeatures\",\n value: function _addTileFeatures(ids, points, x, y, z2, tile) {\n var _iterator4 = _createForOfIteratorHelper(ids),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var i = _step4.value;\n var c = points[i];\n var isCluster = c.numPoints;\n var tags = void 0,\n px = void 0,\n py = void 0;\n\n if (isCluster) {\n tags = getClusterProperties(c);\n px = c.x;\n py = c.y;\n } else {\n var p = this.points[c.index];\n tags = p.properties;\n px = lngX(p.geometry.coordinates[0]);\n py = latY(p.geometry.coordinates[1]);\n }\n\n var f = {\n type: 1,\n geometry: [[Math.round(this.options.extent * (px * z2 - x)), Math.round(this.options.extent * (py * z2 - y))]],\n tags: tags\n }; // assign id\n\n var id = void 0;\n\n if (isCluster) {\n id = c.id;\n } else if (this.options.generateId) {\n // optionally generate id\n id = c.index;\n } else if (this.points[c.index].id) {\n // keep id if already assigned\n id = this.points[c.index].id;\n }\n\n if (id !== undefined) f.id = id;\n tile.features.push(f);\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n }, {\n key: \"_limitZoom\",\n value: function _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));\n }\n }, {\n key: \"_cluster\",\n value: function _cluster(points, zoom) {\n var clusters = [];\n var _this$options3 = this.options,\n radius = _this$options3.radius,\n extent = _this$options3.extent,\n reduce = _this$options3.reduce,\n minPoints = _this$options3.minPoints;\n var r = radius / (extent * Math.pow(2, zoom)); // loop through each point\n\n for (var i = 0; i < points.length; i++) {\n var p = points[i]; // if we've already visited the point at this zoom level, skip it\n\n if (p.zoom <= zoom) continue;\n p.zoom = zoom; // find all nearby points\n\n var tree = this.trees[zoom + 1];\n var neighborIds = tree.within(p.x, p.y, r);\n var numPointsOrigin = p.numPoints || 1;\n var numPoints = numPointsOrigin; // count the number of points in a potential cluster\n\n var _iterator5 = _createForOfIteratorHelper(neighborIds),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _neighborId2 = _step5.value;\n var _b2 = tree.points[_neighborId2]; // filter out neighbors that are already processed\n\n if (_b2.zoom > zoom) numPoints += _b2.numPoints || 1;\n } // if there were neighbors to merge, and there are enough points to form a cluster\n\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n var wx = p.x * numPointsOrigin;\n var wy = p.y * numPointsOrigin;\n var clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null; // encode both zoom and point index on which the cluster originated -- offset by total length of features\n\n var id = (i << 5) + (zoom + 1) + this.points.length;\n\n var _iterator6 = _createForOfIteratorHelper(neighborIds),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var neighborId = _step6.value;\n var b = tree.points[neighborId];\n if (b.zoom <= zoom) continue;\n b.zoom = zoom; // save the zoom (so it doesn't get processed twice)\n\n var numPoints2 = b.numPoints || 1;\n wx += b.x * numPoints2; // accumulate coordinates for calculating weighted center\n\n wy += b.y * numPoints2;\n b.parentId = id;\n\n if (reduce) {\n if (!clusterProperties) clusterProperties = this._map(p, true);\n reduce(clusterProperties, this._map(b));\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n p.parentId = id;\n clusters.push(createCluster(wx / numPoints, wy / numPoints, id, numPoints, clusterProperties));\n } else {\n // left points as unclustered\n clusters.push(p);\n\n if (numPoints > 1) {\n var _iterator7 = _createForOfIteratorHelper(neighborIds),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var _neighborId = _step7.value;\n var _b = tree.points[_neighborId];\n if (_b.zoom <= zoom) continue;\n _b.zoom = zoom;\n clusters.push(_b);\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n }\n }\n }\n\n return clusters;\n } // get index of the point from which the cluster originated\n\n }, {\n key: \"_getOriginId\",\n value: function _getOriginId(clusterId) {\n return clusterId - this.points.length >> 5;\n } // get zoom of the point from which the cluster originated\n\n }, {\n key: \"_getOriginZoom\",\n value: function _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n }\n }, {\n key: \"_map\",\n value: function _map(point, clone) {\n if (point.numPoints) {\n return clone ? extend({}, point.properties) : point.properties;\n }\n\n var original = this.points[point.index].properties;\n var result = this.options.map(original);\n return clone && result === original ? extend({}, result) : result;\n }\n }]);\n\n return Supercluster;\n}();\n\nexport { Supercluster as default };\n\nfunction createCluster(x, y, id, numPoints, properties) {\n return {\n x: fround(x),\n // weighted cluster center; round for consistency with Float32Array index\n y: fround(y),\n zoom: Infinity,\n // the last zoom the cluster was processed at\n id: id,\n // encodes index of the first child of the cluster and its zoom level\n parentId: -1,\n // parent cluster id\n numPoints: numPoints,\n properties: properties\n };\n}\n\nfunction createPointCluster(p, id) {\n var _p$geometry$coordinat = _slicedToArray(p.geometry.coordinates, 2),\n x = _p$geometry$coordinat[0],\n y = _p$geometry$coordinat[1];\n\n return {\n x: fround(lngX(x)),\n // projected point coordinates\n y: fround(latY(y)),\n zoom: Infinity,\n // the last zoom the point was processed at\n index: id,\n // index of the source feature in the original input array,\n parentId: -1 // parent cluster id\n\n };\n}\n\nfunction getClusterJSON(cluster) {\n return {\n type: 'Feature',\n id: cluster.id,\n properties: getClusterProperties(cluster),\n geometry: {\n type: 'Point',\n coordinates: [xLng(cluster.x), yLat(cluster.y)]\n }\n };\n}\n\nfunction getClusterProperties(cluster) {\n var count = cluster.numPoints;\n var abbrev = count >= 10000 ? \"\".concat(Math.round(count / 1000), \"k\") : count >= 1000 ? \"\".concat(Math.round(count / 100) / 10, \"k\") : count;\n return extend(extend({}, cluster.properties), {\n cluster: true,\n cluster_id: cluster.id,\n point_count: count,\n point_count_abbreviated: abbrev\n });\n} // longitude/latitude to spherical mercator in [0..1] range\n\n\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\n\nfunction latY(lat) {\n var sin = Math.sin(lat * Math.PI / 180);\n var y = 0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI;\n return y < 0 ? 0 : y > 1 ? 1 : y;\n} // spherical mercator to longitude/latitude\n\n\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\n\nfunction yLat(y) {\n var y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n\nfunction extend(dest, src) {\n for (var id in src) {\n dest[id] = src[id];\n }\n\n return dest;\n}\n\nfunction getX(p) {\n return p.x;\n}\n\nfunction getY(p) {\n return p.y;\n}","import { featureCollection, point } from '@turf/helpers';\nimport clustersKmeans from '@turf/clusters-kmeans';\nimport clustersDbscan from '@turf/clusters-dbscan';\nimport SuperCluster from 'supercluster';\nimport equal from 'fast-deep-equal/es6';\n\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Cluster {\n constructor({ markers, position }) {\n this.markers = markers;\n if (position) {\n if (position instanceof google.maps.LatLng) {\n this._position = position;\n }\n else {\n this._position = new google.maps.LatLng(position);\n }\n }\n }\n get bounds() {\n if (this.markers.length === 0 && !this._position) {\n return undefined;\n }\n return this.markers.reduce((bounds, marker) => {\n return bounds.extend(marker.getPosition());\n }, new google.maps.LatLngBounds(this._position, this._position));\n }\n get position() {\n return this._position || this.bounds.getCenter();\n }\n /**\n * Get the count of **visible** markers.\n */\n get count() {\n return this.markers.filter((m) => m.getVisible())\n .length;\n }\n /**\n * Add a marker to the cluster.\n */\n push(marker) {\n this.markers.push(marker);\n }\n /**\n * Cleanup references and remove marker from map.\n */\n delete() {\n if (this.marker) {\n this.marker.setMap(null);\n delete this.marker;\n }\n this.markers.length = 0;\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPadding) => {\n const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPadding);\n return markers.filter((marker) => extendedMapBounds.contains(marker.getPosition()));\n};\n/**\n * Extends a bounds by a number of pixels in each direction.\n */\nconst extendBoundsToPaddedViewport = (bounds, projection, pixels) => {\n const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection);\n const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, pixels);\n return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\n * @hidden\n */\nconst distanceBetweenPoints = (p1, p2) => {\n const R = 6371; // Radius of the Earth in km\n const dLat = ((p2.lat - p1.lat) * Math.PI) / 180;\n const dLon = ((p2.lng - p1.lng) * Math.PI) / 180;\n const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat * Math.PI) / 180) *\n Math.cos((p2.lat * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2);\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n};\n/**\n * @hidden\n */\nconst latLngBoundsToPixelBounds = (bounds, projection) => {\n return {\n northEast: projection.fromLatLngToDivPixel(bounds.getNorthEast()),\n southWest: projection.fromLatLngToDivPixel(bounds.getSouthWest()),\n };\n};\n/**\n * @hidden\n */\nconst extendPixelBounds = ({ northEast, southWest }, pixels) => {\n northEast.x += pixels;\n northEast.y -= pixels;\n southWest.x -= pixels;\n southWest.y += pixels;\n return { northEast, southWest };\n};\n/**\n * @hidden\n */\nconst pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => {\n const bounds = new google.maps.LatLngBounds();\n bounds.extend(projection.fromDivPixelToLatLng(northEast));\n bounds.extend(projection.fromDivPixelToLatLng(southWest));\n return bounds;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @hidden\n */\nclass AbstractAlgorithm {\n constructor({ maxZoom = 15 }) {\n this.maxZoom = maxZoom;\n }\n /**\n * Helper function to bypass clustering based upon some map state such as\n * zoom, number of markers, etc.\n *\n * ```typescript\n * cluster({markers, map}: AlgorithmInput): Cluster[] {\n * if (shouldBypassClustering(map)) {\n * return this.noop({markers, map})\n * }\n * }\n * ```\n */\n noop({ markers }) {\n return noop(markers);\n }\n}\n/**\n * Abstract viewport algorithm proves a class to filter markers by a padded\n * viewport. This is a common optimization.\n *\n * @hidden\n */\nclass AbstractViewportAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { viewportPadding = 60 } = _a, options = __rest(_a, [\"viewportPadding\"]);\n super(options);\n this.viewportPadding = 60;\n this.viewportPadding = viewportPadding;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n map,\n mapCanvasProjection,\n }),\n changed: false,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n}\n/**\n * @hidden\n */\nconst noop = (markers) => {\n const clusters = markers.map((marker) => new Cluster({\n position: marker.getPosition(),\n markers: [marker],\n }));\n return clusters;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The default Grid algorithm historically used in Google Maps marker\n * clustering.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n */\nclass GridAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxDistance = 40000, gridSize = 40 } = _a, options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n super(options);\n this.clusters = [];\n this.maxDistance = maxDistance;\n this.gridSize = gridSize;\n }\n cluster({ markers, map, mapCanvasProjection, }) {\n this.clusters = [];\n markers.forEach((marker) => {\n this.addToClosestCluster(marker, map, mapCanvasProjection);\n });\n return this.clusters;\n }\n addToClosestCluster(marker, map, projection) {\n let maxDistance = this.maxDistance; // Some large number\n let cluster = null;\n for (let i = 0; i < this.clusters.length; i++) {\n const candidate = this.clusters[i];\n const distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), marker.getPosition().toJSON());\n if (distance < maxDistance) {\n maxDistance = distance;\n cluster = candidate;\n }\n }\n if (cluster &&\n extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(marker.getPosition())) {\n cluster.push(marker);\n }\n else {\n const cluster = new Cluster({ markers: [marker] });\n this.clusters.push(cluster);\n }\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\n */\nclass NoopAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var options = __rest(_a, []);\n super(options);\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n return {\n clusters: this.cluster({ markers, map, mapCanvasProjection }),\n changed: false,\n };\n }\n cluster(input) {\n return this.noop(input);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Experimental algorithm using Kmeans.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n *\n * @see https://www.npmjs.com/package/@turf/clusters-kmeans\n */\nclass KmeansAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { numberOfClusters } = _a, options = __rest(_a, [\"numberOfClusters\"]);\n super(options);\n this.numberOfClusters = numberOfClusters;\n }\n cluster({ markers, map }) {\n const clusters = [];\n if (markers.length === 0) {\n return clusters;\n }\n const points = featureCollection(markers.map((marker) => {\n return point([marker.getPosition().lng(), marker.getPosition().lat()]);\n }));\n let numberOfClusters;\n if (this.numberOfClusters instanceof Function) {\n numberOfClusters = this.numberOfClusters(markers.length, map.getZoom());\n }\n else {\n numberOfClusters = this.numberOfClusters;\n }\n clustersKmeans(points, { numberOfClusters }).features.forEach((point, i) => {\n if (!clusters[point.properties.cluster]) {\n clusters[point.properties.cluster] = new Cluster({\n position: {\n lng: point.properties.centroid[0],\n lat: point.properties.centroid[1],\n },\n markers: [],\n });\n }\n clusters[point.properties.cluster].push(markers[i]);\n });\n return clusters;\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst DEFAULT_INTERNAL_DBSCAN_OPTION = {\n units: \"kilometers\",\n mutate: false,\n minPoints: 1,\n};\n/**\n *\n * **This algorithm is not yet ready for use!**\n *\n * Experimental algorithm using DBScan.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n *\n * @see https://www.npmjs.com/package/@turf/clusters-dbscan\n */\nclass DBScanAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxDistance = 200, minPoints = DEFAULT_INTERNAL_DBSCAN_OPTION.minPoints } = _a, options = __rest(_a, [\"maxDistance\", \"minPoints\"]);\n super(options);\n this.maxDistance = maxDistance;\n this.options = Object.assign(Object.assign({}, DEFAULT_INTERNAL_DBSCAN_OPTION), { minPoints });\n }\n cluster({ markers, mapCanvasProjection, }) {\n const points = featureCollection(markers.map((marker) => {\n const projectedPoint = mapCanvasProjection.fromLatLngToContainerPixel(marker.getPosition());\n return point([projectedPoint.x, projectedPoint.y]);\n }));\n const grouped = [];\n clustersDbscan(points, this.maxDistance, this.options).features.forEach((point, i) => {\n if (!grouped[point.properties.cluster]) {\n grouped[point.properties.cluster] = [];\n }\n grouped[point.properties.cluster].push(markers[i]);\n });\n return grouped.map((markers) => new Cluster({ markers }));\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\"]);\n super({ maxZoom });\n this.superCluster = new SuperCluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n this.state = { zoom: null };\n }\n calculate(input) {\n let changed = false;\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: [\n marker.getPosition().lng(),\n marker.getPosition().lat(),\n ],\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n const state = { zoom: input.map.getZoom() };\n if (!changed) {\n if (this.state.zoom > this.maxZoom && state.zoom > this.maxZoom) ;\n else {\n changed = changed || !equal(this.state, state);\n }\n }\n this.state = state;\n if (changed) {\n this.clusters = this.cluster(input);\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map }) {\n return this.superCluster\n .getClusters([-180, -90, 180, 90], Math.round(map.getZoom()))\n .map(this.transformCluster.bind(this));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: new google.maps.LatLng({ lat, lng }),\n });\n }\n else {\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: marker.getPosition(),\n });\n }\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\n */\nclass ClusterStats {\n constructor(markers, clusters) {\n this.markers = { sum: markers.length };\n const clusterMarkerCounts = clusters.map((a) => a.count);\n const clusterMarkerSum = clusterMarkerCounts.reduce((a, b) => a + b, 0);\n this.clusters = {\n count: clusters.length,\n markers: {\n mean: clusterMarkerSum / clusters.length,\n sum: clusterMarkerSum,\n min: Math.min(...clusterMarkerCounts),\n max: Math.max(...clusterMarkerCounts),\n },\n };\n }\n}\nclass DefaultRenderer {\n /**\n * The default render function for the library used by {@link MarkerClusterer}.\n *\n * Currently set to use the following:\n *\n * ```typescript\n * // change color if this cluster has more markers than the mean cluster\n * const color =\n * count > Math.max(10, stats.clusters.markers.mean)\n * ? \"#ff0000\"\n * : \"#0000ff\";\n *\n * // create svg url with fill color\n * const svg = window.btoa(`\n * `);\n *\n * // create marker using svg icon\n * return new google.maps.Marker({\n * position,\n * icon: {\n * url: `data:image/svg+xml;base64,${svg}`,\n * scaledSize: new google.maps.Size(45, 45),\n * },\n * label: {\n * text: String(count),\n * color: \"rgba(255,255,255,0.9)\",\n * fontSize: \"12px\",\n * },\n * // adjust zIndex to be above other markers\n * zIndex: 1000 + count,\n * });\n * ```\n */\n render({ count, position }, stats) {\n // change color if this cluster has more markers than the mean cluster\n const color = count > Math.max(10, stats.clusters.markers.mean) ? \"#1289A7\" : \"#1289A7\";\n // create svg url with fill color\n const svg = window.btoa(`\n `);\n // create marker using svg icon\n return new google.maps.Marker({\n position,\n icon: {\n url: `data:image/svg+xml;base64,${svg}`,\n scaledSize: new google.maps.Size(52, 52),\n },\n label: {\n text: String(count),\n color: \"rgba(255,255,255,0.9)\",\n fontSize: \"14px\",\n },\n title: `Groupe de ${count} activités`,\n // adjust zIndex to be above other markers\n zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count,\n });\n }\n}\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Extends an object's prototype by another's.\n *\n * @param type1 The Type to be extended.\n * @param type2 The Type to extend with.\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extend(type1, type2) {\n /* istanbul ignore next */\n // eslint-disable-next-line prefer-const\n for (let property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\n * @ignore\n */\nclass OverlayViewSafe {\n constructor() {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MarkerClustererEvents;\n(function (MarkerClustererEvents) {\n MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\nconst defaultOnClusterClickHandler = (_, cluster, map) => {\n map.fitBounds(cluster.bounds);\n};\n/**\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\n * of markers. See {@link MarkerClustererOptions} for more details.\n *\n */\nclass MarkerClusterer extends OverlayViewSafe {\n constructor({ map, markers = [], algorithm = new SuperClusterAlgorithm({}), renderer = new DefaultRenderer(), onClusterClick = defaultOnClusterClickHandler, }) {\n super();\n this.markers = [...markers];\n this.clusters = [];\n this.algorithm = algorithm;\n this.renderer = renderer;\n this.onClusterClick = onClusterClick;\n if (map) {\n this.setMap(map);\n }\n }\n addMarker(marker, noDraw) {\n if (this.markers.includes(marker)) {\n return;\n }\n this.markers.push(marker);\n if (!noDraw) {\n this.render();\n }\n }\n addMarkers(markers, noDraw) {\n markers.forEach((marker) => {\n this.addMarker(marker, true);\n });\n if (!noDraw) {\n this.render();\n }\n }\n removeMarker(marker, noDraw) {\n const index = this.markers.indexOf(marker);\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n if (!noDraw) {\n this.render();\n }\n return true;\n }\n removeMarkers(markers, noDraw) {\n let removed = false;\n markers.forEach((marker) => {\n removed = this.removeMarker(marker, true) || removed;\n });\n if (removed && !noDraw) {\n this.render();\n }\n return removed;\n }\n clearMarkers(noDraw) {\n this.markers.length = 0;\n if (!noDraw) {\n this.render();\n }\n }\n /**\n * Recalculates and draws all the marker clusters.\n */\n render() {\n const map = this.getMap();\n if (map instanceof google.maps.Map && this.getProjection()) {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n const { clusters, changed } = this.algorithm.calculate({\n markers: this.markers,\n map,\n mapCanvasProjection: this.getProjection(),\n });\n // allow algorithms to return flag on whether the clusters/markers have changed\n if (changed || changed == undefined) {\n // reset visibility of markers and clusters\n this.reset();\n // store new clusters\n this.clusters = clusters;\n this.renderClusters();\n }\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n }\n }\n onAdd() {\n this.idleListener = this.getMap().addListener(\"idle\", this.render.bind(this));\n this.render();\n }\n onRemove() {\n google.maps.event.removeListener(this.idleListener);\n this.reset();\n }\n reset() {\n this.markers.forEach((marker) => marker.setMap(null));\n this.clusters.forEach((cluster) => cluster.delete());\n this.clusters = [];\n }\n renderClusters() {\n // generate stats to pass to renderers\n const stats = new ClusterStats(this.markers, this.clusters);\n const map = this.getMap();\n this.clusters.forEach((cluster) => {\n if (cluster.markers.length === 1) {\n cluster.marker = cluster.markers[0];\n }\n else {\n cluster.marker = this.renderer.render(cluster, stats);\n if (this.onClusterClick) {\n cluster.marker.addListener(\"click\",\n /* istanbul ignore next */\n (event) => {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n this.onClusterClick(event, cluster, map);\n });\n }\n }\n cluster.marker.setMap(map);\n });\n }\n}\n\nexport { AbstractAlgorithm, AbstractViewportAlgorithm, Cluster, ClusterStats, DBScanAlgorithm, DefaultRenderer, GridAlgorithm, KmeansAlgorithm, MarkerClusterer, MarkerClustererEvents, NoopAlgorithm, SuperClusterAlgorithm, defaultOnClusterClickHandler, distanceBetweenPoints, extendBoundsToPaddedViewport, extendPixelBounds, filterMarkersToPaddedViewport, noop, pixelBoundsToLatLngBounds };\n//# sourceMappingURL=index.esm.js.map\n","/* eslint no-console: 0 */\n// Run this example by adding <%= javascript_pack_tag 'hello_vue' %> (and\n// <%= stylesheet_pack_tag 'hello_vue' %> if you have styles in your component)\n// to the head of your layout file,\n// like app/views/layouts/application.html.erb.\n// All it does is render Hello Vue
at the bottom of the page.\n\n// import Vue from 'vue'\n// import App from '../components/App.vue'\n\n// document.addEventListener('DOMContentLoaded', () => {\n// const app = new Vue({\n// render: h => h(App)\n// }).$mount()\n// document.body.appendChild(app.$el)\n\n// console.log(app)\n// })\n\n\n// The above code uses Vue without the compiler, which means you cannot\n// use Vue to target elements in your existing html templates. You would\n// need to always use single file components.\n// To be able to target elements in your existing html/erb templates,\n// comment out the above code and uncomment the below\n// Add <%= javascript_pack_tag 'hello_vue' %> to your layout\n// Then add this markup to your html template:\n//\n// \n// {{message}}\n//
\n//
\n\n\n// import Vue from 'vue/dist/vue.esm'\n// import App from '../app.vue'\n//\n// document.addEventListener('DOMContentLoaded', () => {\n// const app = new Vue({\n// el: '#hello',\n// data: {\n// message: \"Can you say hello?\"\n// },\n// components: { App }\n// })\n// })\n//\n//\n//\n// If the project is using turbolinks, install 'vue-turbolinks':\n//\n// yarn add vue-turbolinks\n//\n// Then uncomment the code block below:\n//\n\nimport Vue from 'vue/dist/vue.esm'\n\nimport VueResource from 'vue-resource'\nVue.use(VueResource)\n\nimport TurbolinksAdapter from 'vue-turbolinks'\nVue.use(TurbolinksAdapter)\n\nimport VueI18n from 'vue-i18n'\nVue.use(VueI18n)\n\nimport en from '../locales/en.json'\nimport fr from '../locales/fr.json'\n\nconst translations = {\n \"en\": en,\n \"fr\": fr\n};\n\nimport { mapInit } from '../plugins/map'\nimport { LimitCheckBoxes } from '../plugins/form'\n\ndocument.addEventListener('turbolinks:load', () => {\n if (document.getElementById('map')) {\n mapInit();\n };\n\n LimitCheckBoxes();\n\n const i18n = new VueI18n({\n locale: document.getElementsByTagName('html')[0].getAttribute('lang'), // Set locale from tag\n fallbackLocale: 'fr',\n messages: translations\n });\n\n if(document.getElementById('activity__book-card')){\n let activityId = document.querySelector('#activity__book-card').getAttribute('activityId');\n\n const appBookCard = new Vue({\n el: '#activity__book-card',\n render(h){\n return h(require('../containers/BookCard/').default,{\n props: {\n activityId\n }\n })\n },\n i18n\n })\n }\n\n if(document.getElementById('activity__book-card--mobile')){\n let activityId = document.querySelector('#activity__book-card--mobile').getAttribute('activityId');\n\n const appBookCard = new Vue({\n el: '#activity__book-card--mobile',\n render(h){\n return h(require('../containers/BookCard/').default,{\n props: {\n activityId\n }\n })\n },\n i18n\n })\n }\n\n if(document.getElementById('book-page')){\n let activityId = document.querySelector('#book-page').getAttribute('activityId');\n let slotId = document.querySelector('#book-page').getAttribute('slotId');\n let date = document.querySelector('#book-page').getAttribute('date');\n let bookingId = document.querySelector('#book-page').getAttribute('bookingId');\n let cgvUrl = document.querySelector('#book-page').getAttribute('cgvUrl');\n let stripePk = document.querySelector('#book-page').getAttribute('stripePk');\n\n const appBookPage = new Vue({\n el: '#book-page',\n // render: h => h(require('../containers/BookPage/').default)\n render(h){\n return h(require('../containers/BookPage/').default,{\n props: {\n activityId,\n slotId,\n date,\n bookingId,\n cgvUrl,\n stripePk\n }\n })\n },\n i18n\n })\n }\n})\n","import { MarkerClusterer } from \"./google_clusterer\";\n\nconst mapInit = () => {\n\n // ALL GLOBAL VARIABLES\n const divMap = document.getElementById('map');\n const screenWidth = window.screen.width;\n const allMarkersAc = JSON.parse(divMap.dataset.markersActivity);\n const allMarkersPoi = JSON.parse(divMap.dataset.markersPoi);\n let lastInfoWindow = new google.maps.InfoWindow();\n const myMarkers = allMarkersAc.concat(allMarkersPoi);\n\n\n // Coordinates to prevent map to pan out of Martinique\n const MARTINIQUE_BOUNDS = {\n north: 15.13978861563618,\n south: 14.16887901980523,\n west: - 61.72161842946184,\n east: - 60.33835857736076\n };\n\n const styledMapType = new google.maps.StyledMapType(\n [{ \"featureType\": \"administrative\", \"elementType\": \"labels.text.fill\", \"stylers\": [{ \"color\": \"#444444\" }] }, { \"featureType\": \"administrative.country\", \"elementType\": \"geometry\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"administrative.country\", \"elementType\": \"geometry.fill\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"administrative.country\", \"elementType\": \"geometry.stroke\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"administrative.province\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"administrative.locality\", \"elementType\": \"labels\", \"stylers\": [{ \"hue\": \"#ffe500\" }] }, { \"featureType\": \"landscape\", \"elementType\": \"all\", \"stylers\": [{ \"color\": \"#f2f2f2\" }, { \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.landcover\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"geometry\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"geometry.fill\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"geometry.stroke\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"labels\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"labels.text\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"labels.text.fill\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"labels.text.stroke\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"landscape.natural.terrain\", \"elementType\": \"labels.icon\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"poi\", \"elementType\": \"labels.text\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"poi.attraction\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"poi.business\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"poi.place_of_worship\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"poi.school\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"simplified\" }] }, { \"featureType\": \"road\", \"elementType\": \"all\", \"stylers\": [{ \"saturation\": -100 }, { \"lightness\": 45 }, { \"visibility\": \"on\" }] }, { \"featureType\": \"road\", \"elementType\": \"labels.icon\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"road.highway\", \"elementType\": \"all\", \"stylers\": [{ \"visibility\": \"simplified\" }] }, { \"featureType\": \"road.arterial\", \"elementType\": \"labels.icon\", \"stylers\": [{ \"visibility\": \"off\" }] }, { \"featureType\": \"transit\", \"stylers\": [{ \"visibility\": \"on\" }] }, { \"featureType\": \"water\", \"elementType\": \"all\", \"stylers\": [{ \"color\": \"#9bdffb\" }, { \"visibility\": \"on\" }] }],\n { name: \"Styled Map\" }\n );\n\n // MAIN FONCTION\n if (divMap) {\n // const map = map.load(divMap, screenWidth);\n\n let map = new google.maps.Map(divMap);\n\n if (screenWidth < 975) {\n map = new google.maps.Map(divMap, {\n zoom: 10,\n center: { lat: 14.542433070007407, lng: -61.01234487406716 },\n zoomControl: true,\n zoomControlOptions: {\n position: google.maps.ControlPosition.TOP_RIGHT,\n },\n scaleControl: false,\n streetViewControl: false,\n mapTypeControl: false,\n mapTypeControlOptions: {\n mapTypeIds: [\"styled_map\"],\n },\n gestureHandling: \"greedy\",\n restriction: {\n latLngBounds: MARTINIQUE_BOUNDS,\n strictBounds: false,\n },\n });\n } else {\n map = new google.maps.Map(divMap, {\n zoom: 10,\n restriction: {\n latLngBounds: MARTINIQUE_BOUNDS,\n strictBounds: false,\n },\n });\n }\n\n const latlngbounds = new google.maps.LatLngBounds();\n\n const markers = myMarkers.map((position) => {\n position.lat = parseFloat(position.lat)\n position.lng = parseFloat(position.lng)\n\n const marker = new google.maps.Marker({\n position,\n label: {\n text: position.emoji,\n fontSize: \"18px\",\n },\n icon: {\n url: `${position.image_url}`,\n scaledSize: { width: 46, height: 54, widthUnit: 'px', heightUnit: 'px' },\n labelOrigin: new google.maps.Point(24, 22)\n }\n });\n\n latlngbounds.extend(marker.position);\n\n if (screenWidth < 975) {\n const infowindow = new google.maps.InfoWindow({\n content: position.info_window,\n minWidth: 320,\n disableAutoPan: true,\n pixelOffset: new google.maps.Size(0, 10),\n zIndex: 1000,\n });\n\n marker.addListener(\"click\", () => {\n lastInfoWindow.close();\n infowindow.open({\n anchor: marker,\n map,\n shouldFocus: false,\n });\n lastInfoWindow = infowindow;\n });\n map.addListener(\"click\", () => {\n infowindow.close();\n });\n }\n // else OPEN on hover\n else {\n const infowindow = new google.maps.InfoWindow({\n content: position.info_window,\n maxWidth: 250,\n pixelOffset: new google.maps.Size(0, 10),\n zIndex: 1000,\n });\n\n marker.addListener(\"mouseover\", () => {\n infowindow.open({\n anchor: marker,\n map,\n shouldFocus: false,\n });\n });\n\n marker.addListener(\"mouseout\", () => {\n infowindow.close();\n });\n\n // On click, redirect on activity or poi detail page\n marker.addListener(\"click\", () => {\n window.location.href = position.url;\n });\n }\n\n //Center map and adjust Zoom based on the position of all markers.\n map.setCenter(latlngbounds.getCenter());\n map.fitBounds(latlngbounds);\n\n return marker;\n });\n\n // Custom map style\n map.mapTypes.set(\"styled_map\", styledMapType);\n map.setMapTypeId(\"styled_map\");\n\n new MarkerClusterer({ map, markers });\n }\n}\n\nexport { mapInit };\n","const LimitCheckBoxes = () => {\n $('.check_boxes').click(function () {\n console.log($('.check_boxes:checked').length)\n if ($('.check_boxes:checked').length > 4) {\n alert(\"1 à 4 réponses possible(s)\");\n this.checked = false;\n }\n else\n $(\".check_boxes\").not(\":checked\").removeAttr('disabled');\n });\n}\n export { LimitCheckBoxes };\n"],"sourceRoot":""}