PageSourceSearch

https://www.aliceandolivia.com/cdn/shop/t/314/assets/core-component-country-selects.gZ884yke.min.js

js aliceandolivia.com collected 2026-10-01 10:35:15 UTC 1,615 bytes, 1 lines download raw bytes

1import{B as e}from"./BaseElement.DADCq26n.min.js";import{e as t,n,t as r}from"./vendor-lit.Dzz78LSH.min.js";var i=Object.defineProperty,c=Object.getOwnPropertyDescriptor,o=(e,t,n,r)=>{for(var o,s=r>1?void 0:r?c(t,n):t,l=e.length-1;l>=0;l--)(o=e[l])&&(s=(r?o(t,n,s):o(s))||s);return r&&s&&i(t,n,s),s};let s=class extends e{constructor(){super(),this._handleCountryChange=this._handleCountryChange.bind(this)}firstUpdated(e){var t;super.firstUpdated(e),this.countrySelect&&this.country&&(this.countrySelect.value=this.country),this.provinceSelect&&this.province&&(this.provinceSelect.value=this.province),null==(t=this.countrySelect)||t.addEventListener("change",this._handleCountryChange),this._handleCountryChange()}_handleCountryChange(){if(!this.countrySelect)return;const e=this.countrySelect.selectedOptions[0];if(e){const t=JSON.parse(e.dataset.provinces);t&&t.length>0?(this.provinceSelect.innerHTML="",this.provinceSelect.required=t.length>0,t.forEach(([e,t])=>{const n=document.createElement("option");n.value=e,n.text=t,n.selected=this.province===e,this.provinceSelect.appendChild(n)}),this.provinceSelectField.style.display=""):(this.provinceSelect.required=!1,this.provinceSelect.innerHTML="",this.provinceSelectField.style.display="none")}}};o([t("[data-country-select] select")],s.prototype,"countrySelect",2),o([t("[data-province-select]")],s.prototype,"provinceSelectField",2),o([t("[data-province-select] select")],s.prototype,"provinceSelect",2),o([n({type:String})],s.prototype,"country",2),o([n({type:String})],s.prototype,"province",2),s=o([r("country-selects")],s);export{s as CountrySelects};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.