@soma-vertical-web/multi-lib 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contexts/hooks/useSessionManager.d.ts +27 -0
- package/contexts/index.d.ts +14 -0
- package/index-DsX1pAV4.js +4 -0
- package/index-YdrSlTYb.mjs +2714 -0
- package/index.js +16 -16
- package/index.mjs +4300 -4217
- package/index2.js +1 -1
- package/index2.mjs +305 -302
- package/package.json +1 -1
- package/types/contexts/contexts/search.d.ts +1 -0
- package/types/data/api/search/product/index.d.ts +2 -0
- package/types/data/events/index.d.ts +11 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type EventType = 'session.ping' | 'search.click' | 'search.query';
|
|
2
|
+
type DataType = {
|
|
3
|
+
productId?: string;
|
|
4
|
+
position?: number;
|
|
5
|
+
text?: string;
|
|
6
|
+
misspelled?: boolean;
|
|
7
|
+
match?: number;
|
|
8
|
+
operator?: string;
|
|
9
|
+
};
|
|
10
|
+
type SessionProps = {
|
|
11
|
+
storeId?: string;
|
|
12
|
+
storeUrl?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const INTELLIGENT_SEARCH_COOKIES: {
|
|
15
|
+
ping: string;
|
|
16
|
+
session: string;
|
|
17
|
+
anonymous: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const SESSION_COOKIES: {
|
|
20
|
+
name: string;
|
|
21
|
+
duration: number;
|
|
22
|
+
}[];
|
|
23
|
+
export declare const useSessionManager: ({ storeId, storeUrl }: SessionProps) => {
|
|
24
|
+
sendSearchEvent: (type: EventType, data?: DataType) => Promise<Response>;
|
|
25
|
+
sessionGenerator: () => void;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
package/contexts/index.d.ts
CHANGED
|
@@ -141,6 +141,20 @@ export declare const contexts: {
|
|
|
141
141
|
imgRef: import('react').RefObject<HTMLImageElement | null>;
|
|
142
142
|
scale: number;
|
|
143
143
|
};
|
|
144
|
+
useSessionManager: ({ storeId, storeUrl }: {
|
|
145
|
+
storeId?: string;
|
|
146
|
+
storeUrl?: string;
|
|
147
|
+
}) => {
|
|
148
|
+
sendSearchEvent: (type: "session.ping" | "search.click" | "search.query", data?: {
|
|
149
|
+
productId?: string;
|
|
150
|
+
position?: number;
|
|
151
|
+
text?: string;
|
|
152
|
+
misspelled?: boolean;
|
|
153
|
+
match?: number;
|
|
154
|
+
operator?: string;
|
|
155
|
+
}) => Promise<Response>;
|
|
156
|
+
sessionGenerator: () => void;
|
|
157
|
+
};
|
|
144
158
|
};
|
|
145
159
|
stores: {
|
|
146
160
|
cart: typeof cart;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const Wn=require("jose"),Xn=require("yup"),w=require("react/jsx-runtime"),Vn=require("@soma-vertical-web/core-components");function zn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const j=zn(Xn),Oe=(t,e=!0)=>Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:e?2:0}).format(t),ur=({valueInCents:t,hasFree:e,freeTaxMessage:r})=>t===0?e?r:Oe(0):Oe(t/100),sr=(t,e)=>{const n=(t-e)*100/t;return Math.floor(n)},yt=(t,e)=>{const[r,n]=t.split(e);return{name:r.trim(),size:n?n.trim():""}},fr=(t,e)=>{if(!t)return{};const[r,n]=t.split(e);return{color:r==null?void 0:r.trim(),size:n==null?void 0:n.trim()}},pr=(t,e="tamanho")=>{if(t.additionalProperty){const[r]=t.additionalProperty;return r!=null&&r.name?r.name.toLocaleLowerCase()===e?r.value:t.name:""}return t.name},dr=(t,e)=>t.replace(e,"").trim(),Kn=t=>t.replace(/\//g,""),yr=({items:t,NAME_SPLIT_SYMBOL:e})=>{const r={price:0,listPrice:0,installments:{count:0,value:0}},n=(i,l)=>{var s;l&&(l.sellerId=i.sellerId,l.sellerName=i.sellerName,l.available=!0,l.isSellerDefault=i.sellerDefault);const{Price:u,ListPrice:f,PaymentOptions:{installmentOptions:c}}=i.commertialOffer;r.price=u,r.listPrice=f;const p=(s=c==null?void 0:c[0])==null?void 0:s.installments;if(p){const{count:y,value:d}=p[p.length-1];r.installments={count:y,value:d/100}}};let o=!0;const a=t.reduce((i,l)=>{var c;const u={name:l.name,sku:l.itemId,value:((c=l.Tamanho)==null?void 0:c[0])??yt(l.nameComplete??l.name,e).size,available:!1,sellerId:"",sellerName:"",isSellerDefault:!1},f=l.sellers.filter(p=>(p.sellerDefault&&p.commertialOffer.IsAvailable&&(u.available=!0,n(p,u)),p.commertialOffer.IsAvailable));return!u.isSellerDefault&&f.length>0&&(u.available=!0,n(f[0],{...u,sellerId:f[0].sellerId,sellerName:f[0].sellerName})),u.available===!1&&(o=!1),i.push(u),i},[]);return{...r,sizes:a,allSizesAvailable:o}},vr=t=>t?!t.offers.offers.find(({quantity:e=0})=>e>0):!1,mr=(t,e)=>{const r=t.find(n=>n.availability.includes("InStock")&&n.quantity&&n.listPrice>0&&n.seller.identifier===e);return r||t.find(n=>n.availability.includes("InStock")&&n.quantity&&n.listPrice>0)},gr=({images:t,TEXTURE_IMAGE:e})=>t.find(r=>e.includes(r.imageLabel))??t[0],hr=(t,e)=>{const r=/\/ids\/(\d+)\//,n=t.match(r);return n?t.replace(`/${n[1]}/`,`/${n[1]}-${e.width}-${e.height}/`):t},Sr=(t,e)=>{const r=/\/ids\/(\d+)-(\d+)-(\d+)\//,n=t.match(r);return n?t.replace(`/${n[1]}-${n[2]}-${n[3]}/`,`/${n[1]}-${e.width}-${e.height}/`):t},_r=({images:t,label:e})=>{const r=t.filter(n=>n.keywords===e.first||n.keywords===e.second||n.alternateName===e.first||n.alternateName===e.second);return r.length===0?t.slice(0,2):r},Yn=t=>{const[e,r]=t.split("/").map(Number);if(Number.isNaN(e)||Number.isNaN(r))throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");return r/e},Er=(t,e,r)=>{e&&(t?(e.getAttribute("src")||(e.src=r??""),e.play()):e.pause())},Qn=Object.freeze(Object.defineProperty({__proto__:null,disableSKU:vr,formatPriceToCurrency:Oe,freightParsePrice:ur,getAspectRatio:Yn,getColorAndSizeFromSkuName:fr,getDiscountPercent:sr,getFirstImages:_r,getProductNameWithoutSku:dr,getSKUName:pr,getSkuInfos:yr,getThumbImage:gr,getValidOffer:mr,removeSlashes:Kn,resizingImg:hr,setVideoPlay:Er,splitNameAndSizeFromFullName:yt,updatedResizedImg:Sr},Symbol.toStringTag,{value:"Module"})),Jn={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},T=Promise.resolve(!1),Ar={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>T,addItem:()=>T,addSellerCode:()=>T,addMarketingData:()=>T,emptyCart:()=>({}),removeItem:()=>T,setIsOpen:()=>({}),shipping:()=>T,shippingUpdate:()=>T,toggleServiceToProduct:()=>T,updateItemQuantity:()=>T,insertProfileEmail:()=>T,setRecentlyAddedProducts:()=>({})},vt=t=>t===0,Pr=(t,e)=>{if(!t||t.length===0)return[];let r="";const n=[],o=t.match(/\d+/g)??[];for(const a of o){const i=e[Number(a)];i&&(r+=(r?"/":"")+i,n.push(r))}return n},br=(t,e)=>{const{availability:r,additionalInfo:{brandName:n},bundleItems:o,id:a,uniqueId:i,detailUrl:l,ean:u,imageUrl:f,name:c,listPrice:p,quantity:s,price:y,priceDefinition:d,productCategories:g,productCategoryIds:h,productId:P,refId:O,seller:m,referenceId:R,offerings:I,productRefId:L,skuName:N,sellingPrice:G}=t;return{availability:r,bundleItems:o,referenceId:R,productRefId:L,id:a,ean:u,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:n},categories:Pr(h,g),categoriesIds:h,gtin:O,image:[{alternateName:(e==null?void 0:e.MAIN_IMAGE)??"1",url:f}],name:c,isVariationOf:{name:c,productGroupID:P},sku:a,slug:l,skuName:N},listPrice:p,quantity:s,offerings:I,price:y,priceDefinition:d,sellingPrice:G,seller:m}},Or=(t,e)=>{const r=t.map(n=>({id:n.uniqueId,quantity:n.quantity,seller:n.seller}));return Array.isArray(e)?[...r,...e]:[...r,e]},Rr=(t,e)=>{const r=t.find(n=>n.id===e);if(r){const n=t.map((o,a)=>{var i,l;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(r==null?void 0:r.id)===((l=o.itemOffered)==null?void 0:l.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:n,filterItems:n.filter(o=>o.id!==e)}}return{updateItems:[],filterItems:[]}},Ir=(t,e,r)=>t.filter(n=>n.availability!=="withoutStock"&&n.availability!=="https://schema.org/OutOfStock").map((n,o)=>{var a,i;return n.id===e?{id:n.id,index:o,quantity:r,seller:n.seller,sku:((a=n.itemOffered)==null?void 0:a.sku)??""}:{id:n.id,index:o,quantity:n.quantity,seller:n.seller,sku:((i=n.itemOffered)==null?void 0:i.sku)??""}}),wr=(t,e)=>t.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===e),Zn=(t,e)=>{var r;return Array.isArray(t)?(((r=t==null?void 0:t.find(n=>{var o;return((o=n==null?void 0:n.id)==null?void 0:o.toLowerCase())===e}))==null?void 0:r.value)??0)/100:0},eo=t=>{const e=t.reduce((o,a)=>{const i=vt(a.price)?0:a.quantity;return o+i},0),r=t.reduce((o,a)=>o+a.price*a.quantity,0),n=t.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:e,total:r,subTotal:n}},to=t=>Array.isArray(t)?t.filter(e=>e.availability!=="withoutStock").reduce((e,r)=>e+(vt(r==null?void 0:r.price)?0:r.quantity),0):0,mt=(t,e)=>{const{items:r,orderFormId:n,...o}=t;return{...o,id:n,items:Array.isArray(r)?r.map(a=>br(a,e)):[]}},Tr=(t,e)=>{const r=t.find(n=>n.id===e);return r?r.availability==="unavailableItemFulfillment":!1},ro=(t,e)=>{const r=t.sku,n=t.isVariantOf.hasVariant.find(o=>o.sku===r);return n?n.name.split(e)[1]:"--"},Cr=(t,e,r=!1)=>!t&&e!==""?{code:300,value:e,statusOk:r}:t===e?{code:200,value:e,statusOk:r}:{code:400,value:e,statusOk:r},no=(t,e)=>{const r=new Set;return[t,...e].filter(n=>!r.has(n)&&r.add(n),r)},Nr=(t,e)=>e&&Array.isArray(e)&&e.find(n=>n.id===t)?Promise.resolve(t):Promise.resolve(!1),Dr=(t,e)=>e?Promise.resolve(t[e]):Promise.resolve(!1),xr=async t=>{try{const e=await t();if(typeof e!="boolean")return e}catch(e){console.error(`[Error orderForm]: ${e}`)}return!1},Fr=(t,e)=>{if(e!==-1){const r=Number(t);return r?r+1:1}return t??1},Mr=(t,e)=>Array.isArray(t)?t.filter(r=>e==null?void 0:e.some(n=>n.id===r.id)):[],$r=async(t,e)=>t.then(r=>[...r??[],...e??[]]),oo=async(t,e,r,n)=>{const{priority:o="auto",body:a}=e;return fetch(t,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const l=await i.json();return r?l:mt(l,n)})},Lr=(t,e,r)=>({notifications:[...t.notifications,{id:Date.now(),message:e,callback:r}]}),Ur=t=>[...Array.isArray(t)?t:[t],"faststore"],jr=t=>{const e=t.get("utm_source")||V("utm_source"),r=t.get("utm_campaign")||V("utm_campaign"),n=t.get("utm_medium")||V("utm_medium"),o=t.get("utmi_cp")||V("utmi_cp"),a=t.get("utmi_pc")||V("utmi_pc"),i=t.get("utmi_p")||V("utmi_p");return{...e&&{utmSource:e},...n&&{utmMedium:n},...r&&{utmCampaign:r},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},V=t=>{if(!t||typeof window>"u")return;const e=window.location.href;t=t.replace(/[[\]]/g,"\\$&");const r=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),n=r.exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},Br=(t,e,r="BR")=>{const n=e,o={country:r,addressType:"",postalCode:t||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(n){const a=typeof n=="object"&&"latitude"in n?n.latitude:null,i=typeof n=="object"&&"longitude"in n?n.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},ao=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Jn,addItemOrder:Or,addNotification:Lr,createItemOrder:br,createNewAddress:Br,fetchCartAPI:oo,findItemIndex:wr,findOptions:Mr,findTotalizerValue:Zn,getCategories:Pr,getCode:Cr,getQuantity:Fr,getRemoveId:Nr,getSize:ro,getTotalItems:to,getTotalizer:eo,getUrlParameter:V,getValue:Dr,initialState:Ar,isGift:vt,marketingTagsBuilder:Ur,mergeOptionsPromise:$r,mountMarketingData:jr,orderFormValues:mt,promiseDefault:T,removeQuantity:Rr,updateItemSellerExternal:Tr,updateOrderFormPromise:xr,updateQuantity:Ir,wishlistArray:no},Symbol.toStringTag,{value:"Module"})),it={baseUrl:""},io=t=>{it.baseUrl||Object.defineProperty(it,"baseUrl",{value:`https://${t}.myvtex.com`,writable:!1,configurable:!1})},gt=(t,e)=>fetch(`${it.baseUrl}${t}`,e),lo=async(t,e,r=!1,n)=>{const{priority:o="auto",body:a}=e,i=await gt(t,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(a),priority:o});if(!i.ok){const u=await i.json().catch(()=>({message:"Unknown error"}));throw new Error(u.message||`HTTP ${i.status}`)}const l=await i.json();return r?l:mt(l,n)},Dt="fuzzy",xt="operator",co=t=>({isDepartment:t!=null&&t.length?t[0].key==="category-1":!1}),Gr=(t,e)=>{const r=decodeURIComponent(e??"").slice(1).split("/");return t.map(n=>{if(n.key==="category-2"&&n.__typename==="FacetBoolean"){const o=n.values;return{...n,values:o.filter(a=>!r.find(i=>i.toLowerCase()===a.value||i.toLowerCase()===a.name.toLowerCase()))}}return n})},kr=(t,e)=>e?t==="category-1":!1,uo=t=>t.key==="operator"&&(t.value==="and"||t.value==="or"),so=t=>t.type==="TEXT",fo=t=>t.key==="fuzzy"&&(t.value==="0"||t.value==="1"||t.value==="auto"),po=t=>{const{key:e,name:r,values:n}=t;return{__typename:"FacetBoolean",key:e,label:r,values:n.slice().sort((o,a)=>o.name.localeCompare(a.name))}},yo=({key:t,values:e})=>({__typename:"FacetRange",key:t,values:e}),vo=(t,e,r)=>{if(!(t instanceof Object)||!("facets"in t))return[];const{facets:n=[]}=t,o=e!=null&&e.length?e[0].key==="category-1":!1;return n.filter(i=>!r||!kr(i.key,o)).map(i=>so(i)?po(i):yo(i))},mo=(t,e)=>{const r=t.find(({key:o})=>o===Dt)??null,n=t.find(({key:o})=>o===xt)??null;r&&fo(r)&&e.append(Dt,r.value),n&&uo(n)&&e.append(xt,n.value)},ht=t=>t.map(e=>{const[r,n]=e.split("/");return{key:r,value:n}}),Hr=(t,e)=>{const r=decodeURIComponent(e??"").slice(1).split("/"),n=t.filter(({value:a})=>!r.includes(decodeURIComponent(a))).map(a=>({...a,value:decodeURIComponent(a.value)})),{isDepartment:o}=co(n);return n==null?void 0:n.filter(a=>!kr(a.key,o))},go=t=>t.getAll("facets").flatMap(e=>{const[r,...n]=e.split("/");return!r||n.length===0?[]:[{key:r,value:n.join("/")}]}),ho=t=>{const e=Wn.decodeJwt(t??"");return{email:e.sub,userId:e.userId}},So=({pathname:t,searchParams:e},r)=>{const n=e.get("sort")??"",o=e.get("query")??null,a=parseInt(e.get("page")??"1",10);return{sort:n,facets:ht(r),term:o,base:o?"":t,page:a}},_o=t=>{const e=new URLSearchParams;return Object.entries(t).forEach(([r,n])=>{Array.isArray(n)?n.forEach(o=>e.append(r,o)):n!==void 0&&e.append(r,n)}),e},Eo=(t,e,r=24,n=1,o)=>{const a=`/search?query=${e??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;t.push(a)},qr={parseSearchState:So,convertSearchParams:_o,filterNonRootFacets:Hr,selectedFacets:ht,filterNonCategorySelected:Gr},Ao=Object.freeze(Object.defineProperty({__proto__:null,default:qr},Symbol.toStringTag,{value:"Module"}));var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Po(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Xr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return e}});function e(r){return r.replace(/\/$/,"")||"/"}})(Xr);var Ne={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return e}});function e(r){const n=r.indexOf("#"),o=r.indexOf("?"),a=o>-1&&(n<0||o<n);return a||n>-1?{pathname:r.substring(0,a?o:n),query:a?r.substring(o,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}})(Ne);var St={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const e=Ne;function r(n,o){if(typeof n!="string")return!1;const{pathname:a}=(0,e.parsePath)(n);return a===o||a.startsWith(o+"/")}})(St);var Vr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(qn,Ct){for(var Nt in Ct)Object.defineProperty(qn,Nt,{enumerable:!0,get:Ct[Nt]})}e(t,{ACTION_SUFFIX:function(){return u},APP_DIR_ALIAS:function(){return Q},CACHE_ONE_YEAR:function(){return R},DOT_NEXT_ALIAS:function(){return U},ESLINT_DEFAULT_DIRS:function(){return Bn},GSP_NO_RETURNED_VALUE:function(){return Fn},GSSP_COMPONENT_MEMBER_ERROR:function(){return Ln},GSSP_NO_RETURNED_VALUE:function(){return Mn},INSTRUMENTATION_HOOK_FILENAME:function(){return N},MIDDLEWARE_FILENAME:function(){return I},MIDDLEWARE_LOCATION_REGEXP:function(){return L},NEXT_BODY_SUFFIX:function(){return p},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return m},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return d},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return g},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return y},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return O},NEXT_CACHE_TAGS_HEADER:function(){return s},NEXT_CACHE_TAG_MAX_ITEMS:function(){return h},NEXT_CACHE_TAG_MAX_LENGTH:function(){return P},NEXT_DATA_SUFFIX:function(){return f},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return c},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return Un},PAGES_DIR_ALIAS:function(){return G},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return ae},ROOT_DIR_ALIAS:function(){return D},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return X},RSC_ACTION_ENCRYPTION_ALIAS:function(){return C},RSC_ACTION_PROXY_ALIAS:function(){return x},RSC_ACTION_VALIDATE_ALIAS:function(){return b},RSC_MOD_REF_PROXY_ALIAS:function(){return k},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return l},SERVER_PROPS_EXPORT_ERROR:function(){return xn},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return he},SERVER_PROPS_SSG_CONFLICT:function(){return ie},SERVER_RUNTIME:function(){return Gn},SSG_FALLBACK_EXPORT_ERROR:function(){return jn},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return Ue},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return Dn},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return $n},WEBPACK_LAYERS:function(){return kn},WEBPACK_RESOURCE_QUERIES:function(){return Hn}});const r="nxtP",n="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",l=".rsc",u=".action",f=".json",c=".meta",p=".body",s="x-next-cache-tags",y="x-next-cache-soft-tags",d="x-next-revalidated-tags",g="x-next-revalidate-tag-token",h=128,P=256,O=1024,m="_N_T_",R=31536e3,I="middleware",L=`(?:src/)?${I}`,N="instrumentation",G="private-next-pages",U="private-dot-next",D="private-next-root-dir",Q="private-next-app-dir",k="private-next-rsc-mod-ref-proxy",b="private-next-rsc-action-validate",x="private-next-rsc-server-reference",C="private-next-rsc-action-encryption",X="private-next-rsc-action-client-wrapper",ae="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",Ue="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",he="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",ie="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",Dn="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",xn="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",Fn="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",Mn="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",$n="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",Ln="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",Un='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',jn="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",Bn=["app","pages","components","lib","src"],Gn={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},E={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},kn={...E,GROUP:{serverOnly:[E.reactServerComponents,E.actionBrowser,E.appMetadataRoute,E.appRouteHandler,E.instrument],clientOnly:[E.serverSideRendering,E.appPagesBrowser],nonClientServerTarget:[E.middleware,E.api],app:[E.reactServerComponents,E.actionBrowser,E.appMetadataRoute,E.appRouteHandler,E.serverSideRendering,E.appPagesBrowser,E.shared,E.instrument]}},Hn={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}})(Vr);var zr={},_t={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return r}});const e=Ne;function r(n,o){if(!n.startsWith("/")||!o)return n;const{pathname:a,query:i,hash:l}=(0,e.parsePath)(n);return""+o+a+i+l}})(_t);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const e=_t,r=St;function n(o,a,i,l){if(!a||a===i)return o;const u=o.toLowerCase();return!l&&((0,r.pathHasPrefix)(u,"/api")||(0,r.pathHasPrefix)(u,"/"+a.toLowerCase()))?o:(0,e.addPathPrefix)(o,"/"+a)}})(zr);var Kr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return e}});function e(r,n){let o;const a=r.split("/");return(n||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),r=a.join("/")||"/",!0):!1),{pathname:r,detectedLocale:o}}})(Kr);var Yr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return e}});function e(r,n,o){if(r){o&&(o=o.toLowerCase());for(const l of r){var a,i;const u=(a=l.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(n===u||o===l.defaultLocale.toLowerCase()||(i=l.locales)!=null&&i.some(f=>f.toLowerCase()===o))return l}}}})(Yr);const bo=(t="")=>t.charAt(0).toUpperCase()+t.slice(1),Ft=(t,e=" ")=>!t||typeof t=="string"&&t.length===0?t:(Array.isArray(t)?t:t.split("-")).map(bo).join(e),Oo=({canonical:t,seo:e,slug:r})=>{const n=Array.isArray(r)?r.join(", "):r;return{id:0,Title:`${Array.isArray(r)?r.map(a=>Ft(a)).join(","):Ft(r)} - ${e.title}`,MetaTagDescription:e.description,name:n,hasChildren:!1,url:t,children:[]}},Ro=({canonical:t,category:e,previousImages:r,seo:n})=>({category:String(e==null?void 0:e.id),title:(e==null?void 0:e.Title)??n.title,description:(e==null?void 0:e.MetaTagDescription)??n.description,alternates:{canonical:t},openGraph:{type:"website",title:(e==null?void 0:e.Title)??n.title,description:(e==null?void 0:e.MetaTagDescription)??n.description,images:Array.isArray(r)?[...r]:[]}}),Io=({items:t,parent:e,apiUrl:r,find:n})=>{const o=t.find(i=>i.url.replace(r,"")===decodeURIComponent(e.toLowerCase()));return(o==null?void 0:o.children.find(i=>i.name.toLowerCase()===decodeURIComponent(String(n))))??o},wo=t=>{t instanceof Error?(console.error(`[ERROR CATEGORY INFO]: ${t.message}`),console.error(t.stack)):console.error("[ERROR CATEGORY INFO]: Unknown error",t)},To=new Set(["brand","category","department","subcategory","collection","cluster"]),Co=t=>typeof(t==null?void 0:t.pageType)=="string"&&To.has(t==null?void 0:t.pageType.toLowerCase()),No=t=>({collection:t.Coleção,categoryId:t.categoryId,current_collection:t["Coleção Atual"],items:t.items}),Qr=(t,e)=>t.reduce((r,n)=>{if(n.items.filter(i=>i.sellers.find(l=>l.commertialOffer.IsAvailable)).length===0||(r==null?void 0:r.find(i=>(i==null?void 0:i.productId)===(n==null?void 0:n.productId)))!==void 0)return r;const a=n.items[0].images.find(i=>e.includes(i.imageLabel));return r.push({slug:`/${n.linkText}/p`,productId:n==null?void 0:n.productId,textureImage:(a==null?void 0:a.imageUrl)??"",textureAlt:(a==null?void 0:a.imageText)??""}),r},[]),Do=Object.freeze(Object.defineProperty({__proto__:null,createEmptySeoCategory:Oo,createSeoCategory:Ro,findCategory:Io,formattedSimilars:Qr,isCollectionPageType:Co,notFindCategoryError:wo,responseAdapter:No},Symbol.toStringTag,{value:"Module"})),ue={"responsive-mobile-flex":"_responsive-mobile-flex_1e0ai_1","responsive-desktop-flex":"_responsive-desktop-flex_1e0ai_15","responsive-mobile-block":"_responsive-mobile-block_1e0ai_30","responsive-desktop-block":"_responsive-desktop-block_1e0ai_41"},Et=async(t,e={})=>{const{method:r="GET",body:n,headers:o={},priority:a="auto",cache:i="default"}=e;return fetch(t,{method:r,headers:{...o,Accept:"application/json","Content-Type":"application/json"},priority:a,cache:i,...n?{body:JSON.stringify(n)}:{}}).then(l=>l.json()).catch(l=>{console.error("[ERROR FETCH VTEX]",l)})},le=new Map;async function xo(t,e={}){var r;try{const{abort:n=!1}=e,o=new AbortController;n&&(le.has(t)&&((r=le.get(t))==null||r.abort(),le.delete(t)),le.set(t,o));const a=Et(t,{...e,...n?{signal:o.signal}:{}});return n&&le.delete(t),a}catch(n){if(n.name==="AbortError"){console.log(`[REQUEST CANCELLED]: ${t}`);return}throw console.error(`[ERROR API]: ${n.message}`),n}}const Fo=j.object({orderFormId:j.string().required(),coupon:j.string().nullable(),utmSource:j.string().optional(),utmMedium:j.string().optional(),utmCampaign:j.string().optional(),utmiCampaign:j.string().optional(),utmiPart:j.string().optional(),utmipage:j.string().optional()});async function Jr({apiUrl:t,body:e}){if(!e){console.error("[ERROR FETCHING] Body is required");return}await Fo.validate(e);const{orderFormId:r,utmiPart:n,coupon:o,...a}=e,i=`${t}/api/checkout/pub/orderForm/${r}/attachments/marketingData`;return Et(i,{method:"POST",body:{orderFormId:r,utmiPart:n??r,coupon:o??null,...a}})}const Mo=Object.freeze(Object.defineProperty({__proto__:null,postMediaData:Jr},Symbol.toStringTag,{value:"Module"})),$o=({children:t,data:e,SectionZone:r,className:n})=>{var c,p;const o=((c=e==null?void 0:e.filter(s=>{var y,d;return((d=(y=s.config)==null?void 0:y.responsive)==null?void 0:d.deviceType)==="mobile"})[0])==null?void 0:c.sections)||[],a=((p=e==null?void 0:e.filter(s=>{var y,d;return((d=(y=s.config)==null?void 0:y.responsive)==null?void 0:d.deviceType)==="desktop"})[0])==null?void 0:p.sections)||[],i=o.slice(0,1),l=o.slice(1,o.length),u=a.slice(0,1),f=a.slice(1,a.length);return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:n,children:[w.jsx("div",{className:ue["responsive-mobile-flex"],children:w.jsx(r,{data:i??[]})}),w.jsx("div",{className:ue["responsive-desktop-flex"],children:w.jsx(r,{data:u??[]})})]}),t,w.jsx("div",{className:ue["responsive-mobile-flex"],children:w.jsx(r,{data:l??[]})}),w.jsx("div",{className:ue["responsive-desktop-flex"],children:w.jsx(r,{data:f??[]})}),w.jsx(Vn.Utils.Divider,{})]})};var oe=TypeError;const Lo={},Uo=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"})),jo=Po(Uo);var At=typeof Map=="function"&&Map.prototype,je=Object.getOwnPropertyDescriptor&&At?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Re=At&&je&&typeof je.get=="function"?je.get:null,Mt=At&&Map.prototype.forEach,Pt=typeof Set=="function"&&Set.prototype,Be=Object.getOwnPropertyDescriptor&&Pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ie=Pt&&Be&&typeof Be.get=="function"?Be.get:null,$t=Pt&&Set.prototype.forEach,Bo=typeof WeakMap=="function"&&WeakMap.prototype,se=Bo?WeakMap.prototype.has:null,Go=typeof WeakSet=="function"&&WeakSet.prototype,fe=Go?WeakSet.prototype.has:null,ko=typeof WeakRef=="function"&&WeakRef.prototype,Lt=ko?WeakRef.prototype.deref:null,Ho=Boolean.prototype.valueOf,qo=Object.prototype.toString,Wo=Function.prototype.toString,Xo=String.prototype.match,bt=String.prototype.slice,H=String.prototype.replace,Vo=String.prototype.toUpperCase,Ut=String.prototype.toLowerCase,Zr=RegExp.prototype.test,jt=Array.prototype.concat,$=Array.prototype.join,zo=Array.prototype.slice,Bt=Math.floor,ct=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ge=Object.getOwnPropertySymbols,ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,re=typeof Symbol=="function"&&typeof Symbol.iterator=="object",pe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===re||!0)?Symbol.toStringTag:null,en=Object.prototype.propertyIsEnumerable,Gt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function kt(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Zr.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Bt(-t):Bt(t);if(n!==t){var o=String(n),a=bt.call(e,o.length+1);return H.call(o,r,"$&_")+"."+H.call(H.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return H.call(e,r,"$&_")}var st=jo,Ht=st.custom,qt=nn(Ht)?Ht:null,tn={__proto__:null,double:'"',single:"'"},Ko={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},De=function t(e,r,n,o){var a=r||{};if(B(a,"quoteStyle")&&!B(tn,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=B(a,"customInspect")?a.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return an(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var u=String(e);return l?kt(e,u):u}if(typeof e=="bigint"){var f=String(e)+"n";return l?kt(e,f):f}var c=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof e=="object")return ft(e)?"[Array]":"[Object]";var p=da(a,n);if(typeof o>"u")o=[];else if(on(o,e)>=0)return"[Circular]";function s(b,x,C){if(x&&(o=zo.call(o),o.push(x)),C){var X={depth:a.depth};return B(a,"quoteStyle")&&(X.quoteStyle=a.quoteStyle),t(b,X,n+1,o)}return t(b,a,n+1,o)}if(typeof e=="function"&&!Wt(e)){var y=oa(e),d=Se(e,s);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(d.length>0?" { "+$.call(d,", ")+" }":"")}if(nn(e)){var g=re?H.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):ut.call(e);return typeof e=="object"&&!re?ce(g):g}if(sa(e)){for(var h="<"+Ut.call(String(e.nodeName)),P=e.attributes||[],O=0;O<P.length;O++)h+=" "+P[O].name+"="+rn(Yo(P[O].value),"double",a);return h+=">",e.childNodes&&e.childNodes.length&&(h+="..."),h+="</"+Ut.call(String(e.nodeName))+">",h}if(ft(e)){if(e.length===0)return"[]";var m=Se(e,s);return p&&!pa(m)?"["+pt(m,p)+"]":"[ "+$.call(m,", ")+" ]"}if(Jo(e)){var R=Se(e,s);return!("cause"in Error.prototype)&&"cause"in e&&!en.call(e,"cause")?"{ ["+String(e)+"] "+$.call(jt.call("[cause]: "+s(e.cause),R),", ")+" }":R.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$.call(R,", ")+" }"}if(typeof e=="object"&&i){if(qt&&typeof e[qt]=="function"&&st)return st(e,{depth:c-n});if(i!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(aa(e)){var I=[];return Mt&&Mt.call(e,function(b,x){I.push(s(x,e,!0)+" => "+s(b,e))}),Xt("Map",Re.call(e),I,p)}if(ca(e)){var L=[];return $t&&$t.call(e,function(b){L.push(s(b,e))}),Xt("Set",Ie.call(e),L,p)}if(ia(e))return ke("WeakMap");if(ua(e))return ke("WeakSet");if(la(e))return ke("WeakRef");if(ea(e))return ce(s(Number(e)));if(ra(e))return ce(s(ct.call(e)));if(ta(e))return ce(Ho.call(e));if(Zo(e))return ce(s(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof lt<"u"&&e===lt)return"{ [object globalThis] }";if(!Qo(e)&&!Wt(e)){var N=Se(e,s),G=Gt?Gt(e)===Object.prototype:e instanceof Object||e.constructor===Object,U=e instanceof Object?"":"null prototype",D=!G&&pe&&Object(e)===e&&pe in e?bt.call(W(e),8,-1):U?"Object":"",Q=G||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",k=Q+(D||U?"["+$.call(jt.call([],D||[],U||[]),": ")+"] ":"");return N.length===0?k+"{}":p?k+"{"+pt(N,p)+"}":k+"{ "+$.call(N,", ")+" }"}return String(e)};function rn(t,e,r){var n=r.quoteStyle||e,o=tn[n];return o+t+o}function Yo(t){return H.call(String(t),/"/g,""")}function Y(t){return!pe||!(typeof t=="object"&&(pe in t||typeof t[pe]<"u"))}function ft(t){return W(t)==="[object Array]"&&Y(t)}function Qo(t){return W(t)==="[object Date]"&&Y(t)}function Wt(t){return W(t)==="[object RegExp]"&&Y(t)}function Jo(t){return W(t)==="[object Error]"&&Y(t)}function Zo(t){return W(t)==="[object String]"&&Y(t)}function ea(t){return W(t)==="[object Number]"&&Y(t)}function ta(t){return W(t)==="[object Boolean]"&&Y(t)}function nn(t){if(re)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!ut)return!1;try{return ut.call(t),!0}catch{}return!1}function ra(t){if(!t||typeof t!="object"||!ct)return!1;try{return ct.call(t),!0}catch{}return!1}var na=Object.prototype.hasOwnProperty||function(t){return t in this};function B(t,e){return na.call(t,e)}function W(t){return qo.call(t)}function oa(t){if(t.name)return t.name;var e=Xo.call(Wo.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function on(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function aa(t){if(!Re||!t||typeof t!="object")return!1;try{Re.call(t);try{Ie.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function ia(t){if(!se||!t||typeof t!="object")return!1;try{se.call(t,se);try{fe.call(t,fe)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function la(t){if(!Lt||!t||typeof t!="object")return!1;try{return Lt.call(t),!0}catch{}return!1}function ca(t){if(!Ie||!t||typeof t!="object")return!1;try{Ie.call(t);try{Re.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function ua(t){if(!fe||!t||typeof t!="object")return!1;try{fe.call(t,fe);try{se.call(t,se)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function sa(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function an(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return an(bt.call(t,0,e.maxStringLength),e)+n}var o=Ko[e.quoteStyle||"single"];o.lastIndex=0;var a=H.call(H.call(t,o,"\\$1"),/[\x00-\x1f]/g,fa);return rn(a,"single",e)}function fa(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Vo.call(e.toString(16))}function ce(t){return"Object("+t+")"}function ke(t){return t+" { ? }"}function Xt(t,e,r,n){var o=n?pt(r,n):$.call(r,", ");return t+" ("+e+") {"+o+"}"}function pa(t){for(var e=0;e<t.length;e++)if(on(t[e],`
|
|
2
|
+
`)>=0)return!1;return!0}function da(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=$.call(Array(t.indent+1)," ");else return null;return{base:r,prev:$.call(Array(e+1),r)}}function pt(t,e){if(t.length===0)return"";var r=`
|
|
3
|
+
`+e.prev+e.base;return r+$.call(t,","+r)+`
|
|
4
|
+
`+e.prev}function Se(t,e){var r=ft(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=B(t,o)?e(t[o],t):""}var a=typeof Ge=="function"?Ge(t):[],i;if(re){i={};for(var l=0;l<a.length;l++)i["$"+a[l]]=a[l]}for(var u in t)B(t,u)&&(r&&String(Number(u))===u&&u<t.length||re&&i["$"+u]instanceof Symbol||(Zr.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if(typeof Ge=="function")for(var f=0;f<a.length;f++)en.call(t,a[f])&&n.push("["+e(a[f])+"]: "+e(t[a[f]],t));return n}var ya=De,va=oe,xe=function(t,e,r){for(var n=t,o;(o=n.next)!=null;n=o)if(o.key===e)return n.next=o.next,r||(o.next=t.next,t.next=o),o},ma=function(t,e){if(t){var r=xe(t,e);return r&&r.value}},ga=function(t,e,r){var n=xe(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},ha=function(t,e){return t?!!xe(t,e):!1},Sa=function(t,e){if(t)return xe(t,e,!0)},_a=function(){var e,r={assert:function(n){if(!r.has(n))throw new va("Side channel does not contain "+ya(n))},delete:function(n){var o=e&&e.next,a=Sa(e,n);return a&&o&&o===a&&(e=void 0),!!a},get:function(n){return ma(e,n)},has:function(n){return ha(e,n)},set:function(n,o){e||(e={next:void 0}),ga(e,n,o)}};return r},ln=Object,Ea=Error,Aa=EvalError,Pa=RangeError,ba=ReferenceError,Oa=SyntaxError,Ra=URIError,Ia=Math.abs,wa=Math.floor,Ta=Math.max,Ca=Math.min,Na=Math.pow,Da=Math.round,xa=Number.isNaN||function(e){return e!==e},Fa=xa,Ma=function(e){return Fa(e)||e===0?e:e<0?-1:1},$a=Object.getOwnPropertyDescriptor,Ee=$a;if(Ee)try{Ee([],"length")}catch{Ee=null}var cn=Ee,Ae=Object.defineProperty||!1;if(Ae)try{Ae({},"a",{value:1})}catch{Ae=!1}var La=Ae,He,Vt;function Ua(){return Vt||(Vt=1,He=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0}),He}var qe,zt;function ja(){if(zt)return qe;zt=1;var t=typeof Symbol<"u"&&Symbol,e=Ua();return qe=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},qe}var We,Kt;function un(){return Kt||(Kt=1,We=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),We}var Xe,Yt;function sn(){if(Yt)return Xe;Yt=1;var t=ln;return Xe=t.getPrototypeOf||null,Xe}var Ve,Qt;function Ba(){if(Qt)return Ve;Qt=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",o=function(u,f){for(var c=[],p=0;p<u.length;p+=1)c[p]=u[p];for(var s=0;s<f.length;s+=1)c[s+u.length]=f[s];return c},a=function(u,f){for(var c=[],p=f,s=0;p<u.length;p+=1,s+=1)c[s]=u[p];return c},i=function(l,u){for(var f="",c=0;c<l.length;c+=1)f+=l[c],c+1<l.length&&(f+=u);return f};return Ve=function(u){var f=this;if(typeof f!="function"||e.apply(f)!==n)throw new TypeError(t+f);for(var c=a(arguments,1),p,s=function(){if(this instanceof p){var P=f.apply(this,o(c,arguments));return Object(P)===P?P:this}return f.apply(u,o(c,arguments))},y=r(0,f.length-c.length),d=[],g=0;g<y;g++)d[g]="$"+g;if(p=Function("binder","return function ("+i(d,",")+"){ return binder.apply(this,arguments); }")(s),f.prototype){var h=function(){};h.prototype=f.prototype,p.prototype=new h,h.prototype=null}return p},Ve}var ze,Jt;function Fe(){if(Jt)return ze;Jt=1;var t=Ba();return ze=Function.prototype.bind||t,ze}var Ke,Zt;function Ot(){return Zt||(Zt=1,Ke=Function.prototype.call),Ke}var Ye,er;function fn(){return er||(er=1,Ye=Function.prototype.apply),Ye}var Ga=typeof Reflect<"u"&&Reflect&&Reflect.apply,ka=Fe(),Ha=fn(),qa=Ot(),Wa=Ga,Xa=Wa||ka.call(qa,Ha),Va=Fe(),za=oe,Ka=Ot(),Ya=Xa,pn=function(e){if(e.length<1||typeof e[0]!="function")throw new za("a function is required");return Ya(Va,Ka,e)},Qe,tr;function Qa(){if(tr)return Qe;tr=1;var t=pn,e=cn,r;try{r=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var n=!!r&&e&&e(Object.prototype,"__proto__"),o=Object,a=o.getPrototypeOf;return Qe=n&&typeof n.get=="function"?t([n.get]):typeof a=="function"?function(l){return a(l==null?l:o(l))}:!1,Qe}var Je,rr;function Ja(){if(rr)return Je;rr=1;var t=un(),e=sn(),r=Qa();return Je=t?function(o){return t(o)}:e?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return e(o)}:r?function(o){return r(o)}:null,Je}var Ze,nr;function Za(){if(nr)return Ze;nr=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Fe();return Ze=r.call(t,e),Ze}var v,ei=ln,ti=Ea,ri=Aa,ni=Pa,oi=ba,ne=Oa,te=oe,ai=Ra,ii=Ia,li=wa,ci=Ta,ui=Ca,si=Na,fi=Da,pi=Ma,dn=Function,et=function(t){try{return dn('"use strict"; return ('+t+").constructor;")()}catch{}},ye=cn,di=La,tt=function(){throw new te},yi=ye?function(){try{return arguments.callee,tt}catch{try{return ye(arguments,"callee").get}catch{return tt}}}():tt,J=ja()(),A=Ja(),vi=sn(),mi=un(),yn=fn(),ve=Ot(),ee={},gi=typeof Uint8Array>"u"||!A?v:A(Uint8Array),K={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":J&&A?A([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":ee,"%AsyncGenerator%":ee,"%AsyncGeneratorFunction%":ee,"%AsyncIteratorPrototype%":ee,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ti,"%eval%":eval,"%EvalError%":ri,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":dn,"%GeneratorFunction%":ee,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":J&&A?A(A([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!J||!A?v:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ei,"%Object.getOwnPropertyDescriptor%":ye,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":ni,"%ReferenceError%":oi,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!J||!A?v:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":J&&A?A(""[Symbol.iterator]()):v,"%Symbol%":J?Symbol:v,"%SyntaxError%":ne,"%ThrowTypeError%":yi,"%TypedArray%":gi,"%TypeError%":te,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":ai,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":ve,"%Function.prototype.apply%":yn,"%Object.defineProperty%":di,"%Object.getPrototypeOf%":vi,"%Math.abs%":ii,"%Math.floor%":li,"%Math.max%":ci,"%Math.min%":ui,"%Math.pow%":si,"%Math.round%":fi,"%Math.sign%":pi,"%Reflect.getPrototypeOf%":mi};if(A)try{null.error}catch(t){var hi=A(A(t));K["%Error.prototype%"]=hi}var Si=function t(e){var r;if(e==="%AsyncFunction%")r=et("async function () {}");else if(e==="%GeneratorFunction%")r=et("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=et("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return K[e]=r,r},or={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},me=Fe(),we=Za(),_i=me.call(ve,Array.prototype.concat),Ei=me.call(yn,Array.prototype.splice),ar=me.call(ve,String.prototype.replace),Te=me.call(ve,String.prototype.slice),Ai=me.call(ve,RegExp.prototype.exec),Pi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,bi=/\\(\\)?/g,Oi=function(e){var r=Te(e,0,1),n=Te(e,-1);if(r==="%"&&n!=="%")throw new ne("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ne("invalid intrinsic syntax, expected opening `%`");var o=[];return ar(e,Pi,function(a,i,l,u){o[o.length]=l?ar(u,bi,"$1"):i||a}),o},Ri=function(e,r){var n=e,o;if(we(or,n)&&(o=or[n],n="%"+o[0]+"%"),we(K,n)){var a=K[n];if(a===ee&&(a=Si(n)),typeof a>"u"&&!r)throw new te("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new ne("intrinsic "+e+" does not exist!")},Rt=function(e,r){if(typeof e!="string"||e.length===0)throw new te("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new te('"allowMissing" argument must be a boolean');if(Ai(/^%?[^%]*%?$/,e)===null)throw new ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Oi(e),o=n.length>0?n[0]:"",a=Ri("%"+o+"%",r),i=a.name,l=a.value,u=!1,f=a.alias;f&&(o=f[0],Ei(n,_i([0,1],f)));for(var c=1,p=!0;c<n.length;c+=1){var s=n[c],y=Te(s,0,1),d=Te(s,-1);if((y==='"'||y==="'"||y==="`"||d==='"'||d==="'"||d==="`")&&y!==d)throw new ne("property names with quotes must have matching quotes");if((s==="constructor"||!p)&&(u=!0),o+="."+s,i="%"+o+"%",we(K,i))l=K[i];else if(l!=null){if(!(s in l)){if(!r)throw new te("base intrinsic for "+e+" exists, but the property is not available.");return}if(ye&&c+1>=n.length){var g=ye(l,s);p=!!g,p&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[s]}else p=we(l,s),l=l[s];p&&!u&&(K[i]=l)}}return l},vn=Rt,mn=pn,Ii=mn([vn("%String.prototype.indexOf%")]),gn=function(e,r){var n=vn(e,!!r);return typeof n=="function"&&Ii(e,".prototype.")>-1?mn([n]):n},wi=Rt,ge=gn,Ti=De,Ci=oe,ir=wi("%Map%",!0),Ni=ge("Map.prototype.get",!0),Di=ge("Map.prototype.set",!0),xi=ge("Map.prototype.has",!0),Fi=ge("Map.prototype.delete",!0),Mi=ge("Map.prototype.size",!0),hn=!!ir&&function(){var e,r={assert:function(n){if(!r.has(n))throw new Ci("Side channel does not contain "+Ti(n))},delete:function(n){if(e){var o=Fi(e,n);return Mi(e)===0&&(e=void 0),o}return!1},get:function(n){if(e)return Ni(e,n)},has:function(n){return e?xi(e,n):!1},set:function(n,o){e||(e=new ir),Di(e,n,o)}};return r},$i=Rt,Me=gn,Li=De,_e=hn,Ui=oe,Z=$i("%WeakMap%",!0),ji=Me("WeakMap.prototype.get",!0),Bi=Me("WeakMap.prototype.set",!0),Gi=Me("WeakMap.prototype.has",!0),ki=Me("WeakMap.prototype.delete",!0),Hi=Z?function(){var e,r,n={assert:function(o){if(!n.has(o))throw new Ui("Side channel does not contain "+Li(o))},delete:function(o){if(Z&&o&&(typeof o=="object"||typeof o=="function")){if(e)return ki(e,o)}else if(_e&&r)return r.delete(o);return!1},get:function(o){return Z&&o&&(typeof o=="object"||typeof o=="function")&&e?ji(e,o):r&&r.get(o)},has:function(o){return Z&&o&&(typeof o=="object"||typeof o=="function")&&e?Gi(e,o):!!r&&r.has(o)},set:function(o,a){Z&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Z),Bi(e,o,a)):_e&&(r||(r=_e()),r.set(o,a))}};return n}:_e,qi=oe,Wi=De,Xi=_a,Vi=hn,zi=Hi,Ki=zi||Vi||Xi,Sn=function(){var e,r={assert:function(n){if(!r.has(n))throw new qi("Side channel does not contain "+Wi(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,o){e||(e=Ki()),e.set(n,o)}};return r},Yi=String.prototype.replace,Qi=/%20/g,rt={RFC1738:"RFC1738",RFC3986:"RFC3986"},It={default:rt.RFC3986,formatters:{RFC1738:function(t){return Yi.call(t,Qi,"+")},RFC3986:function(t){return String(t)}},RFC1738:rt.RFC1738,RFC3986:rt.RFC3986},Ji=It,Zi=Sn,nt=Object.prototype.hasOwnProperty,z=Array.isArray,$e=Zi(),_n=function(e,r){return $e.set(e,r),e},Ce=function(e){return $e.has(e)},dt=function(e){return $e.get(e)},En=function(e,r){$e.set(e,r)},F=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),el=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(z(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&o.push(n[a]);r.obj[r.prop]=o}}},wt=function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},tl=function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(z(e))e.push(r);else if(e&&typeof e=="object")if(Ce(e)){var o=dt(e)+1;e[o]=r,En(e,o)}else(n&&(n.plainObjects||n.allowPrototypes)||!nt.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object"){if(Ce(r)){for(var a=Object.keys(r),i=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},l=0;l<a.length;l++){var u=parseInt(a[l],10);i[u+1]=r[a[l]]}return _n(i,dt(r)+1)}return[e].concat(r)}var f=e;return z(e)&&!z(r)&&(f=wt(e,n)),z(e)&&z(r)?(r.forEach(function(c,p){if(nt.call(e,p)){var s=e[p];s&&typeof s=="object"&&c&&typeof c=="object"?e[p]=t(s,c,n):e.push(c)}else e[p]=c}),e):Object.keys(r).reduce(function(c,p){var s=r[p];return nt.call(c,p)?c[p]=t(c[p],s,n):c[p]=s,c},f)},rl=function(e,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},e)},nl=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},ot=1024,ol=function(e,r,n,o,a){if(e.length===0)return e;var i=e;if(typeof e=="symbol"?i=Symbol.prototype.toString.call(e):typeof e!="string"&&(i=String(e)),n==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(y){return"%26%23"+parseInt(y.slice(2),16)+"%3B"});for(var l="",u=0;u<i.length;u+=ot){for(var f=i.length>=ot?i.slice(u,u+ot):i,c=[],p=0;p<f.length;++p){var s=f.charCodeAt(p);if(s===45||s===46||s===95||s===126||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||a===Ji.RFC1738&&(s===40||s===41)){c[c.length]=f.charAt(p);continue}if(s<128){c[c.length]=F[s];continue}if(s<2048){c[c.length]=F[192|s>>6]+F[128|s&63];continue}if(s<55296||s>=57344){c[c.length]=F[224|s>>12]+F[128|s>>6&63]+F[128|s&63];continue}p+=1,s=65536+((s&1023)<<10|f.charCodeAt(p)&1023),c[c.length]=F[240|s>>18]+F[128|s>>12&63]+F[128|s>>6&63]+F[128|s&63]}l+=c.join("")}return l},al=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o<r.length;++o)for(var a=r[o],i=a.obj[a.prop],l=Object.keys(i),u=0;u<l.length;++u){var f=l[u],c=i[f];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:i,prop:f}),n.push(c))}return el(r),e},il=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ll=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},cl=function(e,r,n,o){if(Ce(e)){var a=dt(e)+1;return e[a]=r,En(e,a),e}var i=[].concat(e,r);return i.length>n?_n(wt(i,{plainObjects:o}),i.length-1):i},ul=function(e,r){if(z(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(r(e[o]));return n}return r(e)},An={arrayToObject:wt,assign:rl,combine:cl,compact:al,decode:nl,encode:ol,isBuffer:ll,isOverflow:Ce,isRegExp:il,maybeMap:ul,merge:tl},Pn=Sn,Pe=An,de=It,sl=Object.prototype.hasOwnProperty,bn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},M=Array.isArray,fl=Array.prototype.push,On=function(t,e){fl.apply(t,M(e)?e:[e])},pl=Date.prototype.toISOString,lr=de.default,_={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Pe.encode,encodeValuesOnly:!1,filter:void 0,format:lr,formatter:de.formatters[lr],indices:!1,serializeDate:function(e){return pl.call(e)},skipNulls:!1,strictNullHandling:!1},dl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},at={},yl=function t(e,r,n,o,a,i,l,u,f,c,p,s,y,d,g,h,P,O){for(var m=e,R=O,I=0,L=!1;(R=R.get(at))!==void 0&&!L;){var N=R.get(e);if(I+=1,typeof N<"u"){if(N===I)throw new RangeError("Cyclic object value");L=!0}typeof R.get(at)>"u"&&(I=0)}if(typeof c=="function"?m=c(r,m):m instanceof Date?m=y(m):n==="comma"&&M(m)&&(m=Pe.maybeMap(m,function(ie){return ie instanceof Date?y(ie):ie})),m===null){if(i)return f&&!h?f(r,_.encoder,P,"key",d):r;m=""}if(dl(m)||Pe.isBuffer(m)){if(f){var G=h?r:f(r,_.encoder,P,"key",d);return[g(G)+"="+g(f(m,_.encoder,P,"value",d))]}return[g(r)+"="+g(String(m))]}var U=[];if(typeof m>"u")return U;var D;if(n==="comma"&&M(m))h&&f&&(m=Pe.maybeMap(m,f)),D=[{value:m.length>0?m.join(",")||null:void 0}];else if(M(c))D=c;else{var Q=Object.keys(m);D=p?Q.sort(p):Q}var k=u?String(r).replace(/\./g,"%2E"):String(r),b=o&&M(m)&&m.length===1?k+"[]":k;if(a&&M(m)&&m.length===0)return b+"[]";for(var x=0;x<D.length;++x){var C=D[x],X=typeof C=="object"&&C&&typeof C.value<"u"?C.value:m[C];if(!(l&&X===null)){var ae=s&&u?String(C).replace(/\./g,"%2E"):String(C),Ue=M(m)?typeof n=="function"?n(b,ae):b:b+(s?"."+ae:"["+ae+"]");O.set(e,I);var he=Pn();he.set(at,O),On(U,t(X,Ue,n,o,a,i,l,u,n==="comma"&&h&&M(m)?null:f,c,p,s,y,d,g,h,P,he))}}return U},vl=function(e){if(!e)return _;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||_.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=de.default;if(typeof e.format<"u"){if(!sl.call(de.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=de.formatters[n],a=_.filter;(typeof e.filter=="function"||M(e.filter))&&(a=e.filter);var i;if(e.arrayFormat in bn?i=e.arrayFormat:"indices"in e?i=e.indices?"indices":"repeat":i=_.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:_.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:_.addQueryPrefix,allowDots:l,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:i,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:_.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?_.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:_.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:_.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:_.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:_.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:_.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:_.strictNullHandling}},ml=function(t,e){var r=t,n=vl(e),o,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):M(n.filter)&&(a=n.filter,o=a);var i=[];if(typeof r!="object"||r===null)return"";var l=bn[n.arrayFormat],u=l==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var f=Pn(),c=0;c<o.length;++c){var p=o[c],s=r[p];n.skipNulls&&s===null||On(i,yl(s,p,l,u,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,f))}var y=i.join(n.delimiter),d=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),y.length>0?d+y:""},q=An,be=Object.prototype.hasOwnProperty,cr=Array.isArray,S={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:q.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},gl=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Rn=function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},hl="utf8=%26%2310003%3B",Sl="utf8=%E2%9C%93",_l=function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=r.parameterLimit===1/0?void 0:r.parameterLimit,i=o.split(r.delimiter,r.throwOnLimitExceeded?a+1:a);if(r.throwOnLimitExceeded&&i.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var l=-1,u,f=r.charset;if(r.charsetSentinel)for(u=0;u<i.length;++u)i[u].indexOf("utf8=")===0&&(i[u]===Sl?f="utf-8":i[u]===hl&&(f="iso-8859-1"),l=u,u=i.length);for(u=0;u<i.length;++u)if(u!==l){var c=i[u],p=c.indexOf("]="),s=p===-1?c.indexOf("="):p+1,y,d;if(s===-1?(y=r.decoder(c,S.decoder,f,"key"),d=r.strictNullHandling?null:""):(y=r.decoder(c.slice(0,s),S.decoder,f,"key"),y!==null&&(d=q.maybeMap(Rn(c.slice(s+1),r,cr(n[y])?n[y].length:0),function(h){return r.decoder(h,S.decoder,f,"value")}))),d&&r.interpretNumericEntities&&f==="iso-8859-1"&&(d=gl(String(d))),c.indexOf("[]=")>-1&&(d=cr(d)?[d]:d),y!==null){var g=be.call(n,y);g&&r.duplicates==="combine"?n[y]=q.combine(n[y],d,r.arrayLimit,r.plainObjects):(!g||r.duplicates==="last")&&(n[y]=d)}}return n},El=function(t,e,r,n){var o=0;if(t.length>0&&t[t.length-1]==="[]"){var a=t.slice(0,-1).join("");o=Array.isArray(e)&&e[a]?e[a].length:0}for(var i=n?e:Rn(e,r,o),l=t.length-1;l>=0;--l){var u,f=t[l];if(f==="[]"&&r.parseArrays)q.isOverflow(i)?u=i:u=r.allowEmptyArrays&&(i===""||r.strictNullHandling&&i===null)?[]:q.combine([],i,r.arrayLimit,r.plainObjects);else{u=r.plainObjects?{__proto__:null}:{};var c=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,p=r.decodeDotInKeys?c.replace(/%2E/g,"."):c,s=parseInt(p,10);!r.parseArrays&&p===""?u={0:i}:!isNaN(s)&&f!==p&&String(s)===p&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(u=[],u[s]=i):p!=="__proto__"&&(u[p]=i)}i=u}return i},Al=function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&be.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,i=o.exec(n),l=i?n.slice(0,i.index):n,u=[];if(l){if(!r.plainObjects&&be.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;(i=a.exec(n))!==null&&f<r.depth;){f+=1;var c=i[1].slice(1,-1);if(!r.plainObjects&&be.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(i[1])}if(i){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+n.slice(i.index)+"]")}return u},Pl=function(e,r,n,o){if(e){var a=Al(e,n);if(a)return El(a,r,n,o)}},bl=function(e){if(!e)return S;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset>"u"?S.charset:e.charset,n=typeof e.duplicates>"u"?S.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:S.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:S.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:S.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:S.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:S.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:S.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:S.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:S.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:S.decoder,delimiter:typeof e.delimiter=="string"||q.isRegExp(e.delimiter)?e.delimiter:S.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:S.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:S.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:S.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:S.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:S.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:S.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},Ol=function(t,e){var r=bl(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?_l(t,r):t,o=r.plainObjects?{__proto__:null}:{},a=Object.keys(n),i=0;i<a.length;++i){var l=a[i],u=Pl(l,n[l],r,typeof t=="string");o=q.merge(o,u,r)}return r.allowSparse===!0?o:q.compact(o)},Rl=ml,Il=Ol,wl=It,Tl={formats:wl,parse:Il,stringify:Rl};const Cl=Wr(Tl);async function Le(t,e={},r){const{cms:n="cms"}=e;return fetch(`${t.href}?${Cl.stringify(e)}`,{method:"GET",cache:r?"no-store":"default",headers:{Accept:"application/json","Content-Type":"application/json","strapi-encode-source-maps":n==="strapi"&&r?"true":"false"}})}function Tt(t,e){return!(e!=null&&e.cms)||(e==null?void 0:e.cms)==="vtex"?`https://${e==null?void 0:e.storeId}.myvtex.com/_v/cms/api/${e==null?void 0:e.name}/${t}`:String(new URL(`api/${t}`,process.env.NEXT_PUBLIC_API_URL))}function In(t){return Array.isArray(t)&&t.length>0?t[0]:Array.isArray(t)?null:t}async function wn(t,e=[],r={}){var n;if((r==null?void 0:r.contentType)===t){const o=(r==null?void 0:r.previewMode)==="true",a=(r==null?void 0:r.documentId)??"",i=a&&((n=String(a))!=null&&n.length)?`/${r.documentId}`:"",l=new URL(Tt(`${t}${i}`,r)),u=await Le(l,r,o);if(!u.ok)return console.error(`[Error fetching preview data]: ${t} - status: ${u.statusText}`),[];const f=await u.json(),c=e.findIndex(p=>p.documentId===f.id);return c!==-1?(e[c]=f,[...e]):[f,...e]}return e}const Nl=Object.freeze(Object.defineProperty({__proto__:null,createUrl:Tt,fetchCMS:Le,mergePreviewDocument:wn,spreadStrapiData:In},Symbol.toStringTag,{value:"Module"}));async function Tn(t,e={},r){const n=!!(e!=null&&e.previewMode),o=await Le(t,e,n);if(!o.ok)return console.log(`Failed to fetch Strapi (url=${String(t)}, status=${o.status})`),{status:404,data:[],error:String(o.status)};const{data:a}=await o.json();return a?{status:200,data:r?In(a):a}:{status:404,data:[],error:"No data found"}}async function Cn(t,e,r={}){const n=(r==null?void 0:r.previewId)??"",o=(r==null?void 0:r.previewMode)==="true",a={...r,versionId:n},i=[];let l=1,u=0,f=!0;try{do{const c=await Le(e,{...a,page:l},o).then(p=>p.json()).catch(p=>(console.error("Error fetching VTEX CMS data:",p),console.error("Error URL:",e.toString()),null));l===1&&(u=c.totalItems),Array.isArray(c==null?void 0:c.data)&&i.push(...c.data),f=!!(c!=null&&c.hasNextPage),l++}while(f&&i.length<u);if(o&&i.length>0){if(!t||!n)throw new Error("contentType and previewId are required for preview mode in vtexCMSData");const c=await wn(t,i,a);return{status:c.length>0?200:404,data:c}}return{status:i.length?200:404,data:i}}catch(c){return{status:500,data:[],error:c instanceof Error?c.message:String(c)}}}const Dl=Object.freeze(Object.defineProperty({__proto__:null,strapiCMSData:Tn,vtexCMSData:Cn},Symbol.toStringTag,{value:"Module"}));async function xl({contentType:t,documentId:e,versionId:r,CMS_PROJECT_NAME:n}){const o=e&&e.length?`/${e}`:"",a=r&&r.length?`?versionId=${r}`:"";return gt(`/cms/api/${n}/${t}${o}${a}`,{cache:"no-cache"})}async function Nn(t,e={},r){const{cms:n="vtex"}=e??{};try{const o=new URL(Tt(t,e));return n!=="vtex"?Tn(o,e,r):Cn(t,o,e)}catch(o){return console.error(`[Fetch ContentType Error CMS ${n}]`,o),r?{status:400,data:null}:{status:200,data:[]}}}const Fl=Object.freeze(Object.defineProperty({__proto__:null,fetchContentType:Nn,getCMSContentType:xl},Symbol.toStringTag,{value:"Module"}));exports.SearchPageScreening=$o;exports.addItemOrder=Or;exports.addLocale=zr;exports.addNotification=Lr;exports.addPathPrefix=_t;exports.addSearchParamsFacets=mo;exports.cart=ao;exports.catalogHelpers=Do;exports.cms=Fl;exports.cmsHelpers=Dl;exports.cmsUtils=Nl;exports.commonjsGlobal=lt;exports.configureFetchProxy=io;exports.constants=Vr;exports.createNewAddress=Br;exports.detectDomainLocale=Yr;exports.disableSKU=vr;exports.fetchContentType=Nn;exports.fetchProxy=gt;exports.fetchVtex=Et;exports.fetchVtexWithAbortController=xo;exports.filterNonCategorySelected=Gr;exports.filterNonRootFacets=Hr;exports.findItemIndex=wr;exports.findOptions=Mr;exports.formatPriceToCurrency=Oe;exports.formattedFacets=vo;exports.formattedSimilars=Qr;exports.freightParsePrice=ur;exports.getAuthenticatedUser=ho;exports.getCode=Cr;exports.getColorAndSizeFromSkuName=fr;exports.getDefaultExportFromCjs=Wr;exports.getDiscountPercent=sr;exports.getFacetsActiveSearchParams=go;exports.getFirstImages=_r;exports.getProductNameWithoutSku=dr;exports.getQuantity=Fr;exports.getRemoveId=Nr;exports.getSKUName=pr;exports.getSkuInfos=yr;exports.getThumbImage=gr;exports.getValidOffer=mr;exports.getValue=Dr;exports.initialState=Ar;exports.marketingTagsBuilder=Ur;exports.marketingdata=Mo;exports.mergeOptionsPromise=$r;exports.mountMarketingData=jr;exports.navigateToSearchPage=Eo;exports.normalizeLocalePath=Kr;exports.parsePath=Ne;exports.pathHasPrefix=St;exports.postMediaData=Jr;exports.productHelpers=Qn;exports.promiseDefault=T;exports.proxyCartAPI=lo;exports.removeQuantity=Rr;exports.removeTrailingSlash=Xr;exports.resizingImg=hr;exports.responsive=ue;exports.search=Ao;exports.searchHelpers=qr;exports.selectedFacets=ht;exports.setVideoPlay=Er;exports.splitNameAndSizeFromFullName=yt;exports.updateItemSellerExternal=Tr;exports.updateOrderFormPromise=xr;exports.updateQuantity=Ir;exports.updatedResizedImg=Sr;
|