@cw-parcelpanel/headless-react
Version:
ParcelPanel Headless React Component - EDD & Tracking widgets for Shopify stores with TypeScript support
1,639 lines (1,638 loc) • 180 kB
JavaScript
(function() {
const style = document.createElement('style');
style.textContent = ".parcelpanel-edd{line-height:1.5;font-weight:400}.parcelpanel-edd svg.pp-shipping-icon{width:1.43em;height:1.43em;vertical-align:top;line-height:1;display:inline;opacity:1}.parcelpanel-edd svg.pp-shipping-icon path{stroke:initial}.parcelpanel-edd p{font-size:14px;line-height:1.5;margin:0 0 8px;min-height:1.5em;width:100%;white-space:pre-wrap}.parcelpanel-edd p:empty{display:block}.parcelpanel-edd p:last-child{margin-bottom:0}.parcelpanel-edd p strong{font-weight:700}.parcelpanel-edd p a{color:#06c;text-decoration:underline;cursor:pointer}.parcelpanel-edd p a:hover,.parcelpanel-edd p a span{text-decoration:underline}.parcelpanel-edd .eddLoading{margin-left:2px;display:inline-block;width:40px;height:10px;border-radius:20px;background:linear-gradient(#9c9c9c 0 0) 0/0% no-repeat #d8d8d8;animation:LoadingAnimation 1s infinite linear}@keyframes LoadingAnimation{to{background-size:110%}}.parcelpanel-overflow-hidden{overflow:hidden;position:relative}.location-selector-container{--pp-modal-bg: #ffffff;--pp-modal-text: #121212;--pp-modal-border: #D1D1DB;--pp-modal-hover: #F9FAFB;--pp-modal-scroll: #8A8A8A;--pp-modal-selected: #ececec;--pp-selector-text: #121212;--pp-selector-bg: #fff;--pp-selector-option-text: #121212;--pp-selector-option-bg: #fff;--pp-modal-close: #4A4949;--pp-modal-close-hover: rgba(0, 0, 0, .05);--pp-modal-close-active: rgba(0, 0, 0, .1);--pp-modal-overlay: rgba(0, 0, 0, .5);--pp-modal-overlay-blur: 10px;--pp-modal-shadow: 0 4px 24px rgba(0, 0, 0, .08);--pp-button-bg: #121212;--pp-button-text: #ffffff;--pp-button-hover: #333333}.location-selector-container.dark-mode{--pp-modal-bg: #000000;--pp-modal-text: #ffffff;--pp-modal-hover: #c3c3c3;--pp-modal-scroll: #8A8A8A;--pp-modal-selector-bg: #fff;--pp-selector-text: #121212;--pp-selector-bg: #fff;--pp-selector-option-text: #121212;--pp-selector-option-bg: #fff;--pp-modal-close: #FFFFFF;--pp-modal-close-hover: rgba(255, 255, 255, .1);--pp-modal-close-active: rgba(255, 255, 255, .15);--pp-modal-overlay: rgba(0, 0, 0, .7);--pp-modal-overlay-blur: 10px;--pp-modal-shadow: 0 4px 24px rgba(0, 0, 0, .3);--pp-button-bg: #ffffff;--pp-button-text: #121212;--pp-button-hover: #E5E7EB}.location-selector-overlay{position:fixed;inset:0;background-color:var(--pp-modal-overlay);backdrop-filter:blur(--pp-modal-overlay-blur);-webkit-backdrop-filter:blur(--pp-modal-overlay-blur);display:flex;justify-content:center;align-items:center;z-index:1000;animation:fadeIn .2s ease}.location-selector-modal{background:var(--pp-modal-bg);border-radius:8px;width:90%;max-width:400px;box-shadow:var(--pp-modal-shadow)}.location-selector-header{padding:32px 32px 0;display:flex;justify-content:space-between;align-items:flex-start}.location-selector-title{font-size:20px;font-weight:600;color:var(--pp-modal-text);margin:0}.location-selector-close{background:none;border:none;width:32px;height:32px;padding:0;margin:-24px -20px 0 0;cursor:pointer;color:var(--pp-modal-close);display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all .2s ease}.location-selector-close:hover path,.location-selector-close:active path{fill:#6c6b804d}.location-selector-close svg{display:block;width:12px;height:12px}.location-selector-content{padding:8px 32px 32px}.location-field{margin-bottom:16px}.location-dropdown{position:relative;width:100%}.location-dropdown-selected{height:40px;padding:0 12px;background:var(--pp-selector-bg);border:1px solid var(--pp-modal-border);border-radius:8px;display:flex;align-items:center;gap:4px;cursor:pointer;transition:all .2s;color:var(--pp-selector-text)}.location-dropdown-selected:hover{border-color:var(--pp-modal-text)}.location-dropdown-text{flex:1;font-size:16px;color:var(--pp-selector-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5}.location-dropdown-arrow{width:16px;height:16px;display:flex}.location-dropdown-options-wrapper{position:absolute;top:calc(100% + 4px);left:0;right:0;border-radius:8px;background:var(--pp-selector-option-bg);border:1px solid var(--pp-modal-border);overflow:hidden;z-index:1000}.location-dropdown-options{max-height:280px;overflow-y:auto}.location-dropdown-option{height:40px;padding:0 16px;display:flex;align-items:center;gap:12px;cursor:pointer;color:var(--pp-selector-option-text)}.location-dropdown-option:hover{background:var(--pp-modal-hover)}.location-dropdown-option[selected]{background:var(--pp-modal-selected)}.location-dropdown-option span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flag-icon{width:30px!important;height:20px!important;border-radius:0!important;background-size:100% 100%!important;background-image:var(--current-flag-url)}.location-selector-save{height:40px;width:100%;padding:0;background:var(--pp-button-bg);color:var(--pp-button-text);border:none;border-radius:12px;font-size:16px;font-weight:500;cursor:pointer;transition:background-color .2s;text-align:center}.location-selector-save:hover{background:var(--pp-button-hover)}.location-dropdown-options::-webkit-scrollbar{width:6px}.location-dropdown-options::-webkit-scrollbar-track{background:var(--pp-modal-selected);border-radius:3px}.location-dropdown-options::-webkit-scrollbar-thumb{background:var(--pp-modal-scroll);border-radius:3px}.location-dropdown-options::-webkit-scrollbar-thumb:hover{background:var(--pp-modal-close)}.parcelpanel-skeleton .skeleton-line{background:linear-gradient(90deg,#f0f0f0 25%,#f8f8f8,#f0f0f0 75%);background-size:200% 100%;animation:skeleton-shimmer 1.5s infinite;border-radius:4px}@keyframes skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}\n";
document.head.appendChild(style);
})();
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __reflectGet = Reflect.get;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a2, b2) => {
for (var prop in b2 || (b2 = {}))
if (__hasOwnProp.call(b2, prop))
__defNormalProp(a2, prop, b2[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b2)) {
if (__propIsEnum.call(b2, prop))
__defNormalProp(a2, prop, b2[prop]);
}
return a2;
};
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e2) {
reject(e2);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e2) {
reject(e2);
}
};
var step = (x2) => x2.done ? resolve(x2.value) : Promise.resolve(x2.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
var _a, _b, _c, _d, _e, _f;
import React, { forwardRef, useRef, useImperativeHandle, useEffect } from "react";
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t$3 = globalThis, e$4 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$1 = Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
let n$3 = class n {
constructor(t2, e2, o2) {
if (this._$cssResult$ = true, o2 !== s$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t2, this.t = e2;
}
get styleSheet() {
let t2 = this.o;
const s2 = this.t;
if (e$4 && void 0 === t2) {
const e2 = void 0 !== s2 && 1 === s2.length;
e2 && (t2 = o$4.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$4.set(s2, t2));
}
return t2;
}
toString() {
return this.cssText;
}
};
const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$1), S$1 = (s2, o2) => {
if (e$4) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
else for (const e2 of o2) {
const o3 = document.createElement("style"), n3 = t$3.litNonce;
void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
}
}, c$2 = e$4 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
let e2 = "";
for (const s2 of t3.cssRules) e2 += s2.cssText;
return r$4(e2);
})(t2) : t2;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const { is: i$3, defineProperty: e$3, getOwnPropertyDescriptor: r$3, getOwnPropertyNames: h$1, getOwnPropertySymbols: o$3, getPrototypeOf: n$2 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
switch (s2) {
case Boolean:
t2 = t2 ? l$1 : null;
break;
case Object:
case Array:
t2 = null == t2 ? t2 : JSON.stringify(t2);
}
return t2;
}, fromAttribute(t2, s2) {
let i2 = t2;
switch (s2) {
case Boolean:
i2 = null !== t2;
break;
case Number:
i2 = null === t2 ? null : Number(t2);
break;
case Object:
case Array:
try {
i2 = JSON.parse(t2);
} catch (t3) {
i2 = null;
}
}
return i2;
} }, f$1 = (t2, s2) => !i$3(t2, s2), y$1 = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 };
(_a = Symbol.metadata) != null ? _a : Symbol.metadata = Symbol("metadata"), (_b = a$1.litPropertyMetadata) != null ? _b : a$1.litPropertyMetadata = /* @__PURE__ */ new WeakMap();
class b extends HTMLElement {
static addInitializer(t2) {
var _a2;
this._$Ei(), ((_a2 = this.l) != null ? _a2 : this.l = []).push(t2);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(t2, s2 = y$1) {
if (s2.state && (s2.attribute = false), this._$Ei(), this.elementProperties.set(t2, s2), !s2.noAccessor) {
const i2 = Symbol(), r3 = this.getPropertyDescriptor(t2, i2, s2);
void 0 !== r3 && e$3(this.prototype, t2, r3);
}
}
static getPropertyDescriptor(t2, s2, i2) {
var _a2;
const { get: e2, set: h2 } = (_a2 = r$3(this.prototype, t2)) != null ? _a2 : { get() {
return this[s2];
}, set(t3) {
this[s2] = t3;
} };
return { get() {
return e2 == null ? void 0 : e2.call(this);
}, set(s3) {
const r3 = e2 == null ? void 0 : e2.call(this);
h2.call(this, s3), this.requestUpdate(t2, r3, i2);
}, configurable: true, enumerable: true };
}
static getPropertyOptions(t2) {
var _a2;
return (_a2 = this.elementProperties.get(t2)) != null ? _a2 : y$1;
}
static _$Ei() {
if (this.hasOwnProperty(d$1("elementProperties"))) return;
const t2 = n$2(this);
t2.finalize(), void 0 !== t2.l && (this.l = [...t2.l]), this.elementProperties = new Map(t2.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(d$1("finalized"))) return;
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
const t3 = this.properties, s2 = [...h$1(t3), ...o$3(t3)];
for (const i2 of s2) this.createProperty(i2, t3[i2]);
}
const t2 = this[Symbol.metadata];
if (null !== t2) {
const s2 = litPropertyMetadata.get(t2);
if (void 0 !== s2) for (const [t3, i2] of s2) this.elementProperties.set(t3, i2);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [t3, s2] of this.elementProperties) {
const i2 = this._$Eu(t3, s2);
void 0 !== i2 && this._$Eh.set(i2, t3);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(s2) {
const i2 = [];
if (Array.isArray(s2)) {
const e2 = new Set(s2.flat(1 / 0).reverse());
for (const s3 of e2) i2.unshift(c$2(s3));
} else void 0 !== s2 && i2.push(c$2(s2));
return i2;
}
static _$Eu(t2, s2) {
const i2 = s2.attribute;
return false === i2 ? void 0 : "string" == typeof i2 ? i2 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
}
constructor() {
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
}
_$Ev() {
var _a2;
this._$ES = new Promise((t2) => this.enableUpdating = t2), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (_a2 = this.constructor.l) == null ? void 0 : _a2.forEach((t2) => t2(this));
}
addController(t2) {
var _a2, _b3;
((_a2 = this._$EO) != null ? _a2 : this._$EO = /* @__PURE__ */ new Set()).add(t2), void 0 !== this.renderRoot && this.isConnected && ((_b3 = t2.hostConnected) == null ? void 0 : _b3.call(t2));
}
removeController(t2) {
var _a2;
(_a2 = this._$EO) == null ? void 0 : _a2.delete(t2);
}
_$E_() {
const t2 = /* @__PURE__ */ new Map(), s2 = this.constructor.elementProperties;
for (const i2 of s2.keys()) this.hasOwnProperty(i2) && (t2.set(i2, this[i2]), delete this[i2]);
t2.size > 0 && (this._$Ep = t2);
}
createRenderRoot() {
var _a2;
const t2 = (_a2 = this.shadowRoot) != null ? _a2 : this.attachShadow(this.constructor.shadowRootOptions);
return S$1(t2, this.constructor.elementStyles), t2;
}
connectedCallback() {
var _a2, _b3;
(_a2 = this.renderRoot) != null ? _a2 : this.renderRoot = this.createRenderRoot(), this.enableUpdating(true), (_b3 = this._$EO) == null ? void 0 : _b3.forEach((t2) => {
var _a3;
return (_a3 = t2.hostConnected) == null ? void 0 : _a3.call(t2);
});
}
enableUpdating(t2) {
}
disconnectedCallback() {
var _a2;
(_a2 = this._$EO) == null ? void 0 : _a2.forEach((t2) => {
var _a3;
return (_a3 = t2.hostDisconnected) == null ? void 0 : _a3.call(t2);
});
}
attributeChangedCallback(t2, s2, i2) {
this._$AK(t2, i2);
}
_$EC(t2, s2) {
var _a2;
const i2 = this.constructor.elementProperties.get(t2), e2 = this.constructor._$Eu(t2, i2);
if (void 0 !== e2 && true === i2.reflect) {
const r3 = (void 0 !== ((_a2 = i2.converter) == null ? void 0 : _a2.toAttribute) ? i2.converter : u$1).toAttribute(s2, i2.type);
this._$Em = t2, null == r3 ? this.removeAttribute(e2) : this.setAttribute(e2, r3), this._$Em = null;
}
}
_$AK(t2, s2) {
var _a2;
const i2 = this.constructor, e2 = i2._$Eh.get(t2);
if (void 0 !== e2 && this._$Em !== e2) {
const t3 = i2.getPropertyOptions(e2), r3 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== ((_a2 = t3.converter) == null ? void 0 : _a2.fromAttribute) ? t3.converter : u$1;
this._$Em = e2, this[e2] = r3.fromAttribute(s2, t3.type), this._$Em = null;
}
}
requestUpdate(t2, s2, i2) {
var _a2;
if (void 0 !== t2) {
if (i2 != null ? i2 : i2 = this.constructor.getPropertyOptions(t2), !((_a2 = i2.hasChanged) != null ? _a2 : f$1)(this[t2], s2)) return;
this.P(t2, s2, i2);
}
false === this.isUpdatePending && (this._$ES = this._$ET());
}
P(t2, s2, i2) {
var _a2;
this._$AL.has(t2) || this._$AL.set(t2, s2), true === i2.reflect && this._$Em !== t2 && ((_a2 = this._$Ej) != null ? _a2 : this._$Ej = /* @__PURE__ */ new Set()).add(t2);
}
_$ET() {
return __async(this, null, function* () {
this.isUpdatePending = true;
try {
yield this._$ES;
} catch (t3) {
Promise.reject(t3);
}
const t2 = this.scheduleUpdate();
return null != t2 && (yield t2), !this.isUpdatePending;
});
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
var _a2, _b3;
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if ((_a2 = this.renderRoot) != null ? _a2 : this.renderRoot = this.createRenderRoot(), this._$Ep) {
for (const [t4, s3] of this._$Ep) this[t4] = s3;
this._$Ep = void 0;
}
const t3 = this.constructor.elementProperties;
if (t3.size > 0) for (const [s3, i2] of t3) true !== i2.wrapped || this._$AL.has(s3) || void 0 === this[s3] || this.P(s3, this[s3], i2);
}
let t2 = false;
const s2 = this._$AL;
try {
t2 = this.shouldUpdate(s2), t2 ? (this.willUpdate(s2), (_b3 = this._$EO) == null ? void 0 : _b3.forEach((t3) => {
var _a3;
return (_a3 = t3.hostUpdate) == null ? void 0 : _a3.call(t3);
}), this.update(s2)) : this._$EU();
} catch (s3) {
throw t2 = false, this._$EU(), s3;
}
t2 && this._$AE(s2);
}
willUpdate(t2) {
}
_$AE(t2) {
var _a2;
(_a2 = this._$EO) == null ? void 0 : _a2.forEach((t3) => {
var _a3;
return (_a3 = t3.hostUpdated) == null ? void 0 : _a3.call(t3);
}), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
}
_$EU() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(t2) {
return true;
}
update(t2) {
this._$Ej && (this._$Ej = this._$Ej.forEach((t3) => this._$EC(t3, this[t3]))), this._$EU();
}
updated(t2) {
}
firstUpdated(t2) {
}
}
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d$1("elementProperties")] = /* @__PURE__ */ new Map(), b[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1 == null ? void 0 : p$1({ ReactiveElement: b }), ((_c = a$1.reactiveElementVersions) != null ? _c : a$1.reactiveElementVersions = []).push("2.0.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t$2 = globalThis, i$2 = t$2.trustedTypes, s = i$2 ? i$2.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$2 = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, o$2 = "?" + h, n$1 = `<${o$2}>`, r$2 = document, l = () => r$2.createComment(""), c = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, a = Array.isArray, u = (t2) => a(t2) || "function" == typeof (t2 == null ? void 0 : t2[Symbol.iterator]), d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), x = y(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r$2.createTreeWalker(r$2, 129);
function P(t2, i2) {
if (!a(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
return void 0 !== s ? s.createHTML(i2) : i2;
}
const V = (t2, i2) => {
const s2 = t2.length - 1, o2 = [];
let r3, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = f;
for (let i3 = 0; i3 < s2; i3++) {
const s3 = t2[i3];
let a2, u2, d2 = -1, y2 = 0;
for (; y2 < s3.length && (c2.lastIndex = y2, u2 = c2.exec(s3), null !== u2); ) y2 = c2.lastIndex, c2 === f ? "!--" === u2[1] ? c2 = v : void 0 !== u2[1] ? c2 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r3 = RegExp("</" + u2[2], "g")), c2 = m) : void 0 !== u2[3] && (c2 = m) : c2 === m ? ">" === u2[0] ? (c2 = r3 != null ? r3 : f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? m : '"' === u2[3] ? g : p) : c2 === g || c2 === p ? c2 = m : c2 === v || c2 === _ ? c2 = f : (c2 = m, r3 = void 0);
const x2 = c2 === m && t2[i3 + 1].startsWith("/>") ? " " : "";
l2 += c2 === f ? s3 + n$1 : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e$2 + s3.slice(d2) + h + x2) : s3 + h + (-2 === d2 ? i3 : x2);
}
return [P(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), o2];
};
class N {
constructor({ strings: t2, _$litType$: s2 }, n3) {
let r3;
this.parts = [];
let c2 = 0, a2 = 0;
const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = V(t2, s2);
if (this.el = N.createElement(f2, n3), C.currentNode = this.el.content, 2 === s2 || 3 === s2) {
const t3 = this.el.content.firstChild;
t3.replaceWith(...t3.childNodes);
}
for (; null !== (r3 = C.nextNode()) && d2.length < u2; ) {
if (1 === r3.nodeType) {
if (r3.hasAttributes()) for (const t3 of r3.getAttributeNames()) if (t3.endsWith(e$2)) {
const i2 = v2[a2++], s3 = r3.getAttribute(t3).split(h), e2 = /([.?@])?(.*)/.exec(i2);
d2.push({ type: 1, index: c2, name: e2[2], strings: s3, ctor: "." === e2[1] ? H : "?" === e2[1] ? I : "@" === e2[1] ? L : k }), r3.removeAttribute(t3);
} else t3.startsWith(h) && (d2.push({ type: 6, index: c2 }), r3.removeAttribute(t3));
if ($.test(r3.tagName)) {
const t3 = r3.textContent.split(h), s3 = t3.length - 1;
if (s3 > 0) {
r3.textContent = i$2 ? i$2.emptyScript : "";
for (let i2 = 0; i2 < s3; i2++) r3.append(t3[i2], l()), C.nextNode(), d2.push({ type: 2, index: ++c2 });
r3.append(t3[s3], l());
}
}
} else if (8 === r3.nodeType) if (r3.data === o$2) d2.push({ type: 2, index: c2 });
else {
let t3 = -1;
for (; -1 !== (t3 = r3.data.indexOf(h, t3 + 1)); ) d2.push({ type: 7, index: c2 }), t3 += h.length - 1;
}
c2++;
}
}
static createElement(t2, i2) {
const s2 = r$2.createElement("template");
return s2.innerHTML = t2, s2;
}
}
function S(t2, i2, s2 = t2, e2) {
var _a2, _b2, _c2;
if (i2 === T) return i2;
let h2 = void 0 !== e2 ? (_a2 = s2._$Co) == null ? void 0 : _a2[e2] : s2._$Cl;
const o2 = c(i2) ? void 0 : i2._$litDirective$;
return (h2 == null ? void 0 : h2.constructor) !== o2 && ((_b2 = h2 == null ? void 0 : h2._$AO) == null ? void 0 : _b2.call(h2, false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? ((_c2 = s2._$Co) != null ? _c2 : s2._$Co = [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = S(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
}
class M {
constructor(t2, i2) {
this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
u(t2) {
var _a2;
const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = ((_a2 = t2 == null ? void 0 : t2.creationScope) != null ? _a2 : r$2).importNode(i2, true);
C.currentNode = e2;
let h2 = C.nextNode(), o2 = 0, n3 = 0, l2 = s2[0];
for (; void 0 !== l2; ) {
if (o2 === l2.index) {
let i3;
2 === l2.type ? i3 = new R(h2, h2.nextSibling, this, t2) : 1 === l2.type ? i3 = new l2.ctor(h2, l2.name, l2.strings, this, t2) : 6 === l2.type && (i3 = new z(h2, this, t2)), this._$AV.push(i3), l2 = s2[++n3];
}
o2 !== (l2 == null ? void 0 : l2.index) && (h2 = C.nextNode(), o2++);
}
return C.currentNode = r$2, e2;
}
p(t2) {
let i2 = 0;
for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
}
}
class R {
get _$AU() {
var _a2, _b2;
return (_b2 = (_a2 = this._$AM) == null ? void 0 : _a2._$AU) != null ? _b2 : this._$Cv;
}
constructor(t2, i2, s2, e2) {
var _a2;
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = (_a2 = e2 == null ? void 0 : e2.isConnected) != null ? _a2 : true;
}
get parentNode() {
let t2 = this._$AA.parentNode;
const i2 = this._$AM;
return void 0 !== i2 && 11 === (t2 == null ? void 0 : t2.nodeType) && (t2 = i2.parentNode), t2;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(t2, i2 = this) {
t2 = S(this, t2, i2), c(t2) ? t2 === E || null == t2 || "" === t2 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : u(t2) ? this.k(t2) : this._(t2);
}
O(t2) {
return this._$AA.parentNode.insertBefore(t2, this._$AB);
}
T(t2) {
this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
}
_(t2) {
this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(r$2.createTextNode(t2)), this._$AH = t2;
}
$(t2) {
var _a2;
const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = N.createElement(P(s2.h, s2.h[0]), this.options)), s2);
if (((_a2 = this._$AH) == null ? void 0 : _a2._$AD) === e2) this._$AH.p(i2);
else {
const t3 = new M(e2, this), s3 = t3.u(this.options);
t3.p(i2), this.T(s3), this._$AH = t3;
}
}
_$AC(t2) {
let i2 = A.get(t2.strings);
return void 0 === i2 && A.set(t2.strings, i2 = new N(t2)), i2;
}
k(t2) {
a(this._$AH) || (this._$AH = [], this._$AR());
const i2 = this._$AH;
let s2, e2 = 0;
for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new R(this.O(l()), this.O(l()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
}
_$AR(t2 = this._$AA.nextSibling, i2) {
var _a2;
for ((_a2 = this._$AP) == null ? void 0 : _a2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
const i3 = t2.nextSibling;
t2.remove(), t2 = i3;
}
}
setConnected(t2) {
var _a2;
void 0 === this._$AM && (this._$Cv = t2, (_a2 = this._$AP) == null ? void 0 : _a2.call(this, t2));
}
}
class k {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(t2, i2, s2, e2, h2) {
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = E;
}
_$AI(t2, i2 = this, s2, e2) {
const h2 = this.strings;
let o2 = false;
if (void 0 === h2) t2 = S(this, t2, i2, 0), o2 = !c(t2) || t2 !== this._$AH && t2 !== T, o2 && (this._$AH = t2);
else {
const e3 = t2;
let n3, r3;
for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r3 = S(this, e3[s2 + n3], i2, n3), r3 === T && (r3 = this._$AH[n3]), o2 || (o2 = !c(r3) || r3 !== this._$AH[n3]), r3 === E ? t2 = E : t2 !== E && (t2 += (r3 != null ? r3 : "") + h2[n3 + 1]), this._$AH[n3] = r3;
}
o2 && !e2 && this.j(t2);
}
j(t2) {
t2 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 != null ? t2 : "");
}
}
class H extends k {
constructor() {
super(...arguments), this.type = 3;
}
j(t2) {
this.element[this.name] = t2 === E ? void 0 : t2;
}
}
class I extends k {
constructor() {
super(...arguments), this.type = 4;
}
j(t2) {
this.element.toggleAttribute(this.name, !!t2 && t2 !== E);
}
}
class L extends k {
constructor(t2, i2, s2, e2, h2) {
super(t2, i2, s2, e2, h2), this.type = 5;
}
_$AI(t2, i2 = this) {
var _a2;
if ((t2 = (_a2 = S(this, t2, i2, 0)) != null ? _a2 : E) === T) return;
const s2 = this._$AH, e2 = t2 === E && s2 !== E || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== E && (s2 === E || e2);
e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
}
handleEvent(t2) {
var _a2, _b2;
"function" == typeof this._$AH ? this._$AH.call((_b2 = (_a2 = this.options) == null ? void 0 : _a2.host) != null ? _b2 : this.element, t2) : this._$AH.handleEvent(t2);
}
}
class z {
constructor(t2, i2, s2) {
this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t2) {
S(this, t2);
}
}
const j = t$2.litHtmlPolyfillSupport;
j == null ? void 0 : j(N, R), ((_d = t$2.litHtmlVersions) != null ? _d : t$2.litHtmlVersions = []).push("3.2.1");
const B = (t2, i2, s2) => {
var _a2, _b2;
const e2 = (_a2 = s2 == null ? void 0 : s2.renderBefore) != null ? _a2 : i2;
let h2 = e2._$litPart$;
if (void 0 === h2) {
const t3 = (_b2 = s2 == null ? void 0 : s2.renderBefore) != null ? _b2 : null;
e2._$litPart$ = h2 = new R(i2.insertBefore(l(), t3), t3, void 0, s2 != null ? s2 : {});
}
return h2._$AI(t2), h2;
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
let r$1 = class r extends b {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
var _a2, _b2;
const t2 = super.createRenderRoot();
return (_b2 = (_a2 = this.renderOptions).renderBefore) != null ? _b2 : _a2.renderBefore = t2.firstChild, t2;
}
update(t2) {
const s2 = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = B(s2, this.renderRoot, this.renderOptions);
}
connectedCallback() {
var _a2;
super.connectedCallback(), (_a2 = this._$Do) == null ? void 0 : _a2.setConnected(true);
}
disconnectedCallback() {
var _a2;
super.disconnectedCallback(), (_a2 = this._$Do) == null ? void 0 : _a2.setConnected(false);
}
render() {
return T;
}
};
r$1._$litElement$ = true, r$1["finalized"] = true, (_e = globalThis.litElementHydrateSupport) == null ? void 0 : _e.call(globalThis, { LitElement: r$1 });
const i$1 = globalThis.litElementPolyfillSupport;
i$1 == null ? void 0 : i$1({ LitElement: r$1 });
((_f = globalThis.litElementVersions) != null ? _f : globalThis.litElementVersions = []).push("4.1.1");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t$1 = (t2) => (e2, o2) => {
void 0 !== o2 ? o2.addInitializer(() => {
customElements.define(t2, e2);
}) : customElements.define(t2, e2);
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const o$1 = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r2 = (t2 = o$1, e2, r3) => {
const { kind: n3, metadata: i2 } = r3;
let s2 = globalThis.litPropertyMetadata.get(i2);
if (void 0 === s2 && globalThis.litPropertyMetadata.set(i2, s2 = /* @__PURE__ */ new Map()), s2.set(r3.name, t2), "accessor" === n3) {
const { name: o2 } = r3;
return { set(r4) {
const n4 = e2.get.call(this);
e2.set.call(this, r4), this.requestUpdate(o2, n4, t2);
}, init(e3) {
return void 0 !== e3 && this.P(o2, void 0, t2), e3;
} };
}
if ("setter" === n3) {
const { name: o2 } = r3;
return function(r4) {
const n4 = this[o2];
e2.call(this, r4), this.requestUpdate(o2, n4, t2);
};
}
throw Error("Unsupported decorator location: " + n3);
};
function n2(t2) {
return (e2, o2) => "object" == typeof o2 ? r2(t2, e2, o2) : ((t3, e3, o3) => {
const r3 = e3.hasOwnProperty(o3);
return e3.constructor.createProperty(o3, r3 ? __spreadProps(__spreadValues({}, t3), { wrapped: true }) : t3), r3 ? Object.getOwnPropertyDescriptor(e3, o3) : void 0;
})(t2, e2, o2);
}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$1 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
class i {
constructor(t2) {
}
get _$AU() {
return this._$AM._$AU;
}
_$AT(t2, e2, i2) {
this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
}
_$AS(t2, e2) {
return this.update(t2, e2);
}
update(t2, e2) {
return this.render(...e2);
}
}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class e extends i {
constructor(i2) {
if (super(i2), this.it = E, i2.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
}
render(r3) {
if (r3 === E || null == r3) return this._t = void 0, this.it = r3;
if (r3 === T) return r3;
if ("string" != typeof r3) throw Error(this.constructor.directiveName + "() called with a non-string value");
if (r3 === this.it) return this._t;
this.it = r3;
const s2 = [r3];
return s2.raw = s2, this._t = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
}
}
e.directiveName = "unsafeHTML", e.resultType = 1;
const o = e$1(e);
function icon() {
return `<svg class="pp-shipping-icon" style="margin-right: 4px;" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.75 4.5C4.33579 4.5 4 4.83579 4 5.25C4 5.66421 4.33579 6 4.75 6H8C8.55228 6 9 6.44772 9 7C9 7.55228 8.55228 8 8 8H3.25C2.83579 8 2.5 8.33579 2.5 8.75C2.5 9.16421 2.83579 9.5 3.25 9.5H6.25C6.66421 9.5 7 9.83579 7 10.25C7 10.6642 6.66421 11 6.25 11H3.75C3.33579 11 3 11.3358 3 11.75C3 12.1642 3.33579 12.5 3.75 12.5H4.20802C4.07422 12.8062 4 13.1444 4 13.5C4 14.8807 5.11929 16 6.5 16C7.88071 16 9 14.8807 9 13.5C9 13.4156 8.99582 13.3322 8.98766 13.25H12.0123C12.0042 13.3322 12 13.4156 12 13.5C12 14.8807 13.1193 16 14.5 16C15.8807 16 17 14.8807 17 13.5C17 13.3627 16.9889 13.2279 16.9676 13.0966C17.5763 12.8226 18 12.2108 18 11.5V10.2808C18 9.47776 17.4535 8.77779 16.6744 8.58303L14.9922 8.16247C14.9055 8.1408 14.837 8.07452 14.8125 7.98862L14.3856 6.49452C14.0483 5.31394 12.9692 4.5 11.7414 4.5H4.75ZM7.5 13.5C7.5 14.0523 7.05228 14.5 6.5 14.5C5.94772 14.5 5.5 14.0523 5.5 13.5C5.5 12.9477 5.94772 12.5 6.5 12.5C7.05228 12.5 7.5 12.9477 7.5 13.5ZM15.5 13.5C15.5 14.0523 15.0523 14.5 14.5 14.5C13.9477 14.5 13.5 14.0523 13.5 13.5C13.5 12.9477 13.9477 12.5 14.5 12.5C15.0523 12.5 15.5 12.9477 15.5 13.5Z" fill="currentColor"/></svg>`;
}
const countries = [
{
"code": "AF",
"name": "Afghanistan",
"provinces": []
},
{
"code": "AX",
"name": "Åland Islands",
"provinces": []
},
{
"code": "AL",
"name": "Albania",
"provinces": []
},
{
"code": "DZ",
"name": "Algeria",
"provinces": []
},
{
"code": "AD",
"name": "Andorra",
"provinces": []
},
{
"code": "AO",
"name": "Angola",
"provinces": []
},
{
"code": "AI",
"name": "Anguilla",
"provinces": []
},
{
"code": "AG",
"name": "Antigua & Barbuda",
"provinces": []
},
{
"code": "AR",
"name": "Argentina",
"provinces": [
{
"name": "Buenos Aires Province",
"code": "B"
},
{
"name": "Catamarca",
"code": "K"
},
{
"name": "Chaco",
"code": "H"
},
{
"name": "Chubut",
"code": "U"
},
{
"name": "Buenos Aires (Autonomous City)",
"code": "C"
},
{
"name": "Córdoba",
"code": "X"
},
{
"name": "Corrientes",
"code": "W"
},
{
"name": "Entre Ríos",
"code": "E"
},
{
"name": "Formosa",
"code": "P"
},
{
"name": "Jujuy",
"code": "Y"
},
{
"name": "La Pampa",
"code": "L"
},
{
"name": "La Rioja",
"code": "F"
},
{
"name": "Mendoza",
"code": "M"
},
{
"name": "Misiones",
"code": "N"
},
{
"name": "Neuquén",
"code": "Q"
},
{
"name": "Río Negro",
"code": "R"
},
{
"name": "Salta",
"code": "A"
},
{
"name": "San Juan",
"code": "J"
},
{
"name": "San Luis",
"code": "D"
},
{
"name": "Santa Cruz",
"code": "Z"
},
{
"name": "Santa Fe",
"code": "S"
},
{
"name": "Santiago del Estero",
"code": "G"
},
{
"name": "Tierra del Fuego",
"code": "V"
},
{
"name": "Tucumán",
"code": "T"
}
]
},
{
"code": "AM",
"name": "Armenia",
"provinces": []
},
{
"code": "AW",
"name": "Aruba",
"provinces": []
},
{
"code": "AC",
"name": "Ascension Island",
"provinces": []
},
{
"code": "AU",
"name": "Australia",
"provinces": [
{
"name": "Australian Capital Territory",
"code": "ACT"
},
{
"name": "New South Wales",
"code": "NSW"
},
{
"name": "Northern Territory",
"code": "NT"
},
{
"name": "Queensland",
"code": "QLD"
},
{
"name": "South Australia",
"code": "SA"
},
{
"name": "Tasmania",
"code": "TAS"
},
{
"name": "Victoria",
"code": "VIC"
},
{
"name": "Western Australia",
"code": "WA"
}
]
},
{
"code": "AT",
"name": "Austria",
"provinces": []
},
{
"code": "AZ",
"name": "Azerbaijan",
"provinces": []
},
{
"code": "BS",
"name": "Bahamas",
"provinces": []
},
{
"code": "BH",
"name": "Bahrain",
"provinces": []
},
{
"code": "BD",
"name": "Bangladesh",
"provinces": []
},
{
"code": "BB",
"name": "Barbados",
"provinces": []
},
{
"code": "BY",
"name": "Belarus",
"provinces": []
},
{
"code": "BE",
"name": "Belgium",
"provinces": []
},
{
"code": "BZ",
"name": "Belize",
"provinces": []
},
{
"code": "BJ",
"name": "Benin",
"provinces": []
},
{
"code": "BM",
"name": "Bermuda",
"provinces": []
},
{
"code": "BT",
"name": "Bhutan",
"provinces": []
},
{
"code": "BO",
"name": "Bolivia",
"provinces": []
},
{
"code": "BA",
"name": "Bosnia & Herzegovina",
"provinces": []
},
{
"code": "BW",
"name": "Botswana",
"provinces": []
},
{
"code": "BR",
"name": "Brazil",
"provinces": [
{
"name": "Acre",
"code": "AC"
},
{
"name": "Alagoas",
"code": "AL"
},
{
"name": "Amapá",
"code": "AP"
},
{
"name": "Amazonas",
"code": "AM"
},
{
"name": "Bahia",
"code": "BA"
},
{
"name": "Ceará",
"code": "CE"
},
{
"name": "Federal District",
"code": "DF"
},
{
"name": "Espírito Santo",
"code": "ES"
},
{
"name": "Goiás",
"code": "GO"
},
{
"name": "Maranhão",
"code": "MA"
},
{
"name": "Mato Grosso",
"code": "MT"
},
{
"name": "Mato Grosso do Sul",
"code": "MS"
},
{
"name": "Minas Gerais",
"code": "MG"
},
{
"name": "Pará",
"code": "PA"
},
{
"name": "Paraíba",
"code": "PB"
},
{
"name": "Paraná",
"code": "PR"
},
{
"name": "Pernambuco",
"code": "PE"
},
{
"name": "Piauí",
"code": "PI"
},
{
"name": "Rio Grande do Norte",
"code": "RN"
},
{
"name": "Rio Grande do Sul",
"code": "RS"
},
{
"name": "Rio de Janeiro",
"code": "RJ"
},
{
"name": "Rondônia",
"code": "RO"
},
{
"name": "Roraima",
"code": "RR"
},
{
"name": "Santa Catarina",
"code": "SC"
},
{
"name": "São Paulo",
"code": "SP"
},
{
"name": "Sergipe",
"code": "SE"
},
{
"name": "Tocantins",
"code": "TO"
}
]
},
{
"code": "IO",
"name": "British Indian Ocean Territory",
"provinces": []
},
{
"code": "VG",
"name": "British Virgin Islands",
"provinces": []
},
{
"code": "BN",
"name": "Brunei",
"provinces": []
},
{
"code": "BG",
"name": "Bulgaria",
"provinces": []
},
{
"code": "BF",
"name": "Burkina Faso",
"provinces": []
},
{
"code": "BI",
"name": "Burundi",
"provinces": []
},
{
"code": "KH",
"name": "Cambodia",
"provinces": []
},
{
"code": "CM",
"name": "Cameroon",
"provinces": []
},
{
"code": "CA",
"name": "Canada",
"provinces": [
{
"name": "Alberta",
"code": "AB"
},
{
"name": "British Columbia",
"code": "BC"
},
{
"name": "Manitoba",
"code": "MB"
},
{
"name": "New Brunswick",
"code": "NB"
},
{
"name": "Newfoundland and Labrador",
"code": "NL"
},
{
"name": "Northwest Territories",
"code": "NT"
},
{
"name": "Nova Scotia",
"code": "NS"
},
{
"name": "Nunavut",
"code": "NU"
},
{
"name": "Ontario",
"code": "ON"
},
{
"name": "Prince Edward Island",
"code": "PE"
},
{
"name": "Quebec",
"code": "QC"
},
{
"name": "Saskatchewan",
"code": "SK"
},
{
"name": "Yukon",
"code": "YT"
}
]
},
{
"code": "CV",
"name": "Cape Verde",
"provinces": []
},
{
"code": "BQ",
"name": "Caribbean Netherlands",
"provinces": []
},
{
"code": "KY",
"name": "Cayman Islands",
"provinces": []
},
{
"code": "CF",
"name": "Central African Republic",
"provinces": []
},
{
"code": "TD",
"name": "Chad",
"provinces": []
},
{
"code": "CL",
"name": "Chile",
"provinces": [
{
"name": "Arica y Parinacota",
"code": "AP"
},
{
"name": "Tarapacá",
"code": "TA"
},
{
"name": "Antofagasta",
"code": "AN"
},
{
"name": "Atacama",
"code": "AT"
},
{
"name": "Coquimbo",
"code": "CO"
},
{
"name": "Valparaíso",
"code": "VS"
},
{
"name": "Santiago Metropolitan",
"code": "RM"
},
{
"name": "Libertador General Bernardo O’Higgins",
"code": "LI"
},
{
"name": "Maule",
"code": "ML"
},
{
"name": "Ñuble",
"code": "NB"
},
{
"name": "Bío Bío",
"code": "BI"
},
{
"name": "Araucanía",
"code": "AR"
},
{
"name": "Los Ríos",
"code": "LR"
},
{
"name": "Los Lagos",
"code": "LL"
},
{
"name": "Aysén",
"code": "AI"
},
{
"name": "Magallanes Region",
"code": "MA"
}
]
},
{
"code": "CN",
"name": "China",
"provinces": [
{
"name": "Anhui",
"code": "AH"
},
{
"name": "Beijing",
"code": "BJ"
},
{
"name": "Chongqing",
"code": "CQ"
},
{
"name": "Fujian",
"code": "FJ"
},
{
"name": "Gansu",
"code": "GS"
},
{
"name": "Guangdong",
"code": "GD"
},
{
"name": "Guangxi",
"code": "GX"
},
{
"name": "Guizhou",
"code": "GZ"
},
{
"name": "Hainan",
"code": "HI"
},
{
"name": "Hebei",
"code": "HE"
},
{
"name": "Heilongjiang",
"code": "HL"
},
{
"name": "Henan",
"code": "HA"
},
{
"name": "Hubei",
"code": "HB"
},
{
"name": "Hunan",
"code": "HN"
},
{
"name": "Inner Mongolia",
"code": "NM"
},
{
"name": "Jiangsu",
"code": "JS"
},
{
"name": "Jiangxi",
"code": "JX"
},
{
"name": "Jilin",
"code": "JL"
},
{
"name": "Liaoning",
"code": "LN"
},
{
"name": "Ningxia",
"code": "NX"
},
{
"name": "Qinghai",
"code": "QH"
},
{
"name": "Shaanxi",
"code": "SN"
},
{
"name": "Shandong",
"code": "SD"
},
{
"name": "Shanghai",
"code": "SH"
},
{
"name": "Shanxi",
"code": "SX"
},
{
"name": "Sichuan",
"code": "SC"
},
{
"name": "Tianjin",
"code": "TJ"
},
{
"name": "Xinjiang",
"code": "XJ"
},
{
"name": "Tibet",
"code": "YZ"
},
{
"name": "Yunnan",
"code": "YN"
},
{
"name": "Zhejiang",
"code": "ZJ"
}
]
},
{
"code": "CX",
"name": "Christmas Island",
"provinces": []
},
{
"code": "CC",
"name": "Cocos (Keeling) Islands",
"provinces": []
},
{
"code": "CO",
"name": "Colombia",
"provinces": [
{
"name": "Capital District",
"code": "DC"
},
{
"name": "Amazonas",
"code": "AMA"
},
{
"name": "Antioquia",
"code": "ANT"
},
{
"name": "Arauca",
"code": "ARA"
},
{
"name": "Atlántico",
"code": "ATL"
},
{
"name": "Bolívar",
"code": "BOL"
},
{
"name": "Boyacá",
"code": "BOY"
},
{
"name": "Caldas",
"code": "CAL"
},
{
"name": "Caquetá",
"code": "CAQ"
},
{
"name": "Casanare",
"code": "CAS"
},
{
"name": "Cauca",
"code": "CAU"
},
{
"name": "Cesar",
"code": "CES"
},
{
"name": "Chocó",
"code": "CHO"
},
{
"name": "Córdoba",
"code": "COR"
},
{
"name": "Cundinamarca",
"code": "CUN"
},
{
"name": "Guainía",
"code": "GUA"
},
{
"name": "Guaviare",
"code": "GUV"
},
{
"name": "Huila",
"code": "HUI"
},
{
"name": "La Guajira",
"code": "LAG"
},
{
"name": "Magdalena",
"code": "MAG"
},
{
"name": "Meta",
"code": "MET"
},
{
"name": "Nariño",
"code": "NAR"
},
{
"name": "Norte de Santander",
"code": "NSA"
},
{
"name": "Putumayo",
"code": "PUT"
},
{
"name": "Quindío",
"code": "QUI"
},
{
"name": "Risaralda",
"code": "RIS"
},
{
"name": "San Andrés & Providencia",
"code": "SAP"
},
{
"name": "Santander",
"code": "SAN"
},
{
"name": "Sucre",
"code": "SUC"
},
{
"name": "Tolima",
"code": "TOL"
},
{
"name": "Valle del Cauca",
"code": "VAC"
},
{
"name": "Vaupés",
"code": "VAU"
},
{
"name": "Vichada",
"code": "VID"
}
]
},
{
"code": "KM",
"name": "Comoros",
"provinces": []
},
{
"code": "CG",
"name": "Congo - Brazzaville",
"provinces": []
},
{
"code": "CD",
"name": "Congo - Kinshasa",
"provinces": []
},
{
"code": "CK",
"name": "Cook Islands",
"provinces": []
},
{
"code": "CR",
"name": "Costa Rica",
"provinces": [
{
"name": "Alajuela",
"code": "CR-A"
},
{
"name": "Cartago",
"code": "CR-C"
},
{
"name": "Guanacaste",
"code": "CR-G"
},
{
"name": "Heredia",
"code": "CR-H"
},
{
"name": "Limón",
"code": "CR-L"
},
{
"name": "Puntarenas",
"code": "CR-P"
},
{
"name": "San José",
"code": "CR-SJ"
}
]
},
{
"code": "HR",
"name": "Croatia",
"provinces": []
},
{
"code": "CW",
"name": "Curaçao",
"provinces": []
},
{
"code": "CY",
"name": "Cyprus",
"provinces": []
},
{
"code": "CZ",
"name": "Czechia",
"provinces": []
},
{
"code": "CI",
"name": "Côte d’Ivoire",
"provinces": []
},
{
"code": "DK",
"name": "Denmark",
"pro