@soma-vertical-web/multi-lib 1.0.41 → 1.0.43

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.
@@ -0,0 +1,4 @@
1
+ "use strict";const kn=require("jose"),Hn=require("yup"),w=require("react/jsx-runtime"),qn=require("@soma-vertical-web/core-components");function Wn(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=Wn(Hn),Oe=(t,e=!0)=>Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:e?2:0}).format(t),ir=({valueInCents:t,hasFree:e,freeTaxMessage:r})=>t===0?e?r:Oe(0):Oe(t/100),lr=(t,e)=>{const n=(t-e)*100/t;return Math.floor(n)},pt=(t,e)=>{const[r,n]=t.split(e);return{name:r.trim(),size:n?n.trim():""}},cr=(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()}},ur=(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},sr=(t,e)=>t.replace(e,"").trim(),Xn=t=>t.replace(/\//g,""),fr=({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:c,ListPrice:f,PaymentOptions:{installmentOptions:u}}=i.commertialOffer;r.price=c,r.listPrice=f;const p=(s=u==null?void 0:u[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 u;const c={name:l.name,sku:l.itemId,value:((u=l.Tamanho)==null?void 0:u[0])??pt(l.nameComplete??l.name,e).size,available:!1,sellerId:"",sellerName:"",isSellerDefault:!1},f=l.sellers.filter(p=>(p.sellerDefault&&p.commertialOffer.IsAvailable&&(c.available=!0,n(p,c)),p.commertialOffer.IsAvailable));return!c.isSellerDefault&&f.length>0&&(c.available=!0,n(f[0],{...c,sellerId:f[0].sellerId,sellerName:f[0].sellerName})),c.available===!1&&(o=!1),i.push(c),i},[]);return{...r,sizes:a,allSizesAvailable:o}},pr=t=>t?!t.offers.offers.find(({quantity:e=0})=>e>0):!1,dr=(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)},yr=({images:t,TEXTURE_IMAGE:e})=>t.find(r=>e.includes(r.imageLabel))??t[0],vr=(t,e)=>{const r=/\/ids\/(\d+)\//,n=t.match(r);return n?t.replace(`/${n[1]}/`,`/${n[1]}-${e.width}-${e.height}/`):t},gr=(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},mr=({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},Vn=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},hr=(t,e,r)=>{e&&(t?(e.getAttribute("src")||(e.src=r??""),e.play()):e.pause())},zn=Object.freeze(Object.defineProperty({__proto__:null,disableSKU:pr,formatPriceToCurrency:Oe,freightParsePrice:ir,getAspectRatio:Vn,getColorAndSizeFromSkuName:cr,getDiscountPercent:lr,getFirstImages:mr,getProductNameWithoutSku:sr,getSKUName:ur,getSkuInfos:fr,getThumbImage:yr,getValidOffer:dr,removeSlashes:Xn,resizingImg:vr,setVideoPlay:hr,splitNameAndSizeFromFullName:pt,updatedResizedImg:gr},Symbol.toStringTag,{value:"Module"})),Kn={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},T=Promise.resolve(!1),Sr={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:()=>({})},dt=t=>t===0,_r=(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},Er=(t,e)=>{const{availability:r,additionalInfo:{brandName:n},bundleItems:o,id:a,uniqueId:i,detailUrl:l,ean:c,imageUrl:f,name:u,listPrice:p,quantity:s,price:y,priceDefinition:d,productCategories:h,productCategoryIds:_,productId:b,refId:O,seller:g,referenceId:R,offerings:I,productRefId:L,skuName:N,sellingPrice:B}=t;return{availability:r,bundleItems:o,referenceId:R,productRefId:L,id:a,ean:c,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:n},categories:_r(_,h),categoriesIds:_,gtin:O,image:[{alternateName:(e==null?void 0:e.MAIN_IMAGE)??"1",url:f}],name:u,isVariationOf:{name:u,productGroupID:b},sku:a,slug:l,skuName:N},listPrice:p,quantity:s,offerings:I,price:y,priceDefinition:d,sellingPrice:B,seller:g}},Ar=(t,e)=>{const r=t.map(n=>({id:n.uniqueId,quantity:n.quantity,seller:n.seller}));return Array.isArray(e)?[...r,...e]:[...r,e]},Pr=(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:[]}},br=(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)??""}}),Or=(t,e)=>t.filter(r=>r.availability!=="withoutStock").findIndex(({id:r})=>r===e),Yn=(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},Qn=t=>{const e=t.reduce((o,a)=>{const i=dt(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}},Jn=t=>Array.isArray(t)?t.filter(e=>e.availability!=="withoutStock").reduce((e,r)=>e+(dt(r==null?void 0:r.price)?0:r.quantity),0):0,yt=(t,e)=>{const{items:r,orderFormId:n,...o}=t;return{...o,id:n,items:Array.isArray(r)?r.map(a=>Er(a,e)):[]}},Rr=(t,e)=>{const r=t.find(n=>n.id===e);return r?r.availability==="unavailableItemFulfillment":!1},Zn=(t,e)=>{const r=t.sku,n=t.isVariantOf.hasVariant.find(o=>o.sku===r);return n?n.name.split(e)[1]:"--"},Ir=(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},eo=(t,e)=>{const r=new Set;return[t,...e].filter(n=>!r.has(n)&&r.add(n),r)},wr=(t,e)=>e&&Array.isArray(e)&&e.find(n=>n.id===t)?Promise.resolve(t):Promise.resolve(!1),Tr=(t,e)=>e?Promise.resolve(t[e]):Promise.resolve(!1),Cr=async t=>{try{const e=await t();if(typeof e!="boolean")return e}catch(e){console.error(`[Error orderForm]: ${e}`)}return!1},Nr=(t,e)=>{if(e!==-1){const r=Number(t);return r?r+1:1}return t??1},Dr=(t,e)=>Array.isArray(t)?t.filter(r=>e==null?void 0:e.some(n=>n.id===r.id)):[],xr=async(t,e)=>t.then(r=>[...r??[],...e??[]]),to=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:yt(l,n)})},Fr=(t,e,r)=>({notifications:[...t.notifications,{id:Date.now(),message:e,callback:r}]}),Mr=t=>[...Array.isArray(t)?t:[t],"faststore"],$r=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},Lr=(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]},ro=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:Kn,addItemOrder:Ar,addNotification:Fr,createItemOrder:Er,createNewAddress:Lr,fetchCartAPI:to,findItemIndex:Or,findOptions:Dr,findTotalizerValue:Yn,getCategories:_r,getCode:Ir,getQuantity:Nr,getRemoveId:wr,getSize:Zn,getTotalItems:Jn,getTotalizer:Qn,getUrlParameter:V,getValue:Tr,initialState:Sr,isGift:dt,marketingTagsBuilder:Mr,mergeOptionsPromise:xr,mountMarketingData:$r,orderFormValues:yt,promiseDefault:T,removeQuantity:Pr,updateItemSellerExternal:Rr,updateOrderFormPromise:Cr,updateQuantity:br,wishlistArray:eo},Symbol.toStringTag,{value:"Module"})),ot={baseUrl:""},no=t=>{ot.baseUrl||Object.defineProperty(ot,"baseUrl",{value:`https://${t}.myvtex.com`,writable:!1,configurable:!1})},vt=(t,e)=>fetch(`${ot.baseUrl}${t}`,e),oo=async(t,e,r=!1,n)=>{const{priority:o="auto",body:a}=e,i=await vt(t,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(a),priority:o});if(!i.ok){const c=await i.json().catch(()=>({message:"Unknown error"}));throw new Error(c.message||`HTTP ${i.status}`)}const l=await i.json();return r?l:yt(l,n)},Ct="fuzzy",Nt="operator",ao=t=>({isDepartment:t!=null&&t.length?t[0].key==="category-1":!1}),Ur=(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})},jr=(t,e)=>e?t==="category-1":!1,io=t=>t.key==="operator"&&(t.value==="and"||t.value==="or"),lo=t=>t.type==="TEXT",co=t=>t.key==="fuzzy"&&(t.value==="0"||t.value==="1"||t.value==="auto"),uo=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))}},so=({key:t,values:e})=>({__typename:"FacetRange",key:t,values:e}),fo=(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||!jr(i.key,o)).map(i=>lo(i)?uo(i):so(i))},po=(t,e)=>{const r=t.find(({key:o})=>o===Ct)??null,n=t.find(({key:o})=>o===Nt)??null;r&&co(r)&&e.append(Ct,r.value),n&&io(n)&&e.append(Nt,n.value)},gt=t=>t.map(e=>{const[r,n]=e.split("/");return{key:r,value:n}}),Gr=(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}=ao(n);return n==null?void 0:n.filter(a=>!jr(a.key,o))},yo=t=>t.getAll("facets").flatMap(e=>{const[r,...n]=e.split("/");return!r||n.length===0?[]:[{key:r,value:n.join("/")}]}),vo=t=>{const e=kn.decodeJwt(t??"");return{email:e.sub,userId:e.userId}},go=({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:gt(r),term:o,base:o?"":t,page:a}},mo=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},ho=(t,e,r=24,n=1,o)=>{const a=`/search?query=${e??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;t.push(a)},Br={parseSearchState:go,convertSearchParams:mo,filterNonRootFacets:Gr,selectedFacets:gt,filterNonCategorySelected:Ur},So=Object.freeze(Object.defineProperty({__proto__:null,default:Br},Symbol.toStringTag,{value:"Module"}));var at=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _o(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 Hr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return e}});function e(r){return r.replace(/\/$/,"")||"/"}})(Hr);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 mt={};(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+"/")}})(mt);var qr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(Bn,wt){for(var Tt in wt)Object.defineProperty(Bn,Tt,{enumerable:!0,get:wt[Tt]})}e(t,{ACTION_SUFFIX:function(){return c},APP_DIR_ALIAS:function(){return Q},CACHE_ONE_YEAR:function(){return R},DOT_NEXT_ALIAS:function(){return U},ESLINT_DEFAULT_DIRS:function(){return Ln},GSP_NO_RETURNED_VALUE:function(){return Nn},GSSP_COMPONENT_MEMBER_ERROR:function(){return Fn},GSSP_NO_RETURNED_VALUE:function(){return Dn},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 g},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return d},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return h},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 _},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return f},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return u},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return Mn},PAGES_DIR_ALIAS:function(){return B},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 P},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 Cn},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return he},SERVER_PROPS_SSG_CONFLICT:function(){return ie},SERVER_RUNTIME:function(){return Un},SSG_FALLBACK_EXPORT_ERROR:function(){return $n},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return Ue},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return Tn},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return xn},WEBPACK_LAYERS:function(){return jn},WEBPACK_RESOURCE_QUERIES:function(){return Gn}});const r="nxtP",n="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",l=".rsc",c=".action",f=".json",u=".meta",p=".body",s="x-next-cache-tags",y="x-next-cache-soft-tags",d="x-next-revalidated-tags",h="x-next-revalidate-tag-token",_=128,b=256,O=1024,g="_N_T_",R=31536e3,I="middleware",L=`(?:src/)?${I}`,N="instrumentation",B="private-next-pages",U="private-dot-next",D="private-next-root-dir",Q="private-next-app-dir",k="private-next-rsc-mod-ref-proxy",P="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",Tn="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",Cn="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",Nn="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",Dn="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",xn="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",Fn="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",Mn='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',$n="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",Ln=["app","pages","components","lib","src"],Un={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"},jn={...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]}},Gn={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}})(qr);var Wr={},ht={};(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}})(ht);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const e=ht,r=mt;function n(o,a,i,l){if(!a||a===i)return o;const c=o.toLowerCase();return!l&&((0,r.pathHasPrefix)(c,"/api")||(0,r.pathHasPrefix)(c,"/"+a.toLowerCase()))?o:(0,e.addPathPrefix)(o,"/"+a)}})(Wr);var Xr={};(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}}})(Xr);var Vr={};(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 c=(a=l.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(n===c||o===l.defaultLocale.toLowerCase()||(i=l.locales)!=null&&i.some(f=>f.toLowerCase()===o))return l}}}})(Vr);const Eo=(t="")=>t.charAt(0).toUpperCase()+t.slice(1),Dt=(t,e=" ")=>!t||typeof t=="string"&&t.length===0?t:(Array.isArray(t)?t:t.split("-")).map(Eo).join(e),Ao=({canonical:t,seo:e,slug:r})=>{const n=Array.isArray(r)?r.join(", "):r;return{id:0,Title:`${Array.isArray(r)?r.map(a=>Dt(a)).join(","):Dt(r)} - ${e.title}`,MetaTagDescription:e.description,name:n,hasChildren:!1,url:t,children:[]}},Po=({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]:[]}}),bo=({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},Oo=t=>{t instanceof Error?(console.error(`[ERROR CATEGORY INFO]: ${t.message}`),console.error(t.stack)):console.error("[ERROR CATEGORY INFO]: Unknown error",t)},Ro=new Set(["brand","category","department","subcategory","collection","cluster"]),Io=t=>typeof(t==null?void 0:t.pageType)=="string"&&Ro.has(t==null?void 0:t.pageType.toLowerCase()),wo=t=>({collection:t.Coleção,categoryId:t.categoryId,current_collection:t["Coleção Atual"],items:t.items}),zr=(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},[]),To=Object.freeze(Object.defineProperty({__proto__:null,createEmptySeoCategory:Ao,createSeoCategory:Po,findCategory:bo,formattedSimilars:zr,isCollectionPageType:Io,notFindCategoryError:Oo,responseAdapter:wo},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"},St=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 Co(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=St(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 No=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 Kr({apiUrl:t,body:e}){if(!e){console.error("[ERROR FETCHING] Body is required");return}await No.validate(e);const{orderFormId:r,utmiPart:n,coupon:o,...a}=e,i=`${t}/api/checkout/pub/orderForm/${r}/attachments/marketingData`;return St(i,{method:"POST",body:{orderFormId:r,utmiPart:n??r,coupon:o??null,...a}})}const Do=Object.freeze(Object.defineProperty({__proto__:null,postMediaData:Kr},Symbol.toStringTag,{value:"Module"})),xo=({children:t,data:e,SectionZone:r,className:n})=>{var u,p;const o=((u=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:u.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),c=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:c??[]})})]}),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(qn.Utils.Divider,{})]})};var oe=TypeError;const Fo={},Mo=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"})),$o=_o(Mo);var _t=typeof Map=="function"&&Map.prototype,je=Object.getOwnPropertyDescriptor&&_t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Re=_t&&je&&typeof je.get=="function"?je.get:null,xt=_t&&Map.prototype.forEach,Et=typeof Set=="function"&&Set.prototype,Ge=Object.getOwnPropertyDescriptor&&Et?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ie=Et&&Ge&&typeof Ge.get=="function"?Ge.get:null,Ft=Et&&Set.prototype.forEach,Lo=typeof WeakMap=="function"&&WeakMap.prototype,se=Lo?WeakMap.prototype.has:null,Uo=typeof WeakSet=="function"&&WeakSet.prototype,fe=Uo?WeakSet.prototype.has:null,jo=typeof WeakRef=="function"&&WeakRef.prototype,Mt=jo?WeakRef.prototype.deref:null,Go=Boolean.prototype.valueOf,Bo=Object.prototype.toString,ko=Function.prototype.toString,Ho=String.prototype.match,At=String.prototype.slice,H=String.prototype.replace,qo=String.prototype.toUpperCase,$t=String.prototype.toLowerCase,Yr=RegExp.prototype.test,Lt=Array.prototype.concat,$=Array.prototype.join,Wo=Array.prototype.slice,Ut=Math.floor,it=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Be=Object.getOwnPropertySymbols,lt=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,Qr=Object.prototype.propertyIsEnumerable,jt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Gt(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Yr.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Ut(-t):Ut(t);if(n!==t){var o=String(n),a=At.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 ct=$o,Bt=ct.custom,kt=en(Bt)?Bt:null,Jr={__proto__:null,double:'"',single:"'"},Xo={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},De=function t(e,r,n,o){var a=r||{};if(G(a,"quoteStyle")&&!G(Jr,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(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=G(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(G(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(G(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 rn(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return l?Gt(e,c):c}if(typeof e=="bigint"){var f=String(e)+"n";return l?Gt(e,f):f}var u=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof e=="object")return ut(e)?"[Array]":"[Object]";var p=sa(a,n);if(typeof o>"u")o=[];else if(tn(o,e)>=0)return"[Circular]";function s(P,x,C){if(x&&(o=Wo.call(o),o.push(x)),C){var X={depth:a.depth};return G(a,"quoteStyle")&&(X.quoteStyle=a.quoteStyle),t(P,X,n+1,o)}return t(P,a,n+1,o)}if(typeof e=="function"&&!Ht(e)){var y=ta(e),d=Se(e,s);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(d.length>0?" { "+$.call(d,", ")+" }":"")}if(en(e)){var h=re?H.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lt.call(e);return typeof e=="object"&&!re?ce(h):h}if(la(e)){for(var _="<"+$t.call(String(e.nodeName)),b=e.attributes||[],O=0;O<b.length;O++)_+=" "+b[O].name+"="+Zr(Vo(b[O].value),"double",a);return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+$t.call(String(e.nodeName))+">",_}if(ut(e)){if(e.length===0)return"[]";var g=Se(e,s);return p&&!ua(g)?"["+st(g,p)+"]":"[ "+$.call(g,", ")+" ]"}if(Ko(e)){var R=Se(e,s);return!("cause"in Error.prototype)&&"cause"in e&&!Qr.call(e,"cause")?"{ ["+String(e)+"] "+$.call(Lt.call("[cause]: "+s(e.cause),R),", ")+" }":R.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$.call(R,", ")+" }"}if(typeof e=="object"&&i){if(kt&&typeof e[kt]=="function"&&ct)return ct(e,{depth:u-n});if(i!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(ra(e)){var I=[];return xt&&xt.call(e,function(P,x){I.push(s(x,e,!0)+" => "+s(P,e))}),qt("Map",Re.call(e),I,p)}if(aa(e)){var L=[];return Ft&&Ft.call(e,function(P){L.push(s(P,e))}),qt("Set",Ie.call(e),L,p)}if(na(e))return ke("WeakMap");if(ia(e))return ke("WeakSet");if(oa(e))return ke("WeakRef");if(Qo(e))return ce(s(Number(e)));if(Zo(e))return ce(s(it.call(e)));if(Jo(e))return ce(Go.call(e));if(Yo(e))return ce(s(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof at<"u"&&e===at)return"{ [object globalThis] }";if(!zo(e)&&!Ht(e)){var N=Se(e,s),B=jt?jt(e)===Object.prototype:e instanceof Object||e.constructor===Object,U=e instanceof Object?"":"null prototype",D=!B&&pe&&Object(e)===e&&pe in e?At.call(W(e),8,-1):U?"Object":"",Q=B||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",k=Q+(D||U?"["+$.call(Lt.call([],D||[],U||[]),": ")+"] ":"");return N.length===0?k+"{}":p?k+"{"+st(N,p)+"}":k+"{ "+$.call(N,", ")+" }"}return String(e)};function Zr(t,e,r){var n=r.quoteStyle||e,o=Jr[n];return o+t+o}function Vo(t){return H.call(String(t),/"/g,"&quot;")}function Y(t){return!pe||!(typeof t=="object"&&(pe in t||typeof t[pe]<"u"))}function ut(t){return W(t)==="[object Array]"&&Y(t)}function zo(t){return W(t)==="[object Date]"&&Y(t)}function Ht(t){return W(t)==="[object RegExp]"&&Y(t)}function Ko(t){return W(t)==="[object Error]"&&Y(t)}function Yo(t){return W(t)==="[object String]"&&Y(t)}function Qo(t){return W(t)==="[object Number]"&&Y(t)}function Jo(t){return W(t)==="[object Boolean]"&&Y(t)}function en(t){if(re)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!lt)return!1;try{return lt.call(t),!0}catch{}return!1}function Zo(t){if(!t||typeof t!="object"||!it)return!1;try{return it.call(t),!0}catch{}return!1}var ea=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return ea.call(t,e)}function W(t){return Bo.call(t)}function ta(t){if(t.name)return t.name;var e=Ho.call(ko.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function tn(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 ra(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 na(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 oa(t){if(!Mt||!t||typeof t!="object")return!1;try{return Mt.call(t),!0}catch{}return!1}function aa(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 ia(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 la(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function rn(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return rn(At.call(t,0,e.maxStringLength),e)+n}var o=Xo[e.quoteStyle||"single"];o.lastIndex=0;var a=H.call(H.call(t,o,"\\$1"),/[\x00-\x1f]/g,ca);return Zr(a,"single",e)}function ca(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":"")+qo.call(e.toString(16))}function ce(t){return"Object("+t+")"}function ke(t){return t+" { ? }"}function qt(t,e,r,n){var o=n?st(r,n):$.call(r,", ");return t+" ("+e+") {"+o+"}"}function ua(t){for(var e=0;e<t.length;e++)if(tn(t[e],`
2
+ `)>=0)return!1;return!0}function sa(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 st(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=ut(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var a=typeof Be=="function"?Be(t):[],i;if(re){i={};for(var l=0;l<a.length;l++)i["$"+a[l]]=a[l]}for(var c in t)G(t,c)&&(r&&String(Number(c))===c&&c<t.length||re&&i["$"+c]instanceof Symbol||(Yr.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof Be=="function")for(var f=0;f<a.length;f++)Qr.call(t,a[f])&&n.push("["+e(a[f])+"]: "+e(t[a[f]],t));return n}var fa=De,pa=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},da=function(t,e){if(t){var r=xe(t,e);return r&&r.value}},ya=function(t,e,r){var n=xe(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},va=function(t,e){return t?!!xe(t,e):!1},ga=function(t,e){if(t)return xe(t,e,!0)},ma=function(){var e,r={assert:function(n){if(!r.has(n))throw new pa("Side channel does not contain "+fa(n))},delete:function(n){var o=e&&e.next,a=ga(e,n);return a&&o&&o===a&&(e=void 0),!!a},get:function(n){return da(e,n)},has:function(n){return va(e,n)},set:function(n,o){e||(e={next:void 0}),ya(e,n,o)}};return r},nn=Object,ha=Error,Sa=EvalError,_a=RangeError,Ea=ReferenceError,Aa=SyntaxError,Pa=URIError,ba=Math.abs,Oa=Math.floor,Ra=Math.max,Ia=Math.min,wa=Math.pow,Ta=Math.round,Ca=Number.isNaN||function(e){return e!==e},Na=Ca,Da=function(e){return Na(e)||e===0?e:e<0?-1:1},xa=Object.getOwnPropertyDescriptor,Ee=xa;if(Ee)try{Ee([],"length")}catch{Ee=null}var on=Ee,Ae=Object.defineProperty||!1;if(Ae)try{Ae({},"a",{value:1})}catch{Ae=!1}var Fa=Ae,He,Wt;function Ma(){return Wt||(Wt=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,Xt;function $a(){if(Xt)return qe;Xt=1;var t=typeof Symbol<"u"&&Symbol,e=Ma();return qe=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},qe}var We,Vt;function an(){return Vt||(Vt=1,We=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),We}var Xe,zt;function ln(){if(zt)return Xe;zt=1;var t=nn;return Xe=t.getPrototypeOf||null,Xe}var La="Function.prototype.bind called on incompatible ",Ua=Object.prototype.toString,ja=Math.max,Ga="[object Function]",Kt=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},Ba=function(e,r){for(var n=[],o=r,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},ka=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},Ha=function(e){var r=this;if(typeof r!="function"||Ua.apply(r)!==Ga)throw new TypeError(La+r);for(var n=Ba(arguments,1),o,a=function(){if(this instanceof o){var u=r.apply(this,Kt(n,arguments));return Object(u)===u?u:this}return r.apply(e,Kt(n,arguments))},i=ja(0,r.length-n.length),l=[],c=0;c<i;c++)l[c]="$"+c;if(o=Function("binder","return function ("+ka(l,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var f=function(){};f.prototype=r.prototype,o.prototype=new f,f.prototype=null}return o},qa=Ha,Fe=Function.prototype.bind||qa,Ve,Yt;function Pt(){return Yt||(Yt=1,Ve=Function.prototype.call),Ve}var ze,Qt;function cn(){return Qt||(Qt=1,ze=Function.prototype.apply),ze}var Wa=typeof Reflect<"u"&&Reflect&&Reflect.apply,Xa=Fe,Va=cn(),za=Pt(),Ka=Wa,Ya=Ka||Xa.call(za,Va),Qa=Fe,Ja=oe,Za=Pt(),ei=Ya,un=function(e){if(e.length<1||typeof e[0]!="function")throw new Ja("a function is required");return ei(Qa,Za,e)},Ke,Jt;function ti(){if(Jt)return Ke;Jt=1;var t=un,e=on,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 Ke=n&&typeof n.get=="function"?t([n.get]):typeof a=="function"?function(l){return a(l==null?l:o(l))}:!1,Ke}var Ye,Zt;function ri(){if(Zt)return Ye;Zt=1;var t=an(),e=ln(),r=ti();return Ye=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,Ye}var Qe,er;function ni(){if(er)return Qe;er=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Fe;return Qe=r.call(t,e),Qe}var v,oi=nn,ai=ha,ii=Sa,li=_a,ci=Ea,ne=Aa,te=oe,ui=Pa,si=ba,fi=Oa,pi=Ra,di=Ia,yi=wa,vi=Ta,gi=Da,sn=Function,Je=function(t){try{return sn('"use strict"; return ('+t+").constructor;")()}catch{}},ye=on,mi=Fa,Ze=function(){throw new te},hi=ye?function(){try{return arguments.callee,Ze}catch{try{return ye(arguments,"callee").get}catch{return Ze}}}():Ze,J=$a()(),A=ri(),Si=ln(),_i=an(),fn=cn(),ve=Pt(),ee={},Ei=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%":ai,"%eval%":eval,"%EvalError%":ii,"%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%":sn,"%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%":oi,"%Object.getOwnPropertyDescriptor%":ye,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":li,"%ReferenceError%":ci,"%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%":hi,"%TypedArray%":Ei,"%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%":ui,"%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%":fn,"%Object.defineProperty%":mi,"%Object.getPrototypeOf%":Si,"%Math.abs%":si,"%Math.floor%":fi,"%Math.max%":pi,"%Math.min%":di,"%Math.pow%":yi,"%Math.round%":vi,"%Math.sign%":gi,"%Reflect.getPrototypeOf%":_i};if(A)try{null.error}catch(t){var Ai=A(A(t));K["%Error.prototype%"]=Ai}var Pi=function t(e){var r;if(e==="%AsyncFunction%")r=Je("async function () {}");else if(e==="%GeneratorFunction%")r=Je("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Je("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},tr={__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"]},ge=Fe,we=ni(),bi=ge.call(ve,Array.prototype.concat),Oi=ge.call(fn,Array.prototype.splice),rr=ge.call(ve,String.prototype.replace),Te=ge.call(ve,String.prototype.slice),Ri=ge.call(ve,RegExp.prototype.exec),Ii=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,wi=/\\(\\)?/g,Ti=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 rr(e,Ii,function(a,i,l,c){o[o.length]=l?rr(c,wi,"$1"):i||a}),o},Ci=function(e,r){var n=e,o;if(we(tr,n)&&(o=tr[n],n="%"+o[0]+"%"),we(K,n)){var a=K[n];if(a===ee&&(a=Pi(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!")},bt=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(Ri(/^%?[^%]*%?$/,e)===null)throw new ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ti(e),o=n.length>0?n[0]:"",a=Ci("%"+o+"%",r),i=a.name,l=a.value,c=!1,f=a.alias;f&&(o=f[0],Oi(n,bi([0,1],f)));for(var u=1,p=!0;u<n.length;u+=1){var s=n[u],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)&&(c=!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&&u+1>=n.length){var h=ye(l,s);p=!!h,p&&"get"in h&&!("originalValue"in h.get)?l=h.get:l=l[s]}else p=we(l,s),l=l[s];p&&!c&&(K[i]=l)}}return l},pn=bt,dn=un,Ni=dn([pn("%String.prototype.indexOf%")]),yn=function(e,r){var n=pn(e,!!r);return typeof n=="function"&&Ni(e,".prototype.")>-1?dn([n]):n},Di=bt,me=yn,xi=De,Fi=oe,nr=Di("%Map%",!0),Mi=me("Map.prototype.get",!0),$i=me("Map.prototype.set",!0),Li=me("Map.prototype.has",!0),Ui=me("Map.prototype.delete",!0),ji=me("Map.prototype.size",!0),vn=!!nr&&function(){var e,r={assert:function(n){if(!r.has(n))throw new Fi("Side channel does not contain "+xi(n))},delete:function(n){if(e){var o=Ui(e,n);return ji(e)===0&&(e=void 0),o}return!1},get:function(n){if(e)return Mi(e,n)},has:function(n){return e?Li(e,n):!1},set:function(n,o){e||(e=new nr),$i(e,n,o)}};return r},Gi=bt,Me=yn,Bi=De,_e=vn,ki=oe,Z=Gi("%WeakMap%",!0),Hi=Me("WeakMap.prototype.get",!0),qi=Me("WeakMap.prototype.set",!0),Wi=Me("WeakMap.prototype.has",!0),Xi=Me("WeakMap.prototype.delete",!0),Vi=Z?function(){var e,r,n={assert:function(o){if(!n.has(o))throw new ki("Side channel does not contain "+Bi(o))},delete:function(o){if(Z&&o&&(typeof o=="object"||typeof o=="function")){if(e)return Xi(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?Hi(e,o):r&&r.get(o)},has:function(o){return Z&&o&&(typeof o=="object"||typeof o=="function")&&e?Wi(e,o):!!r&&r.has(o)},set:function(o,a){Z&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new Z),qi(e,o,a)):_e&&(r||(r=_e()),r.set(o,a))}};return n}:_e,zi=oe,Ki=De,Yi=ma,Qi=vn,Ji=Vi,Zi=Ji||Qi||Yi,gn=function(){var e,r={assert:function(n){if(!r.has(n))throw new zi("Side channel does not contain "+Ki(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=Zi()),e.set(n,o)}};return r},el=String.prototype.replace,tl=/%20/g,et={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ot={default:et.RFC3986,formatters:{RFC1738:function(t){return el.call(t,tl,"+")},RFC3986:function(t){return String(t)}},RFC1738:et.RFC1738,RFC3986:et.RFC3986},rl=Ot,nl=gn,tt=Object.prototype.hasOwnProperty,z=Array.isArray,$e=nl(),mn=function(e,r){return $e.set(e,r),e},Ce=function(e){return $e.has(e)},ft=function(e){return $e.get(e)},hn=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}(),ol=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}}},Rt=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},al=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=ft(e)+1;e[o]=r,hn(e,o)}else(n&&(n.plainObjects||n.allowPrototypes)||!tt.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 c=parseInt(a[l],10);i[c+1]=r[a[l]]}return mn(i,ft(r)+1)}return[e].concat(r)}var f=e;return z(e)&&!z(r)&&(f=Rt(e,n)),z(e)&&z(r)?(r.forEach(function(u,p){if(tt.call(e,p)){var s=e[p];s&&typeof s=="object"&&u&&typeof u=="object"?e[p]=t(s,u,n):e.push(u)}else e[p]=u}),e):Object.keys(r).reduce(function(u,p){var s=r[p];return tt.call(u,p)?u[p]=t(u[p],s,n):u[p]=s,u},f)},il=function(e,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},e)},ll=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}},rt=1024,cl=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="",c=0;c<i.length;c+=rt){for(var f=i.length>=rt?i.slice(c,c+rt):i,u=[],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===rl.RFC1738&&(s===40||s===41)){u[u.length]=f.charAt(p);continue}if(s<128){u[u.length]=F[s];continue}if(s<2048){u[u.length]=F[192|s>>6]+F[128|s&63];continue}if(s<55296||s>=57344){u[u.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),u[u.length]=F[240|s>>18]+F[128|s>>12&63]+F[128|s>>6&63]+F[128|s&63]}l+=u.join("")}return l},ul=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),c=0;c<l.length;++c){var f=l[c],u=i[f];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:i,prop:f}),n.push(u))}return ol(r),e},sl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},fl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},pl=function(e,r,n,o){if(Ce(e)){var a=ft(e)+1;return e[a]=r,hn(e,a),e}var i=[].concat(e,r);return i.length>n?mn(Rt(i,{plainObjects:o}),i.length-1):i},dl=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)},Sn={arrayToObject:Rt,assign:il,combine:pl,compact:ul,decode:ll,encode:cl,isBuffer:fl,isOverflow:Ce,isRegExp:sl,maybeMap:dl,merge:al},_n=gn,Pe=Sn,de=Ot,yl=Object.prototype.hasOwnProperty,En={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},M=Array.isArray,vl=Array.prototype.push,An=function(t,e){vl.apply(t,M(e)?e:[e])},gl=Date.prototype.toISOString,or=de.default,S={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:or,formatter:de.formatters[or],indices:!1,serializeDate:function(e){return gl.call(e)},skipNulls:!1,strictNullHandling:!1},ml=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},nt={},hl=function t(e,r,n,o,a,i,l,c,f,u,p,s,y,d,h,_,b,O){for(var g=e,R=O,I=0,L=!1;(R=R.get(nt))!==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(nt)>"u"&&(I=0)}if(typeof u=="function"?g=u(r,g):g instanceof Date?g=y(g):n==="comma"&&M(g)&&(g=Pe.maybeMap(g,function(ie){return ie instanceof Date?y(ie):ie})),g===null){if(i)return f&&!_?f(r,S.encoder,b,"key",d):r;g=""}if(ml(g)||Pe.isBuffer(g)){if(f){var B=_?r:f(r,S.encoder,b,"key",d);return[h(B)+"="+h(f(g,S.encoder,b,"value",d))]}return[h(r)+"="+h(String(g))]}var U=[];if(typeof g>"u")return U;var D;if(n==="comma"&&M(g))_&&f&&(g=Pe.maybeMap(g,f)),D=[{value:g.length>0?g.join(",")||null:void 0}];else if(M(u))D=u;else{var Q=Object.keys(g);D=p?Q.sort(p):Q}var k=c?String(r).replace(/\./g,"%2E"):String(r),P=o&&M(g)&&g.length===1?k+"[]":k;if(a&&M(g)&&g.length===0)return P+"[]";for(var x=0;x<D.length;++x){var C=D[x],X=typeof C=="object"&&C&&typeof C.value<"u"?C.value:g[C];if(!(l&&X===null)){var ae=s&&c?String(C).replace(/\./g,"%2E"):String(C),Ue=M(g)?typeof n=="function"?n(P,ae):P:P+(s?"."+ae:"["+ae+"]");O.set(e,I);var he=_n();he.set(nt,O),An(U,t(X,Ue,n,o,a,i,l,c,n==="comma"&&_&&M(g)?null:f,u,p,s,y,d,h,_,b,he))}}return U},Sl=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.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||S.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(!yl.call(de.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=de.formatters[n],a=S.filter;(typeof e.filter=="function"||M(e.filter))&&(a=e.filter);var i;if(e.arrayFormat in En?i=e.arrayFormat:"indices"in e?i=e.indices?"indices":"repeat":i=S.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:S.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:S.addQueryPrefix,allowDots:l,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:S.allowEmptyArrays,arrayFormat:i,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:S.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?S.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:S.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:S.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:S.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:S.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:S.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:S.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:S.strictNullHandling}},_l=function(t,e){var r=t,n=Sl(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=En[n.arrayFormat],c=l==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var f=_n(),u=0;u<o.length;++u){var p=o[u],s=r[p];n.skipNulls&&s===null||An(i,hl(s,p,l,c,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=Sn,be=Object.prototype.hasOwnProperty,ar=Array.isArray,m={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},El=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Pn=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},Al="utf8=%26%2310003%3B",Pl="utf8=%E2%9C%93",bl=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,c,f=r.charset;if(r.charsetSentinel)for(c=0;c<i.length;++c)i[c].indexOf("utf8=")===0&&(i[c]===Pl?f="utf-8":i[c]===Al&&(f="iso-8859-1"),l=c,c=i.length);for(c=0;c<i.length;++c)if(c!==l){var u=i[c],p=u.indexOf("]="),s=p===-1?u.indexOf("="):p+1,y,d;if(s===-1?(y=r.decoder(u,m.decoder,f,"key"),d=r.strictNullHandling?null:""):(y=r.decoder(u.slice(0,s),m.decoder,f,"key"),y!==null&&(d=q.maybeMap(Pn(u.slice(s+1),r,ar(n[y])?n[y].length:0),function(_){return r.decoder(_,m.decoder,f,"value")}))),d&&r.interpretNumericEntities&&f==="iso-8859-1"&&(d=El(String(d))),u.indexOf("[]=")>-1&&(d=ar(d)?[d]:d),y!==null){var h=be.call(n,y);h&&r.duplicates==="combine"?n[y]=q.combine(n[y],d,r.arrayLimit,r.plainObjects):(!h||r.duplicates==="last")&&(n[y]=d)}}return n},Ol=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:Pn(e,r,o),l=t.length-1;l>=0;--l){var c,f=t[l];if(f==="[]"&&r.parseArrays)q.isOverflow(i)?c=i:c=r.allowEmptyArrays&&(i===""||r.strictNullHandling&&i===null)?[]:q.combine([],i,r.arrayLimit,r.plainObjects);else{c=r.plainObjects?{__proto__:null}:{};var u=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,p=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,s=parseInt(p,10);!r.parseArrays&&p===""?c={0:i}:!isNaN(s)&&f!==p&&String(s)===p&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(c=[],c[s]=i):p!=="__proto__"&&(c[p]=i)}i=c}return i},Rl=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,c=[];if(l){if(!r.plainObjects&&be.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;(i=a.exec(n))!==null&&f<r.depth;){f+=1;var u=i[1].slice(1,-1);if(!r.plainObjects&&be.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(i[1])}if(i){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+n.slice(i.index)+"]")}return c},Il=function(e,r,n,o){if(e){var a=Rl(e,n);if(a)return Ol(a,r,n,o)}},wl=function(e){if(!e)return m;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"?m.charset:e.charset,n=typeof e.duplicates>"u"?m.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:m.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:m.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:m.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:m.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:m.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:m.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:m.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:m.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:m.decoder,delimiter:typeof e.delimiter=="string"||q.isRegExp(e.delimiter)?e.delimiter:m.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:m.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:m.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:m.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:m.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:m.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:m.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},Tl=function(t,e){var r=wl(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?bl(t,r):t,o=r.plainObjects?{__proto__:null}:{},a=Object.keys(n),i=0;i<a.length;++i){var l=a[i],c=Il(l,n[l],r,typeof t=="string");o=q.merge(o,c,r)}return r.allowSparse===!0?o:q.compact(o)},Cl=_l,Nl=Tl,Dl=Ot,xl={formats:Dl,parse:Nl,stringify:Cl};const Fl=kr(xl);async function Le(t,e={},r){const{cms:n="cms"}=e;return fetch(`${t.href}?${Fl.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 It(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 bn(t){return Array.isArray(t)&&t.length>0?t[0]:Array.isArray(t)?null:t}async function On(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(It(`${t}${i}`,r)),c=await Le(l,r,o);if(!c.ok)return console.error(`[Error fetching preview data]: ${t} - status: ${c.statusText}`),[];const f=await c.json(),u=e.findIndex(p=>p.documentId===f.id);return u!==-1?(e[u]=f,[...e]):[f,...e]}return e}const Ml=Object.freeze(Object.defineProperty({__proto__:null,createUrl:It,fetchCMS:Le,mergePreviewDocument:On,spreadStrapiData:bn},Symbol.toStringTag,{value:"Module"}));async function Rn(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?bn(a):a}:{status:404,data:[],error:"No data found"}}async function In(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,c=0,f=!0;try{do{const u=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&&(c=u.totalItems),Array.isArray(u==null?void 0:u.data)&&i.push(...u.data),f=!!(u!=null&&u.hasNextPage),l++}while(f&&i.length<c);if(o&&i.length>0){if(!t||!n)throw new Error("contentType and previewId are required for preview mode in vtexCMSData");const u=await On(t,i,a);return{status:u.length>0?200:404,data:u}}return{status:i.length?200:404,data:i}}catch(u){return{status:500,data:[],error:u instanceof Error?u.message:String(u)}}}const $l=Object.freeze(Object.defineProperty({__proto__:null,strapiCMSData:Rn,vtexCMSData:In},Symbol.toStringTag,{value:"Module"}));async function Ll({contentType:t,documentId:e,versionId:r,CMS_PROJECT_NAME:n}){const o=e&&e.length?`/${e}`:"",a=r&&r.length?`?versionId=${r}`:"";return vt(`/cms/api/${n}/${t}${o}${a}`,{cache:"no-cache"})}async function wn(t,e={},r){const{cms:n="vtex"}=e??{};try{const o=new URL(It(t,e));return n!=="vtex"?Rn(o,e,r):In(t,o,e)}catch(o){return console.error(`[Fetch ContentType Error CMS ${n}]`,o),r?{status:400,data:null}:{status:200,data:[]}}}const Ul=Object.freeze(Object.defineProperty({__proto__:null,fetchContentType:wn,getCMSContentType:Ll},Symbol.toStringTag,{value:"Module"}));exports.SearchPageScreening=xo;exports.addItemOrder=Ar;exports.addLocale=Wr;exports.addNotification=Fr;exports.addPathPrefix=ht;exports.addSearchParamsFacets=po;exports.cart=ro;exports.catalogHelpers=To;exports.cms=Ul;exports.cmsHelpers=$l;exports.cmsUtils=Ml;exports.commonjsGlobal=at;exports.configureFetchProxy=no;exports.constants=qr;exports.createNewAddress=Lr;exports.detectDomainLocale=Vr;exports.disableSKU=pr;exports.fetchContentType=wn;exports.fetchProxy=vt;exports.fetchVtex=St;exports.fetchVtexWithAbortController=Co;exports.filterNonCategorySelected=Ur;exports.filterNonRootFacets=Gr;exports.findItemIndex=Or;exports.findOptions=Dr;exports.formatPriceToCurrency=Oe;exports.formattedFacets=fo;exports.formattedSimilars=zr;exports.freightParsePrice=ir;exports.getAuthenticatedUser=vo;exports.getCode=Ir;exports.getColorAndSizeFromSkuName=cr;exports.getDefaultExportFromCjs=kr;exports.getDiscountPercent=lr;exports.getFacetsActiveSearchParams=yo;exports.getFirstImages=mr;exports.getProductNameWithoutSku=sr;exports.getQuantity=Nr;exports.getRemoveId=wr;exports.getSKUName=ur;exports.getSkuInfos=fr;exports.getThumbImage=yr;exports.getValidOffer=dr;exports.getValue=Tr;exports.initialState=Sr;exports.marketingTagsBuilder=Mr;exports.marketingdata=Do;exports.mergeOptionsPromise=xr;exports.mountMarketingData=$r;exports.navigateToSearchPage=ho;exports.normalizeLocalePath=Xr;exports.parsePath=Ne;exports.pathHasPrefix=mt;exports.postMediaData=Kr;exports.productHelpers=zn;exports.promiseDefault=T;exports.proxyCartAPI=oo;exports.removeQuantity=Pr;exports.removeTrailingSlash=Hr;exports.resizingImg=vr;exports.responsive=ue;exports.search=So;exports.searchHelpers=Br;exports.selectedFacets=gt;exports.setVideoPlay=hr;exports.splitNameAndSizeFromFullName=pt;exports.updateItemSellerExternal=Rr;exports.updateOrderFormPromise=Cr;exports.updateQuantity=br;exports.updatedResizedImg=gr;