import{i as t}from"./071c0ba4.B9zTdxJO.js";var e={address1:"address1",address2:"address2",city:"city",company:"company",country:"countryCode",district:"district",firstName:"firstName",lastName:"lastName",line2:"additionalInformation",phone:"phone",province:"provinceCode",streetName:"streetName",streetNumber:"streetNumber",subdistrict:"subdistrict",zip:"zip"},r=new Map(Object.entries({address1:["streetName","streetNumber"],address2:["additionalInformation","district","subdistrict"]}).flatMap(([t,e])=>e.map(e=>[e,t]))),n=/[A-Za-z0-9]+/g;function s({country:t,extendedAddressMode:s}){if(!t||t.isFallback)return;const a=s.getFromCountry(t),o=s.getFormatFromCountry(t,a),i=new Set;for(const d of o.match(n)??[]){const t="concatenated"===a&&"neighborhood"===d?"district":e[d];if(!t)continue;const n=r.get(t);n&&i.add(n),i.add(t)}return[...i]}async function a({countryCode:t,countryDetails:e,extendedAddressMode:r}){if(t)return s({country:await e.fetch(t),extendedAddressMode:r})}function o(e){return!t(e).earlierThan("2026-10")}function i(t){return o(t)}function d(t){return o(t)}function c(t){return o(t)}export{a,s as i,d as n,i as r,c as t};