@soma-vertical-web/multi-lib 1.0.19 → 1.0.20
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/contexts/plp/FilterContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPContext.d.ts +1 -1
- package/contexts/contexts/search/Facets.d.ts +1 -1
- package/contexts/contexts/search/Search.d.ts +1 -1
- package/contexts/hooks/useSimilars.d.ts +7 -0
- package/contexts/index.d.ts +4 -4
- package/data/helpers/plp/index.d.ts +2 -2
- package/data/helpers/search/facets.d.ts +0 -1
- package/data/helpers/search/index.d.ts +0 -4
- package/data/helpers/search/search.d.ts +0 -1
- package/data/index.d.ts +0 -2
- package/index-CpUjW-m9.mjs +1877 -0
- package/index-xWhZ_YcF.js +4 -0
- package/index.js +17 -17
- package/index.mjs +8437 -10416
- package/index2.js +1 -1
- package/index2.mjs +613 -685
- package/layout/index.d.ts +3 -3
- package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
- package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
- package/layout/template/PDC/PDC.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +2 -2
- package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
- package/layout/template/PDP/index.d.ts +2 -2
- package/package.json +1 -1
- package/server.d.ts +1 -7
- package/style.css +1 -1
- package/types/cms/Sections/SectionZone/index.d.ts +1 -0
- package/types/contexts/contexts/plp.d.ts +9 -42
- package/types/contexts/contexts/search.d.ts +15 -34
- package/types/contexts/hooks/index.d.ts +12 -0
- package/types/layout/team-components/PLPNavigation/index.d.ts +2 -0
- package/types/layout/team-components/ProductCard/index.d.ts +1 -0
- package/types/layout/team-components/ProductList/index.d.ts +2 -1
- package/types/layout/templates/PDP/index.d.ts +1 -2
- package/types/layout/templates/PLP/index.d.ts +3 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const O=require("react/jsx-runtime"),Mt=require("@soma-vertical-web/core-components"),me=(r,e=!0)=>Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:e?2:0}).format(r),Wr=({valueInCents:r,hasFree:e,freeTaxMessage:t})=>r===0?e?t:me(0):me(r/100),jr=(r,e)=>{const n=(r-e)*100/r;return Math.floor(n)},rr=(r,e)=>{const[t,n]=r.split(e);return{name:t.trim(),size:n?n.trim():""}},zr=(r,e)=>{if(!r)return{};const[t,n]=r.split(e);return{color:t==null?void 0:t.trim(),size:n==null?void 0:n.trim()}},qr=(r,e="tamanho")=>{if(r.additionalProperty){const[t]=r.additionalProperty;return t!=null&&t.name?t.name.toLocaleLowerCase()===e?t.value:r.name:""}return r.name},Gr=(r,e)=>r.replace(e,"").trim(),Bt=r=>r.replace(/\//g,""),Hr=({items:r,NAME_SPLIT_SYMBOL:e})=>{const t={price:0,listPrice:0,installments:{count:0,value:0}},n=(i,c)=>{var u;c&&(c.sellerId=i.sellerId,c.sellerName=i.sellerName,c.available=!0,c.isSellerDefault=i.sellerDefault);const{Price:f,ListPrice:s,PaymentOptions:{installmentOptions:l}}=i.commertialOffer;t.price=f,t.listPrice=s;const p=(u=l==null?void 0:l[0])==null?void 0:u.installments;if(p){const{count:v,value:d}=p[p.length-1];t.installments={count:v,value:d/100}}};let o=!0;const a=r.reduce((i,c)=>{var l;const f={name:c.name,sku:c.itemId,value:((l=c.Tamanho)==null?void 0:l[0])??rr(c.nameComplete??c.name,e).size,available:!1,sellerId:"",sellerName:"",isSellerDefault:!1},s=c.sellers.filter(p=>(p.sellerDefault&&p.commertialOffer.IsAvailable&&(f.available=!0,n(p,f)),p.commertialOffer.IsAvailable));return!f.isSellerDefault&&s.length>0&&(f.available=!0,n(s[0],{...f,sellerId:s[0].sellerId,sellerName:s[0].sellerName})),f.available===!1&&(o=!1),i.push(f),i},[]);return{...t,sizes:a,allSizesAvailable:o}},Kr=r=>r?!r.offers.offers.find(({quantity:e=0})=>e>0):!1,Vr=(r,e)=>{const t=r.find(n=>n.availability.includes("InStock")&&n.quantity&&n.listPrice>0&&n.seller.identifier===e);return t||r.find(n=>n.availability.includes("InStock")&&n.quantity&&n.listPrice>0)},Qr=({images:r,TEXTURE_IMAGE:e})=>r.find(t=>e.includes(t.imageLabel))??r[0],Jr=(r,e)=>{const t=/\/ids\/(\d+)\//,n=r.match(t);return n?r.replace(`/${n[1]}/`,`/${n[1]}-${e.width}-${e.height}/`):r},Yr=(r,e)=>{const t=/\/ids\/(\d+)-(\d+)-(\d+)\//,n=r.match(t);return n?r.replace(`/${n[1]}-${n[2]}-${n[3]}/`,`/${n[1]}-${e.width}-${e.height}/`):r},Xr=({images:r,label:e})=>{const t=r.filter(n=>n.keywords===e.first||n.keywords===e.second||n.alternateName===e.first||n.alternateName===e.second);return t.length===0?r.slice(0,2):t},Ut=r=>{const[e,t]=r.split("/").map(Number);if(Number.isNaN(e)||Number.isNaN(t))throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");return t/e},Zr=(r,e,t)=>{e&&(r?(e.getAttribute("src")||(e.src=t??""),e.play()):e.pause())},Lt=Object.freeze(Object.defineProperty({__proto__:null,disableSKU:Kr,formatPriceToCurrency:me,freightParsePrice:Wr,getAspectRatio:Ut,getColorAndSizeFromSkuName:zr,getDiscountPercent:jr,getFirstImages:Xr,getProductNameWithoutSku:Gr,getSKUName:qr,getSkuInfos:Hr,getThumbImage:Qr,getValidOffer:Vr,removeSlashes:Bt,resizingImg:Jr,setVideoPlay:Zr,splitNameAndSizeFromFullName:rr,updatedResizedImg:Yr},Symbol.toStringTag,{value:"Module"})),sr="fuzzy",pr="operator",kt=r=>({isDepartment:r!=null&&r.length?r[0].key==="category-1":!1}),Wt=(r,e)=>{const t=decodeURIComponent(e??"").slice(1).split("/");return r.map(n=>{if(n.key==="category-2"&&n.__typename==="FacetBoolean"){const o=n.values;return{...n,values:o.filter(a=>!t.find(i=>i.toLowerCase()===a.value||i.toLowerCase()===a.name.toLowerCase()))}}return n})},et=(r,e)=>e?r==="category-1":!1,jt=r=>r.key==="operator"&&(r.value==="and"||r.value==="or"),zt=r=>r.type==="TEXT",qt=r=>r.key==="fuzzy"&&(r.value==="0"||r.value==="1"||r.value==="auto"),Gt=r=>{const{key:e,name:t,values:n}=r;return{__typename:"FacetBoolean",key:e,label:t,values:n.slice().sort((o,a)=>o.name.localeCompare(a.name))}},Ht=({key:r,values:e})=>({__typename:"FacetRange",key:r,values:e}),Kt=(r,e,t)=>{if(!(r instanceof Object)||!("facets"in r))return[];const{facets:n=[]}=r,o=e!=null&&e.length?e[0].key==="category-1":!1;return n.filter(i=>!t||!et(i.key,o)).map(i=>zt(i)?Gt(i):Ht(i))},Vt=(r,e)=>{const t=r.find(({key:o})=>o===sr)??null,n=r.find(({key:o})=>o===pr)??null;t&&qt(t)&&e.append(sr,t.value),n&&jt(n)&&e.append(pr,n.value)},Qt=r=>r.map(e=>{const[t,n]=e.split("/");return{key:t,value:n}}),Jt=(r,e)=>{const t=decodeURIComponent(e??"").slice(1).split("/"),n=r.filter(({value:a})=>!t.includes(decodeURIComponent(a))).map(a=>({...a,value:decodeURIComponent(a.value)})),{isDepartment:o}=kt(n);return n==null?void 0:n.filter(a=>!et(a.key,o))},Yt=({pathname:r,searchParams:e},t)=>{const n=e.get("sort")??"",o=e.get("query")??null,a=parseInt(e.get("page")??"1",10);return{sort:n,facets:Qt(t),term:o,base:o?"":r,page:a}},Xt=r=>{const e=new URLSearchParams;return Object.entries(r).forEach(([t,n])=>{Array.isArray(n)?n.forEach(o=>e.append(t,o)):n!==void 0&&e.append(t,n)}),e},Zt=(r,e,t=24,n=1,o)=>{const a=`/search?query=${e??""}&count=${t}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;r.push(a)};var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function en(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}),t}const rn=(r="")=>r.charAt(0).toUpperCase()+r.slice(1),dr=(r,e=" ")=>!r||typeof r=="string"&&r.length===0?r:(Array.isArray(r)?r:r.split("-")).map(rn).join(e),tn=({canonical:r,seo:e,slug:t})=>{const n=Array.isArray(t)?t.join(", "):t;return{id:0,Title:`${Array.isArray(t)?t.map(a=>dr(a)).join(","):dr(t)} - ${e.title}`,MetaTagDescription:e.description,name:n,hasChildren:!1,url:r,children:[]}},nn=({canonical:r,category:e,previousImages:t,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:r},openGraph:{type:"website",title:(e==null?void 0:e.Title)??n.title,description:(e==null?void 0:e.MetaTagDescription)??n.description,images:Array.isArray(t)?[...t]:[]}}),on=({items:r,parent:e,apiUrl:t,find:n})=>{const o=r.find(i=>i.url.replace(t,"")===decodeURIComponent(e.toLowerCase()));return(o==null?void 0:o.children.find(i=>i.name.toLowerCase()===decodeURIComponent(String(n))))??o},an=r=>{r instanceof Error?(console.error(`[ERROR CATEGORY INFO]: ${r.message}`),console.error(r.stack)):console.error("[ERROR CATEGORY INFO]: Unknown error",r)},ln=new Set(["brand","category","department","subcategory","collection","cluster"]),fn=r=>typeof(r==null?void 0:r.pageType)=="string"&&ln.has(r==null?void 0:r.pageType.toLowerCase()),cn=r=>({collection:r.Coleção,categoryId:r.categoryId,current_collection:r["Coleção Atual"],items:r.items}),tt=(r,e)=>r.reduce((t,n)=>{if(n.items.filter(i=>i.sellers.find(c=>c.commertialOffer.IsAvailable)).length===0||(t==null?void 0:t.find(i=>(i==null?void 0:i.productId)===(n==null?void 0:n.productId)))!==void 0)return t;const a=n.items[0].images.find(i=>e.includes(i.imageLabel));return t.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)??""}),t},[]),un=Object.freeze(Object.defineProperty({__proto__:null,createEmptySeoCategory:tn,createSeoCategory:nn,findCategory:on,formattedSimilars:tt,isCollectionPageType:fn,notFindCategoryError:an,responseAdapter:cn},Symbol.toStringTag,{value:"Module"})),ee={"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"},sn=({children:r,data:e,SectionZone:t,className:n})=>{var l,p;const o=((l=e==null?void 0:e.filter(u=>{var v,d;return((d=(v=u.config)==null?void 0:v.responsive)==null?void 0:d.deviceType)==="mobile"})[0])==null?void 0:l.sections)||[],a=((p=e==null?void 0:e.filter(u=>{var v,d;return((d=(v=u.config)==null?void 0:v.responsive)==null?void 0:d.deviceType)==="desktop"})[0])==null?void 0:p.sections)||[],i=o.slice(0,1),c=o.slice(1,o.length),f=a.slice(0,1),s=a.slice(1,a.length);return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:n,children:[O.jsx("div",{className:ee["responsive-mobile-flex"],children:O.jsx(t,{data:i??[]})}),O.jsx("div",{className:ee["responsive-desktop-flex"],children:O.jsx(t,{data:f??[]})})]}),r,O.jsx("div",{className:ee["responsive-mobile-flex"],children:O.jsx(t,{data:c??[]})}),O.jsx("div",{className:ee["responsive-desktop-flex"],children:O.jsx(t,{data:s??[]})}),O.jsx(Mt.Utils.Divider,{})]})};var J=TypeError;const pn={},yn=Object.freeze(Object.defineProperty({__proto__:null,default:pn},Symbol.toStringTag,{value:"Module"})),dn=en(yn);var tr=typeof Map=="function"&&Map.prototype,Ce=Object.getOwnPropertyDescriptor&&tr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ge=tr&&Ce&&typeof Ce.get=="function"?Ce.get:null,vr=tr&&Map.prototype.forEach,nr=typeof Set=="function"&&Set.prototype,Fe=Object.getOwnPropertyDescriptor&&nr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Se=nr&&Fe&&typeof Fe.get=="function"?Fe.get:null,hr=nr&&Set.prototype.forEach,vn=typeof WeakMap=="function"&&WeakMap.prototype,re=vn?WeakMap.prototype.has:null,hn=typeof WeakSet=="function"&&WeakSet.prototype,te=hn?WeakSet.prototype.has:null,mn=typeof WeakRef=="function"&&WeakRef.prototype,mr=mn?WeakRef.prototype.deref:null,gn=Boolean.prototype.valueOf,Sn=Object.prototype.toString,bn=Function.prototype.toString,wn=String.prototype.match,or=String.prototype.slice,T=String.prototype.replace,On=String.prototype.toUpperCase,gr=String.prototype.toLowerCase,nt=RegExp.prototype.test,Sr=Array.prototype.concat,$=Array.prototype.join,An=Array.prototype.slice,br=Math.floor,Qe=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ne=Object.getOwnPropertySymbols,Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,V=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===V||!0)?Symbol.toStringTag:null,ot=Object.prototype.propertyIsEnumerable,wr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Or(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||nt.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-br(-r):br(r);if(n!==r){var o=String(n),a=or.call(e,o.length+1);return T.call(o,t,"$&_")+"."+T.call(T.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return T.call(e,t,"$&_")}var Ye=dn,Ar=Ye.custom,Pr=lt(Ar)?Ar:null,at={__proto__:null,double:'"',single:"'"},Pn={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Ae=function r(e,t,n,o){var a=t||{};if(_(a,"quoteStyle")&&!_(at,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(_(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=_(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(_(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(_(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=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 ct(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return c?Or(e,f):f}if(typeof e=="bigint"){var s=String(e)+"n";return c?Or(e,s):s}var l=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=l&&l>0&&typeof e=="object")return Xe(e)?"[Array]":"[Object]";var p=jn(a,n);if(typeof o>"u")o=[];else if(ft(o,e)>=0)return"[Circular]";function u(A,N,I){if(N&&(o=An.call(o),o.push(N)),I){var X={depth:a.depth};return _(a,"quoteStyle")&&(X.quoteStyle=a.quoteStyle),r(A,X,n+1,o)}return r(A,a,n+1,o)}if(typeof e=="function"&&!Er(e)){var v=Nn(e),d=se(e,u);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(d.length>0?" { "+$.call(d,", ")+" }":"")}if(lt(e)){var b=V?T.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Je.call(e);return typeof e=="object"&&!V?Z(b):b}if(Ln(e)){for(var w="<"+gr.call(String(e.nodeName)),R=e.attributes||[],x=0;x<R.length;x++)w+=" "+R[x].name+"="+it(En(R[x].value),"double",a);return w+=">",e.childNodes&&e.childNodes.length&&(w+="..."),w+="</"+gr.call(String(e.nodeName))+">",w}if(Xe(e)){if(e.length===0)return"[]";var h=se(e,u);return p&&!Wn(h)?"["+Ze(h,p)+"]":"[ "+$.call(h,", ")+" ]"}if(In(e)){var C=se(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!ot.call(e,"cause")?"{ ["+String(e)+"] "+$.call(Sr.call("[cause]: "+u(e.cause),C),", ")+" }":C.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$.call(C,", ")+" }"}if(typeof e=="object"&&i){if(Pr&&typeof e[Pr]=="function"&&Ye)return Ye(e,{depth:l-n});if(i!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Tn(e)){var B=[];return vr&&vr.call(e,function(A,N){B.push(u(N,e,!0)+" => "+u(A,e))}),$r("Map",ge.call(e),B,p)}if(Bn(e)){var Y=[];return hr&&hr.call(e,function(A){Y.push(u(A,e))}),$r("Set",Se.call(e),Y,p)}if(Dn(e))return Te("WeakMap");if(Un(e))return Te("WeakSet");if(Mn(e))return Te("WeakRef");if(Rn(e))return Z(u(Number(e)));if(Cn(e))return Z(u(Qe.call(e)));if(xn(e))return Z(gn.call(e));if(_n(e))return Z(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof yr<"u"&&e===yr)return"{ [object globalThis] }";if(!$n(e)&&!Er(e)){var j=se(e,u),ce=wr?wr(e)===Object.prototype:e instanceof Object||e.constructor===Object,U=e instanceof Object?"":"null prototype",F=!ce&&ne&&Object(e)===e&&ne in e?or.call(M(e),8,-1):U?"Object":"",ue=ce||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",z=ue+(F||U?"["+$.call(Sr.call([],F||[],U||[]),": ")+"] ":"");return j.length===0?z+"{}":p?z+"{"+Ze(j,p)+"}":z+"{ "+$.call(j,", ")+" }"}return String(e)};function it(r,e,t){var n=t.quoteStyle||e,o=at[n];return o+r+o}function En(r){return T.call(String(r),/"/g,""")}function W(r){return!ne||!(typeof r=="object"&&(ne in r||typeof r[ne]<"u"))}function Xe(r){return M(r)==="[object Array]"&&W(r)}function $n(r){return M(r)==="[object Date]"&&W(r)}function Er(r){return M(r)==="[object RegExp]"&&W(r)}function In(r){return M(r)==="[object Error]"&&W(r)}function _n(r){return M(r)==="[object String]"&&W(r)}function Rn(r){return M(r)==="[object Number]"&&W(r)}function xn(r){return M(r)==="[object Boolean]"&&W(r)}function lt(r){if(V)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Je)return!1;try{return Je.call(r),!0}catch{}return!1}function Cn(r){if(!r||typeof r!="object"||!Qe)return!1;try{return Qe.call(r),!0}catch{}return!1}var Fn=Object.prototype.hasOwnProperty||function(r){return r in this};function _(r,e){return Fn.call(r,e)}function M(r){return Sn.call(r)}function Nn(r){if(r.name)return r.name;var e=wn.call(bn.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function ft(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Tn(r){if(!ge||!r||typeof r!="object")return!1;try{ge.call(r);try{Se.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Dn(r){if(!re||!r||typeof r!="object")return!1;try{re.call(r,re);try{te.call(r,te)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Mn(r){if(!mr||!r||typeof r!="object")return!1;try{return mr.call(r),!0}catch{}return!1}function Bn(r){if(!Se||!r||typeof r!="object")return!1;try{Se.call(r);try{ge.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Un(r){if(!te||!r||typeof r!="object")return!1;try{te.call(r,te);try{re.call(r,re)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Ln(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function ct(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return ct(or.call(r,0,e.maxStringLength),e)+n}var o=Pn[e.quoteStyle||"single"];o.lastIndex=0;var a=T.call(T.call(r,o,"\\$1"),/[\x00-\x1f]/g,kn);return it(a,"single",e)}function kn(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+On.call(e.toString(16))}function Z(r){return"Object("+r+")"}function Te(r){return r+" { ? }"}function $r(r,e,t,n){var o=n?Ze(t,n):$.call(t,", ");return r+" ("+e+") {"+o+"}"}function Wn(r){for(var e=0;e<r.length;e++)if(ft(r[e],`
|
|
2
|
+
`)>=0)return!1;return!0}function jn(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=$.call(Array(r.indent+1)," ");else return null;return{base:t,prev:$.call(Array(e+1),t)}}function Ze(r,e){if(r.length===0)return"";var t=`
|
|
3
|
+
`+e.prev+e.base;return t+$.call(r,","+t)+`
|
|
4
|
+
`+e.prev}function se(r,e){var t=Xe(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=_(r,o)?e(r[o],r):""}var a=typeof Ne=="function"?Ne(r):[],i;if(V){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var f in r)_(r,f)&&(t&&String(Number(f))===f&&f<r.length||V&&i["$"+f]instanceof Symbol||(nt.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r))));if(typeof Ne=="function")for(var s=0;s<a.length;s++)ot.call(r,a[s])&&n.push("["+e(a[s])+"]: "+e(r[a[s]],r));return n}var zn=Ae,qn=J,Pe=function(r,e,t){for(var n=r,o;(o=n.next)!=null;n=o)if(o.key===e)return n.next=o.next,t||(o.next=r.next,r.next=o),o},Gn=function(r,e){if(r){var t=Pe(r,e);return t&&t.value}},Hn=function(r,e,t){var n=Pe(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Kn=function(r,e){return r?!!Pe(r,e):!1},Vn=function(r,e){if(r)return Pe(r,e,!0)},Qn=function(){var e,t={assert:function(n){if(!t.has(n))throw new qn("Side channel does not contain "+zn(n))},delete:function(n){var o=e&&e.next,a=Vn(e,n);return a&&o&&o===a&&(e=void 0),!!a},get:function(n){return Gn(e,n)},has:function(n){return Kn(e,n)},set:function(n,o){e||(e={next:void 0}),Hn(e,n,o)}};return t},ut=Object,Jn=Error,Yn=EvalError,Xn=RangeError,Zn=ReferenceError,eo=SyntaxError,ro=URIError,to=Math.abs,no=Math.floor,oo=Math.max,ao=Math.min,io=Math.pow,lo=Math.round,fo=Number.isNaN||function(e){return e!==e},co=fo,uo=function(e){return co(e)||e===0?e:e<0?-1:1},so=Object.getOwnPropertyDescriptor,ye=so;if(ye)try{ye([],"length")}catch{ye=null}var st=ye,de=Object.defineProperty||!1;if(de)try{de({},"a",{value:1})}catch{de=!1}var po=de,De,Ir;function yo(){return Ir||(Ir=1,De=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=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]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,t);if(c.value!==o||c.enumerable!==!0)return!1}return!0}),De}var Me,_r;function vo(){if(_r)return Me;_r=1;var r=typeof Symbol<"u"&&Symbol,e=yo();return Me=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Me}var Be,Rr;function pt(){return Rr||(Rr=1,Be=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Be}var Ue,xr;function yt(){if(xr)return Ue;xr=1;var r=ut;return Ue=r.getPrototypeOf||null,Ue}var ho="Function.prototype.bind called on incompatible ",mo=Object.prototype.toString,go=Math.max,So="[object Function]",Cr=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},bo=function(e,t){for(var n=[],o=t,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},wo=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},Oo=function(e){var t=this;if(typeof t!="function"||mo.apply(t)!==So)throw new TypeError(ho+t);for(var n=bo(arguments,1),o,a=function(){if(this instanceof o){var l=t.apply(this,Cr(n,arguments));return Object(l)===l?l:this}return t.apply(e,Cr(n,arguments))},i=go(0,t.length-n.length),c=[],f=0;f<i;f++)c[f]="$"+f;if(o=Function("binder","return function ("+wo(c,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var s=function(){};s.prototype=t.prototype,o.prototype=new s,s.prototype=null}return o},Ao=Oo,Ee=Function.prototype.bind||Ao,ar=Function.prototype.call,Le,Fr;function dt(){return Fr||(Fr=1,Le=Function.prototype.apply),Le}var Po=typeof Reflect<"u"&&Reflect&&Reflect.apply,Eo=Ee,$o=dt(),Io=ar,_o=Po,Ro=_o||Eo.call(Io,$o),xo=Ee,Co=J,Fo=ar,No=Ro,vt=function(e){if(e.length<1||typeof e[0]!="function")throw new Co("a function is required");return No(xo,Fo,e)},ke,Nr;function To(){if(Nr)return ke;Nr=1;var r=vt,e=st,t;try{t=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var n=!!t&&e&&e(Object.prototype,"__proto__"),o=Object,a=o.getPrototypeOf;return ke=n&&typeof n.get=="function"?r([n.get]):typeof a=="function"?function(c){return a(c==null?c:o(c))}:!1,ke}var We,Tr;function Do(){if(Tr)return We;Tr=1;var r=pt(),e=yt(),t=To();return We=r?function(o){return r(o)}:e?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return e(o)}:t?function(o){return t(o)}:null,We}var je,Dr;function Mo(){if(Dr)return je;Dr=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=Ee;return je=t.call(r,e),je}var y,Bo=ut,Uo=Jn,Lo=Yn,ko=Xn,Wo=Zn,Q=eo,K=J,jo=ro,zo=to,qo=no,Go=oo,Ho=ao,Ko=io,Vo=lo,Qo=uo,ht=Function,ze=function(r){try{return ht('"use strict"; return ('+r+").constructor;")()}catch{}},ae=st,Jo=po,qe=function(){throw new K},Yo=ae?function(){try{return arguments.callee,qe}catch{try{return ae(arguments,"callee").get}catch{return qe}}}():qe,q=vo()(),S=Do(),Xo=yt(),Zo=pt(),mt=dt(),ie=ar,H={},ea=typeof Uint8Array>"u"||!S?y:S(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?y:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?y:ArrayBuffer,"%ArrayIteratorPrototype%":q&&S?S([][Symbol.iterator]()):y,"%AsyncFromSyncIteratorPrototype%":y,"%AsyncFunction%":H,"%AsyncGenerator%":H,"%AsyncGeneratorFunction%":H,"%AsyncIteratorPrototype%":H,"%Atomics%":typeof Atomics>"u"?y:Atomics,"%BigInt%":typeof BigInt>"u"?y:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?y:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?y:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?y:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Uo,"%eval%":eval,"%EvalError%":Lo,"%Float16Array%":typeof Float16Array>"u"?y:Float16Array,"%Float32Array%":typeof Float32Array>"u"?y:Float32Array,"%Float64Array%":typeof Float64Array>"u"?y:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?y:FinalizationRegistry,"%Function%":ht,"%GeneratorFunction%":H,"%Int8Array%":typeof Int8Array>"u"?y:Int8Array,"%Int16Array%":typeof Int16Array>"u"?y:Int16Array,"%Int32Array%":typeof Int32Array>"u"?y:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":q&&S?S(S([][Symbol.iterator]())):y,"%JSON%":typeof JSON=="object"?JSON:y,"%Map%":typeof Map>"u"?y:Map,"%MapIteratorPrototype%":typeof Map>"u"||!q||!S?y:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Bo,"%Object.getOwnPropertyDescriptor%":ae,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?y:Promise,"%Proxy%":typeof Proxy>"u"?y:Proxy,"%RangeError%":ko,"%ReferenceError%":Wo,"%Reflect%":typeof Reflect>"u"?y:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?y:Set,"%SetIteratorPrototype%":typeof Set>"u"||!q||!S?y:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?y:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":q&&S?S(""[Symbol.iterator]()):y,"%Symbol%":q?Symbol:y,"%SyntaxError%":Q,"%ThrowTypeError%":Yo,"%TypedArray%":ea,"%TypeError%":K,"%Uint8Array%":typeof Uint8Array>"u"?y:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?y:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?y:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?y:Uint32Array,"%URIError%":jo,"%WeakMap%":typeof WeakMap>"u"?y:WeakMap,"%WeakRef%":typeof WeakRef>"u"?y:WeakRef,"%WeakSet%":typeof WeakSet>"u"?y:WeakSet,"%Function.prototype.call%":ie,"%Function.prototype.apply%":mt,"%Object.defineProperty%":Jo,"%Object.getPrototypeOf%":Xo,"%Math.abs%":zo,"%Math.floor%":qo,"%Math.max%":Go,"%Math.min%":Ho,"%Math.pow%":Ko,"%Math.round%":Vo,"%Math.sign%":Qo,"%Reflect.getPrototypeOf%":Zo};if(S)try{null.error}catch(r){var ra=S(S(r));k["%Error.prototype%"]=ra}var ta=function r(e){var t;if(e==="%AsyncFunction%")t=ze("async function () {}");else if(e==="%GeneratorFunction%")t=ze("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=ze("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&S&&(t=S(o.prototype))}return k[e]=t,t},Mr={__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"]},le=Ee,be=Mo(),na=le.call(ie,Array.prototype.concat),oa=le.call(mt,Array.prototype.splice),Br=le.call(ie,String.prototype.replace),we=le.call(ie,String.prototype.slice),aa=le.call(ie,RegExp.prototype.exec),ia=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,la=/\\(\\)?/g,fa=function(e){var t=we(e,0,1),n=we(e,-1);if(t==="%"&&n!=="%")throw new Q("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Q("invalid intrinsic syntax, expected opening `%`");var o=[];return Br(e,ia,function(a,i,c,f){o[o.length]=c?Br(f,la,"$1"):i||a}),o},ca=function(e,t){var n=e,o;if(be(Mr,n)&&(o=Mr[n],n="%"+o[0]+"%"),be(k,n)){var a=k[n];if(a===H&&(a=ta(n)),typeof a>"u"&&!t)throw new K("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Q("intrinsic "+e+" does not exist!")},ir=function(e,t){if(typeof e!="string"||e.length===0)throw new K("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new K('"allowMissing" argument must be a boolean');if(aa(/^%?[^%]*%?$/,e)===null)throw new Q("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=fa(e),o=n.length>0?n[0]:"",a=ca("%"+o+"%",t),i=a.name,c=a.value,f=!1,s=a.alias;s&&(o=s[0],oa(n,na([0,1],s)));for(var l=1,p=!0;l<n.length;l+=1){var u=n[l],v=we(u,0,1),d=we(u,-1);if((v==='"'||v==="'"||v==="`"||d==='"'||d==="'"||d==="`")&&v!==d)throw new Q("property names with quotes must have matching quotes");if((u==="constructor"||!p)&&(f=!0),o+="."+u,i="%"+o+"%",be(k,i))c=k[i];else if(c!=null){if(!(u in c)){if(!t)throw new K("base intrinsic for "+e+" exists, but the property is not available.");return}if(ae&&l+1>=n.length){var b=ae(c,u);p=!!b,p&&"get"in b&&!("originalValue"in b.get)?c=b.get:c=c[u]}else p=be(c,u),c=c[u];p&&!f&&(k[i]=c)}}return c},gt=ir,St=vt,ua=St([gt("%String.prototype.indexOf%")]),bt=function(e,t){var n=gt(e,!!t);return typeof n=="function"&&ua(e,".prototype.")>-1?St([n]):n},sa=ir,fe=bt,pa=Ae,ya=J,Ur=sa("%Map%",!0),da=fe("Map.prototype.get",!0),va=fe("Map.prototype.set",!0),ha=fe("Map.prototype.has",!0),ma=fe("Map.prototype.delete",!0),ga=fe("Map.prototype.size",!0),wt=!!Ur&&function(){var e,t={assert:function(n){if(!t.has(n))throw new ya("Side channel does not contain "+pa(n))},delete:function(n){if(e){var o=ma(e,n);return ga(e)===0&&(e=void 0),o}return!1},get:function(n){if(e)return da(e,n)},has:function(n){return e?ha(e,n):!1},set:function(n,o){e||(e=new Ur),va(e,n,o)}};return t},Sa=ir,$e=bt,ba=Ae,pe=wt,wa=J,G=Sa("%WeakMap%",!0),Oa=$e("WeakMap.prototype.get",!0),Aa=$e("WeakMap.prototype.set",!0),Pa=$e("WeakMap.prototype.has",!0),Ea=$e("WeakMap.prototype.delete",!0),$a=G?function(){var e,t,n={assert:function(o){if(!n.has(o))throw new wa("Side channel does not contain "+ba(o))},delete:function(o){if(G&&o&&(typeof o=="object"||typeof o=="function")){if(e)return Ea(e,o)}else if(pe&&t)return t.delete(o);return!1},get:function(o){return G&&o&&(typeof o=="object"||typeof o=="function")&&e?Oa(e,o):t&&t.get(o)},has:function(o){return G&&o&&(typeof o=="object"||typeof o=="function")&&e?Pa(e,o):!!t&&t.has(o)},set:function(o,a){G&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new G),Aa(e,o,a)):pe&&(t||(t=pe()),t.set(o,a))}};return n}:pe,Ia=J,_a=Ae,Ra=Qn,xa=wt,Ca=$a,Fa=Ca||xa||Ra,Ot=function(){var e,t={assert:function(n){if(!t.has(n))throw new Ia("Side channel does not contain "+_a(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=Fa()),e.set(n,o)}};return t},Na=String.prototype.replace,Ta=/%20/g,Ge={RFC1738:"RFC1738",RFC3986:"RFC3986"},lr={default:Ge.RFC3986,formatters:{RFC1738:function(r){return Na.call(r,Ta,"+")},RFC3986:function(r){return String(r)}},RFC1738:Ge.RFC1738,RFC3986:Ge.RFC3986},Da=lr,Ma=Ot,He=Object.prototype.hasOwnProperty,L=Array.isArray,Ie=Ma(),At=function(e,t){return Ie.set(e,t),e},Oe=function(e){return Ie.has(e)},er=function(e){return Ie.get(e)},Pt=function(e,t){Ie.set(e,t)},P=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Ba=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(L(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&o.push(n[a]);t.obj[t.prop]=o}}},fr=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},Ua=function r(e,t,n){if(!t)return e;if(typeof t!="object"&&typeof t!="function"){if(L(e))e.push(t);else if(e&&typeof e=="object")if(Oe(e)){var o=er(e)+1;e[o]=t,Pt(e,o)}else(n&&(n.plainObjects||n.allowPrototypes)||!He.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object"){if(Oe(t)){for(var a=Object.keys(t),i=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},c=0;c<a.length;c++){var f=parseInt(a[c],10);i[f+1]=t[a[c]]}return At(i,er(t)+1)}return[e].concat(t)}var s=e;return L(e)&&!L(t)&&(s=fr(e,n)),L(e)&&L(t)?(t.forEach(function(l,p){if(He.call(e,p)){var u=e[p];u&&typeof u=="object"&&l&&typeof l=="object"?e[p]=r(u,l,n):e.push(l)}else e[p]=l}),e):Object.keys(t).reduce(function(l,p){var u=t[p];return He.call(l,p)?l[p]=r(l[p],u,n):l[p]=u,l},s)},La=function(e,t){return Object.keys(t).reduce(function(n,o){return n[o]=t[o],n},e)},ka=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Ke=1024,Wa=function(e,t,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(v){return"%26%23"+parseInt(v.slice(2),16)+"%3B"});for(var c="",f=0;f<i.length;f+=Ke){for(var s=i.length>=Ke?i.slice(f,f+Ke):i,l=[],p=0;p<s.length;++p){var u=s.charCodeAt(p);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===Da.RFC1738&&(u===40||u===41)){l[l.length]=s.charAt(p);continue}if(u<128){l[l.length]=P[u];continue}if(u<2048){l[l.length]=P[192|u>>6]+P[128|u&63];continue}if(u<55296||u>=57344){l[l.length]=P[224|u>>12]+P[128|u>>6&63]+P[128|u&63];continue}p+=1,u=65536+((u&1023)<<10|s.charCodeAt(p)&1023),l[l.length]=P[240|u>>18]+P[128|u>>12&63]+P[128|u>>6&63]+P[128|u&63]}c+=l.join("")}return c},ja=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var a=t[o],i=a.obj[a.prop],c=Object.keys(i),f=0;f<c.length;++f){var s=c[f],l=i[s];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(t.push({obj:i,prop:s}),n.push(l))}return Ba(t),e},za=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},qa=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Ga=function(e,t,n,o){if(Oe(e)){var a=er(e)+1;return e[a]=t,Pt(e,a),e}var i=[].concat(e,t);return i.length>n?At(fr(i,{plainObjects:o}),i.length-1):i},Ha=function(e,t){if(L(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},Et={arrayToObject:fr,assign:La,combine:Ga,compact:ja,decode:ka,encode:Wa,isBuffer:qa,isOverflow:Oe,isRegExp:za,maybeMap:Ha,merge:Ua},$t=Ot,ve=Et,oe=lr,Ka=Object.prototype.hasOwnProperty,It={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},E=Array.isArray,Va=Array.prototype.push,_t=function(r,e){Va.apply(r,E(e)?e:[e])},Qa=Date.prototype.toISOString,Lr=oe.default,g={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ve.encode,encodeValuesOnly:!1,filter:void 0,format:Lr,formatter:oe.formatters[Lr],indices:!1,serializeDate:function(e){return Qa.call(e)},skipNulls:!1,strictNullHandling:!1},Ja=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ve={},Ya=function r(e,t,n,o,a,i,c,f,s,l,p,u,v,d,b,w,R,x){for(var h=e,C=x,B=0,Y=!1;(C=C.get(Ve))!==void 0&&!Y;){var j=C.get(e);if(B+=1,typeof j<"u"){if(j===B)throw new RangeError("Cyclic object value");Y=!0}typeof C.get(Ve)>"u"&&(B=0)}if(typeof l=="function"?h=l(t,h):h instanceof Date?h=v(h):n==="comma"&&E(h)&&(h=ve.maybeMap(h,function(xe){return xe instanceof Date?v(xe):xe})),h===null){if(i)return s&&!w?s(t,g.encoder,R,"key",d):t;h=""}if(Ja(h)||ve.isBuffer(h)){if(s){var ce=w?t:s(t,g.encoder,R,"key",d);return[b(ce)+"="+b(s(h,g.encoder,R,"value",d))]}return[b(t)+"="+b(String(h))]}var U=[];if(typeof h>"u")return U;var F;if(n==="comma"&&E(h))w&&s&&(h=ve.maybeMap(h,s)),F=[{value:h.length>0?h.join(",")||null:void 0}];else if(E(l))F=l;else{var ue=Object.keys(h);F=p?ue.sort(p):ue}var z=f?String(t).replace(/\./g,"%2E"):String(t),A=o&&E(h)&&h.length===1?z+"[]":z;if(a&&E(h)&&h.length===0)return A+"[]";for(var N=0;N<F.length;++N){var I=F[N],X=typeof I=="object"&&I&&typeof I.value<"u"?I.value:h[I];if(!(c&&X===null)){var Re=u&&f?String(I).replace(/\./g,"%2E"):String(I),Dt=E(h)?typeof n=="function"?n(A,Re):A:A+(u?"."+Re:"["+Re+"]");x.set(e,B);var ur=$t();ur.set(Ve,x),_t(U,r(X,Dt,n,o,a,i,c,f,n==="comma"&&w&&E(h)?null:s,l,p,u,v,d,b,w,R,ur))}}return U},Xa=function(e){if(!e)return g;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 t=e.charset||g.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=oe.default;if(typeof e.format<"u"){if(!Ka.call(oe.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=oe.formatters[n],a=g.filter;(typeof e.filter=="function"||E(e.filter))&&(a=e.filter);var i;if(e.arrayFormat in It?i=e.arrayFormat:"indices"in e?i=e.indices?"indices":"repeat":i=g.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:g.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:g.addQueryPrefix,allowDots:c,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:g.allowEmptyArrays,arrayFormat:i,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:g.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?g.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:g.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:g.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:g.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:g.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:g.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:g.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:g.strictNullHandling}},Za=function(r,e){var t=r,n=Xa(e),o,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):E(n.filter)&&(a=n.filter,o=a);var i=[];if(typeof t!="object"||t===null)return"";var c=It[n.arrayFormat],f=c==="comma"&&n.commaRoundTrip;o||(o=Object.keys(t)),n.sort&&o.sort(n.sort);for(var s=$t(),l=0;l<o.length;++l){var p=o[l],u=t[p];n.skipNulls&&u===null||_t(i,Ya(u,p,c,f,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,s))}var v=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&"),v.length>0?d+v:""},D=Et,he=Object.prototype.hasOwnProperty,kr=Array.isArray,m={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:D.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},ei=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Rt=function(r,e,t){if(r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1)return r.split(",");if(e.throwOnLimitExceeded&&t>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return r},ri="utf8=%26%2310003%3B",ti="utf8=%E2%9C%93",ni=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,i=o.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&i.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var c=-1,f,s=t.charset;if(t.charsetSentinel)for(f=0;f<i.length;++f)i[f].indexOf("utf8=")===0&&(i[f]===ti?s="utf-8":i[f]===ri&&(s="iso-8859-1"),c=f,f=i.length);for(f=0;f<i.length;++f)if(f!==c){var l=i[f],p=l.indexOf("]="),u=p===-1?l.indexOf("="):p+1,v,d;if(u===-1?(v=t.decoder(l,m.decoder,s,"key"),d=t.strictNullHandling?null:""):(v=t.decoder(l.slice(0,u),m.decoder,s,"key"),v!==null&&(d=D.maybeMap(Rt(l.slice(u+1),t,kr(n[v])?n[v].length:0),function(w){return t.decoder(w,m.decoder,s,"value")}))),d&&t.interpretNumericEntities&&s==="iso-8859-1"&&(d=ei(String(d))),l.indexOf("[]=")>-1&&(d=kr(d)?[d]:d),v!==null){var b=he.call(n,v);b&&t.duplicates==="combine"?n[v]=D.combine(n[v],d,t.arrayLimit,t.plainObjects):(!b||t.duplicates==="last")&&(n[v]=d)}}return n},oi=function(r,e,t,n){var o=0;if(r.length>0&&r[r.length-1]==="[]"){var a=r.slice(0,-1).join("");o=Array.isArray(e)&&e[a]?e[a].length:0}for(var i=n?e:Rt(e,t,o),c=r.length-1;c>=0;--c){var f,s=r[c];if(s==="[]"&&t.parseArrays)D.isOverflow(i)?f=i:f=t.allowEmptyArrays&&(i===""||t.strictNullHandling&&i===null)?[]:D.combine([],i,t.arrayLimit,t.plainObjects);else{f=t.plainObjects?{__proto__:null}:{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,p=t.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(p,10);!t.parseArrays&&p===""?f={0:i}:!isNaN(u)&&s!==p&&String(u)===p&&u>=0&&t.parseArrays&&u<=t.arrayLimit?(f=[],f[u]=i):p!=="__proto__"&&(f[p]=i)}i=f}return i},ai=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0)return!t.plainObjects&&he.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,i=o.exec(n),c=i?n.slice(0,i.index):n,f=[];if(c){if(!t.plainObjects&&he.call(Object.prototype,c)&&!t.allowPrototypes)return;f.push(c)}for(var s=0;(i=a.exec(n))!==null&&s<t.depth;){s+=1;var l=i[1].slice(1,-1);if(!t.plainObjects&&he.call(Object.prototype,l)&&!t.allowPrototypes)return;f.push(i[1])}if(i){if(t.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");f.push("["+n.slice(i.index)+"]")}return f},ii=function(e,t,n,o){if(e){var a=ai(e,n);if(a)return oi(a,t,n,o)}},li=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 t=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:t,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"||D.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}},fi=function(r,e){var t=li(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?{__proto__:null}:{};for(var n=typeof r=="string"?ni(r,t):r,o=t.plainObjects?{__proto__:null}:{},a=Object.keys(n),i=0;i<a.length;++i){var c=a[i],f=ii(c,n[c],t,typeof r=="string");o=D.merge(o,f,t)}return t.allowSparse===!0?o:D.compact(o)},ci=Za,ui=fi,si=lr,pi={formats:si,parse:ui,stringify:ci};const yi=rt(pi);async function _e(r,e={},t){const{cms:n="cms"}=e;return fetch(`${r.href}?${yi.stringify(e)}`,{method:"GET",cache:t?"no-store":"default",headers:{Accept:"application/json","Content-Type":"application/json","strapi-encode-source-maps":n==="strapi"&&t?"true":"false"}})}function cr(r,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}/${r}`:String(new URL(`api/${r}`,process.env.NEXT_PUBLIC_API_URL))}function xt(r){return Array.isArray(r)&&r.length>0?r[0]:Array.isArray(r)?null:r}async function Ct(r,e=[],t={}){var n;if((t==null?void 0:t.contentType)===r){const o=(t==null?void 0:t.previewMode)==="true",a=(t==null?void 0:t.documentId)??"",i=a&&((n=String(a))!=null&&n.length)?`/${t.documentId}`:"",c=new URL(cr(`${r}${i}`,t)),f=await _e(c,t,o);if(!f.ok)return console.error(`[Error fetching preview data]: ${r} - status: ${f.statusText}`),[];const s=await f.json(),l=e.findIndex(p=>p.documentId===s.id);return l!==-1?(e[l]=s,[...e]):[s,...e]}return e}const di=Object.freeze(Object.defineProperty({__proto__:null,createUrl:cr,fetchCMS:_e,mergePreviewDocument:Ct,spreadStrapiData:xt},Symbol.toStringTag,{value:"Module"}));async function Ft(r,e={},t){const n=!!(e!=null&&e.previewMode),o=await _e(r,e,n);if(!o.ok)return console.log(`Failed to fetch Strapi (url=${String(r)}, status=${o.status})`),{status:404,data:[],error:String(o.status)};const{data:a}=await o.json();return a?{status:200,data:t?xt(a):a}:{status:404,data:[],error:"No data found"}}async function Nt(r,e,t={}){const n=(t==null?void 0:t.previewId)??"",o=(t==null?void 0:t.previewMode)==="true",a={...t,versionId:n},i=[];let c=1,f=0,s=!0;try{do{const l=await _e(e,{...a,page:c},o).then(p=>p.json()).catch(p=>(console.error("Error fetching VTEX CMS data:",p),console.error("Error URL:",e.toString()),null));c===1&&(f=l.totalItems),Array.isArray(l==null?void 0:l.data)&&i.push(...l.data),s=!!(l!=null&&l.hasNextPage),c++}while(s&&i.length<f);if(o&&i.length>0){if(!r||!n)throw new Error("contentType and previewId are required for preview mode in vtexCMSData");const l=await Ct(r,i,a);return{status:l.length>0?200:404,data:l}}return{status:i.length?200:404,data:i}}catch(l){return{status:500,data:[],error:l instanceof Error?l.message:String(l)}}}const vi=Object.freeze(Object.defineProperty({__proto__:null,strapiCMSData:Ft,vtexCMSData:Nt},Symbol.toStringTag,{value:"Module"}));async function hi({contentType:r,documentId:e,versionId:t,storeId:n,CMS_PROJECT_NAME:o}){const a=e&&e.length?`/${e}`:"",i=t&&t.length?`?versionId=${t}`:"";return fetch(`https://${n}.myvtex.com/_v/cms/api/${o}/${r}${a}${i}`,{cache:"no-cache"})}async function Tt(r,e={},t){const{cms:n="vtex"}=e??{};try{const o=new URL(cr(r,e));return n!=="vtex"?Ft(o,e,t):Nt(r,o,e)}catch(o){return console.error(`[Fetch ContentType Error CMS ${n}]`,o),t?{status:400,data:null}:{status:200,data:[]}}}const mi=Object.freeze(Object.defineProperty({__proto__:null,fetchContentType:Tt,getCMSContentType:hi},Symbol.toStringTag,{value:"Module"}));exports.SearchPageScreening=sn;exports.addSearchParamsFacets=Vt;exports.catalogHelpers=un;exports.cms=mi;exports.cmsHelpers=vi;exports.cmsUtils=di;exports.convertSearchParams=Xt;exports.disableSKU=Kr;exports.fetchContentType=Tt;exports.filterNonCategorySelected=Wt;exports.filterNonRootFacets=Jt;exports.formatPriceToCurrency=me;exports.formattedFacets=Kt;exports.formattedSimilars=tt;exports.freightParsePrice=Wr;exports.getColorAndSizeFromSkuName=zr;exports.getDefaultExportFromCjs=rt;exports.getDiscountPercent=jr;exports.getFirstImages=Xr;exports.getProductNameWithoutSku=Gr;exports.getSKUName=qr;exports.getSkuInfos=Hr;exports.getThumbImage=Qr;exports.getValidOffer=Vr;exports.navigateToSearchPage=Zt;exports.parseSearchState=Yt;exports.productHelpers=Lt;exports.resizingImg=Jr;exports.responsive=ee;exports.setVideoPlay=Zr;exports.splitNameAndSizeFromFullName=rr;exports.updatedResizedImg=Yr;
|