UNPKG

@eotl/core

Version:

Assortment of data structures, Vue.js components, and utilities across EOTL apps and sites.

1,447 lines 474 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const AccountNew = require("./AccountNew-iEKG4C1F.cjs"); const AccountRestore = require("./AccountRestore-DDasrBaI.cjs"); const vue = require("vue"); const store = require("./store.cjs"); const Daemon = require("./Daemon-Co4jKUpP.cjs"); const $ = require("jquery"); const simpleSignedRecords = require("@eotl/simple-signed-records"); const Weights = require("./Weights-Cy7jEEqn.cjs"); const slugify = require("./slugify-Cx7jv5Y8.cjs"); require("./authSsr-Aa_pi4mF.cjs"); const _pluginVue_exportHelper = require("./_plugin-vue_export-helper-DM9IkUGy.cjs"); const pinia = require("pinia"); const _commonjsHelpers = require("./_commonjsHelpers-Bc2YnDe1.cjs"); function _mergeNamespaces(n, m2) { for (var i = 0; i < m2.length; i++) { const e = m2[i]; if (typeof e !== "string" && !Array.isArray(e)) { for (const k2 in e) { if (k2 !== "default" && !(k2 in n)) { const d = Object.getOwnPropertyDescriptor(e, k2); if (d) { Object.defineProperty(n, k2, d.get ? d : { enumerable: true, get: () => e[k2] }); } } } } } return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" })); } const _hoisted_1$6 = { class: "mb-0" }; const ALERT_CONTEXT_KEY = Symbol("eotl-core-alert"); const DEFAULT_CONTEXT = vue.reactive({ childAlertRoots: 0 }); function createAlertContext() { vue.provide(ALERT_CONTEXT_KEY, vue.reactive({ // a counter to record whether there are <Alert> components deeper in the tree // which should be used instead of the current one childAlertRoots: 0 })); const parent = vue.inject(ALERT_CONTEXT_KEY, DEFAULT_CONTEXT); const isMounted = vue.ref(false); const isActivated = vue.ref(true); vue.onMounted(() => isMounted.value = true); vue.onBeforeMount(() => isMounted.value = false); vue.onActivated(() => isActivated.value = true); vue.onDeactivated(() => isActivated.value = false); vue.watchEffect((onCleanup) => { if (!isActivated.value || !isMounted.value) return; parent.childAlertRoots++; store.useEotlCore().alert.show = false; onCleanup(() => { parent.childAlertRoots--; store.useEotlCore().alert.show = false; }); }); } const _sfc_main$7 = { __name: "Alert", setup(__props) { const eotlStore = store.useEotlCore(); const alertRoot = vue.inject(ALERT_CONTEXT_KEY, DEFAULT_CONTEXT); return (_ctx, _cache) => { var _a; return vue.openBlock(), vue.createElementBlock("div", null, [ vue.unref(eotlStore).alert.show && !((_a = vue.unref(alertRoot)) == null ? void 0 : _a.childAlertRoots) ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: vue.normalizeClass("mb-3 alert alert-dismissable alert-" + vue.unref(eotlStore).alert.style), role: "alert" }, [ vue.createElementVNode("button", { type: "button", class: "close", "data-dismiss": "alert", onClick: _cache[0] || (_cache[0] = () => vue.unref(eotlStore).alertReset()), "aria-label": "Close" }, " × "), vue.createElementVNode("h4", null, vue.toDisplayString(vue.unref(eotlStore).alert.title), 1), vue.createElementVNode("p", _hoisted_1$6, vue.toDisplayString(vue.unref(eotlStore).alert.message), 1) ], 2)) : vue.createCommentVNode("", true) ]); }; } }; const _sfc_main$6 = { data() { const store$1 = store.useEotlCore(); return { store: store$1, currency: Weights.currency.eur, sizing: Weights.sizes.md, sizes: Weights.sizes, weights: Weights.weights, speeds: ["immediate", "day", "next", "second", "week"], loading: true, shipment: { size: "md", weight: "average", speed: "next" }, details: { payment: "cash", payer: "receiver" }, agree: false }; }, computed: { sizeImage() { return `/images/icons/box-${this.shipment.size}.svg`; }, priceEstimate() { return slugify.tallyFee(this.shipment, Weights.currency["eur"].symbol); }, pickup() { const { city, country, postal } = this.store.config; return { name: "", method: "none", contact: "", address: "", address2: "", city, state: country, postal }; }, destination() { const { city, country, postal } = this.store.config; return { name: "", method: "none", contact: "", address: "", address2: "", city, state: country, postal }; } }, methods: { btnShowShipment() { $("#shipment-tab").tab("show"); }, btnShowPickup() { $("#pickup-tab").tab("show"); }, btnShowDestination() { $("#destination-tab").tab("show"); }, btnShowDetails() { $("#details-tab").tab("show"); }, btnCreateShipment() { const record = { size: this.shipment.size, weight: this.shipment.weight, speed: this.shipment.speed, pickup_name: this.pickup.name, pickup_method: this.pickup.method, pickup_contact: this.pickup.contact, pickup_address: this.pickup.address, pickup_address2: this.pickup.address2, pickup_city: this.pickup.city, pickup_state: this.pickup.state, pickup_postal: this.pickup.postal, dest_name: this.destination.name, dest_method: this.destination.method, dest_contact: this.destination.contact, dest_address: this.destination.address, dest_address2: this.destination.address2, dest_city: this.destination.city, dest_state: this.destination.state, dest_postal: this.destination.postal }; const router = this.$router; simpleSignedRecords.ssrFetcher.Post("shipments", record).then((data) => { router.push("/shipment/" + data.id); }); }, btnCancelShipment() { alert("Cancel order to be created..."); } }, mounted() { this.loading = false; } }; const _hoisted_1$5 = { key: 0, class: "estimator" }; const _hoisted_2$4 = { class: "estimate", id: "estimate" }; const _hoisted_3$4 = { class: "preview" }; const _hoisted_4$2 = { class: "row" }; const _hoisted_5$2 = { class: "col-md-6 text-center" }; const _hoisted_6$2 = { class: "height" }; const _hoisted_7$1 = ["src"]; const _hoisted_8$1 = { class: "width" }; const _hoisted_9$1 = { class: "length" }; const _hoisted_10$1 = { class: "col-md-6 text-center" }; const _hoisted_11$1 = { class: "mt-3" }; const _hoisted_12 = { class: "nav nav-tabs", id: "myTab", role: "tablist" }; const _hoisted_13 = { class: "nav-item" }; const _hoisted_14 = { class: "nav-link active", id: "shipment-tab", "data-toggle": "tab", href: "#shipment", role: "tab", "aria-controls": "shipment", "aria-selected": "true" }; const _hoisted_15 = { class: "nav-item" }; const _hoisted_16 = { class: "nav-link", id: "pickup-tab", "data-toggle": "tab", href: "#pickup", role: "tab", "aria-controls": "pickup", "aria-selected": "false" }; const _hoisted_17 = { class: "nav-item", symbol: "" }; const _hoisted_18 = { class: "nav-link", id: "destination-tab", "data-toggle": "tab", href: "#destination", role: "tab", "aria-controls": "destination", "aria-selected": "false" }; const _hoisted_19 = { class: "nav-item" }; const _hoisted_20 = { class: "nav-link", id: "details-tab", "data-toggle": "tab", href: "#details", role: "tab", "aria-controls": "details", "aria-selected": "false" }; const _hoisted_21 = { class: "tab-content pb-4", id: "myTabContent" }; const _hoisted_22 = { class: "tab-pane active", id: "shipment", role: "tabpanel", "aria-labelledby": "shipment-tab" }; const _hoisted_23 = { class: "form-row mb-4" }; const _hoisted_24 = { class: "col-md-4" }; const _hoisted_25 = { for: "inputSize" }; const _hoisted_26 = ["value"]; const _hoisted_27 = { class: "col-md-4" }; const _hoisted_28 = { for: "inputWeight" }; const _hoisted_29 = ["value"]; const _hoisted_30 = { class: "col-md-4" }; const _hoisted_31 = { for: "inputSpeed" }; const _hoisted_32 = ["value"]; const _hoisted_33 = { class: "form-row mb-4 text-right" }; const _hoisted_34 = { class: "tab-pane", id: "pickup", role: "tabpanel", "aria-labelledby": "pickup-tab" }; const _hoisted_35 = { class: "mb-5" }; const _hoisted_36 = { class: "form-row" }; const _hoisted_37 = { class: "form-group col-md-5" }; const _hoisted_38 = { for: "inputName" }; const _hoisted_39 = { class: "form-group col-md-3" }; const _hoisted_40 = { for: "inputMethod" }; const _hoisted_41 = /* @__PURE__ */ vue.createStaticVNode('<option value="none">None</option><option value="sms">SMS</option><option value="voice">Phone Call</option><option value="email">Email</option><option value="signal">Signal</option><option value="telegram">Telegram</option><option value="whatsapp">WhatsApp</option><option value="wire">Wire</option>', 8); const _hoisted_49 = [ _hoisted_41 ]; const _hoisted_50 = { class: "form-group col-md-4" }; const _hoisted_51 = { for: "inputContact" }; const _hoisted_52 = { class: "form-row" }; const _hoisted_53 = { class: "form-group col-md-6" }; const _hoisted_54 = { for: "inputAddressStart" }; const _hoisted_55 = { class: "form-group col-md-6" }; const _hoisted_56 = { for: "inputAddress2Start" }; const _hoisted_57 = { class: "form-row" }; const _hoisted_58 = { class: "form-group col-md-6" }; const _hoisted_59 = { for: "inputCityStart" }; const _hoisted_60 = { class: "form-group col-md-2" }; const _hoisted_61 = { for: "inputZipStart" }; const _hoisted_62 = { class: "form-group col-md-4" }; const _hoisted_63 = { for: "inputStateStart" }; const _hoisted_64 = ["value"]; const _hoisted_65 = { class: "tab-pane", id: "destination", role: "tabpanel", "aria-labelledby": "destination-tab" }; const _hoisted_66 = { class: "mb-5" }; const _hoisted_67 = { class: "form-row" }; const _hoisted_68 = { class: "form-group col-md-5" }; const _hoisted_69 = { for: "inputNameEnd" }; const _hoisted_70 = { class: "form-group col-md-3" }; const _hoisted_71 = { for: "inputMethodEnd" }; const _hoisted_72 = /* @__PURE__ */ vue.createStaticVNode('<option value="none" selected>None</option><option value="sms">SMS</option><option value="voice">Phone Call</option><option value="day">Email</option><option value="signal">Signal</option><option value="telegram">Telegram</option><option value="whatsapp">WhatsApp</option><option value="wire">Wire</option>', 8); const _hoisted_80 = [ _hoisted_72 ]; const _hoisted_81 = { class: "form-group col-md-4" }; const _hoisted_82 = { for: "inputContactEnd" }; const _hoisted_83 = { class: "form-row" }; const _hoisted_84 = { class: "form-group col-md-6" }; const _hoisted_85 = { for: "inputAddressEnd" }; const _hoisted_86 = { class: "form-group col-md-6" }; const _hoisted_87 = { for: "inputAddress2End" }; const _hoisted_88 = { class: "form-row" }; const _hoisted_89 = { class: "form-group col-md-6" }; const _hoisted_90 = { for: "inputCityEnd" }; const _hoisted_91 = { class: "form-group col-md-2" }; const _hoisted_92 = { for: "inputZipEnd" }; const _hoisted_93 = { class: "form-group col-md-4" }; const _hoisted_94 = { for: "inputStateEnd" }; const _hoisted_95 = ["value"]; const _hoisted_96 = { class: "tab-pane", id: "details", role: "tabpanel", "aria-labelledby": "details-tab" }; const _hoisted_97 = { class: "form-row mb-3" }; const _hoisted_98 = { class: "form-group col-md-6" }; const _hoisted_99 = { for: "inputPayment" }; const _hoisted_100 = /* @__PURE__ */ vue.createStaticVNode('<option value="none" selected>None</option><option value="cash">Cash</option><option value="bitcoin">Bitcoin</option><option value="paypal">PayPal</option><option value="cc">Credit Card</option><option value="time">Time Bank</option>', 6); const _hoisted_106 = [ _hoisted_100 ]; const _hoisted_107 = { class: "col-md-6" }; const _hoisted_108 = { for: "payer" }; const _hoisted_109 = /* @__PURE__ */ vue.createElementVNode("option", { value: "na" }, "Not Applicable", -1); const _hoisted_110 = /* @__PURE__ */ vue.createElementVNode("option", { value: "sender" }, "Sender", -1); const _hoisted_111 = /* @__PURE__ */ vue.createElementVNode("option", { value: "receiver" }, "Receiver", -1); const _hoisted_112 = [ _hoisted_109, _hoisted_110, _hoisted_111 ]; const _hoisted_113 = ["innerHTML"]; const _hoisted_114 = { class: "form-group" }; const _hoisted_115 = { class: "form-check" }; const _hoisted_116 = { class: "form-check-label", for: "gridCheck" }; const _hoisted_117 = { class: "mb-3" }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { return !$data.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [ vue.createElementVNode("form", { method: "POST", onSubmit: _cache[27] || (_cache[27] = vue.withModifiers(($event) => $options.btnCreateShipment(), ["prevent"])) }, [ vue.createElementVNode("div", _hoisted_2$4, vue.toDisplayString(_ctx.$t("estimate")), 1), vue.createElementVNode("div", _hoisted_3$4, [ vue.createElementVNode("div", _hoisted_4$2, [ vue.createElementVNode("div", _hoisted_5$2, [ vue.createElementVNode("span", _hoisted_6$2, vue.toDisplayString($data.sizing.height), 1), vue.createElementVNode("img", { id: "previewImg", src: $options.sizeImage, class: "invert" }, null, 8, _hoisted_7$1), vue.createElementVNode("span", _hoisted_8$1, vue.toDisplayString($data.sizing.width), 1), vue.createTextVNode(" x "), vue.createElementVNode("span", _hoisted_9$1, vue.toDisplayString($data.sizing.length), 1) ]), vue.createElementVNode("div", _hoisted_10$1, [ vue.createElementVNode("h2", null, vue.toDisplayString($options.priceEstimate), 1) ]) ]) ]), vue.createElementVNode("div", _hoisted_11$1, [ vue.createElementVNode("ul", _hoisted_12, [ vue.createElementVNode("li", _hoisted_13, [ vue.createElementVNode("a", _hoisted_14, vue.toDisplayString(_ctx.$t("shipment.title")), 1) ]), vue.createElementVNode("li", _hoisted_15, [ vue.createElementVNode("a", _hoisted_16, vue.toDisplayString(_ctx.$t("pickup.title")), 1) ]), vue.createElementVNode("li", _hoisted_17, [ vue.createElementVNode("a", _hoisted_18, vue.toDisplayString(_ctx.$t("destination.title")), 1) ]), vue.createElementVNode("li", _hoisted_19, [ vue.createElementVNode("a", _hoisted_20, vue.toDisplayString(_ctx.$t("delivery.title")), 1) ]) ]) ]), vue.createElementVNode("div", _hoisted_21, [ vue.createElementVNode("div", _hoisted_22, [ vue.createElementVNode("div", _hoisted_23, [ vue.createElementVNode("div", _hoisted_24, [ vue.createElementVNode("label", _hoisted_25, vue.toDisplayString(_ctx.$t("shipment.size")), 1), vue.withDirectives(vue.createElementVNode("select", { "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.shipment.size = $event), id: "inputSize", class: "form-control" }, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.sizes, (size, index) => { return vue.openBlock(), vue.createElementBlock("option", { key: index, value: index }, vue.toDisplayString(_ctx.$t("sizes." + index)), 9, _hoisted_26); }), 128)) ], 512), [ [vue.vModelSelect, $data.shipment.size] ]) ]), vue.createElementVNode("div", _hoisted_27, [ vue.createElementVNode("label", _hoisted_28, vue.toDisplayString(_ctx.$t("shipment.weight")), 1), vue.withDirectives(vue.createElementVNode("select", { "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.shipment.weight = $event), id: "inputWeight", class: "form-control" }, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.weights, (weight, index) => { return vue.openBlock(), vue.createElementBlock("option", { key: index, value: index }, vue.toDisplayString(_ctx.$t("weights." + index)) + " (" + vue.toDisplayString(weight.kg) + ") ", 9, _hoisted_29); }), 128)) ], 512), [ [vue.vModelSelect, $data.shipment.weight] ]) ]), vue.createElementVNode("div", _hoisted_30, [ vue.createElementVNode("label", _hoisted_31, vue.toDisplayString(_ctx.$t("shipment.shipmentSpeed")), 1), vue.withDirectives(vue.createElementVNode("select", { "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.shipment.speed = $event), id: "inputSpeed", class: "form-control" }, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.speeds, (speed) => { return vue.openBlock(), vue.createElementBlock("option", { key: speed, value: speed }, vue.toDisplayString(_ctx.$t("speeds." + speed)), 9, _hoisted_32); }), 128)) ], 512), [ [vue.vModelSelect, $data.shipment.speed] ]) ]) ]), vue.createElementVNode("div", _hoisted_33, [ vue.createElementVNode("button", { type: "button", onClick: _cache[3] || (_cache[3] = (...args) => $options.btnShowPickup && $options.btnShowPickup(...args)), class: "btn btn-primary" }, " Next Step ") ]) ]), vue.createElementVNode("div", _hoisted_34, [ vue.createElementVNode("div", _hoisted_35, [ vue.createElementVNode("div", _hoisted_36, [ vue.createElementVNode("div", _hoisted_37, [ vue.createElementVNode("label", _hoisted_38, vue.toDisplayString(_ctx.$t("pickup.name")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $options.pickup.name = $event), class: "form-control", id: "inputName" }, null, 512), [ [vue.vModelText, $options.pickup.name] ]) ]), vue.createElementVNode("div", _hoisted_39, [ vue.createElementVNode("label", _hoisted_40, vue.toDisplayString(_ctx.$t("pickup.contactMethod")), 1), vue.withDirectives(vue.createElementVNode("select", { id: "inputMethod", class: "form-control", "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $options.pickup.method = $event) }, _hoisted_49, 512), [ [vue.vModelSelect, $options.pickup.method] ]) ]), vue.createElementVNode("div", _hoisted_50, [ vue.createElementVNode("label", _hoisted_51, vue.toDisplayString(_ctx.$t("pickup.contact")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $options.pickup.contact = $event), class: "form-control", id: "inputContact" }, null, 512), [ [vue.vModelText, $options.pickup.contact] ]) ]) ]), vue.createElementVNode("div", _hoisted_52, [ vue.createElementVNode("div", _hoisted_53, [ vue.createElementVNode("label", _hoisted_54, vue.toDisplayString(_ctx.$t("pickup.address")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $options.pickup.address = $event), id: "inputAddressStart", placeholder: "1234 Main St" }, null, 512), [ [vue.vModelText, $options.pickup.address] ]) ]), vue.createElementVNode("div", _hoisted_55, [ vue.createElementVNode("label", _hoisted_56, vue.toDisplayString(_ctx.$t("pickup.addressSuffix")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $options.pickup.address2 = $event), id: "inputAddress2Start", placeholder: "Apartment, studio, or floor" }, null, 512), [ [vue.vModelText, $options.pickup.address2] ]) ]) ]), vue.createElementVNode("div", _hoisted_57, [ vue.createElementVNode("div", _hoisted_58, [ vue.createElementVNode("label", _hoisted_59, vue.toDisplayString(_ctx.$t("pickup.city")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $options.pickup.city = $event), id: "inputCityStart" }, null, 512), [ [vue.vModelText, $options.pickup.city] ]) ]), vue.createElementVNode("div", _hoisted_60, [ vue.createElementVNode("label", _hoisted_61, vue.toDisplayString(_ctx.$t("pickup.postal")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputZipStart", "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $options.pickup.postal = $event) }, null, 512), [ [vue.vModelText, $options.pickup.postal] ]) ]), vue.createElementVNode("div", _hoisted_62, [ vue.createElementVNode("label", _hoisted_63, vue.toDisplayString(_ctx.$t("pickup.state")), 1), vue.withDirectives(vue.createElementVNode("select", { id: "inputStateStart", class: "form-control", "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $options.pickup.state = $event) }, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.$tm("countries"), (country) => { return vue.openBlock(), vue.createElementBlock("option", { key: country.value, value: country.value }, vue.toDisplayString(country.text), 9, _hoisted_64); }), 128)) ], 512), [ [vue.vModelSelect, $options.pickup.state] ]) ]) ]), vue.createElementVNode("button", { type: "button", onClick: _cache[12] || (_cache[12] = (...args) => $options.btnShowDestination && $options.btnShowDestination(...args)), class: "btn btn-primary float-right" }, " Next Step ") ]) ]), vue.createElementVNode("div", _hoisted_65, [ vue.createElementVNode("div", _hoisted_66, [ vue.createElementVNode("div", _hoisted_67, [ vue.createElementVNode("div", _hoisted_68, [ vue.createElementVNode("label", _hoisted_69, vue.toDisplayString(_ctx.$t("destination.name")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputNameEnd", "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $options.destination.name = $event) }, null, 512), [ [vue.vModelText, $options.destination.name] ]) ]), vue.createElementVNode("div", _hoisted_70, [ vue.createElementVNode("label", _hoisted_71, vue.toDisplayString(_ctx.$t("destination.contactMethod")), 1), vue.withDirectives(vue.createElementVNode("select", { id: "inputMethodEnd", class: "form-control", "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $options.destination.method = $event) }, _hoisted_80, 512), [ [vue.vModelSelect, $options.destination.method] ]) ]), vue.createElementVNode("div", _hoisted_81, [ vue.createElementVNode("label", _hoisted_82, vue.toDisplayString(_ctx.$t("destination.contact")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputContactEnd", "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $options.destination.contact = $event) }, null, 512), [ [vue.vModelText, $options.destination.contact] ]) ]) ]), vue.createElementVNode("div", _hoisted_83, [ vue.createElementVNode("div", _hoisted_84, [ vue.createElementVNode("label", _hoisted_85, vue.toDisplayString(_ctx.$t("destination.address")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputAddressEnd", placeholder: "1234 Main St", "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $options.destination.address = $event) }, null, 512), [ [vue.vModelText, $options.destination.address] ]) ]), vue.createElementVNode("div", _hoisted_86, [ vue.createElementVNode("label", _hoisted_87, vue.toDisplayString(_ctx.$t("destination.addressSuffix")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputAddress2End", placeholder: "Apartment, studio, or floor", "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $options.destination.address2 = $event) }, null, 512), [ [vue.vModelText, $options.destination.address2] ]) ]) ]), vue.createElementVNode("div", _hoisted_88, [ vue.createElementVNode("div", _hoisted_89, [ vue.createElementVNode("label", _hoisted_90, vue.toDisplayString(_ctx.$t("destination.city")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputCityEnd", "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $options.destination.city = $event) }, null, 512), [ [vue.vModelText, $options.destination.city] ]) ]), vue.createElementVNode("div", _hoisted_91, [ vue.createElementVNode("label", _hoisted_92, vue.toDisplayString(_ctx.$t("destination.postal")), 1), vue.withDirectives(vue.createElementVNode("input", { type: "text", class: "form-control", id: "inputZipEnd", "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $options.destination.postal = $event) }, null, 512), [ [vue.vModelText, $options.destination.postal] ]) ]), vue.createElementVNode("div", _hoisted_93, [ vue.createElementVNode("label", _hoisted_94, vue.toDisplayString(_ctx.$t("destination.state")), 1), vue.withDirectives(vue.createElementVNode("select", { id: "inputStateEnd", class: "form-control", "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $options.destination.state = $event) }, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.$tm("countries"), (country) => { return vue.openBlock(), vue.createElementBlock("option", { key: country.value, value: country.value }, vue.toDisplayString(country.text), 9, _hoisted_95); }), 128)) ], 512), [ [vue.vModelSelect, $options.destination.state] ]) ]) ]), vue.createElementVNode("button", { type: "button", onClick: _cache[21] || (_cache[21] = (...args) => $options.btnShowDetails && $options.btnShowDetails(...args)), class: "btn btn-primary float-right" }, " Next Step ") ]) ]), vue.createElementVNode("div", _hoisted_96, [ vue.createElementVNode("h4", null, vue.toDisplayString(_ctx.$t("delivery.payment")), 1), vue.createElementVNode("div", _hoisted_97, [ vue.createElementVNode("div", _hoisted_98, [ vue.createElementVNode("label", _hoisted_99, vue.toDisplayString(_ctx.$t("delivery.paymentMethod")), 1), vue.withDirectives(vue.createElementVNode("select", { id: "inputPayment", class: "form-control", "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $data.details.payment = $event) }, _hoisted_106, 512), [ [vue.vModelSelect, $data.details.payment] ]) ]), vue.createElementVNode("div", _hoisted_107, [ vue.createElementVNode("label", _hoisted_108, vue.toDisplayString(_ctx.$t("delivery.paymentPayer")), 1), vue.withDirectives(vue.createElementVNode("select", { id: "payer", class: "form-control", "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => $data.details.payer = $event) }, _hoisted_112, 512), [ [vue.vModelSelect, $data.details.payer] ]) ]) ]), vue.createElementVNode("h5", null, vue.toDisplayString(_ctx.$t("delivery.tos")), 1), vue.createElementVNode("div", { innerHTML: _ctx.$t("delivery.tosMust") }, null, 8, _hoisted_113), vue.createElementVNode("div", _hoisted_114, [ vue.createElementVNode("div", _hoisted_115, [ vue.withDirectives(vue.createElementVNode("input", { class: "form-check-input", "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => $data.agree = $event), type: "checkbox", id: "gridCheck" }, null, 512), [ [vue.vModelCheckbox, $data.agree] ]), vue.createElementVNode("label", _hoisted_116, vue.toDisplayString(_ctx.$t("delivery.tosAgree")), 1) ]) ]), vue.createElementVNode("div", _hoisted_117, [ vue.createElementVNode("button", { type: "button", class: "btn btn-secondary mr-4", onClick: _cache[25] || (_cache[25] = ($event) => $options.btnCancelShipment()) }, vue.toDisplayString(_ctx.$t("delivery.btnCancel")), 1), vue.createElementVNode("button", { type: "submit", class: "btn btn-primary", onSubmit: _cache[26] || (_cache[26] = vue.withModifiers(($event) => $options.btnCreateShipment(), ["prevent"])) }, vue.toDisplayString(_ctx.$t("delivery.btnComplete")), 33) ]) ]) ]) ], 32) ])) : vue.createCommentVNode("", true); } const Estimator = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$6, [["render", _sfc_render$3]]); const _sfc_main$5 = { name: "IdentityKey", props: ["identity"], data: function() { return {}; } }; const _hoisted_1$4 = /* @__PURE__ */ vue.createElementVNode("br", null, null, -1); const _hoisted_2$3 = /* @__PURE__ */ vue.createElementVNode("br", null, null, -1); const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode("br", null, null, -1); function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createElementVNode("small", null, [ vue.createTextVNode(vue.toDisplayString($props.identity.identity), 1), _hoisted_1$4, vue.createTextVNode(" Level: " + vue.toDisplayString($props.identity.level), 1), _hoisted_2$3, vue.createTextVNode(" Status: " + vue.toDisplayString($props.identity.status), 1), _hoisted_3$3, vue.createTextVNode(" " + vue.toDisplayString($props.identity.info), 1) ]) ]); } const IdentityKey = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$5, [["render", _sfc_render$2]]); const ce = (e, o) => { for (const t of Object.keys(o)) e.on(t, o[t]); }, ye = (e) => { for (const o of Object.keys(e)) { const t = e[o]; t && k(t.cancel) && t.cancel(); } }, Je = (e) => !e || typeof e.charAt != "function" ? e : e.charAt(0).toUpperCase() + e.slice(1), k = (e) => typeof e == "function", L$2 = (e, o, t) => { for (const n in t) { const s = "set" + Je(n); e[s] ? vue.watch( () => t[n], (r, l) => { e[s](r, l); } ) : o[s] && vue.watch( () => t[n], (r) => { o[s](r); } ); } }, f = (e, o, t = {}) => { const n = { ...t }; for (const s in e) { const r = o[s], l = e[s]; r && (r && r.custom === true || l !== void 0 && (n[s] = l)); } return n; }, T = (e) => { const o = {}, t = {}; for (const n in e) if (n.startsWith("on") && !n.startsWith("onUpdate") && n !== "onReady") { const s = n.slice(2).toLocaleLowerCase(); o[s] = e[n]; } else t[n] = e[n]; return { listeners: o, attrs: t }; }, qe = async (e) => { const o = await Promise.all([ Promise.resolve().then(() => require("./marker-icon-2x-BDumLctR.cjs")), Promise.resolve().then(() => require("./marker-icon-CWw64EAX.cjs")), Promise.resolve().then(() => require("./marker-shadow-DKuaBVLM.cjs")) ]); delete e.Default.prototype._getIconUrl, e.Default.mergeOptions({ iconRetinaUrl: o[0].default, iconUrl: o[1].default, shadowUrl: o[2].default }); }, Y = (e) => { const o = vue.ref( (...n) => console.warn(`Method ${e} has been invoked without being replaced`) ), t = (...n) => o.value(...n); return t.wrapped = o, vue.provide(e, t), t; }, V = (e, o) => e.wrapped.value = o, b = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || globalThis, m = (e) => { const o = vue.inject(e); if (o === void 0) throw new Error( `Attempt to inject ${e.description} before it was provided.` ); return o; }, h = Symbol( "useGlobalLeaflet" ), M = Symbol("addLayer"), ee = Symbol("removeLayer"), H = Symbol( "registerControl" ), me = Symbol( "registerLayerControl" ), ve = Symbol( "canSetParentHtml" ), be = Symbol("setParentHtml"), fe = Symbol("setIcon"), ge = Symbol("bindPopup"), Le = Symbol("bindTooltip"), he = Symbol("unbindPopup"), Oe = Symbol("unbindTooltip"), W = { options: { type: Object, default: () => ({}), custom: true } }, J = (e) => ({ options: e.options, methods: {} }), D = { ...W, pane: { type: String }, attribution: { type: String }, name: { type: String, custom: true }, layerType: { type: String, custom: true }, visible: { type: Boolean, custom: true, default: true } }, q = (e, o, t) => { const n = m(M), s = m(ee), { options: r, methods: l } = J(e), a = f( e, D, r ), i = () => n({ leafletObject: o.value }), u = () => s({ leafletObject: o.value }), d = { ...l, setAttribution(y) { u(), o.value.options.attribution = y, e.visible && i(); }, setName() { u(), e.visible && i(); }, setLayerType() { u(), e.visible && i(); }, setVisible(y) { o.value && (y ? i() : u()); }, bindPopup(y) { if (!o.value || !k(o.value.bindPopup)) { console.warn( "Attempt to bind popup before bindPopup method available on layer." ); return; } o.value.bindPopup(y); }, bindTooltip(y) { if (!o.value || !k(o.value.bindTooltip)) { console.warn( "Attempt to bind tooltip before bindTooltip method available on layer." ); return; } o.value.bindTooltip(y); }, unbindTooltip() { o.value && (k(o.value.closeTooltip) && o.value.closeTooltip(), k(o.value.unbindTooltip) && o.value.unbindTooltip()); }, unbindPopup() { o.value && (k(o.value.closePopup) && o.value.closePopup(), k(o.value.unbindPopup) && o.value.unbindPopup()); }, updateVisibleProp(y) { t.emit("update:visible", y); } }; return vue.provide(ge, d.bindPopup), vue.provide(Le, d.bindTooltip), vue.provide(he, d.unbindPopup), vue.provide(Oe, d.unbindTooltip), vue.onUnmounted(() => { d.unbindPopup(), d.unbindTooltip(), u(); }), { options: a, methods: d }; }, G = (e, o) => { if (e && o.default) return vue.h("div", { style: { display: "none" } }, o.default()); }, Se = { ...D, interactive: { type: Boolean, default: void 0 }, bubblingMouseEvents: { type: Boolean, default: void 0 } }, Ke = (e, o, t) => { const { options: n, methods: s } = q( e, o, t ); return { options: f( e, Se, n ), methods: s }; }, ne = { ...Se, stroke: { type: Boolean, default: void 0 }, color: { type: String }, weight: { type: Number }, opacity: { type: Number }, lineCap: { type: String }, lineJoin: { type: String }, dashArray: { type: String }, dashOffset: { type: String }, fill: { type: Boolean, default: void 0 }, fillColor: { type: String }, fillOpacity: { type: Number }, fillRule: { type: String }, className: { type: String } }, _e = (e, o, t) => { const { options: n, methods: s } = Ke(e, o, t), r = f( e, ne, n ), l = m(ee), a = { ...s, setStroke(i) { o.value.setStyle({ stroke: i }); }, setColor(i) { o.value.setStyle({ color: i }); }, setWeight(i) { o.value.setStyle({ weight: i }); }, setOpacity(i) { o.value.setStyle({ opacity: i }); }, setLineCap(i) { o.value.setStyle({ lineCap: i }); }, setLineJoin(i) { o.value.setStyle({ lineJoin: i }); }, setDashArray(i) { o.value.setStyle({ dashArray: i }); }, setDashOffset(i) { o.value.setStyle({ dashOffset: i }); }, setFill(i) { o.value.setStyle({ fill: i }); }, setFillColor(i) { o.value.setStyle({ fillColor: i }); }, setFillOpacity(i) { o.value.setStyle({ fillOpacity: i }); }, setFillRule(i) { o.value.setStyle({ fillRule: i }); }, setClassName(i) { o.value.setStyle({ className: i }); } }; return vue.onBeforeUnmount(() => { l({ leafletObject: o.value }); }), { options: r, methods: a }; }, re = { ...ne, /** * Radius of the marker in pixels. */ radius: { type: Number }, latLng: { type: [Object, Array], required: true, custom: true } }, je = (e, o, t) => { const { options: n, methods: s } = _e( e, o, t ), r = f( e, re, n ), l = { ...s, setRadius(a) { o.value.setRadius(a); }, setLatLng(a) { o.value.setLatLng(a); } }; return { options: r, methods: l }; }, Pe = { ...re, /** * Radius of the circle in meters. */ radius: { type: Number } }, Qe = (e, o, t) => { const { options: n, methods: s } = je(e, o, t), r = f( e, Pe, n ), l = { ...s }; return { options: r, methods: l }; }; vue.defineComponent({ name: "LCircle", props: Pe, setup(e, o) { const t = vue.ref(), n = vue.ref(false), s = vue.inject(h), r = m(M), { options: l, methods: a } = Qe(e, t, o); return vue.onMounted(async () => { const { circle: i } = s ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw(i(e.latLng, l)); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(a, t.value, e), r({ ...e, ...a, leafletObject: t.value }), n.value = true, vue.nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }); vue.defineComponent({ name: "LCircleMarker", props: re, setup(e, o) { const t = vue.ref(), n = vue.ref(false), s = vue.inject(h), r = m(M), { options: l, methods: a } = je( e, t, o ); return vue.onMounted(async () => { const { circleMarker: i } = s ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw( i(e.latLng, l) ); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(a, t.value, e), r({ ...e, ...a, leafletObject: t.value }), n.value = true, vue.nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }); const F = { ...W, position: { type: String } }, K = (e, o) => { const { options: t, methods: n } = J(e), s = f( e, F, t ), r = { ...n, setPosition(l) { o.value && o.value.setPosition(l); } }; return vue.onUnmounted(() => { o.value && o.value.remove(); }), { options: s, methods: r }; }, Xe = (e) => e.default ? vue.h("div", { ref: "root" }, e.default()) : null; vue.defineComponent({ name: "LControl", props: { ...F, disableClickPropagation: { type: Boolean, custom: true, default: true }, disableScrollPropagation: { type: Boolean, custom: true, default: false } }, setup(e, o) { const t = vue.ref(), n = vue.ref(), s = vue.inject(h), r = m(H), { options: l, methods: a } = K(e, t); return vue.onMounted(async () => { const { Control: i, DomEvent: u } = s ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")), d = i.extend({ onAdd() { return n.value; } }); t.value = vue.markRaw(new d(l)), L$2(a, t.value, e), r({ leafletObject: t.value }), e.disableClickPropagation && n.value && u.disableClickPropagation(n.value), e.disableScrollPropagation && n.value && u.disableScrollPropagation(n.value), vue.nextTick(() => o.emit("ready", t.value)); }), { root: n, leafletObject: t }; }, render() { return Xe(this.$slots); } }); const Ce = { ...F, prefix: { type: String } }, Ye = (e, o) => { const { options: t, methods: n } = K( e, o ), s = f( e, Ce, t ), r = { ...n, setPrefix(l) { o.value.setPrefix(l); } }; return { options: s, methods: r }; }; vue.defineComponent({ name: "LControlAttribution", props: Ce, setup(e, o) { const t = vue.ref(), n = vue.inject(h), s = m(H), { options: r, methods: l } = Ye(e, t); return vue.onMounted(async () => { const { control: a } = n ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw( a.attribution(r) ), L$2(l, t.value, e), s({ leafletObject: t.value }), vue.nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const Te = { ...F, collapsed: { type: Boolean, default: void 0 }, autoZIndex: { type: Boolean, default: void 0 }, hideSingleBase: { type: Boolean, default: void 0 }, sortLayers: { type: Boolean, default: void 0 }, sortFunction: { type: Function } }, Ve = (e, o) => { const { options: t } = K(e, o); return { options: f( e, Te, t ), methods: { addLayer(r) { r.layerType === "base" ? o.value.addBaseLayer(r.leafletObject, r.name) : r.layerType === "overlay" && o.value.addOverlay(r.leafletObject, r.name); }, removeLayer(r) { o.value.removeLayer(r.leafletObject); } } }; }; vue.defineComponent({ name: "LControlLayers", props: Te, setup(e, o) { const t = vue.ref(), n = vue.inject(h), s = m(me), { options: r, methods: l } = Ve(e, t); return vue.onMounted(async () => { const { control: a } = n ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw( a.layers(void 0, void 0, r) ), L$2(l, t.value, e), s({ ...e, ...l, leafletObject: t.value }), vue.nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const Me = { ...F, maxWidth: { type: Number }, metric: { type: Boolean, default: void 0 }, imperial: { type: Boolean, default: void 0 }, updateWhenIdle: { type: Boolean, default: void 0 } }, xe = (e, o) => { const { options: t, methods: n } = K( e, o ); return { options: f( e, Me, t ), methods: n }; }; vue.defineComponent({ name: "LControlScale", props: Me, setup(e, o) { const t = vue.ref(), n = vue.inject(h), s = m(H), { options: r, methods: l } = xe(e, t); return vue.onMounted(async () => { const { control: a } = n ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw(a.scale(r)), L$2(l, t.value, e), s({ leafletObject: t.value }), vue.nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const Be = { ...F, zoomInText: { type: String }, zoomInTitle: { type: String }, zoomOutText: { type: String }, zoomOutTitle: { type: String } }, Re = (e, o) => { const { options: t, methods: n } = K( e, o ); return { options: f( e, Be, t ), methods: n }; }; vue.defineComponent({ name: "LControlZoom", props: Be, setup(e, o) { const t = vue.ref(), n = vue.inject(h), s = m(H), { options: r, methods: l } = Re(e, t); return vue.onMounted(async () => { const { control: a } = n ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw(a.zoom(r)), L$2(l, t.value, e), s({ leafletObject: t.value }), vue.nextTick(() => o.emit("ready", t.value)); }), { leafletObject: t }; }, render() { return null; } }); const te = { ...D }, se = (e, o, t) => { const { options: n, methods: s } = q( e, o, t ), r = f( e, te, n ), l = { ...s, addLayer(a) { o.value.addLayer(a.leafletObject); }, removeLayer(a) { o.value.removeLayer(a.leafletObject); } }; return vue.provide(M, l.addLayer), vue.provide(ee, l.removeLayer), { options: r, methods: l }; }, we = { ...te }, et = (e, o, t) => { const { options: n, methods: s } = se( e, o, t ), r = f( e, we, n ), l = { ...s }; return { options: r, methods: l }; }; vue.defineComponent({ props: we, setup(e, o) { const t = vue.ref(), n = vue.ref(false), s = vue.inject(h), r = m(M), { methods: l, options: a } = et( e, t, o ); return vue.onMounted(async () => { const { featureGroup: i } = s ? b.L : await Promise.resolve().then(() => require("./leaflet-src.esm-CIfQolt2.cjs")); t.value = vue.markRaw( i(void 0, a) ); const { listeners: u } = T(o.attrs); t.value.on(u), L$2(l, t.value, e), r({ ...e, ...l, leafletObject: t.value }), n.value = true, vue.nextTick(() => o.emit("ready", t.value)); }), { ready: n, leafletObject: t }; }, render() { return G(this.ready, this.$slots); } }); const Ie = { ...te, geojson: { type: [Object, Array], custom: true }, optionsStyle: { type: Function, custom: true } }, tt = (e, o, t) => { const { options: n, methods: s } = se( e, o, t ), r = f( e, Ie, n ); Object.prototype.hasOwnProperty.call(e, "optionsStyl