@soma-vertical-web/multi-lib 1.0.21 → 1.0.22
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/cms/ContentTypes/LPLojas/LPLojaClientWrapper.d.ts +1 -1
- package/cms/ContentTypes/LPLojas/LPLojasContent.d.ts +1 -1
- package/cms/ContentTypes/LPLojas/helpers.d.ts +1 -7
- package/cms/ContentTypes/PolicyPage/PolicyPageContent.d.ts +3 -0
- package/cms/index.d.ts +1 -1
- package/cms/server.d.ts +2 -1
- package/contexts/contexts/lplojas/Context.d.ts +1 -1
- package/contexts/index.d.ts +2 -2
- package/index-D61YFVi9.mjs +2261 -0
- package/index-DyKuIyRP.js +4 -0
- package/index.js +16 -16
- package/index.mjs +7158 -6900
- package/index2.js +2 -2
- package/index2.mjs +949 -999
- package/layout/index.d.ts +6 -4
- package/layout/template/LPLojas/Composite/Details/Details.d.ts +1 -1
- package/layout/template/LPLojas/Composite/Details/Item.d.ts +1 -1
- package/layout/template/LPLojas/Composite/Details/Vendor.d.ts +1 -1
- package/layout/template/LPLojas/Composite/DropDown/DropDown.d.ts +1 -1
- package/layout/template/LPLojas/Composite/Root.d.ts +1 -1
- package/layout/template/LPLojas/index.d.ts +3 -3
- package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +1 -1
- package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
- package/layout/template/PDP/index.d.ts +2 -2
- package/layout/template/Politicas/Composite/Banner.d.ts +4 -0
- package/layout/template/Politicas/Composite/Container.d.ts +7 -0
- package/layout/template/Politicas/Composite/OneTrustPolicy.d.ts +14 -0
- package/layout/template/Politicas/Politicas.d.ts +10 -0
- package/package.json +1 -1
- package/server.d.ts +1 -3
- package/style.css +1 -1
- package/types/cms/ContentTypes/LPLojas/index.d.ts +22 -1
- package/types/cms/ContentTypes/PolicyPage/index.d.ts +17 -0
- package/types/cms/Sections/SectionZone/index.d.ts +1 -0
- package/types/contexts/contexts/plp.d.ts +1 -0
- package/types/contexts/hooks/index.d.ts +12 -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/LPLojas/Details/index.d.ts +18 -0
- package/types/layout/templates/LPLojas/DropDown/index.d.ts +10 -0
- package/types/layout/templates/LPLojas/index.d.ts +18 -0
- package/types/layout/templates/PDP/index.d.ts +1 -2
- package/types/layout/templates/PLP/index.d.ts +1 -0
- package/types/layout/templates/Politicas/index.d.ts +27 -0
package/index2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react/jsx-runtime"),C=require("./index-DZ1MbO8M.js"),G=require("@soma-vertical-web/core-components"),wt=require("yup"),vt=require("sanitize-html"),yt=require("jose");function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=_t(wt),Rt=async({children:e,ClientCartProvider:t,...r})=>{const{data:n}=await C.fetchContentType("mini_cart",r);return k.jsx(t,{...n?Array.isArray(n)?{data:n[0]}:{data:n}:{},children:e})},It=({slug:e,data:t,SectionZone:r,COMMON_PAGE_COLUMN_GAP:n,identifyWhoIsFirst:i})=>{const s=t==null?void 0:t.find(u=>{var w,v,y,_;return((v=(w=u.config)==null?void 0:w.responsive)==null?void 0:v.deviceType)==="desktop"&&((_=(y=u.config)==null?void 0:y.seo)==null?void 0:_.slug)===e}),a=s==null?void 0:s.config.responsive.gapCustom,o=s==null?void 0:s.config.responsive.gapSections,d=t==null?void 0:t.find(u=>{var w,v,y,_;return((v=(w=u.config)==null?void 0:w.responsive)==null?void 0:v.deviceType)==="mobile"&&((_=(y=u.config)==null?void 0:y.seo)==null?void 0:_.slug)===e}),g=d==null?void 0:d.config.responsive.gapCustom,l=d==null?void 0:d.config.responsive.gapSections;return k.jsxs(k.Fragment,{children:[k.jsx(G.Utils.Column,{gap:a&&o?o:n,className:G.helpers.classNameConcat(C.responsive["responsive-desktop-flex"],"utils-column-modifier"),children:k.jsx(r,{data:(s==null?void 0:s.sections)??[],identifyWhoIsFirst:i})}),k.jsx(G.Utils.Column,{gap:g&&l?l:n,className:G.helpers.classNameConcat(C.responsive["responsive-mobile-flex"],"utils-column-modifier"),children:k.jsx(r,{data:(d==null?void 0:d.sections)??[],identifyWhoIsFirst:i})})]})},xt=async({slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:r,identifyWhoIsFirst:n=!1,...i})=>{const{data:s}=await C.fetchContentType("common_page",i);return!s||!Array.isArray(s)||s.length===0?null:k.jsx(It,{data:s,slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:r,identifyWhoIsFirst:n})},Pt=async({children:e,ClientFlagsAndTagsProvider:t,...r})=>{const{data:n}=await C.fetchContentType("flags_and_tags",r);return!n||!Array.isArray(n)?null:k.jsx(t,{data:n[0],children:e})},Ct=async({className:e,PAYMENT_FLAGS_DICTIONARY:t,PAYMENT_FLAGS:r,LEGAL_INFORMATION_TEXT:n,ICONS:i,SectionZone:s,Footer:a,FooterSupport:o,hasFooterStamps:d,...g})=>{var v,y,_,p,b,m,h,f,A,N,I;const{data:l}=await C.fetchContentType("footer",g),u=Array.isArray(l)&&((v=l[0])==null?void 0:v.type)==="footer"?l[0]:null,w={...(y=u==null?void 0:u.paymentInfo)==null?void 0:y.paymentInfo,acceptedFlags:Array.isArray((_=u==null?void 0:u.paymentInfo)==null?void 0:_.paymentInfo.acceptedFlags)?(p=u==null?void 0:u.paymentInfo)==null?void 0:p.paymentInfo.acceptedFlags.filter(R=>!!t[R]).map(R=>t[R]):[]};return u?k.jsx(a,{className:e,data:{...u},socialInfo:(b=u.socialMedia)==null?void 0:b.socialMedia,socialMedias:(h=(m=u.socialMedia)==null?void 0:m.socialMedia)==null?void 0:h.medias,payments:w,hasFooterStamps:d,adornment:{...(A=(f=u.supportInfo)==null?void 0:f.supportInfo)!=null&&A.content?{bottom:k.jsx(o,{content:(I=(N=u.supportInfo)==null?void 0:N.supportInfo)==null?void 0:I.content,CONSTANTS:{ICONS:i,PAYMENT_FLAGS:r,PAYMENT_FLAGS_DICTIONARY:t}})}:{},...u.sections.length?{top:k.jsx(s,{data:u.sections})}:{}},LEGAL_INFORMATION_TEXT:n,ICONS:i}):null},St=async({children:e,ClientHeaderProvider:t,...r})=>{var s,a,o,d,g,l;const{data:n}=await C.fetchContentType("header",r),i=Array.isArray(n)?n[0]:void 0;return k.jsx(t,{headerData:{...((s=i==null?void 0:i.layerConfig)==null?void 0:s.config)??{},subMenus:((a=i==null?void 0:i.sections)==null?void 0:a.map(u=>u.data))??[],categories:((d=(o=i==null?void 0:i.categories)==null?void 0:o.categories)==null?void 0:d.items)??[],navigationLinks:((l=(g=i==null?void 0:i.navigationLinks)==null?void 0:g.navigationLinks)==null?void 0:l.items)??[]},children:e})},kt=e=>{var a,o;const t=(o=(a=e[0])==null?void 0:a.items)==null?void 0:o.items;if((t==null?void 0:t.items.length)===0||e.length===0)return{iconLabel:"",label:"",content:[]};const r=t==null?void 0:t.iconLabel,n=t==null?void 0:t.label,i=t==null?void 0:t.helpButtonSize,s=t.items.map((d,g)=>({type:d.type,id:`${g.toString()}-${d.title.toLowerCase()}`,title:d.title,subtitle:d.subtitle,description:d.description,buttonLabel:d.buttonLabel,buttonHref:d.buttonHref,buttonMode:d.buttonMode,buttonSize:d.buttonSize,buttonIcon:d.buttonIcon}));return{iconLabel:r,label:n,helpButtonSize:i,content:s}},Tt=async({HelpButton:e,ICONS:t,className:r,...n})=>{const{data:i}=await C.fetchContentType("helpbutton",n);if(!i||!Array.isArray(i)||i.length===0)return null;const s=kt(i);return k.jsx(e,{data:s,ICONS:t,className:r})},Et=async({SectionZone:e,LPCadastro:t,...r})=>{var d;const{data:n}=await C.fetchContentType("lp_cadastro",r);if(!n||!Array.isArray(n)||n.length===0)return null;const[i]=n,s=(i==null?void 0:i.sections)||[],a=((d=i==null?void 0:i.content)==null?void 0:d.conteúdo)||{},o=i==null?void 0:i.sections;return k.jsxs(k.Fragment,{children:[k.jsx(t,{sections:s,content:a}),k.jsx(e,{data:o})]})},At=async({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,entity:r,showVendor:n,LPStoresClientWrapper:i,...s})=>{var g;const{data:a}=await C.fetchContentType("lp_lojas",s),d=(g=(Array.isArray(a)?a:[])[0])==null?void 0:g.config.config;return k.jsx(i,{entity:r,content:d,data:a,showVendor:n,ICONS:t,LPLOJAS_TEMPLATE_RETURN_BUTTON:e})},Ot=async({children:e,productId:t,COMMON_PAGE_COLUMN_GAP:r,SectionZone:n,PDPContentProvider:i,...s})=>{const{data:a}=await C.fetchContentType("product_page",s);return!a||!Array.isArray(a)||a.length===0?null:k.jsx(i,{data:a[0],productId:t,COMMON_PAGE_COLUMN_GAP:r,SectionZone:n,children:e})},jt={"column-modifier":"_column-modifier_1tqap_1"},qt=async({className:e,children:t,slug:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:i,PLPContentProvider:s,...a})=>{const{data:o}=await C.fetchContentType("categories_page",a);if(!o||!Array.isArray(o))return null;const d=o.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)===r&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="desktop"}),g=o.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)===r&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="mobile"}),l=o.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)==="default"&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="desktop"}),u=o.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)==="default"&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="mobile"}),w=Array.isArray(e)?e:[e];return k.jsxs(k.Fragment,{children:[k.jsx(G.Utils.Column,{className:G.helpers.classNameConcat(C.responsive["responsive-desktop-flex"],[jt["column-modifier"],...w]),style:{minHeight:"100vh"},children:k.jsx(s,{data:d??l,device:"desktop",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:i,children:t})}),k.jsx(G.Utils.Column,{className:G.helpers.classNameConcat(C.responsive["responsive-mobile-flex"],e),children:k.jsx(s,{data:g??u,device:"mobile",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:i,children:t})})]})},Nt=async({slug:e,...t})=>{var a,o,d;const{data:r}=await C.fetchContentType("redirect_to_search",t);if(!r||!Array.isArray(r))return{slug:e,query:null,redirect:!1};const n=((d=(o=(a=r[0])==null?void 0:a.redirectToSearch)==null?void 0:o.redirectToSearch)==null?void 0:d.paths)??[];if(!!!n.length)return{slug:e,query:null,redirect:!1};const s=n.find(g=>{var l,u;return((l=g.path)==null?void 0:l.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((u=g.path)==null?void 0:u.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return s?{slug:e,query:s==null?void 0:s.searchQuery,redirect:!0,collectionId:s==null?void 0:s.collectionId,filters:s==null?void 0:s.filters,sort:s==null?void 0:s.sort}:{slug:e,query:null,redirect:!1,collectionId:null,filters:null,sort:null}},Ft=async({slug:e,...t})=>{var a,o,d;const{data:r}=await C.fetchContentType("redirect_to_search",t);if(!r||!Array.isArray(r))return null;const n=((d=(o=(a=r[0])==null?void 0:a.redirectToSearch)==null?void 0:o.redirectToSearch)==null?void 0:d.paths)??[];if(!!!n.length)return null;const s=n.find(g=>{var l,u;return((l=g.path)==null?void 0:l.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((u=g.path)==null?void 0:u.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return s?{slug:e,title:s.pageTitle,description:s.pageDescription}:null},$t=async({children:e,SectionZone:t,className:r,...n})=>{const{data:i}=await C.fetchContentType("search_page",n);return Array.isArray(i)&&i.length>0?k.jsx(C.SearchPageScreening,{data:i,SectionZone:t,className:r,children:e}):k.jsx(k.Fragment,{children:"children"})},Lt=async({ClientTipbarContent:e,...t})=>{const{data:r}=await C.fetchContentType("tipbar",t);return k.jsx(e,{data:r})},Dt={CommonPageContent:xt,CartContent:Rt,FlagsAndTagsContent:Pt,HeaderContent:St,TipbarContent:Lt,FooterContent:Ct,PLPContent:qt,PDPContent:Ot,getRedirectData:Nt,getPLPSynteticMetaData:Ft,SearchPageContent:$t,HelpButtonContent:Tt,LPCadastroContent:Et,LPLojasContent:At},Ut={Components:Dt},j=async(e,t={})=>{const{method:r="GET",body:n,headers:i={},priority:s="auto",cache:a="default"}=t;return fetch(e,{method:r,headers:{...i,Accept:"application/json","Content-Type":"application/json"},priority:s,cache:a,...n?{body:JSON.stringify(n)}:{}}).then(o=>o.json()).catch(o=>{console.error("[ERROR FETCH VTEX]",o)})},K=new Map;async function Ht(e,t={}){var r;try{const{abort:n=!1}=t,i=new AbortController;n&&(K.has(e)&&((r=K.get(e))==null||r.abort(),K.delete(e)),K.set(e,i));const s=j(e,{...t,...n?{signal:i.signal}:{}});return n&&K.delete(e),s}catch(n){if(n.name==="AbortError"){console.log(`[REQUEST CANCELLED]: ${e}`);return}throw console.error(`[ERROR API]: ${n.message}`),n}}const Mt=c.object({country:c.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:c.string().nullable()});async function Bt({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Mt.validate(t);const{country:n,postalCode:i}=t;return await j(`${e}/api/checkout/pub/postal-code/${n}/${i}`,{method:"POST",body:t,...r})}const zt=c.object({orderFormId:c.string().nullable(),sellerCode:c.string().nullable(),sellerName:c.string().nullable()});async function He({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await zt.validate(t);const{orderFormId:n,sellerCode:i,sellerName:s}=t,a=i?`${i.trim()} - ${s}`:null;return j(`${e}/api/checkout/pub/orderForm/${n}/attachments/openTextField`,{method:"POST",body:{value:a},...r})}const Gt=c.object({orderFormId:c.string().nullable(),sellerCode:c.string().nullable(),marketingData:c.object()});async function Me({apiUrl:e,body:t,extraData:r={},fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Gt.validate(t);const{orderFormId:i,sellerCode:s,marketingData:a}=t,o=s?{utmCampaign:s?s.toUpperCase():"",utmiCampaign:s?`${r.VENDOR_CODE}`:"semcodigo"}:{};return j(`${e}/api/checkout/pub/orderForm/${i}/attachments/marketingData`,{method:"POST",body:{...a,...o},...n})}const Vt=c.object({orderFormId:c.string().nullable(),sellerCode:c.string().nullable(),sellerName:c.string().nullable()});async function Wt({apiUrl:e,body:t,fetchOptions:r,extraData:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Vt.validate(t);const i=await He({apiUrl:e,body:t,fetchOptions:r});return Me({apiUrl:e,body:{...t,marketingData:i==null?void 0:i.marketingData},extraData:n,fetchOptions:r})}const Qt=c.object({orderFormId:c.string().nullable(),coupon:c.string().nullable()});async function Xt({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Qt.validate(t);const{coupon:n="",orderFormId:i}=t;return j(`${e}/api/checkout/pub/orderForm/${i}/coupons`,{method:"POST",body:{text:n},...r})}const Kt=c.object({appId:c.string().required("App ID is required"),orderFormId:c.string().nullable(),key:c.array().of(c.string())});async function Jt({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Kt.validate(t);const{appId:n="faststore",orderFormId:i,key:s}=t;return j(`${e}/api/checkout/pub/orderForm/${i}/customData/${n}/${s}`,{method:"PUT",...r})}const Zt=c.object().shape({name:c.string().required("Attachment name is required"),content:c.object().nullable()});var De;const Yt=c.object().shape({attachments:(De=c.array().of(Zt))==null?void 0:De.nullable(),id:c.string().required("ID of SKU is required"),index:c.number().integer().nullable(),quantity:c.number().integer().nullable(),seller:c.string().required("Seller is required"),price:c.number().integer()}),er=c.object({orderFormId:c.string().required("OrderFormId is required"),orderItems:c.array().of(Yt)});async function tr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await er.validate(t);const{orderFormId:n,orderItems:i}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/items`,{method:"POST",body:{orderItems:i},...r})}const rr=c.object({orderFormId:c.string().nullable()});async function nr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await rr.validate(t);const{orderFormId:n}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/items/removeAll`,{method:"POST",...r})}const ir=c.object().shape({name:c.string().required("Attachment name is required"),content:c.object().nullable()});var Ue;const or=c.object().shape({attachments:(Ue=c.array().of(ir))==null?void 0:Ue.nullable(),id:c.string().required("ID of SKU is required"),index:c.number().integer().nullable(),quantity:c.number().integer().nullable(),seller:c.string().required("Seller is required"),price:c.number().integer()}),sr=c.object({orderFormId:c.string().nullable(),orderItems:c.array().of(or)});async function ar({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await sr.validate(t);const{orderFormId:n,orderItems:i}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/items/update`,{method:"POST",body:{orderItems:i},...r})}const lr=c.object({orderFormId:c.string().nullable()});async function cr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await lr.validate(t);const{orderFormId:n}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/messages/clear`,{method:"POST",...r})}const ur=c.object({id:c.string().nullable(),itemIndex:c.number().nullable(),orderFormId:c.string().nullable(),remove:c.boolean().nullable()});async function dr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ur.validate(t);const{itemIndex:n,orderFormId:i,id:s,remove:a}=t,o=a?`/${s}/remove`:"",d=`${e}/api/checkout/pub/orderForm/${i}/items/${n}/offerings${o}`;return j(d,{method:"POST",body:{id:s},...r})}const pr=c.object({orderFormId:c.string().nullable()});async function mr({apiUrl:e,body:t,fetchOptions:r,extraData:n}){var a;if(!t){console.error("[ERROR FETCHING] Body is required");return}await pr.validate(t);const i=new URLSearchParams({refreshOutdatedData:"true"}),s=t.orderFormId&&((a=n.orderFormPurchaseId)==null?void 0:a.value)!==t.orderFormId?`${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(i)}`:`${e}/api/checkout/pub/orderForm`;return j(s,{method:"GET",...r})}const hr=c.object({orderFormId:c.string().nullable(),email:c.string().email().required(),firstName:c.string().required(),lastName:c.string().required(),documentType:c.string().required(),document:c.string().required(),phone:c.string().matches(/^\+\d{1,3}\d{10,11}$/)});async function fr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await hr.validate(t);const{orderFormId:n,...i}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/attachments/clientProfileData`,{method:"POST",body:{...i},...r})}const gr=c.object({sellerCode:c.string().nullable()});async function br({apiUrl:e,body:t,extraData:r,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await gr.validate(t);const{sellerCode:i=""}=t;return j(`${e}/api/dataentities/${r.ENTITIES}/search?_fields=${r.FIELDS}&${r.FILTER}=${i}`,{method:"GET",headers:{Accept:"application/vnd.vtex.ds.v10+json"},...n})}const wr=c.object().shape({country:c.string().length(3,"Country code must be 3 characters long").required("Country is required"),orderFormId:c.string().nullable(),postalCode:c.string().nullable()});async function vr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await wr.validate(t);const{country:n,orderFormId:i,postalCode:s}=t,a=s?{address:{addressType:"residential",postalCode:s,country:n}}:{logisticsInfo:[],clearAddressIfPostalCodeNotFound:!0};return j(`${e}/api/checkout/pub/orderForm/${i}/attachments/shippingData`,{method:"POST",body:a,...r})}const yr=c.object().shape({orderFormId:c.string().nullable(),options:c.array().of(c.object().shape({itemIndex:c.number(),selectedDeliveryChannel:c.string(),selectedSla:c.string()})),selectedAddresses:c.array().of(c.object().shape({addressId:c.string().required(),addressType:c.string().required(),city:c.string().nullable(),complement:c.string().nullable(),country:c.string().required().length(3),geoCoordinates:c.array().of(c.number()).required().min(0),isDisposable:c.boolean().required(),neighborhood:c.string().nullable(),number:c.string().nullable(),postalCode:c.string().required(),receiverName:c.string().nullable(),reference:c.string().nullable(),state:c.string().nullable(),street:c.string().nullable()}))});async function _r({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await yr.validate(t);const{orderFormId:n,options:i,selectedAddresses:s}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/attachments/shippingData`,{method:"POST",body:{selectedAddresses:s,clearAddressIfPostalCodeNotFound:!1,logisticsInfo:i},...r})}const Rr=c.object({country:c.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:c.string().nullable(),geoCoordinates:c.object().shape({longitude:c.number().required(),latitude:c.number().required()})});async function Ir({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Rr.validate(t);const{country:n="",geoCoordinates:i,postalCode:s=""}=t,a=new URLSearchParams({country:String(n)});return s?a.append("postalCode",s):a.append("geoCoordinates",`${i==null?void 0:i.longitude};${i==null?void 0:i.latitude}`),await j(`${e}/api/checkout/pub/regions/?${a.toString()}`,{method:"GET",...r})}const xr=c.object({id:c.string().required("ID of SKU is required"),quantity:c.number().integer().required("Quantity of item is required"),seller:c.string()}),Pr=c.object({items:c.array().of(xr),country:c.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:c.string().nullable(),geoCoordinates:c.array().nullable().of(c.number()).length(2)});async function Cr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}return await Pr.validate(t),j(`${e}/api/checkout/pub/orderForms/simulation`,{method:"POST",body:t,...r})}const Sr=Object.freeze(Object.defineProperty({__proto__:null,getMasterDataSellerCode:br,getOrderForm:mr,postOrderFormAddCoupon:Xt,postOrderFormAttachClientProfileData:fr,postOrderFormAttachOrderFormData:Wt,postOrderFormAttachShippingData:vr,postOrderFormAttachmentsMarketingData:Me,postOrderFormAttachmentsOpenTextField:He,postOrderFormClearMessages:cr,postOrderFormFreightSimulation:Cr,postOrderFormItems:tr,postOrderFormRegion:Ir,postOrderFormRemoveAllItems:nr,postOrderFormUpdateItems:ar,postOrderFormUpdateShippingData:_r,postOrderformAddress:Bt,putOrderFormCustomData:Jt,updateOrderFormOffering:dr},Symbol.toStringTag,{value:"Module"})),kr=c.object({skuId:c.string()});async function Tr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await kr.validate(t);const{skuId:n}=t;return j(`${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${n}`,{...r})}const Er=c.object({ids:c.array().of(c.string().required("ID are required")).required("IDs are required")});async function Ar({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Er.validate(t);const{ids:n}=t;return j(`${e}/api/catalog_system/pub/products/search?fq=${n.map(i=>`productId:${i}`).join("&fq=")}`,{...r})}const Or=c.object({productId:c.number().required("Product ID is required")});async function jr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Or.validate(t);const{productId:n}=t;return j(`${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`,{...r})}const qr=Object.freeze(Object.defineProperty({__proto__:null,getCatalogKitProducts:Tr,getCatalogProducts:Ar,getCatalogSimilars:jr},Symbol.toStringTag,{value:"Module"})),Nr=c.object({query:c.string()});async function Fr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Nr.validate(t);const{query:n=""}=t,i=new URLSearchParams({query:n});return j(`${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${i.toString()}`,{...r})}const $r=(e,t)=>vt(e,t),Lr=e=>({...e,description:e.description?$r(e.description):e.description}),Dr=({offer:e,seller:t,product:r})=>({...e,product:r,seller:t}),Be=(e,t)=>({...e,isVariantOf:Lr(t)}),Ur=e=>e?"https://schema.org/InStock":"https://schema.org/OutOfStock",se=e=>e.AvailableQuantity>0,Ne=e=>e.spotPrice??0,Hr=e=>e.Price??0,ze=(e,t)=>se(e)&&!se(t)?-1:!se(e)&&se(t)?1:Ne(e)-Ne(t),Mr=(e,t)=>{let r=0;for(let n=1;n<e.length;n++)t(e[r],e[n])>0&&(r=n);return e[r]},Ge=e=>{const t=e.flatMap(n=>n.sellers.map(i=>({offer:i.commertialOffer,sku:n}))),r=Mr(t,({offer:n},{offer:i})=>ze(n,i));return r?r.sku:e[0]},Ve=e=>e.map(({imageUrl:t,imageText:r,imageLabel:n})=>({alternateName:r??"",url:t.replace("vteximg.com.br","vtexassets.com"),keywords:n})),ae={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Br=e=>({name:e.name,value:e.content,valueReference:ae.attachment}),zr=e=>({propertyID:e.id,name:e.name,value:e.value,valueReference:{valueReference:ae.attribute,visible:e.visible}}),le=(e,t,r)=>{const n=e.flatMap(({name:a,values:o})=>o?o.map(d=>({name:a,value:d,valueReference:ae.specification})):{name:a,value:"",valueReference:ae.specification}),i=Array.isArray(r)?r.map(Br):[],s=t?t.map(zr):[];return[...n,...i,...s]},Fe="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",Gr="AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa",Vr=e=>{let t=e.slice(0);for(let r=0;r<Fe.length;r++)t=t.replace(new RegExp(Fe.charAt(r),"g"),Gr.charAt(r));return t},Wr=e=>e.replace(/[·/_,:]/,"-"),We=e=>{const r=e.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g,"-");return Wr(Vr(r)).toLowerCase()},Qe=e=>`/${e}/p`,Xe=e=>{const t=Math.max(...e.map(n=>n.NumberOfInstallments)),r=e.find(n=>n.NumberOfInstallments===t);return{count:(r==null?void 0:r.NumberOfInstallments)??0,value:(r==null?void 0:r.Value)??0}},Ke=(e,t)=>{const r={price:0,listPrice:0,sellerDefault:!1},i=e.map(s=>Dr({offer:s.commertialOffer,seller:s,product:t})).sort(ze).map(s=>(s.seller.sellerId==="1"&&s.AvailableQuantity>0&&(r.price=s.Price,r.listPrice=s.ListPrice,r.sellerDefault=!0),{availability:s.AvailableQuantity>0,listPrice:s.ListPrice,price:Hr(s),priceValidUntil:s.PriceValidUntil,priceCurrency:"BRL",installments:s.Installments,lowPrice:s.spotPrice,quantity:s.AvailableQuantity,seller:{identifier:s.seller.sellerId}}));return{lowPrice:r.sellerDefault?r.price:i[0].price,highPrice:r.sellerDefault?r.listPrice:i[0].listPrice,offers:i}},Je=e=>{const{attributes:t,itemId:r,name:n,sellers:i,variations:s}=e;return{additionalProperty:le(s,t,[]),name:n,offers:{offers:i==null?void 0:i.map(({sellerId:a,commertialOffer:o})=>({availability:Ur(o.AvailableQuantity>0),listPrice:o.ListPrice,price:o.Price,quantity:o.AvailableQuantity,seller:{identifier:a}}))},sku:r}},Qr=e=>{var R;const{attributes:t,referenceId:r,isVariantOf:n,images:i,itemId:s,name:a,sellers:o,videos:d,variations:g}=e,{brand:l,categories:u,categoriesIds:w,description:v,linkText:y,productClusters:_,clusterHighlights:p,productName:b,properties:m,productId:h,productReference:f}=n,A=u.slice().reverse(),N=Ke(o,e.isVariantOf),I=Xe(N.offers[0].installments);return{sku:s,gtin:((R=r==null?void 0:r[0])==null?void 0:R.Value)??f??"",name:b??a,description:v,releaseDate:n.releaseDate??"",slug:y,video:d[0],categories:u,categoriesIds:w,id:h,brand:{name:l,brandName:l},seo:{description:v,title:b,canonical:Qe(y)},cluster:{generals:_,highlights:p},properties:m,availability:{status:N.offers[0].availability},breadcrumbList:{itemListElement:[...A.map((T,F)=>{const $=T.split("/"),D=$[$.length-2],U=$.map(We).join("/");return{name:D,item:U,position:F+1}}),{name:n.productName,item:y,position:u.length+1}],numberOfItems:u.length},image:Ve(i),offers:N,additionalProperty:le(g,t,[]),isVariantOf:{productGroupID:n.productId,hasVariant:n.items.map(T=>Je(T))},installments:I}},Xr=e=>{var I;const{attributes:t,referenceId:r,isVariantOf:n,images:i,itemId:s,name:a,sellers:o,Videos:d,variations:g}=e,{brand:l,categories:u,categoriesIds:w,description:v,linkText:y,productClusters:_,productName:p,Coleção:b,"ID Coleção":m,productId:h}=n,f=u.slice().reverse(),A=Ke(o,e.isVariantOf),N=Xe(A.offers[0].installments);return{sku:s,gtin:((I=r[0])==null?void 0:I.Value)??"",name:p??a,description:v,releaseDate:n.releaseDate??"",slug:y,video:d[0],categories:u,categoriesIds:w,collection:b,collectionId:m,id:h,brand:{name:l,brandName:l},seo:{description:v,title:p,canonical:Qe(y)},cluster:{generals:_,highlights:[]},availability:{status:A.offers[0].availability},breadcrumbList:{itemListElement:[...f.map((R,T)=>{const F=R.split("/"),$=F[F.length-2],D=F.map(We).join("/");return{name:$,item:D,position:T+1}}),{name:n.productName,item:y,position:u.length+1}],numberOfItems:u.length},image:Ve(i),offers:A,additionalProperty:le(g,t,[]),isVariantOf:{productGroupID:n.productId,hasVariant:n.items.map(R=>{const{variations:T}=R,F=T.map($=>({name:$,values:R[$]}));return{...Je(R),additionalProperty:le(F,t,[])}})},installments:N}},Kr=c.array().of(c.object({key:c.string().required(),value:c.string().required()})).required("Facets are required");async function Jr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Kr.validate(t);const n=new URLSearchParams({}),i=t.map(({key:a,value:o})=>`${a}/${o}`).join("/");C.addSearchParamsFacets(t,n);const s=`${e}/api/catalog_system/pub/products/crossselling/${i}`;return j(s,{cache:"no-store",...r}).then(a=>a.map(d=>{const g=Ge(d.items);return g&&Be(g,d)}).filter(d=>!!d).map(d=>({node:Xr(d)})))}const Ze=({apiUrl:e,body:t,fetchOptions:r,extraData:n})=>{if(!t){console.error("[ERROR FETCHING] Body is required");return}const{query:i="",page:s=1,count:a,sort:o="",facets:d=[],type:g,hideUnavailableItems:l=!0,locale:u=""}=t,w=new URLSearchParams({page:s.toString(),count:(a==null?void 0:a.toString())??(n==null?void 0:n.ITEMS_PER_PAGE)??24,query:i,sort:o,locale:u});l!==void 0&&w.append("hideUnavailableItems",l.toString());const v=d.map(y=>`${y.key}/${y.value}`).join("/")??"";return Ht(`${e}/api/io/_v/api/intelligent-search/${g}/${v}?${w.toString()}`,{headers:{Accept:"application/json","content-type":"application/json"},...r})};async function Zr({body:e,extraData:t,...r}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const n=await Ze({body:{...e,type:"product_search"},extraData:t,...r}),i=(n==null?void 0:n.products.map(o=>{const d=Ge(o.items);return d&&Be(d,o)}).filter(o=>!!o))??[],{pagination:s,recordsFiltered:a}=n;return{data:{pagination:{nextPage:s.after.length>0,previousPage:s.before.length>0,startCursor:"0",endCursor:a.toString(),count:a,total:s.count},products:i.map((o,d)=>({node:Qr(o),cursor:d.toString()}))}}}async function Yr({body:e,extraData:t,...r}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const n=await Ze({body:{...e,type:"facets"},extraData:t,...r});return!n||!n.facets?(console.error("[ERROR FETCHING] No facets found"),{data:{facets:[]}}):{data:{...n,facets:C.formattedFacets(n,e==null?void 0:e.selectedFacets,(e==null?void 0:e.query)??"")}}}const en=c.object({query:c.string().optional(),locale:c.string().optional()});async function tn({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await en.validate(t);const{query:n="",locale:i="default_locale"}=t,s=new URLSearchParams({query:n,locale:i});return j(`${e}/api/io/_v/api/intelligent-search/search_suggestions?${s.toString()}`,{...r})}async function rn({apiUrl:e}){return j(`${e}/api/io/_v/api/intelligent-search/top_searches`)}const nn=Object.freeze(Object.defineProperty({__proto__:null,getSearchAutoCompleteSuggestions:Fr,getSearchCrossellingProducts:Jr,getSearchFacets:Yr,getSearchProducts:Zr,getSearchSuggestedTerms:tn,getSearchTopSearchs:rn},Symbol.toStringTag,{value:"Module"})),on=c.object({masterDataEntity:c.string().nonNullable(),payload:c.object().shape({}).nullable()});async function sn({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await on.validate(t);const{masterDataEntity:n,payload:i}=t,s=`${e}/api/dataentities/${n}/documents`;return j(s,{method:"POST",body:{payload:i},...r})}const an=c.object().shape({_where:c.string().optional(),_fields:c.string().optional(),_sort:c.string().optional(),_from:c.number().integer().min(0).optional(),_to:c.number().integer().min(0).optional(),_keyword:c.string().optional()}),ln=c.object({masterDataEntity:c.string().required(),searchFields:an,headers:c.object().shape({"REST-Range":c.string().notRequired()})});async function cn({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}const n=new URLSearchParams;await ln.validate(t);const{masterDataEntity:i,searchFields:s,headers:a}=t;s&&Object.entries(s).forEach(([g,l])=>{n.append(g,String(l))}),"_fields"in s||n==null||n.append("_fields","_all");let o=[],d=null;do{d&&n.set("_scroll",d);const g=await fetch(`${e}/api/dataentities/${i}/search?${n.toString()}`,{method:"GET",headers:{"REST-Range":(a==null?void 0:a["REST-Range"])??"resources=0-100",...r==null?void 0:r.headers},cache:"no-store"});if(!g.ok)throw new Error(`[MasterData] ${g.status} - ${g.statusText}`);const l=await g.json();o.push(...l),d=g.headers.get("x-vtex-md-scroll")}while(d);return o}const un=c.object({dataEntityName:c.string().required(),id:c.string().required(),fieldsToBeUpdated:c.object().shape({})});async function dn({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await un.validate(t);const{dataEntityName:n,id:i,fieldsToBeUpdated:s}=t,a=`${e}/api/dataentities/${n}/documents/${i}`;return j(a,{body:{fieldsToBeUpdated:s},method:"PATCH",...r})}const pn=Object.freeze(Object.defineProperty({__proto__:null,getSearchMasterdata:cn,patchUpdateMasterdata:dn,postMasterdata:sn},Symbol.toStringTag,{value:"Module"}));async function mn({body:e,apiUrl:t,extraData:r,fetchOptions:n}){const{productIds:i}=e;if(!i)return console.error("[ERROR FETCHING] productIds is required"),[];const{NAME_SPLIT_SYMBOL:s}=r;if(!s)return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"),[];const a=i.map(l=>typeof l=="string"||typeof l=="number"?`productId:${l}`:"").join("&fq="),o=await j(`${t}/api/catalog_system/pub/products/search?fq=${a}`,{...n}),d=l=>Object.keys(l).map(u=>({id:u,name:l[u]}));return o.map((l,u)=>{var h;const{installments:w,price:v,listPrice:y,sizes:_,allSizesAvailable:p}=C.getSkuInfos({items:l.items,NAME_SPLIT_SYMBOL:s}),b=p?!0:_.some(f=>f.available),m=l.items[0].sellers[0].commertialOffer;return{node:{sku:l.items[0].itemId,gtin:l.productReference,name:l.productName,description:l.description,releaseDate:l.releaseDate,slug:l.linkText,categories:l.categories,categoriesIds:l.categoriesIds,id:l.items[0].itemId,brand:{name:l.brand,brandName:l.brand},seo:{description:l.description,title:l.productName,canonical:`/${l.linkText}/p`},cluster:{generals:d(l.productClusters),highlights:d(l.clusterHighlights)},availability:{status:b},image:l.items[0].images.map(({imageLabel:f,imageUrl:A})=>({alternateName:f,url:A,keywords:f})),offers:{lowPrice:v,highPrice:y,offers:[{availability:b,listPrice:y,price:v,priceValidUntil:m.PriceValidUntil,priceCurrency:"BRL",installments:m.Installments,lowPrice:v,quantity:m.AvailableQuantity,seller:{identifier:l.items[0].sellers[0].sellerId}}]},additionalProperty:(h=l==null?void 0:l.skuSpecifications)==null?void 0:h.map(f=>({name:l==null?void 0:l.skuSpecifications[0].field.name,value:f,valueReference:"SPECIFICATION"})),isVariantOf:{productGroupID:l.productId,hasVariant:l.items.map(f=>{var A;return{additionalProperty:f==null?void 0:f.variations.map(()=>{var N,I,R;return{name:(N=f==null?void 0:f.variations)==null?void 0:N[0],value:(R=f==null?void 0:f[(I=f==null?void 0:f.variations)==null?void 0:I[0]])==null?void 0:R[0],valueReference:"SPECIFICATION"}}),name:f.name,offers:{offers:(A=f.sellers)==null?void 0:A.map(({commertialOffer:N,sellerId:I})=>({availability:"https://schema.org/InStock",listPrice:N.ListPrice,price:N.Price,quantity:N.AvailableQuantity,seller:{identifier:I}}))},sku:f.itemId,slug:`-${f.itemId}`}})},installments:w},cursor:u.toString()}})}const hn=Object.freeze(Object.defineProperty({__proto__:null,getWishlistProducts:mn},Symbol.toStringTag,{value:"Module"}));var we={exports:{}},Ye={},ye={},et={},tt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathSuffix",{enumerable:!0,get:function(){return r}});const t=C.parsePath;function r(n,i){if(!n.startsWith("/")||!i)return n;const{pathname:s,query:a,hash:o}=(0,t.parsePath)(n);return""+s+i+a+o}})(tt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"formatNextPathnameInfo",{enumerable:!0,get:function(){return s}});const t=C.removeTrailingSlash,r=C.addPathPrefix,n=tt,i=C.addLocale;function s(a){let o=(0,i.addLocale)(a.pathname,a.locale,a.buildId?void 0:a.defaultLocale,a.ignorePrefix);return(a.buildId||!a.trailingSlash)&&(o=(0,t.removeTrailingSlash)(o)),a.buildId&&(o=(0,n.addPathSuffix)((0,r.addPathPrefix)(o,"/_next/data/"+a.buildId),a.pathname==="/"?"index.json":".json")),o=(0,r.addPathPrefix)(o,a.basePath),!a.buildId&&a.trailingSlash?o.endsWith("/")?o:(0,n.addPathSuffix)(o,"/"):(0,t.removeTrailingSlash)(o)}})(et);var rt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getHostname",{enumerable:!0,get:function(){return t}});function t(r,n){let i;if(n!=null&&n.host&&!Array.isArray(n.host))i=n.host.toString().split(":",1)[0];else if(r.hostname)i=r.hostname;else return;return i.toLowerCase()}})(rt);var nt={},it={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removePathPrefix",{enumerable:!0,get:function(){return r}});const t=C.pathHasPrefix;function r(n,i){if(!(0,t.pathHasPrefix)(n,i))return n;const s=n.slice(i.length);return s.startsWith("/")?s:"/"+s}})(it);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});const t=C.normalizeLocalePath,r=it,n=C.pathHasPrefix;function i(s,a){var o;const{basePath:d,i18n:g,trailingSlash:l}=(o=a.nextConfig)!=null?o:{},u={pathname:s,trailingSlash:s!=="/"?s.endsWith("/"):l};d&&(0,n.pathHasPrefix)(u.pathname,d)&&(u.pathname=(0,r.removePathPrefix)(u.pathname,d),u.basePath=d);let w=u.pathname;if(u.pathname.startsWith("/_next/data/")&&u.pathname.endsWith(".json")){const y=u.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),_=y[0];u.buildId=_,w=y[1]!=="index"?"/"+y.slice(1).join("/"):"/",a.parseData===!0&&(u.pathname=w)}if(g){let y=a.i18nProvider?a.i18nProvider.analyze(u.pathname):(0,t.normalizeLocalePath)(u.pathname,g.locales);u.locale=y.detectedLocale;var v;u.pathname=(v=y.pathname)!=null?v:u.pathname,!y.detectedLocale&&u.buildId&&(y=a.i18nProvider?a.i18nProvider.analyze(w):(0,t.normalizeLocalePath)(w,g.locales),y.detectedLocale&&(u.locale=y.detectedLocale))}return u}})(nt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextURL",{enumerable:!0,get:function(){return d}});const t=C.detectDomainLocale,r=et,n=rt,i=nt,s=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function a(g,l){return new URL(String(g).replace(s,"localhost"),l&&String(l).replace(s,"localhost"))}const o=Symbol("NextURLInternal");class d{constructor(l,u,w){let v,y;typeof u=="object"&&"pathname"in u||typeof u=="string"?(v=u,y=w||{}):y=w||u||{},this[o]={url:a(l,v??y.base),options:y,basePath:""},this.analyze()}analyze(){var l,u,w,v,y;const _=(0,i.getNextPathnameInfo)(this[o].url.pathname,{nextConfig:this[o].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[o].options.i18nProvider}),p=(0,n.getHostname)(this[o].url,this[o].options.headers);this[o].domainLocale=this[o].options.i18nProvider?this[o].options.i18nProvider.detectDomainLocale(p):(0,t.detectDomainLocale)((u=this[o].options.nextConfig)==null||(l=u.i18n)==null?void 0:l.domains,p);const b=((w=this[o].domainLocale)==null?void 0:w.defaultLocale)||((y=this[o].options.nextConfig)==null||(v=y.i18n)==null?void 0:v.defaultLocale);this[o].url.pathname=_.pathname,this[o].defaultLocale=b,this[o].basePath=_.basePath??"",this[o].buildId=_.buildId,this[o].locale=_.locale??b,this[o].trailingSlash=_.trailingSlash}formatPathname(){return(0,r.formatNextPathnameInfo)({basePath:this[o].basePath,buildId:this[o].buildId,defaultLocale:this[o].options.forceLocale?void 0:this[o].defaultLocale,locale:this[o].locale,pathname:this[o].url.pathname,trailingSlash:this[o].trailingSlash})}formatSearch(){return this[o].url.search}get buildId(){return this[o].buildId}set buildId(l){this[o].buildId=l}get locale(){return this[o].locale??""}set locale(l){var u,w;if(!this[o].locale||!(!((w=this[o].options.nextConfig)==null||(u=w.i18n)==null)&&u.locales.includes(l)))throw new TypeError(`The NextURL configuration includes no locale "${l}"`);this[o].locale=l}get defaultLocale(){return this[o].defaultLocale}get domainLocale(){return this[o].domainLocale}get searchParams(){return this[o].url.searchParams}get host(){return this[o].url.host}set host(l){this[o].url.host=l}get hostname(){return this[o].url.hostname}set hostname(l){this[o].url.hostname=l}get port(){return this[o].url.port}set port(l){this[o].url.port=l}get protocol(){return this[o].url.protocol}set protocol(l){this[o].url.protocol=l}get href(){const l=this.formatPathname(),u=this.formatSearch();return`${this.protocol}//${this.host}${l}${u}${this.hash}`}set href(l){this[o].url=a(l),this.analyze()}get origin(){return this[o].url.origin}get pathname(){return this[o].url.pathname}set pathname(l){this[o].url.pathname=l}get hash(){return this[o].url.hash}set hash(l){this[o].url.hash=l}get search(){return this[o].url.search}set search(l){this[o].url.search=l}get password(){return this[o].url.password}set password(l){this[o].url.password=l}get username(){return this[o].url.username}set username(l){this[o].url.username=l}get basePath(){return this[o].basePath}set basePath(l){this[o].basePath=l.startsWith("/")?l:`/${l}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new d(String(this),this[o].options)}}})(ye);var _e={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,g){for(var l in g)Object.defineProperty(d,l,{enumerable:!0,get:g[l]})}t(e,{fromNodeOutgoingHttpHeaders:function(){return n},normalizeNextQueryParam:function(){return o},splitCookiesString:function(){return i},toNodeOutgoingHttpHeaders:function(){return s},validateURL:function(){return a}});const r=C.constants;function n(d){const g=new Headers;for(let[l,u]of Object.entries(d)){const w=Array.isArray(u)?u:[u];for(let v of w)typeof v>"u"||(typeof v=="number"&&(v=v.toString()),g.append(l,v))}return g}function i(d){var g=[],l=0,u,w,v,y,_;function p(){for(;l<d.length&&/\s/.test(d.charAt(l));)l+=1;return l<d.length}function b(){return w=d.charAt(l),w!=="="&&w!==";"&&w!==","}for(;l<d.length;){for(u=l,_=!1;p();)if(w=d.charAt(l),w===","){for(v=l,l+=1,p(),y=l;l<d.length&&b();)l+=1;l<d.length&&d.charAt(l)==="="?(_=!0,l=y,g.push(d.substring(u,v)),u=l):l=v+1}else l+=1;(!_||l>=d.length)&&g.push(d.substring(u,d.length))}return g}function s(d){const g={},l=[];if(d)for(const[u,w]of d.entries())u.toLowerCase()==="set-cookie"?(l.push(...i(w)),g[u]=l.length===1?l[0]:l):g[u]=w;return g}function a(d){try{return String(new URL(String(d)))}catch(g){throw new Error(`URL is malformed "${String(d)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:g})}}function o(d,g){const l=[r.NEXT_QUERY_PARAM_PREFIX,r.NEXT_INTERCEPTION_MARKER_PREFIX];for(const u of l)if(d!==u&&d.startsWith(u)){const w=d.substring(u.length);g(w)}}})(_e);var ot={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var o in a)Object.defineProperty(s,o,{enumerable:!0,get:a[o]})}t(e,{PageSignatureError:function(){return r},RemovedPageError:function(){return n},RemovedUAError:function(){return i}});class r extends Error{constructor({page:a}){super(`The middleware "${a}" accepts an async API directly with the form:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react/jsx-runtime"),C=require("./index-DyKuIyRP.js"),G=require("@soma-vertical-web/core-components"),gt=require("yup"),bt=require("sanitize-html"),wt=require("jose");function vt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=vt(gt),yt=async({children:e,ClientCartProvider:t,...r})=>{const{data:n}=await C.fetchContentType("mini_cart",r);return k.jsx(t,{...n?Array.isArray(n)?{data:n[0]}:{data:n}:{},children:e})},_t=({slug:e,data:t,SectionZone:r,COMMON_PAGE_COLUMN_GAP:n,identifyWhoIsFirst:o})=>{const a=t==null?void 0:t.find(u=>{var w,v,y,_;return((v=(w=u.config)==null?void 0:w.responsive)==null?void 0:v.deviceType)==="desktop"&&((_=(y=u.config)==null?void 0:y.seo)==null?void 0:_.slug)===e}),c=a==null?void 0:a.config.responsive.gapCustom,i=a==null?void 0:a.config.responsive.gapSections,d=t==null?void 0:t.find(u=>{var w,v,y,_;return((v=(w=u.config)==null?void 0:w.responsive)==null?void 0:v.deviceType)==="mobile"&&((_=(y=u.config)==null?void 0:y.seo)==null?void 0:_.slug)===e}),g=d==null?void 0:d.config.responsive.gapCustom,s=d==null?void 0:d.config.responsive.gapSections;return k.jsxs(k.Fragment,{children:[k.jsx(G.Utils.Column,{gap:c&&i?i:n,className:G.helpers.classNameConcat(C.responsive["responsive-desktop-flex"],"utils-column-modifier"),children:k.jsx(r,{data:(a==null?void 0:a.sections)??[],identifyWhoIsFirst:o})}),k.jsx(G.Utils.Column,{gap:g&&s?s:n,className:G.helpers.classNameConcat(C.responsive["responsive-mobile-flex"],"utils-column-modifier"),children:k.jsx(r,{data:(d==null?void 0:d.sections)??[],identifyWhoIsFirst:o})})]})},Rt=async({slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:r,identifyWhoIsFirst:n=!1,...o})=>{const{data:a}=await C.fetchContentType("common_page",o);return!a||!Array.isArray(a)||a.length===0?null:k.jsx(_t,{data:a,slug:e,SectionZone:t,COMMON_PAGE_COLUMN_GAP:r,identifyWhoIsFirst:n})},xt=async({children:e,ClientFlagsAndTagsProvider:t,...r})=>{const{data:n}=await C.fetchContentType("flags_and_tags",r);return!n||!Array.isArray(n)?null:k.jsx(t,{data:n[0],children:e})},Pt=async({className:e,PAYMENT_FLAGS_DICTIONARY:t,PAYMENT_FLAGS:r,LEGAL_INFORMATION_TEXT:n,ICONS:o,SectionZone:a,Footer:c,FooterSupport:i,hasFooterStamps:d,...g})=>{var v,y,_,p,b,h,m,f,A,N,x;const{data:s}=await C.fetchContentType("footer",g),u=Array.isArray(s)&&((v=s[0])==null?void 0:v.type)==="footer"?s[0]:null,w={...(y=u==null?void 0:u.paymentInfo)==null?void 0:y.paymentInfo,acceptedFlags:Array.isArray((_=u==null?void 0:u.paymentInfo)==null?void 0:_.paymentInfo.acceptedFlags)?(p=u==null?void 0:u.paymentInfo)==null?void 0:p.paymentInfo.acceptedFlags.filter(R=>!!t[R]).map(R=>t[R]):[]};return u?k.jsx(c,{className:e,data:{...u},socialInfo:(b=u.socialMedia)==null?void 0:b.socialMedia,socialMedias:(m=(h=u.socialMedia)==null?void 0:h.socialMedia)==null?void 0:m.medias,payments:w,hasFooterStamps:d,adornment:{...(A=(f=u.supportInfo)==null?void 0:f.supportInfo)!=null&&A.content?{bottom:k.jsx(i,{content:(x=(N=u.supportInfo)==null?void 0:N.supportInfo)==null?void 0:x.content,CONSTANTS:{ICONS:o,PAYMENT_FLAGS:r,PAYMENT_FLAGS_DICTIONARY:t}})}:{},...u.sections.length?{top:k.jsx(a,{data:u.sections})}:{}},LEGAL_INFORMATION_TEXT:n,ICONS:o}):null},It=async({children:e,ClientHeaderProvider:t,...r})=>{var a,c,i,d,g,s;const{data:n}=await C.fetchContentType("header",r),o=Array.isArray(n)?n[0]:void 0;return k.jsx(t,{headerData:{...((a=o==null?void 0:o.layerConfig)==null?void 0:a.config)??{},subMenus:((c=o==null?void 0:o.sections)==null?void 0:c.map(u=>u.data))??[],categories:((d=(i=o==null?void 0:o.categories)==null?void 0:i.categories)==null?void 0:d.items)??[],navigationLinks:((s=(g=o==null?void 0:o.navigationLinks)==null?void 0:g.navigationLinks)==null?void 0:s.items)??[]},children:e})},Ct=e=>{var c,i;const t=(i=(c=e[0])==null?void 0:c.items)==null?void 0:i.items;if((t==null?void 0:t.items.length)===0||e.length===0)return{iconLabel:"",label:"",content:[]};const r=t==null?void 0:t.iconLabel,n=t==null?void 0:t.label,o=t==null?void 0:t.helpButtonSize,a=t.items.map((d,g)=>({type:d.type,id:`${g.toString()}-${d.title.toLowerCase()}`,title:d.title,subtitle:d.subtitle,description:d.description,buttonLabel:d.buttonLabel,buttonHref:d.buttonHref,buttonMode:d.buttonMode,buttonSize:d.buttonSize,buttonIcon:d.buttonIcon}));return{iconLabel:r,label:n,helpButtonSize:o,content:a}},St=async({HelpButton:e,ICONS:t,className:r,...n})=>{const{data:o}=await C.fetchContentType("helpbutton",n);if(!o||!Array.isArray(o)||o.length===0)return null;const a=Ct(o);return k.jsx(e,{data:a,ICONS:t,className:r})},kt=async({SectionZone:e,LPCadastro:t,...r})=>{var d;const{data:n}=await C.fetchContentType("lp_cadastro",r);if(!n||!Array.isArray(n)||n.length===0)return null;const[o]=n,a=(o==null?void 0:o.sections)||[],c=((d=o==null?void 0:o.content)==null?void 0:d.conteúdo)||{},i=o==null?void 0:o.sections;return k.jsxs(k.Fragment,{children:[k.jsx(t,{sections:a,content:c}),k.jsx(e,{data:i})]})},Et=async({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,entity:r,showVendor:n,LPStoresClientWrapper:o,...a})=>{var g;const{data:c}=await C.fetchContentType("lp_lojas",a),d=(g=(Array.isArray(c)?c:[])[0])==null?void 0:g.config.config;return k.jsx(o,{entity:r,content:d,data:c,showVendor:n,ICONS:t,LPLOJAS_TEMPLATE_RETURN_BUTTON:e})},Tt=async({children:e,productId:t,COMMON_PAGE_COLUMN_GAP:r,SectionZone:n,PDPContentProvider:o,...a})=>{const{data:c}=await C.fetchContentType("product_page",a);return!c||!Array.isArray(c)||c.length===0?null:k.jsx(o,{data:c[0],productId:t,COMMON_PAGE_COLUMN_GAP:r,SectionZone:n,children:e})},At={"column-modifier":"_column-modifier_1tqap_1"},Ot=async({className:e,children:t,slug:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o,PLPContentProvider:a,...c})=>{const{data:i}=await C.fetchContentType("categories_page",c);if(!i||!Array.isArray(i))return null;const d=i.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)===r&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="desktop"}),g=i.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)===r&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="mobile"}),s=i.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)==="default"&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="desktop"}),u=i.find(v=>{var y,_,p;return((y=v.config)==null?void 0:y.seo.slug)==="default"&&((p=(_=v.config)==null?void 0:_.responsive)==null?void 0:p.deviceType)==="mobile"}),w=Array.isArray(e)?e:[e];return k.jsxs(k.Fragment,{children:[k.jsx(G.Utils.Column,{className:G.helpers.classNameConcat(C.responsive["responsive-desktop-flex"],[At["column-modifier"],...w]),style:{minHeight:"100vh"},children:k.jsx(a,{data:d??s,device:"desktop",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o,children:t})}),k.jsx(G.Utils.Column,{className:G.helpers.classNameConcat(C.responsive["responsive-mobile-flex"],e),children:k.jsx(a,{data:g??u,device:"mobile",SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o,children:t})})]})},jt=async({slug:e,...t})=>{var c,i,d;const{data:r}=await C.fetchContentType("redirect_to_search",t);if(!r||!Array.isArray(r))return{slug:e,query:null,redirect:!1};const n=((d=(i=(c=r[0])==null?void 0:c.redirectToSearch)==null?void 0:i.redirectToSearch)==null?void 0:d.paths)??[];if(!!!n.length)return{slug:e,query:null,redirect:!1};const a=n.find(g=>{var s,u;return((s=g.path)==null?void 0:s.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((u=g.path)==null?void 0:u.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return a?{slug:e,query:a==null?void 0:a.searchQuery,redirect:!0,collectionId:a==null?void 0:a.collectionId,filters:a==null?void 0:a.filters,sort:a==null?void 0:a.sort}:{slug:e,query:null,redirect:!1,collectionId:null,filters:null,sort:null}},qt=async({slug:e,...t})=>{var c,i,d;const{data:r}=await C.fetchContentType("redirect_to_search",t);if(!r||!Array.isArray(r))return null;const n=((d=(i=(c=r[0])==null?void 0:c.redirectToSearch)==null?void 0:i.redirectToSearch)==null?void 0:d.paths)??[];if(!!!n.length)return null;const a=n.find(g=>{var s,u;return((s=g.path)==null?void 0:s.replace(/\//g,"-").toLowerCase())===e.replace(/\//g,"-").toLowerCase()||((u=g.path)==null?void 0:u.replace(/\//g,"-").toLowerCase())===`/${e}`.replace(/\//g,"-").toLowerCase()});return a?{slug:e,title:a.pageTitle,description:a.pageDescription}:null},Nt=async({slug:e,Politicas:t,SectionZone:r,oneTrust:n,...o})=>{const{data:a}=await C.fetchContentType("policy_page",o),{data:c}=await C.fetchContentType("policy_tab",o),i=Array.isArray(a)?a:null,d=Array.isArray(c)?c:null,g=i?i[0].sections:null;return!i||!d?null:k.jsxs(k.Fragment,{children:[k.jsx(t,{slug:e,pageData:i[0],tabsData:d,oneTrust:n}),g&&k.jsx(r,{data:g})]})},Ft=async({children:e,SectionZone:t,className:r,...n})=>{const{data:o}=await C.fetchContentType("search_page",n);return Array.isArray(o)&&o.length>0?k.jsx(C.SearchPageScreening,{data:o,SectionZone:t,className:r,children:e}):k.jsx(k.Fragment,{children:"children"})},$t=async({ClientTipbarContent:e,...t})=>{const{data:r}=await C.fetchContentType("tipbar",t);return k.jsx(e,{data:r})},Lt={CommonPageContent:Rt,CartContent:yt,FlagsAndTagsContent:xt,HeaderContent:It,TipbarContent:$t,FooterContent:Pt,PLPContent:Ot,PDPContent:Tt,getRedirectData:jt,getPLPSynteticMetaData:qt,SearchPageContent:Ft,HelpButtonContent:St,LPCadastroContent:kt,LPLojasContent:Et,PolicyPageContent:Nt},Dt={Components:Lt},j=async(e,t={})=>{const{method:r="GET",body:n,headers:o={},priority:a="auto",cache:c="default"}=t;return fetch(e,{method:r,headers:{...o,Accept:"application/json","Content-Type":"application/json"},priority:a,cache:c,...n?{body:JSON.stringify(n)}:{}}).then(i=>i.json()).catch(i=>{console.error("[ERROR FETCH VTEX]",i)})},K=new Map;async function Ut(e,t={}){var r;try{const{abort:n=!1}=t,o=new AbortController;n&&(K.has(e)&&((r=K.get(e))==null||r.abort(),K.delete(e)),K.set(e,o));const a=j(e,{...t,...n?{signal:o.signal}:{}});return n&&K.delete(e),a}catch(n){if(n.name==="AbortError"){console.log(`[REQUEST CANCELLED]: ${e}`);return}throw console.error(`[ERROR API]: ${n.message}`),n}}const Ht=l.object({country:l.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:l.string().nullable()});async function Mt({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ht.validate(t);const{country:n,postalCode:o}=t;return await j(`${e}/api/checkout/pub/postal-code/${n}/${o}`,{method:"POST",body:t,...r})}const Bt=l.object({orderFormId:l.string().nullable(),sellerCode:l.string().nullable(),sellerName:l.string().nullable()});async function Ue({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Bt.validate(t);const{orderFormId:n,sellerCode:o,sellerName:a}=t,c=o?`${o.trim()} - ${a}`:null;return j(`${e}/api/checkout/pub/orderForm/${n}/attachments/openTextField`,{method:"POST",body:{value:c},...r})}const zt=l.object({orderFormId:l.string().nullable(),sellerCode:l.string().nullable(),marketingData:l.object()});async function He({apiUrl:e,body:t,extraData:r={},fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await zt.validate(t);const{orderFormId:o,sellerCode:a,marketingData:c}=t,i=a?{utmCampaign:a?a.toUpperCase():"",utmiCampaign:a?`${r.VENDOR_CODE}`:"semcodigo"}:{};return j(`${e}/api/checkout/pub/orderForm/${o}/attachments/marketingData`,{method:"POST",body:{...c,...i},...n})}const Gt=l.object({orderFormId:l.string().nullable(),sellerCode:l.string().nullable(),sellerName:l.string().nullable()});async function Vt({apiUrl:e,body:t,fetchOptions:r,extraData:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Gt.validate(t);const o=await Ue({apiUrl:e,body:t,fetchOptions:r});return He({apiUrl:e,body:{...t,marketingData:o==null?void 0:o.marketingData},extraData:n,fetchOptions:r})}const Wt=l.object({orderFormId:l.string().nullable(),coupon:l.string().nullable()});async function Qt({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Wt.validate(t);const{coupon:n="",orderFormId:o}=t;return j(`${e}/api/checkout/pub/orderForm/${o}/coupons`,{method:"POST",body:{text:n},...r})}const Xt=l.object({appId:l.string().required("App ID is required"),orderFormId:l.string().nullable(),key:l.array().of(l.string())});async function Kt({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Xt.validate(t);const{appId:n="faststore",orderFormId:o,key:a}=t;return j(`${e}/api/checkout/pub/orderForm/${o}/customData/${n}/${a}`,{method:"PUT",...r})}const Zt=l.object().shape({name:l.string().required("Attachment name is required"),content:l.object().nullable()});var Le;const Jt=l.object().shape({attachments:(Le=l.array().of(Zt))==null?void 0:Le.nullable(),id:l.string().required("ID of SKU is required"),index:l.number().integer().nullable(),quantity:l.number().integer().nullable(),seller:l.string().required("Seller is required"),price:l.number().integer()}),Yt=l.object({orderFormId:l.string().required("OrderFormId is required"),orderItems:l.array().of(Jt)});async function er({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Yt.validate(t);const{orderFormId:n,orderItems:o}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/items`,{method:"POST",body:{orderItems:o},...r})}const tr=l.object({orderFormId:l.string().nullable()});async function rr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await tr.validate(t);const{orderFormId:n}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/items/removeAll`,{method:"POST",...r})}const nr=l.object().shape({name:l.string().required("Attachment name is required"),content:l.object().nullable()});var De;const or=l.object().shape({attachments:(De=l.array().of(nr))==null?void 0:De.nullable(),id:l.string().required("ID of SKU is required"),index:l.number().integer().nullable(),quantity:l.number().integer().nullable(),seller:l.string().required("Seller is required"),price:l.number().integer()}),ir=l.object({orderFormId:l.string().nullable(),orderItems:l.array().of(or)});async function ar({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ir.validate(t);const{orderFormId:n,orderItems:o}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/items/update`,{method:"POST",body:{orderItems:o},...r})}const sr=l.object({orderFormId:l.string().nullable()});async function cr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await sr.validate(t);const{orderFormId:n}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/messages/clear`,{method:"POST",...r})}const lr=l.object({id:l.string().nullable(),itemIndex:l.number().nullable(),orderFormId:l.string().nullable(),remove:l.boolean().nullable()});async function ur({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await lr.validate(t);const{itemIndex:n,orderFormId:o,id:a,remove:c}=t,i=c?`/${a}/remove`:"",d=`${e}/api/checkout/pub/orderForm/${o}/items/${n}/offerings${i}`;return j(d,{method:"POST",body:{id:a},...r})}const dr=l.object({orderFormId:l.string().nullable()});async function pr({apiUrl:e,body:t,fetchOptions:r,extraData:n}){var c;if(!t){console.error("[ERROR FETCHING] Body is required");return}await dr.validate(t);const o=new URLSearchParams({refreshOutdatedData:"true"}),a=t.orderFormId&&((c=n.orderFormPurchaseId)==null?void 0:c.value)!==t.orderFormId?`${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(o)}`:`${e}/api/checkout/pub/orderForm`;return j(a,{method:"GET",...r})}const hr=l.object({orderFormId:l.string().nullable(),email:l.string().email().required(),firstName:l.string().required(),lastName:l.string().required(),documentType:l.string().required(),document:l.string().required(),phone:l.string().matches(/^\+\d{1,3}\d{10,11}$/)});async function mr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await hr.validate(t);const{orderFormId:n,...o}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/attachments/clientProfileData`,{method:"POST",body:{...o},...r})}const fr=l.object({sellerCode:l.string().nullable()});async function gr({apiUrl:e,body:t,extraData:r,fetchOptions:n}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await fr.validate(t);const{sellerCode:o=""}=t;return j(`${e}/api/dataentities/${r.ENTITIES}/search?_fields=${r.FIELDS}&${r.FILTER}=${o}`,{method:"GET",headers:{Accept:"application/vnd.vtex.ds.v10+json"},...n})}const br=l.object().shape({country:l.string().length(3,"Country code must be 3 characters long").required("Country is required"),orderFormId:l.string().nullable(),postalCode:l.string().nullable()});async function wr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await br.validate(t);const{country:n,orderFormId:o,postalCode:a}=t,c=a?{address:{addressType:"residential",postalCode:a,country:n}}:{logisticsInfo:[],clearAddressIfPostalCodeNotFound:!0};return j(`${e}/api/checkout/pub/orderForm/${o}/attachments/shippingData`,{method:"POST",body:c,...r})}const vr=l.object().shape({orderFormId:l.string().nullable(),options:l.array().of(l.object().shape({itemIndex:l.number(),selectedDeliveryChannel:l.string(),selectedSla:l.string()})),selectedAddresses:l.array().of(l.object().shape({addressId:l.string().required(),addressType:l.string().required(),city:l.string().nullable(),complement:l.string().nullable(),country:l.string().required().length(3),geoCoordinates:l.array().of(l.number()).required().min(0),isDisposable:l.boolean().required(),neighborhood:l.string().nullable(),number:l.string().nullable(),postalCode:l.string().required(),receiverName:l.string().nullable(),reference:l.string().nullable(),state:l.string().nullable(),street:l.string().nullable()}))});async function yr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await vr.validate(t);const{orderFormId:n,options:o,selectedAddresses:a}=t;return j(`${e}/api/checkout/pub/orderForm/${n}/attachments/shippingData`,{method:"POST",body:{selectedAddresses:a,clearAddressIfPostalCodeNotFound:!1,logisticsInfo:o},...r})}const _r=l.object({country:l.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:l.string().nullable(),geoCoordinates:l.object().shape({longitude:l.number().required(),latitude:l.number().required()})});async function Rr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await _r.validate(t);const{country:n="",geoCoordinates:o,postalCode:a=""}=t,c=new URLSearchParams({country:String(n)});return a?c.append("postalCode",a):c.append("geoCoordinates",`${o==null?void 0:o.longitude};${o==null?void 0:o.latitude}`),await j(`${e}/api/checkout/pub/regions/?${c.toString()}`,{method:"GET",...r})}const xr=l.object({id:l.string().required("ID of SKU is required"),quantity:l.number().integer().required("Quantity of item is required"),seller:l.string()}),Pr=l.object({items:l.array().of(xr),country:l.string().length(3,"Country code must be 3 characters long").required("Country is required"),postalCode:l.string().nullable(),geoCoordinates:l.array().nullable().of(l.number()).length(2)});async function Ir({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}return await Pr.validate(t),j(`${e}/api/checkout/pub/orderForms/simulation`,{method:"POST",body:t,...r})}const Cr=Object.freeze(Object.defineProperty({__proto__:null,getMasterDataSellerCode:gr,getOrderForm:pr,postOrderFormAddCoupon:Qt,postOrderFormAttachClientProfileData:mr,postOrderFormAttachOrderFormData:Vt,postOrderFormAttachShippingData:wr,postOrderFormAttachmentsMarketingData:He,postOrderFormAttachmentsOpenTextField:Ue,postOrderFormClearMessages:cr,postOrderFormFreightSimulation:Ir,postOrderFormItems:er,postOrderFormRegion:Rr,postOrderFormRemoveAllItems:rr,postOrderFormUpdateItems:ar,postOrderFormUpdateShippingData:yr,postOrderformAddress:Mt,putOrderFormCustomData:Kt,updateOrderFormOffering:ur},Symbol.toStringTag,{value:"Module"})),Sr=l.object({skuId:l.string()});async function kr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Sr.validate(t);const{skuId:n}=t;return j(`${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${n}`,{...r})}const Er=l.object({ids:l.array().of(l.string().required("ID are required")).required("IDs are required")});async function Tr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Er.validate(t);const{ids:n}=t;return j(`${e}/api/catalog_system/pub/products/search?fq=${n.map(o=>`productId:${o}`).join("&fq=")}`,{...r})}const Ar=l.object({productId:l.number().required("Product ID is required")});async function Or({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Ar.validate(t);const{productId:n}=t;return j(`${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`,{...r})}const jr=Object.freeze(Object.defineProperty({__proto__:null,getCatalogKitProducts:kr,getCatalogProducts:Tr,getCatalogSimilars:Or},Symbol.toStringTag,{value:"Module"})),qr=l.object({query:l.string()});async function Nr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await qr.validate(t);const{query:n=""}=t,o=new URLSearchParams({query:n});return j(`${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${o.toString()}`,{...r})}const Fr=(e,t)=>bt(e,t),$r=e=>({...e,description:e.description?Fr(e.description):e.description}),Lr=({offer:e,seller:t,product:r})=>({...e,product:r,seller:t}),Me=(e,t)=>({...e,isVariantOf:$r(t)}),Dr=e=>e?"https://schema.org/InStock":"https://schema.org/OutOfStock",ae=e=>e.AvailableQuantity>0,Ne=e=>e.spotPrice??0,Ur=e=>e.Price??0,Be=(e,t)=>ae(e)&&!ae(t)?-1:!ae(e)&&ae(t)?1:Ne(e)-Ne(t),Hr=(e,t)=>{let r=0;for(let n=1;n<e.length;n++)t(e[r],e[n])>0&&(r=n);return e[r]},ze=e=>{const t=e.flatMap(n=>n.sellers.map(o=>({offer:o.commertialOffer,sku:n}))),r=Hr(t,({offer:n},{offer:o})=>Be(n,o));return r?r.sku:e[0]},Ge=e=>e.map(({imageUrl:t,imageText:r,imageLabel:n})=>({alternateName:r??"",url:t.replace("vteximg.com.br","vtexassets.com"),keywords:n})),se={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},Mr=e=>({name:e.name,value:e.content,valueReference:se.attachment}),Br=e=>({propertyID:e.id,name:e.name,value:e.value,valueReference:{valueReference:se.attribute,visible:e.visible}}),ce=(e,t,r)=>{const n=e.flatMap(({name:c,values:i})=>i?i.map(d=>({name:c,value:d,valueReference:se.specification})):{name:c,value:"",valueReference:se.specification}),o=Array.isArray(r)?r.map(Mr):[],a=t?t.map(Br):[];return[...n,...o,...a]},Fe="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",zr="AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa",Gr=e=>{let t=e.slice(0);for(let r=0;r<Fe.length;r++)t=t.replace(new RegExp(Fe.charAt(r),"g"),zr.charAt(r));return t},Vr=e=>e.replace(/[·/_,:]/,"-"),Ve=e=>{const r=e.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g,"-");return Vr(Gr(r)).toLowerCase()},We=e=>`/${e}/p`,Qe=e=>{const t=Math.max(...e.map(n=>n.NumberOfInstallments)),r=e.find(n=>n.NumberOfInstallments===t);return{count:(r==null?void 0:r.NumberOfInstallments)??0,value:(r==null?void 0:r.Value)??0}},Xe=(e,t)=>{const r={price:0,listPrice:0,sellerDefault:!1},o=e.map(a=>Lr({offer:a.commertialOffer,seller:a,product:t})).sort(Be).map(a=>(a.seller.sellerId==="1"&&a.AvailableQuantity>0&&(r.price=a.Price,r.listPrice=a.ListPrice,r.sellerDefault=!0),{availability:a.AvailableQuantity>0,listPrice:a.ListPrice,price:Ur(a),priceValidUntil:a.PriceValidUntil,priceCurrency:"BRL",installments:a.Installments,lowPrice:a.spotPrice,quantity:a.AvailableQuantity,seller:{identifier:a.seller.sellerId}}));return{lowPrice:r.sellerDefault?r.price:o[0].price,highPrice:r.sellerDefault?r.listPrice:o[0].listPrice,offers:o}},Ke=e=>{const{attributes:t,itemId:r,name:n,sellers:o,variations:a}=e;return{additionalProperty:ce(a,t,[]),name:n,offers:{offers:o==null?void 0:o.map(({sellerId:c,commertialOffer:i})=>({availability:Dr(i.AvailableQuantity>0),listPrice:i.ListPrice,price:i.Price,quantity:i.AvailableQuantity,seller:{identifier:c}}))},sku:r}},Wr=e=>{var R;const{attributes:t,referenceId:r,isVariantOf:n,images:o,itemId:a,name:c,sellers:i,videos:d,variations:g}=e,{brand:s,categories:u,categoriesIds:w,description:v,linkText:y,productClusters:_,clusterHighlights:p,productName:b,properties:h,productId:m,productReference:f}=n,A=u.slice().reverse(),N=Xe(i,e.isVariantOf),x=Qe(N.offers[0].installments);return{sku:a,gtin:((R=r==null?void 0:r[0])==null?void 0:R.Value)??f??"",name:b??c,description:v,releaseDate:n.releaseDate??"",slug:y,video:d[0],categories:u,categoriesIds:w,id:m,brand:{name:s,brandName:s},seo:{description:v,title:b,canonical:We(y)},cluster:{generals:_,highlights:p},properties:h,availability:{status:N.offers[0].availability},breadcrumbList:{itemListElement:[...A.map((E,F)=>{const $=E.split("/"),D=$[$.length-2],U=$.map(Ve).join("/");return{name:D,item:U,position:F+1}}),{name:n.productName,item:y,position:u.length+1}],numberOfItems:u.length},image:Ge(o),offers:N,additionalProperty:ce(g,t,[]),isVariantOf:{productGroupID:n.productId,hasVariant:n.items.map(E=>Ke(E))},installments:x}},Qr=e=>{var x;const{attributes:t,referenceId:r,isVariantOf:n,images:o,itemId:a,name:c,sellers:i,Videos:d,variations:g}=e,{brand:s,categories:u,categoriesIds:w,description:v,linkText:y,productClusters:_,productName:p,Coleção:b,"ID Coleção":h,productId:m}=n,f=u.slice().reverse(),A=Xe(i,e.isVariantOf),N=Qe(A.offers[0].installments);return{sku:a,gtin:((x=r[0])==null?void 0:x.Value)??"",name:p??c,description:v,releaseDate:n.releaseDate??"",slug:y,video:d[0],categories:u,categoriesIds:w,collection:b,collectionId:h,id:m,brand:{name:s,brandName:s},seo:{description:v,title:p,canonical:We(y)},cluster:{generals:_,highlights:[]},availability:{status:A.offers[0].availability},breadcrumbList:{itemListElement:[...f.map((R,E)=>{const F=R.split("/"),$=F[F.length-2],D=F.map(Ve).join("/");return{name:$,item:D,position:E+1}}),{name:n.productName,item:y,position:u.length+1}],numberOfItems:u.length},image:Ge(o),offers:A,additionalProperty:ce(g,t,[]),isVariantOf:{productGroupID:n.productId,hasVariant:n.items.map(R=>{const{variations:E}=R,F=E.map($=>({name:$,values:R[$]}));return{...Ke(R),additionalProperty:ce(F,t,[])}})},installments:N}},Xr=l.array().of(l.object({key:l.string().required(),value:l.string().required()})).required("Facets are required");async function Kr({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Xr.validate(t);const n=new URLSearchParams({}),o=t.map(({key:c,value:i})=>`${c}/${i}`).join("/");C.addSearchParamsFacets(t,n);const a=`${e}/api/catalog_system/pub/products/crossselling/${o}`;return j(a,{cache:"no-store",...r}).then(c=>c.map(d=>{const g=ze(d.items);return g&&Me(g,d)}).filter(d=>!!d).map(d=>({node:Qr(d)})))}const Ze=({apiUrl:e,body:t,fetchOptions:r,extraData:n})=>{if(!t){console.error("[ERROR FETCHING] Body is required");return}const{query:o="",page:a=1,count:c,sort:i="",facets:d=[],type:g,hideUnavailableItems:s=!0,locale:u=""}=t,w=new URLSearchParams({page:a.toString(),count:(c==null?void 0:c.toString())??(n==null?void 0:n.ITEMS_PER_PAGE)??24,query:o,sort:i,locale:u});s!==void 0&&w.append("hideUnavailableItems",s.toString());const v=d.map(y=>`${y.key}/${y.value}`).join("/")??"";return Ut(`${e}/api/io/_v/api/intelligent-search/${g}/${v}?${w.toString()}`,{headers:{Accept:"application/json","content-type":"application/json"},...r})};async function Zr({body:e,extraData:t,...r}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const n=await Ze({body:{...e,type:"product_search"},extraData:t,...r}),o=(n==null?void 0:n.products.map(i=>{const d=ze(i.items);return d&&Me(d,i)}).filter(i=>!!i))??[],{pagination:a,recordsFiltered:c}=n;return{data:{pagination:{nextPage:a.after.length>0,previousPage:a.before.length>0,startCursor:"0",endCursor:c.toString(),count:c,total:a.count},products:o.map((i,d)=>({node:Wr(i),cursor:d.toString()}))}}}async function Jr({body:e,extraData:t,...r}){if(!e){console.error("[ERROR FETCHING] Body is required");return}const n=await Ze({body:{...e,type:"facets"},extraData:t,...r});return!n||!n.facets?(console.error("[ERROR FETCHING] No facets found"),{data:{facets:[]}}):{data:{...n,facets:C.formattedFacets(n,e==null?void 0:e.selectedFacets,(e==null?void 0:e.query)??"")}}}const Yr=l.object({query:l.string().optional(),locale:l.string().optional()});async function en({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await Yr.validate(t);const{query:n="",locale:o="default_locale"}=t,a=new URLSearchParams({query:n,locale:o});return j(`${e}/api/io/_v/api/intelligent-search/search_suggestions?${a.toString()}`,{...r})}async function tn({apiUrl:e}){return j(`${e}/api/io/_v/api/intelligent-search/top_searches`)}const rn=Object.freeze(Object.defineProperty({__proto__:null,getSearchAutoCompleteSuggestions:Nr,getSearchCrossellingProducts:Kr,getSearchFacets:Jr,getSearchProducts:Zr,getSearchSuggestedTerms:en,getSearchTopSearchs:tn},Symbol.toStringTag,{value:"Module"})),nn=l.object({masterDataEntity:l.string().nonNullable(),payload:l.object().shape({}).nullable()});async function on({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await nn.validate(t);const{masterDataEntity:n,payload:o}=t,a=`${e}/api/dataentities/${n}/documents`;return j(a,{method:"POST",body:{payload:o},...r})}const an=l.object().shape({_where:l.string().optional(),_fields:l.string().optional(),_sort:l.string().optional(),_from:l.number().integer().min(0).optional(),_to:l.number().integer().min(0).optional(),_keyword:l.string().optional()}),sn=l.object({masterDataEntity:l.string().required(),searchFields:an,headers:l.object().shape({"REST-Range":l.string().notRequired()})});async function cn({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}const n=new URLSearchParams;await sn.validate(t);const{masterDataEntity:o,searchFields:a,headers:c}=t;a&&Object.entries(a).forEach(([g,s])=>{n.append(g,String(s))}),"_fields"in a||n==null||n.append("_fields","_all");let i=[],d=null;do{d&&n.set("_scroll",d);const g=await fetch(`${e}/api/dataentities/${o}/search?${n.toString()}`,{method:"GET",headers:{"REST-Range":(c==null?void 0:c["REST-Range"])??"resources=0-100",...r==null?void 0:r.headers},cache:"no-store"});if(!g.ok)throw new Error(`[MasterData] ${g.status} - ${g.statusText}`);const s=await g.json();i.push(...s),d=g.headers.get("x-vtex-md-scroll")}while(d);return i}const ln=l.object({dataEntityName:l.string().required(),id:l.string().required(),fieldsToBeUpdated:l.object().shape({})});async function un({apiUrl:e,body:t,fetchOptions:r}){if(!t){console.error("[ERROR FETCHING] Body is required");return}await ln.validate(t);const{dataEntityName:n,id:o,fieldsToBeUpdated:a}=t,c=`${e}/api/dataentities/${n}/documents/${o}`;return j(c,{body:{fieldsToBeUpdated:a},method:"PATCH",...r})}const dn=Object.freeze(Object.defineProperty({__proto__:null,getSearchMasterdata:cn,patchUpdateMasterdata:un,postMasterdata:on},Symbol.toStringTag,{value:"Module"}));async function pn({body:e,apiUrl:t,extraData:r,fetchOptions:n}){const{productIds:o}=e;if(!o)return console.error("[ERROR FETCHING] productIds is required"),[];const{NAME_SPLIT_SYMBOL:a}=r;if(!a)return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"),[];const c=o.map(s=>typeof s=="string"||typeof s=="number"?`productId:${s}`:"").join("&fq="),i=await j(`${t}/api/catalog_system/pub/products/search?fq=${c}`,{...n}),d=s=>Object.keys(s).map(u=>({id:u,name:s[u]}));return i.map((s,u)=>{var m;const{installments:w,price:v,listPrice:y,sizes:_,allSizesAvailable:p}=C.getSkuInfos({items:s.items,NAME_SPLIT_SYMBOL:a}),b=p?!0:_.some(f=>f.available),h=s.items[0].sellers[0].commertialOffer;return{node:{sku:s.items[0].itemId,gtin:s.productReference,name:s.productName,description:s.description,releaseDate:s.releaseDate,slug:s.linkText,categories:s.categories,categoriesIds:s.categoriesIds,id:s.items[0].itemId,brand:{name:s.brand,brandName:s.brand},seo:{description:s.description,title:s.productName,canonical:`/${s.linkText}/p`},cluster:{generals:d(s.productClusters),highlights:d(s.clusterHighlights)},availability:{status:b},image:s.items[0].images.map(({imageLabel:f,imageUrl:A})=>({alternateName:f,url:A,keywords:f})),offers:{lowPrice:v,highPrice:y,offers:[{availability:b,listPrice:y,price:v,priceValidUntil:h.PriceValidUntil,priceCurrency:"BRL",installments:h.Installments,lowPrice:v,quantity:h.AvailableQuantity,seller:{identifier:s.items[0].sellers[0].sellerId}}]},additionalProperty:(m=s==null?void 0:s.skuSpecifications)==null?void 0:m.map(f=>({name:s==null?void 0:s.skuSpecifications[0].field.name,value:f,valueReference:"SPECIFICATION"})),isVariantOf:{productGroupID:s.productId,hasVariant:s.items.map(f=>{var A;return{additionalProperty:f==null?void 0:f.variations.map(()=>{var N,x,R;return{name:(N=f==null?void 0:f.variations)==null?void 0:N[0],value:(R=f==null?void 0:f[(x=f==null?void 0:f.variations)==null?void 0:x[0]])==null?void 0:R[0],valueReference:"SPECIFICATION"}}),name:f.name,offers:{offers:(A=f.sellers)==null?void 0:A.map(({commertialOffer:N,sellerId:x})=>({availability:"https://schema.org/InStock",listPrice:N.ListPrice,price:N.Price,quantity:N.AvailableQuantity,seller:{identifier:x}}))},sku:f.itemId,slug:`-${f.itemId}`}})},installments:w},cursor:u.toString()}})}const hn=Object.freeze(Object.defineProperty({__proto__:null,getWishlistProducts:pn},Symbol.toStringTag,{value:"Module"}));var we={exports:{}},Je={},ye={},Ye={},et={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathSuffix",{enumerable:!0,get:function(){return r}});const t=C.parsePath;function r(n,o){if(!n.startsWith("/")||!o)return n;const{pathname:a,query:c,hash:i}=(0,t.parsePath)(n);return""+a+o+c+i}})(et);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"formatNextPathnameInfo",{enumerable:!0,get:function(){return a}});const t=C.removeTrailingSlash,r=C.addPathPrefix,n=et,o=C.addLocale;function a(c){let i=(0,o.addLocale)(c.pathname,c.locale,c.buildId?void 0:c.defaultLocale,c.ignorePrefix);return(c.buildId||!c.trailingSlash)&&(i=(0,t.removeTrailingSlash)(i)),c.buildId&&(i=(0,n.addPathSuffix)((0,r.addPathPrefix)(i,"/_next/data/"+c.buildId),c.pathname==="/"?"index.json":".json")),i=(0,r.addPathPrefix)(i,c.basePath),!c.buildId&&c.trailingSlash?i.endsWith("/")?i:(0,n.addPathSuffix)(i,"/"):(0,t.removeTrailingSlash)(i)}})(Ye);var tt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getHostname",{enumerable:!0,get:function(){return t}});function t(r,n){let o;if(n!=null&&n.host&&!Array.isArray(n.host))o=n.host.toString().split(":",1)[0];else if(r.hostname)o=r.hostname;else return;return o.toLowerCase()}})(tt);var rt={},nt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removePathPrefix",{enumerable:!0,get:function(){return r}});const t=C.pathHasPrefix;function r(n,o){if(!(0,t.pathHasPrefix)(n,o))return n;const a=n.slice(o.length);return a.startsWith("/")?a:"/"+a}})(nt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getNextPathnameInfo",{enumerable:!0,get:function(){return o}});const t=C.normalizeLocalePath,r=nt,n=C.pathHasPrefix;function o(a,c){var i;const{basePath:d,i18n:g,trailingSlash:s}=(i=c.nextConfig)!=null?i:{},u={pathname:a,trailingSlash:a!=="/"?a.endsWith("/"):s};d&&(0,n.pathHasPrefix)(u.pathname,d)&&(u.pathname=(0,r.removePathPrefix)(u.pathname,d),u.basePath=d);let w=u.pathname;if(u.pathname.startsWith("/_next/data/")&&u.pathname.endsWith(".json")){const y=u.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),_=y[0];u.buildId=_,w=y[1]!=="index"?"/"+y.slice(1).join("/"):"/",c.parseData===!0&&(u.pathname=w)}if(g){let y=c.i18nProvider?c.i18nProvider.analyze(u.pathname):(0,t.normalizeLocalePath)(u.pathname,g.locales);u.locale=y.detectedLocale;var v;u.pathname=(v=y.pathname)!=null?v:u.pathname,!y.detectedLocale&&u.buildId&&(y=c.i18nProvider?c.i18nProvider.analyze(w):(0,t.normalizeLocalePath)(w,g.locales),y.detectedLocale&&(u.locale=y.detectedLocale))}return u}})(rt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextURL",{enumerable:!0,get:function(){return d}});const t=C.detectDomainLocale,r=Ye,n=tt,o=rt,a=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function c(g,s){return new URL(String(g).replace(a,"localhost"),s&&String(s).replace(a,"localhost"))}const i=Symbol("NextURLInternal");class d{constructor(s,u,w){let v,y;typeof u=="object"&&"pathname"in u||typeof u=="string"?(v=u,y=w||{}):y=w||u||{},this[i]={url:c(s,v??y.base),options:y,basePath:""},this.analyze()}analyze(){var s,u,w,v,y;const _=(0,o.getNextPathnameInfo)(this[i].url.pathname,{nextConfig:this[i].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[i].options.i18nProvider}),p=(0,n.getHostname)(this[i].url,this[i].options.headers);this[i].domainLocale=this[i].options.i18nProvider?this[i].options.i18nProvider.detectDomainLocale(p):(0,t.detectDomainLocale)((u=this[i].options.nextConfig)==null||(s=u.i18n)==null?void 0:s.domains,p);const b=((w=this[i].domainLocale)==null?void 0:w.defaultLocale)||((y=this[i].options.nextConfig)==null||(v=y.i18n)==null?void 0:v.defaultLocale);this[i].url.pathname=_.pathname,this[i].defaultLocale=b,this[i].basePath=_.basePath??"",this[i].buildId=_.buildId,this[i].locale=_.locale??b,this[i].trailingSlash=_.trailingSlash}formatPathname(){return(0,r.formatNextPathnameInfo)({basePath:this[i].basePath,buildId:this[i].buildId,defaultLocale:this[i].options.forceLocale?void 0:this[i].defaultLocale,locale:this[i].locale,pathname:this[i].url.pathname,trailingSlash:this[i].trailingSlash})}formatSearch(){return this[i].url.search}get buildId(){return this[i].buildId}set buildId(s){this[i].buildId=s}get locale(){return this[i].locale??""}set locale(s){var u,w;if(!this[i].locale||!(!((w=this[i].options.nextConfig)==null||(u=w.i18n)==null)&&u.locales.includes(s)))throw new TypeError(`The NextURL configuration includes no locale "${s}"`);this[i].locale=s}get defaultLocale(){return this[i].defaultLocale}get domainLocale(){return this[i].domainLocale}get searchParams(){return this[i].url.searchParams}get host(){return this[i].url.host}set host(s){this[i].url.host=s}get hostname(){return this[i].url.hostname}set hostname(s){this[i].url.hostname=s}get port(){return this[i].url.port}set port(s){this[i].url.port=s}get protocol(){return this[i].url.protocol}set protocol(s){this[i].url.protocol=s}get href(){const s=this.formatPathname(),u=this.formatSearch();return`${this.protocol}//${this.host}${s}${u}${this.hash}`}set href(s){this[i].url=c(s),this.analyze()}get origin(){return this[i].url.origin}get pathname(){return this[i].url.pathname}set pathname(s){this[i].url.pathname=s}get hash(){return this[i].url.hash}set hash(s){this[i].url.hash=s}get search(){return this[i].url.search}set search(s){this[i].url.search=s}get password(){return this[i].url.password}set password(s){this[i].url.password=s}get username(){return this[i].url.username}set username(s){this[i].url.username=s}get basePath(){return this[i].basePath}set basePath(s){this[i].basePath=s.startsWith("/")?s:`/${s}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new d(String(this),this[i].options)}}})(ye);var _e={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,g){for(var s in g)Object.defineProperty(d,s,{enumerable:!0,get:g[s]})}t(e,{fromNodeOutgoingHttpHeaders:function(){return n},normalizeNextQueryParam:function(){return i},splitCookiesString:function(){return o},toNodeOutgoingHttpHeaders:function(){return a},validateURL:function(){return c}});const r=C.constants;function n(d){const g=new Headers;for(let[s,u]of Object.entries(d)){const w=Array.isArray(u)?u:[u];for(let v of w)typeof v>"u"||(typeof v=="number"&&(v=v.toString()),g.append(s,v))}return g}function o(d){var g=[],s=0,u,w,v,y,_;function p(){for(;s<d.length&&/\s/.test(d.charAt(s));)s+=1;return s<d.length}function b(){return w=d.charAt(s),w!=="="&&w!==";"&&w!==","}for(;s<d.length;){for(u=s,_=!1;p();)if(w=d.charAt(s),w===","){for(v=s,s+=1,p(),y=s;s<d.length&&b();)s+=1;s<d.length&&d.charAt(s)==="="?(_=!0,s=y,g.push(d.substring(u,v)),u=s):s=v+1}else s+=1;(!_||s>=d.length)&&g.push(d.substring(u,d.length))}return g}function a(d){const g={},s=[];if(d)for(const[u,w]of d.entries())u.toLowerCase()==="set-cookie"?(s.push(...o(w)),g[u]=s.length===1?s[0]:s):g[u]=w;return g}function c(d){try{return String(new URL(String(d)))}catch(g){throw new Error(`URL is malformed "${String(d)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:g})}}function i(d,g){const s=[r.NEXT_QUERY_PARAM_PREFIX,r.NEXT_INTERCEPTION_MARKER_PREFIX];for(const u of s)if(d!==u&&d.startsWith(u)){const w=d.substring(u.length);g(w)}}})(_e);var ot={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,c){for(var i in c)Object.defineProperty(a,i,{enumerable:!0,get:c[i]})}t(e,{PageSignatureError:function(){return r},RemovedPageError:function(){return n},RemovedUAError:function(){return o}});class r extends Error{constructor({page:c}){super(`The middleware "${c}" accepts an async API directly with the form:
|
|
2
2
|
|
|
3
3
|
export function middleware(request, event) {
|
|
4
4
|
return NextResponse.redirect('/new-location')
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
|
8
|
-
`)}}class n extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class i extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}})(ot);var ce={},Re=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,gn=Object.getOwnPropertyNames,bn=Object.prototype.hasOwnProperty,wn=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})},vn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of gn(t))!bn.call(e,i)&&i!==r&&Re(e,i,{get:()=>t[i],enumerable:!(n=fn(t,i))||n.enumerable});return e},yn=e=>vn(Re({},"__esModule",{value:!0}),e),st={};wn(st,{RequestCookies:()=>kn,ResponseCookies:()=>Tn,parseCookie:()=>Ie,parseSetCookie:()=>at,stringifyCookie:()=>J});var _n=yn(st);function J(e){var t;const r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||e.expires===0)&&`Expires=${(typeof e.expires=="number"?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&typeof e.maxAge=="number"&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent((t=e.value)!=null?t:"")}`;return r.length===0?n:`${n}; ${r.join("; ")}`}function Ie(e){const t=new Map;for(const r of e.split(/; */)){if(!r)continue;const n=r.indexOf("=");if(n===-1){t.set(r,"true");continue}const[i,s]=[r.slice(0,n),r.slice(n+1)];try{t.set(i,decodeURIComponent(s??"true"))}catch{}}return t}function at(e){if(!e)return;const[[t,r],...n]=Ie(e),{domain:i,expires:s,httponly:a,maxage:o,path:d,samesite:g,secure:l,partitioned:u,priority:w}=Object.fromEntries(n.map(([y,_])=>[y.toLowerCase(),_])),v={name:t,value:decodeURIComponent(r),domain:i,...s&&{expires:new Date(s)},...a&&{httpOnly:!0},...typeof o=="string"&&{maxAge:Number(o)},path:d,...g&&{sameSite:xn(g)},...l&&{secure:!0},...w&&{priority:Cn(w)},...u&&{partitioned:!0}};return Rn(v)}function Rn(e){const t={};for(const r in e)e[r]&&(t[r]=e[r]);return t}var In=["strict","lax","none"];function xn(e){return e=e.toLowerCase(),In.includes(e)?e:void 0}var Pn=["low","medium","high"];function Cn(e){return e=e.toLowerCase(),Pn.includes(e)?e:void 0}function Sn(e){if(!e)return[];var t=[],r=0,n,i,s,a,o;function d(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function g(){return i=e.charAt(r),i!=="="&&i!==";"&&i!==","}for(;r<e.length;){for(n=r,o=!1;d();)if(i=e.charAt(r),i===","){for(s=r,r+=1,d(),a=r;r<e.length&&g();)r+=1;r<e.length&&e.charAt(r)==="="?(o=!0,r=a,t.push(e.substring(n,s)),n=r):r=s+1}else r+=1;(!o||r>=e.length)&&t.push(e.substring(n,e.length))}return t}var kn=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t){const r=Ie(t);for(const[n,i]of r)this._parsed.set(n,{name:n,value:i})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const r=Array.from(this._parsed);if(!e.length)return r.map(([i,s])=>s);const n=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return r.filter(([i])=>i===n).map(([i,s])=>s)}has(e){return this._parsed.has(e)}set(...e){const[t,r]=e.length===1?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([i,s])=>J(s)).join("; ")),this}delete(e){const t=this._parsed,r=Array.isArray(e)?e.map(n=>t.delete(n)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([n,i])=>J(i)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},Tn=class{constructor(e){this._parsed=new Map;var t,r,n;this._headers=e;const i=(n=(r=(t=e.getSetCookie)==null?void 0:t.call(e))!=null?r:e.get("set-cookie"))!=null?n:[],s=Array.isArray(i)?i:Sn(i);for(const a of s){const o=at(a);o&&this._parsed.set(o.name,o)}}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const r=Array.from(this._parsed.values());if(!e.length)return r;const n=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return r.filter(i=>i.name===n)}has(e){return this._parsed.has(e)}set(...e){const[t,r,n]=e.length===1?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,An({name:t,value:r,...n})),En(i,this._headers),this}delete(...e){const[t,r,n]=typeof e[0]=="string"?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:r,domain:n,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(J).join("; ")}};function En(e,t){t.delete("set-cookie");for(const[,r]of e){const n=J(r);t.append("set-cookie",n)}}function An(e={name:"",value:""}){return typeof e.expires=="number"&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+e.maxAge*1e3)),(e.path===null||e.path===void 0)&&(e.path="/"),e}(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(n,i){for(var s in i)Object.defineProperty(n,s,{enumerable:!0,get:i[s]})}t(e,{RequestCookies:function(){return r.RequestCookies},ResponseCookies:function(){return r.ResponseCookies},stringifyCookie:function(){return r.stringifyCookie}});const r=_n})(ce);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,g){for(var l in g)Object.defineProperty(d,l,{enumerable:!0,get:g[l]})}t(e,{INTERNALS:function(){return a},NextRequest:function(){return o}});const r=ye,n=_e,i=ot,s=ce,a=Symbol("internal request");class o extends Request{constructor(g,l={}){const u=typeof g!="string"&&"url"in g?g.url:String(g);(0,n.validateURL)(u),g instanceof Request?super(g,l):super(u,l);const w=new r.NextURL(u,{headers:(0,n.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:l.nextConfig});this[a]={cookies:new s.RequestCookies(this.headers),geo:l.geo||{},ip:l.ip,nextUrl:w,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?u:w.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[a].cookies}get geo(){return this[a].geo}get ip(){return this[a].ip}get nextUrl(){return this[a].nextUrl}get page(){throw new i.RemovedPageError}get ua(){throw new i.RemovedUAError}get url(){return this[a].url}}})(Ye);var lt={},ct={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ReflectAdapter",{enumerable:!0,get:function(){return t}});class t{static get(n,i,s){const a=Reflect.get(n,i,s);return typeof a=="function"?a.bind(n):a}static set(n,i,s,a){return Reflect.set(n,i,s,a)}static has(n,i){return Reflect.has(n,i)}static deleteProperty(n,i){return Reflect.deleteProperty(n,i)}}})(ct);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextResponse",{enumerable:!0,get:function(){return g}});const t=ce,r=ye,n=_e,i=ct,s=ce,a=Symbol("internal response"),o=new Set([301,302,303,307,308]);function d(l,u){var w;if(!(l==null||(w=l.request)==null)&&w.headers){if(!(l.request.headers instanceof Headers))throw new Error("request.headers must be an instance of Headers");const v=[];for(const[y,_]of l.request.headers)u.set("x-middleware-request-"+y,_),v.push(y);u.set("x-middleware-override-headers",v.join(","))}}class g extends Response{constructor(u,w={}){super(u,w);const v=this.headers,y=new s.ResponseCookies(v),_=new Proxy(y,{get(p,b,m){switch(b){case"delete":case"set":return(...h)=>{const f=Reflect.apply(p[b],p,h),A=new Headers(v);return f instanceof s.ResponseCookies&&v.set("x-middleware-set-cookie",f.getAll().map(N=>(0,t.stringifyCookie)(N)).join(",")),d(w,A),f};default:return i.ReflectAdapter.get(p,b,m)}}});this[a]={cookies:_,url:w.url?new r.NextURL(w.url,{headers:(0,n.toNodeOutgoingHttpHeaders)(v),nextConfig:w.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[a].cookies}static json(u,w){const v=Response.json(u,w);return new g(v.body,v)}static redirect(u,w){const v=typeof w=="number"?w:(w==null?void 0:w.status)??307;if(!o.has(v))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');const y=typeof w=="object"?w:{},_=new Headers(y==null?void 0:y.headers);return _.set("Location",(0,n.validateURL)(u)),new g(null,{...y,headers:_,status:v})}static rewrite(u,w){const v=new Headers(w==null?void 0:w.headers);return v.set("x-middleware-rewrite",(0,n.validateURL)(u)),d(w,v),new g(null,{...w,headers:v})}static next(u){const w=new Headers(u==null?void 0:u.headers);return w.set("x-middleware-next","1"),d(u,w),new g(null,{...u,headers:w})}}})(lt);var ut={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageResponse",{enumerable:!0,get:function(){return t}});function t(){throw new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}})(ut);var ve={},dt={exports:{}};(()=>{var e={226:function(i,s){(function(a,o){var d="1.0.35",g="",l="?",u="function",w="undefined",v="object",y="string",_="major",p="model",b="name",m="type",h="vendor",f="version",A="architecture",N="console",I="mobile",R="tablet",T="smarttv",F="wearable",$="embedded",D=350,U="Amazon",B="Apple",Z="ASUS",xe="BlackBerry",V="Browser",Y="Chrome",ht="Edge",ee="Firefox",te="Google",Pe="Huawei",ue="LG",de="Microsoft",Ce="Motorola",re="Opera",pe="Samsung",Se="Sharp",ne="Sony",me="Xiaomi",he="Zebra",ke="Facebook",Te="Chromium OS",Ee="Mac OS",ft=function(S,O){var P={};for(var q in S)O[q]&&O[q].length%2===0?P[q]=O[q].concat(S[q]):P[q]=S[q];return P},ie=function(S){for(var O={},P=0;P<S.length;P++)O[S[P].toUpperCase()]=S[P];return O},Ae=function(S,O){return typeof S===y?Q(O).indexOf(Q(S))!==-1:!1},Q=function(S){return S.toLowerCase()},gt=function(S){return typeof S===y?S.replace(/[^\d\.]/g,g).split(".")[0]:o},fe=function(S,O){if(typeof S===y)return S=S.replace(/^\s\s*/,g),typeof O===w?S:S.substring(0,D)},X=function(S,O){for(var P=0,q,z,H,E,x,M;P<O.length&&!x;){var be=O[P],qe=O[P+1];for(q=z=0;q<be.length&&!x&&be[q];)if(x=be[q++].exec(S),x)for(H=0;H<qe.length;H++)M=x[++z],E=qe[H],typeof E===v&&E.length>0?E.length===2?typeof E[1]==u?this[E[0]]=E[1].call(this,M):this[E[0]]=E[1]:E.length===3?typeof E[1]===u&&!(E[1].exec&&E[1].test)?this[E[0]]=M?E[1].call(this,M,E[2]):o:this[E[0]]=M?M.replace(E[1],E[2]):o:E.length===4&&(this[E[0]]=M?E[3].call(this,M.replace(E[1],E[2])):o):this[E]=M||o;P+=2}},ge=function(S,O){for(var P in O)if(typeof O[P]===v&&O[P].length>0){for(var q=0;q<O[P].length;q++)if(Ae(O[P][q],S))return P===l?o:P}else if(Ae(O[P],S))return P===l?o:P;return S},bt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Oe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},je={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[b,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[b,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[b,f],[/opios[\/ ]+([\w\.]+)/i],[f,[b,re+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[b,re]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[b,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[b,"UC"+V]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[b,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[b,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[b,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[b,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[b,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[b,/(.+)/,"$1 Secure "+V],f],[/\bfocus\/([\w\.]+)/i],[f,[b,ee+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[b,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[b,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[b,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[b,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[b,"MIUI "+V]],[/fxios\/([-\w\.]+)/i],[f,[b,ee]],[/\bqihu|(qi?ho?o?|360)browser/i],[[b,"360 "+V]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[b,/(.+)/,"$1 "+V],f],[/(comodo_dragon)\/([\w\.]+)/i],[[b,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[b,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[b],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[b,ke],f],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[b,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[b,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[b,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[b,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[b,Y+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[b,"Android "+V]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[b,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[b,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,b],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[b,[f,ge,bt]],[/(webkit|khtml)\/([\w\.]+)/i],[b,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[b,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[b,ee+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[b,f],[/(cobalt)\/([\w\.]+)/i],[b,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,Q]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,g,Q]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,Q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[h,pe],[m,R]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[h,pe],[m,I]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[h,B],[m,I]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[h,B],[m,R]],[/(macintosh);/i],[p,[h,B]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[h,Se],[m,I]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[h,Pe],[m,R]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[h,Pe],[m,I]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[h,me],[m,I]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[h,me],[m,R]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[h,"OPPO"],[m,I]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[h,"Vivo"],[m,I]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[h,"Realme"],[m,I]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[h,Ce],[m,I]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[h,Ce],[m,R]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[h,ue],[m,R]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[h,ue],[m,I]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[h,"Lenovo"],[m,R]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[h,"Nokia"],[m,I]],[/(pixel c)\b/i],[p,[h,te],[m,R]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[h,te],[m,I]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[h,ne],[m,I]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[h,ne],[m,R]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[h,"OnePlus"],[m,I]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[h,U],[m,R]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[h,U],[m,I]],[/(playbook);[-\w\),; ]+(rim)/i],[p,h,[m,R]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[h,xe],[m,I]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[h,Z],[m,R]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[h,Z],[m,I]],[/(nexus 9)/i],[p,[h,"HTC"],[m,R]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[p,/_/g," "],[m,I]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[h,"Acer"],[m,R]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[h,"Meizu"],[m,I]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,p,[m,I]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,p,[m,R]],[/(surface duo)/i],[p,[h,de],[m,R]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[h,"Fairphone"],[m,I]],[/(u304aa)/i],[p,[h,"AT&T"],[m,I]],[/\bsie-(\w*)/i],[p,[h,"Siemens"],[m,I]],[/\b(rct\w+) b/i],[p,[h,"RCA"],[m,R]],[/\b(venue[\d ]{2,7}) b/i],[p,[h,"Dell"],[m,R]],[/\b(q(?:mv|ta)\w+) b/i],[p,[h,"Verizon"],[m,R]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[h,"Barnes & Noble"],[m,R]],[/\b(tm\d{3}\w+) b/i],[p,[h,"NuVision"],[m,R]],[/\b(k88) b/i],[p,[h,"ZTE"],[m,R]],[/\b(nx\d{3}j) b/i],[p,[h,"ZTE"],[m,I]],[/\b(gen\d{3}) b.+49h/i],[p,[h,"Swiss"],[m,I]],[/\b(zur\d{3}) b/i],[p,[h,"Swiss"],[m,R]],[/\b((zeki)?tb.*\b) b/i],[p,[h,"Zeki"],[m,R]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],p,[m,R]],[/\b(ns-?\w{0,9}) b/i],[p,[h,"Insignia"],[m,R]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[h,"NextBook"],[m,R]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],p,[m,I]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],p,[m,I]],[/\b(ph-1) /i],[p,[h,"Essential"],[m,I]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[h,"Envizen"],[m,R]],[/\b(trio[-\w\. ]+) b/i],[p,[h,"MachSpeed"],[m,R]],[/\btu_(1491) b/i],[p,[h,"Rotor"],[m,R]],[/(shield[\w ]+) b/i],[p,[h,"Nvidia"],[m,R]],[/(sprint) (\w+)/i],[h,p,[m,I]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[h,de],[m,I]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[h,he],[m,R]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[h,he],[m,I]],[/smart-tv.+(samsung)/i],[h,[m,T]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[h,pe],[m,T]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,ue],[m,T]],[/(apple) ?tv/i],[h,[p,B+" TV"],[m,T]],[/crkey/i],[[p,Y+"cast"],[h,te],[m,T]],[/droid.+aft(\w)( bui|\))/i],[p,[h,U],[m,T]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[h,Se],[m,T]],[/(bravia[\w ]+)( bui|\))/i],[p,[h,ne],[m,T]],[/(mitv-\w{5}) bui/i],[p,[h,me],[m,T]],[/Hbbtv.*(technisat) (.*);/i],[h,p,[m,T]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,fe],[p,fe],[m,T]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,T]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,p,[m,N]],[/droid.+; (shield) bui/i],[p,[h,"Nvidia"],[m,N]],[/(playstation [345portablevi]+)/i],[p,[h,ne],[m,N]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[h,de],[m,N]],[/((pebble))app/i],[h,p,[m,F]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[h,B],[m,F]],[/droid.+; (glass) \d/i],[p,[h,te],[m,F]],[/droid.+; (wt63?0{2,3})\)/i],[p,[h,he],[m,F]],[/(quest( 2| pro)?)/i],[p,[h,ke],[m,F]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[m,$]],[/(aeobc)\b/i],[p,[h,U],[m,$]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[m,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[m,R]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,R]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,I]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[b,ht+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[b,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[b,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,b]],os:[[/microsoft (windows) (vista|xp)/i],[b,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[b,[f,ge,Oe]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,"Windows"],[f,ge,Oe]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[b,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[b,Ee],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,b],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[b,f],[/\(bb(10);/i],[f,[b,xe]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[b,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[b,ee+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[b,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[b,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[b,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[b,Te],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[b,f],[/(sunos) ?([\w\.\d]*)/i],[[b,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[b,f]]},L=function(S,O){if(typeof S===v&&(O=S,S=o),!(this instanceof L))return new L(S,O).getResult();var P=typeof a!==w&&a.navigator?a.navigator:o,q=S||(P&&P.userAgent?P.userAgent:g),z=P&&P.userAgentData?P.userAgentData:o,H=O?ft(je,O):je,E=P&&P.userAgent==q;return this.getBrowser=function(){var x={};return x[b]=o,x[f]=o,X.call(x,q,H.browser),x[_]=gt(x[f]),E&&P&&P.brave&&typeof P.brave.isBrave==u&&(x[b]="Brave"),x},this.getCPU=function(){var x={};return x[A]=o,X.call(x,q,H.cpu),x},this.getDevice=function(){var x={};return x[h]=o,x[p]=o,x[m]=o,X.call(x,q,H.device),E&&!x[m]&&z&&z.mobile&&(x[m]=I),E&&x[p]=="Macintosh"&&P&&typeof P.standalone!==w&&P.maxTouchPoints&&P.maxTouchPoints>2&&(x[p]="iPad",x[m]=R),x},this.getEngine=function(){var x={};return x[b]=o,x[f]=o,X.call(x,q,H.engine),x},this.getOS=function(){var x={};return x[b]=o,x[f]=o,X.call(x,q,H.os),E&&!x[b]&&z&&z.platform!="Unknown"&&(x[b]=z.platform.replace(/chrome os/i,Te).replace(/macos/i,Ee)),x},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return q},this.setUA=function(x){return q=typeof x===y&&x.length>D?fe(x,D):x,this},this.setUA(q),this};L.VERSION=d,L.BROWSER=ie([b,f,_]),L.CPU=ie([A]),L.DEVICE=ie([p,h,m,N,I,T,R,F,$]),L.ENGINE=L.OS=ie([b,f]),typeof s!==w?(i.exports&&(s=i.exports=L),s.UAParser=L):typeof a!==w&&(a.UAParser=L);var W=typeof a!==w&&(a.jQuery||a.Zepto);if(W&&!W.ua){var oe=new L;W.ua=oe.getResult(),W.ua.get=function(){return oe.getUA()},W.ua.set=function(S){oe.setUA(S);var O=oe.getResult();for(var P in O)W.ua[P]=O[P]}}})(typeof window=="object"?window:this)}},t={};function r(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}},o=!0;try{e[i].call(a.exports,a,a.exports,r),o=!1}finally{o&&delete t[i]}return a.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(226);dt.exports=n})();var On=dt.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,d){for(var g in d)Object.defineProperty(o,g,{enumerable:!0,get:d[g]})}t(e,{isBot:function(){return i},userAgent:function(){return a},userAgentFromString:function(){return s}});const r=n(On);function n(o){return o&&o.__esModule?o:{default:o}}function i(o){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(o)}function s(o){return{...(0,r.default)(o),isBot:o===void 0?!1:i(o)}}function a({headers:o}){return s(o.get("user-agent")||void 0)}})(ve);var pt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"URLPattern",{enumerable:!0,get:function(){return t}});const t=typeof URLPattern>"u"?void 0:URLPattern})(pt);(function(e,t){const r={NextRequest:Ye.NextRequest,NextResponse:lt.NextResponse,ImageResponse:ut.ImageResponse,userAgentFromString:ve.userAgentFromString,userAgent:ve.userAgent,URLPattern:pt.URLPattern};e.exports=r,t.NextRequest=r.NextRequest,t.NextResponse=r.NextResponse,t.ImageResponse=r.ImageResponse,t.userAgentFromString=r.userAgentFromString,t.userAgent=r.userAgent,t.URLPattern=r.URLPattern})(we,we.exports);var $e=we.exports;async function jn({apiUrl:e,extraData:t,fetchOptions:r}){var I,R;const n=`${e}/api/dataentities`,i=`${e}/api/io/v1/extrato/get-total`,{MASTER_DATA_ENTITY:s,MASTER_DATA_FIELDS:a,AUTH_TOKEN_COOKIE:o,requestHeaders:d,cookies:g}=t,{address:l,client:u}=s,{address:w,client:v}=a,y=((I=g==null?void 0:g.find(T=>(T==null?void 0:T.name)===o))==null?void 0:I.value)||"";if(!y)return $e.NextResponse.json({error:"Token not found. Unauthorized"},{status:200});const{sub:_,userId:p}=yt.decodeJwt(y),b=Object.fromEntries(Object.entries(d).map(([T,F])=>[T,String(F||"")])),m=async(T,F,$=!1)=>{try{const U=await fetch(`${$?i:n}${T}`,{headers:{...F,...r==null?void 0:r.headers}}).then(Z=>Z.json()),B=Array.isArray(U)?U[0]:U;return Array.isArray(B)?B[0]:B}catch(D){return console.error(`Erro no fetch: ${T}`,D),null}},h=await m(`/${u}/search?email=${_}&_fields=${v.join(",")}`,b);if(!(h!=null&&h.id))return $e.NextResponse.json({sub:_},{status:200});const f=(R=h.document)==null?void 0:R.replace(/\D/g,""),A=await m(`/${l}/search?userId=${h.id}&_fields=${w.join(",")}&_sort=lastInteractionIn DESC`,{...b,"REST-Range":"resources=0-1000"}),N=f?await m(`/${f}?user_code=${h.userId},${_}&per_page=1&page=1`,b,!0):null;return{...h,...A,userCredits:N,sub:_,userId:p}}const qn=Object.freeze(Object.defineProperty({__proto__:null,getUserData:jn},Symbol.toStringTag,{value:"Module"})),Nn=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),Le=(e,t=" ")=>!e||typeof e=="string"&&e.length===0?e:(Array.isArray(e)?e:e.split("-")).map(Nn).join(t),Fn=({canonical:e,seo:t,slug:r})=>{const n=Array.isArray(r)?r.join(", "):r;return{id:0,Title:`${Array.isArray(r)?r.map(s=>Le(s)).join(","):Le(r)} - ${t.title}`,MetaTagDescription:t.description,name:n,hasChildren:!1,url:e,children:[]}},$n=({canonical:e,category:t,previousImages:r,seo:n})=>({category:String(t==null?void 0:t.id),title:(t==null?void 0:t.Title)??n.title,description:(t==null?void 0:t.MetaTagDescription)??n.description,alternates:{canonical:e},openGraph:{type:"website",title:(t==null?void 0:t.Title)??n.title,description:(t==null?void 0:t.MetaTagDescription)??n.description,images:Array.isArray(r)?[...r]:[]}}),Ln=({items:e,parent:t,apiUrl:r,find:n})=>{const i=e.find(a=>a.url.replace(r,"")===decodeURIComponent(t.toLowerCase()));return(i==null?void 0:i.children.find(a=>a.name.toLowerCase()===decodeURIComponent(String(n))))??i},Dn=e=>{e instanceof Error?(console.error(`[ERROR CATEGORY INFO]: ${e.message}`),console.error(e.stack)):console.error("[ERROR CATEGORY INFO]: Unknown error",e)},Un=new Set(["brand","category","department","subcategory","collection","cluster"]),Hn=e=>typeof(e==null?void 0:e.pageType)=="string"&&Un.has(e==null?void 0:e.pageType.toLowerCase()),Mn=e=>({collection:e.Coleção,categoryId:e.categoryId,current_collection:e["Coleção Atual"],items:e.items}),mt=(e,t)=>e.reduce((r,n)=>{if(n.items.filter(a=>a.sellers.find(o=>o.commertialOffer.IsAvailable)).length===0||(r==null?void 0:r.find(a=>(a==null?void 0:a.productId)===(n==null?void 0:n.productId)))!==void 0)return r;const s=n.items[0].images.find(a=>t.includes(a.imageLabel));return r.push({slug:`/${n.linkText}/p`,productId:n==null?void 0:n.productId,textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""}),r},[]),Bn=Object.freeze(Object.defineProperty({__proto__:null,createEmptySeoCategory:Fn,createSeoCategory:$n,findCategory:Ln,formattedSimilars:mt,isCollectionPageType:Hn,notFindCategoryError:Dn,responseAdapter:Mn},Symbol.toStringTag,{value:"Module"})),zn={parseSearchState:C.parseSearchState,convertSearchParams:C.convertSearchParams,filterNonRootFacets:C.filterNonRootFacets,filterNonCategorySelected:C.filterNonCategorySelected},Gn=async({children:e,apiUrl:t,productId:r,ClientItems:n,PDP_INFO:i,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a})=>{const o=await fetch(`${t}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`).then(g=>g.json()),d=mt(o,s);return k.jsxs("div",{className:C.styles.similars,children:[k.jsxs("div",{className:C.styles["similars-info"],children:[k.jsx("span",{className:C.styles["sections-title"],children:i.product.color_title}),e]}),k.jsx(n,{productId:r,similars:d,TOGGLE_STYLE_MODIFIER:a})]})},Vn={checkout:Sr,catalog:qr,cms:C.cms,search:nn,masterdata:pn,user:qn,wishlist:{...hn}},Wn={catalog:Bn,search:zn,product:C.productHelpers,cms:{...C.cmsHelpers,...C.cmsUtils}},Qn={template:{pdp:{PDPSimilars:Gn}}};exports.serverAPIs=Vn;exports.serverCMS=Ut;exports.serverComponents=Qn;exports.serverHelpers=Wn;
|
|
8
|
+
`)}}class n extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class o extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}})(ot);var le={},Re=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,fn=Object.getOwnPropertyNames,gn=Object.prototype.hasOwnProperty,bn=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})},wn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fn(t))!gn.call(e,o)&&o!==r&&Re(e,o,{get:()=>t[o],enumerable:!(n=mn(t,o))||n.enumerable});return e},vn=e=>wn(Re({},"__esModule",{value:!0}),e),it={};bn(it,{RequestCookies:()=>Sn,ResponseCookies:()=>kn,parseCookie:()=>xe,parseSetCookie:()=>at,stringifyCookie:()=>Z});var yn=vn(it);function Z(e){var t;const r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||e.expires===0)&&`Expires=${(typeof e.expires=="number"?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&typeof e.maxAge=="number"&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent((t=e.value)!=null?t:"")}`;return r.length===0?n:`${n}; ${r.join("; ")}`}function xe(e){const t=new Map;for(const r of e.split(/; */)){if(!r)continue;const n=r.indexOf("=");if(n===-1){t.set(r,"true");continue}const[o,a]=[r.slice(0,n),r.slice(n+1)];try{t.set(o,decodeURIComponent(a??"true"))}catch{}}return t}function at(e){if(!e)return;const[[t,r],...n]=xe(e),{domain:o,expires:a,httponly:c,maxage:i,path:d,samesite:g,secure:s,partitioned:u,priority:w}=Object.fromEntries(n.map(([y,_])=>[y.toLowerCase(),_])),v={name:t,value:decodeURIComponent(r),domain:o,...a&&{expires:new Date(a)},...c&&{httpOnly:!0},...typeof i=="string"&&{maxAge:Number(i)},path:d,...g&&{sameSite:xn(g)},...s&&{secure:!0},...w&&{priority:In(w)},...u&&{partitioned:!0}};return _n(v)}function _n(e){const t={};for(const r in e)e[r]&&(t[r]=e[r]);return t}var Rn=["strict","lax","none"];function xn(e){return e=e.toLowerCase(),Rn.includes(e)?e:void 0}var Pn=["low","medium","high"];function In(e){return e=e.toLowerCase(),Pn.includes(e)?e:void 0}function Cn(e){if(!e)return[];var t=[],r=0,n,o,a,c,i;function d(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function g(){return o=e.charAt(r),o!=="="&&o!==";"&&o!==","}for(;r<e.length;){for(n=r,i=!1;d();)if(o=e.charAt(r),o===","){for(a=r,r+=1,d(),c=r;r<e.length&&g();)r+=1;r<e.length&&e.charAt(r)==="="?(i=!0,r=c,t.push(e.substring(n,a)),n=r):r=a+1}else r+=1;(!i||r>=e.length)&&t.push(e.substring(n,e.length))}return t}var Sn=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t){const r=xe(t);for(const[n,o]of r)this._parsed.set(n,{name:n,value:o})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const r=Array.from(this._parsed);if(!e.length)return r.map(([o,a])=>a);const n=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return r.filter(([o])=>o===n).map(([o,a])=>a)}has(e){return this._parsed.has(e)}set(...e){const[t,r]=e.length===1?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([o,a])=>Z(a)).join("; ")),this}delete(e){const t=this._parsed,r=Array.isArray(e)?e.map(n=>t.delete(n)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([n,o])=>Z(o)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},kn=class{constructor(e){this._parsed=new Map;var t,r,n;this._headers=e;const o=(n=(r=(t=e.getSetCookie)==null?void 0:t.call(e))!=null?r:e.get("set-cookie"))!=null?n:[],a=Array.isArray(o)?o:Cn(o);for(const c of a){const i=at(c);i&&this._parsed.set(i.name,i)}}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const r=Array.from(this._parsed.values());if(!e.length)return r;const n=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return r.filter(o=>o.name===n)}has(e){return this._parsed.has(e)}set(...e){const[t,r,n]=e.length===1?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,Tn({name:t,value:r,...n})),En(o,this._headers),this}delete(...e){const[t,r,n]=typeof e[0]=="string"?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:r,domain:n,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(Z).join("; ")}};function En(e,t){t.delete("set-cookie");for(const[,r]of e){const n=Z(r);t.append("set-cookie",n)}}function Tn(e={name:"",value:""}){return typeof e.expires=="number"&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+e.maxAge*1e3)),(e.path===null||e.path===void 0)&&(e.path="/"),e}(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(n,o){for(var a in o)Object.defineProperty(n,a,{enumerable:!0,get:o[a]})}t(e,{RequestCookies:function(){return r.RequestCookies},ResponseCookies:function(){return r.ResponseCookies},stringifyCookie:function(){return r.stringifyCookie}});const r=yn})(le);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,g){for(var s in g)Object.defineProperty(d,s,{enumerable:!0,get:g[s]})}t(e,{INTERNALS:function(){return c},NextRequest:function(){return i}});const r=ye,n=_e,o=ot,a=le,c=Symbol("internal request");class i extends Request{constructor(g,s={}){const u=typeof g!="string"&&"url"in g?g.url:String(g);(0,n.validateURL)(u),g instanceof Request?super(g,s):super(u,s);const w=new r.NextURL(u,{headers:(0,n.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:s.nextConfig});this[c]={cookies:new a.RequestCookies(this.headers),geo:s.geo||{},ip:s.ip,nextUrl:w,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?u:w.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[c].cookies}get geo(){return this[c].geo}get ip(){return this[c].ip}get nextUrl(){return this[c].nextUrl}get page(){throw new o.RemovedPageError}get ua(){throw new o.RemovedUAError}get url(){return this[c].url}}})(Je);var st={},ct={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ReflectAdapter",{enumerable:!0,get:function(){return t}});class t{static get(n,o,a){const c=Reflect.get(n,o,a);return typeof c=="function"?c.bind(n):c}static set(n,o,a,c){return Reflect.set(n,o,a,c)}static has(n,o){return Reflect.has(n,o)}static deleteProperty(n,o){return Reflect.deleteProperty(n,o)}}})(ct);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextResponse",{enumerable:!0,get:function(){return g}});const t=le,r=ye,n=_e,o=ct,a=le,c=Symbol("internal response"),i=new Set([301,302,303,307,308]);function d(s,u){var w;if(!(s==null||(w=s.request)==null)&&w.headers){if(!(s.request.headers instanceof Headers))throw new Error("request.headers must be an instance of Headers");const v=[];for(const[y,_]of s.request.headers)u.set("x-middleware-request-"+y,_),v.push(y);u.set("x-middleware-override-headers",v.join(","))}}class g extends Response{constructor(u,w={}){super(u,w);const v=this.headers,y=new a.ResponseCookies(v),_=new Proxy(y,{get(p,b,h){switch(b){case"delete":case"set":return(...m)=>{const f=Reflect.apply(p[b],p,m),A=new Headers(v);return f instanceof a.ResponseCookies&&v.set("x-middleware-set-cookie",f.getAll().map(N=>(0,t.stringifyCookie)(N)).join(",")),d(w,A),f};default:return o.ReflectAdapter.get(p,b,h)}}});this[c]={cookies:_,url:w.url?new r.NextURL(w.url,{headers:(0,n.toNodeOutgoingHttpHeaders)(v),nextConfig:w.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[c].cookies}static json(u,w){const v=Response.json(u,w);return new g(v.body,v)}static redirect(u,w){const v=typeof w=="number"?w:(w==null?void 0:w.status)??307;if(!i.has(v))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');const y=typeof w=="object"?w:{},_=new Headers(y==null?void 0:y.headers);return _.set("Location",(0,n.validateURL)(u)),new g(null,{...y,headers:_,status:v})}static rewrite(u,w){const v=new Headers(w==null?void 0:w.headers);return v.set("x-middleware-rewrite",(0,n.validateURL)(u)),d(w,v),new g(null,{...w,headers:v})}static next(u){const w=new Headers(u==null?void 0:u.headers);return w.set("x-middleware-next","1"),d(u,w),new g(null,{...u,headers:w})}}})(st);var lt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageResponse",{enumerable:!0,get:function(){return t}});function t(){throw new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}})(lt);var ve={},ut={exports:{}};(()=>{var e={226:function(o,a){(function(c,i){var d="1.0.35",g="",s="?",u="function",w="undefined",v="object",y="string",_="major",p="model",b="name",h="type",m="vendor",f="version",A="architecture",N="console",x="mobile",R="tablet",E="smarttv",F="wearable",$="embedded",D=350,U="Amazon",B="Apple",J="ASUS",Pe="BlackBerry",V="Browser",Y="Chrome",pt="Edge",ee="Firefox",te="Google",Ie="Huawei",ue="LG",de="Microsoft",Ce="Motorola",re="Opera",pe="Samsung",Se="Sharp",ne="Sony",he="Xiaomi",me="Zebra",ke="Facebook",Ee="Chromium OS",Te="Mac OS",ht=function(S,O){var I={};for(var q in S)O[q]&&O[q].length%2===0?I[q]=O[q].concat(S[q]):I[q]=S[q];return I},oe=function(S){for(var O={},I=0;I<S.length;I++)O[S[I].toUpperCase()]=S[I];return O},Ae=function(S,O){return typeof S===y?Q(O).indexOf(Q(S))!==-1:!1},Q=function(S){return S.toLowerCase()},mt=function(S){return typeof S===y?S.replace(/[^\d\.]/g,g).split(".")[0]:i},fe=function(S,O){if(typeof S===y)return S=S.replace(/^\s\s*/,g),typeof O===w?S:S.substring(0,D)},X=function(S,O){for(var I=0,q,z,H,T,P,M;I<O.length&&!P;){var be=O[I],qe=O[I+1];for(q=z=0;q<be.length&&!P&&be[q];)if(P=be[q++].exec(S),P)for(H=0;H<qe.length;H++)M=P[++z],T=qe[H],typeof T===v&&T.length>0?T.length===2?typeof T[1]==u?this[T[0]]=T[1].call(this,M):this[T[0]]=T[1]:T.length===3?typeof T[1]===u&&!(T[1].exec&&T[1].test)?this[T[0]]=M?T[1].call(this,M,T[2]):i:this[T[0]]=M?M.replace(T[1],T[2]):i:T.length===4&&(this[T[0]]=M?T[3].call(this,M.replace(T[1],T[2])):i):this[T]=M||i;I+=2}},ge=function(S,O){for(var I in O)if(typeof O[I]===v&&O[I].length>0){for(var q=0;q<O[I].length;q++)if(Ae(O[I][q],S))return I===s?i:I}else if(Ae(O[I],S))return I===s?i:I;return S},ft={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Oe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},je={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[b,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[b,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[b,f],[/opios[\/ ]+([\w\.]+)/i],[f,[b,re+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[b,re]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[b,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[b,"UC"+V]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[b,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[b,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[b,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[b,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[b,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[b,/(.+)/,"$1 Secure "+V],f],[/\bfocus\/([\w\.]+)/i],[f,[b,ee+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[b,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[b,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[b,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[b,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[b,"MIUI "+V]],[/fxios\/([-\w\.]+)/i],[f,[b,ee]],[/\bqihu|(qi?ho?o?|360)browser/i],[[b,"360 "+V]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[b,/(.+)/,"$1 "+V],f],[/(comodo_dragon)\/([\w\.]+)/i],[[b,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[b,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[b],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[b,ke],f],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[b,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[b,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[b,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[b,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[b,Y+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[b,"Android "+V]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[b,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[b,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,b],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[b,[f,ge,ft]],[/(webkit|khtml)\/([\w\.]+)/i],[b,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[b,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[b,ee+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[b,f],[/(cobalt)\/([\w\.]+)/i],[b,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,Q]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,g,Q]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,Q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[m,pe],[h,R]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[m,pe],[h,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[m,B],[h,x]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[m,B],[h,R]],[/(macintosh);/i],[p,[m,B]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[m,Se],[h,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[m,Ie],[h,R]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[m,Ie],[h,x]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[m,he],[h,x]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[m,he],[h,R]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[m,"OPPO"],[h,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[m,"Vivo"],[h,x]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[m,"Realme"],[h,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[m,Ce],[h,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[m,Ce],[h,R]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[m,ue],[h,R]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[m,ue],[h,x]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[m,"Lenovo"],[h,R]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[m,"Nokia"],[h,x]],[/(pixel c)\b/i],[p,[m,te],[h,R]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[m,te],[h,x]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[m,ne],[h,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[m,ne],[h,R]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[m,"OnePlus"],[h,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[m,U],[h,R]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[m,U],[h,x]],[/(playbook);[-\w\),; ]+(rim)/i],[p,m,[h,R]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[m,Pe],[h,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[m,J],[h,R]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[m,J],[h,x]],[/(nexus 9)/i],[p,[m,"HTC"],[h,R]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[p,/_/g," "],[h,x]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[m,"Acer"],[h,R]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[m,"Meizu"],[h,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[m,p,[h,x]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,p,[h,R]],[/(surface duo)/i],[p,[m,de],[h,R]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[m,"Fairphone"],[h,x]],[/(u304aa)/i],[p,[m,"AT&T"],[h,x]],[/\bsie-(\w*)/i],[p,[m,"Siemens"],[h,x]],[/\b(rct\w+) b/i],[p,[m,"RCA"],[h,R]],[/\b(venue[\d ]{2,7}) b/i],[p,[m,"Dell"],[h,R]],[/\b(q(?:mv|ta)\w+) b/i],[p,[m,"Verizon"],[h,R]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[m,"Barnes & Noble"],[h,R]],[/\b(tm\d{3}\w+) b/i],[p,[m,"NuVision"],[h,R]],[/\b(k88) b/i],[p,[m,"ZTE"],[h,R]],[/\b(nx\d{3}j) b/i],[p,[m,"ZTE"],[h,x]],[/\b(gen\d{3}) b.+49h/i],[p,[m,"Swiss"],[h,x]],[/\b(zur\d{3}) b/i],[p,[m,"Swiss"],[h,R]],[/\b((zeki)?tb.*\b) b/i],[p,[m,"Zeki"],[h,R]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],p,[h,R]],[/\b(ns-?\w{0,9}) b/i],[p,[m,"Insignia"],[h,R]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[m,"NextBook"],[h,R]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],p,[h,x]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],p,[h,x]],[/\b(ph-1) /i],[p,[m,"Essential"],[h,x]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[m,"Envizen"],[h,R]],[/\b(trio[-\w\. ]+) b/i],[p,[m,"MachSpeed"],[h,R]],[/\btu_(1491) b/i],[p,[m,"Rotor"],[h,R]],[/(shield[\w ]+) b/i],[p,[m,"Nvidia"],[h,R]],[/(sprint) (\w+)/i],[m,p,[h,x]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[m,de],[h,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[m,me],[h,R]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[m,me],[h,x]],[/smart-tv.+(samsung)/i],[m,[h,E]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[m,pe],[h,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,ue],[h,E]],[/(apple) ?tv/i],[m,[p,B+" TV"],[h,E]],[/crkey/i],[[p,Y+"cast"],[m,te],[h,E]],[/droid.+aft(\w)( bui|\))/i],[p,[m,U],[h,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[m,Se],[h,E]],[/(bravia[\w ]+)( bui|\))/i],[p,[m,ne],[h,E]],[/(mitv-\w{5}) bui/i],[p,[m,he],[h,E]],[/Hbbtv.*(technisat) (.*);/i],[m,p,[h,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,fe],[p,fe],[h,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,p,[h,N]],[/droid.+; (shield) bui/i],[p,[m,"Nvidia"],[h,N]],[/(playstation [345portablevi]+)/i],[p,[m,ne],[h,N]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[m,de],[h,N]],[/((pebble))app/i],[m,p,[h,F]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[m,B],[h,F]],[/droid.+; (glass) \d/i],[p,[m,te],[h,F]],[/droid.+; (wt63?0{2,3})\)/i],[p,[m,me],[h,F]],[/(quest( 2| pro)?)/i],[p,[m,ke],[h,F]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[h,$]],[/(aeobc)\b/i],[p,[m,U],[h,$]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[h,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[h,R]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,R]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,x]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[b,pt+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[b,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[b,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,b]],os:[[/microsoft (windows) (vista|xp)/i],[b,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[b,[f,ge,Oe]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,"Windows"],[f,ge,Oe]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[b,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[b,Te],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,b],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[b,f],[/\(bb(10);/i],[f,[b,Pe]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[b,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[b,ee+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[b,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[b,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[b,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[b,Ee],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[b,f],[/(sunos) ?([\w\.\d]*)/i],[[b,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[b,f]]},L=function(S,O){if(typeof S===v&&(O=S,S=i),!(this instanceof L))return new L(S,O).getResult();var I=typeof c!==w&&c.navigator?c.navigator:i,q=S||(I&&I.userAgent?I.userAgent:g),z=I&&I.userAgentData?I.userAgentData:i,H=O?ht(je,O):je,T=I&&I.userAgent==q;return this.getBrowser=function(){var P={};return P[b]=i,P[f]=i,X.call(P,q,H.browser),P[_]=mt(P[f]),T&&I&&I.brave&&typeof I.brave.isBrave==u&&(P[b]="Brave"),P},this.getCPU=function(){var P={};return P[A]=i,X.call(P,q,H.cpu),P},this.getDevice=function(){var P={};return P[m]=i,P[p]=i,P[h]=i,X.call(P,q,H.device),T&&!P[h]&&z&&z.mobile&&(P[h]=x),T&&P[p]=="Macintosh"&&I&&typeof I.standalone!==w&&I.maxTouchPoints&&I.maxTouchPoints>2&&(P[p]="iPad",P[h]=R),P},this.getEngine=function(){var P={};return P[b]=i,P[f]=i,X.call(P,q,H.engine),P},this.getOS=function(){var P={};return P[b]=i,P[f]=i,X.call(P,q,H.os),T&&!P[b]&&z&&z.platform!="Unknown"&&(P[b]=z.platform.replace(/chrome os/i,Ee).replace(/macos/i,Te)),P},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return q},this.setUA=function(P){return q=typeof P===y&&P.length>D?fe(P,D):P,this},this.setUA(q),this};L.VERSION=d,L.BROWSER=oe([b,f,_]),L.CPU=oe([A]),L.DEVICE=oe([p,m,h,N,x,E,R,F,$]),L.ENGINE=L.OS=oe([b,f]),typeof a!==w?(o.exports&&(a=o.exports=L),a.UAParser=L):typeof c!==w&&(c.UAParser=L);var W=typeof c!==w&&(c.jQuery||c.Zepto);if(W&&!W.ua){var ie=new L;W.ua=ie.getResult(),W.ua.get=function(){return ie.getUA()},W.ua.set=function(S){ie.setUA(S);var O=ie.getResult();for(var I in O)W.ua[I]=O[I]}}})(typeof window=="object"?window:this)}},t={};function r(o){var a=t[o];if(a!==void 0)return a.exports;var c=t[o]={exports:{}},i=!0;try{e[o].call(c.exports,c,c.exports,r),i=!1}finally{i&&delete t[o]}return c.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(226);ut.exports=n})();var An=ut.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,d){for(var g in d)Object.defineProperty(i,g,{enumerable:!0,get:d[g]})}t(e,{isBot:function(){return o},userAgent:function(){return c},userAgentFromString:function(){return a}});const r=n(An);function n(i){return i&&i.__esModule?i:{default:i}}function o(i){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(i)}function a(i){return{...(0,r.default)(i),isBot:i===void 0?!1:o(i)}}function c({headers:i}){return a(i.get("user-agent")||void 0)}})(ve);var dt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"URLPattern",{enumerable:!0,get:function(){return t}});const t=typeof URLPattern>"u"?void 0:URLPattern})(dt);(function(e,t){const r={NextRequest:Je.NextRequest,NextResponse:st.NextResponse,ImageResponse:lt.ImageResponse,userAgentFromString:ve.userAgentFromString,userAgent:ve.userAgent,URLPattern:dt.URLPattern};e.exports=r,t.NextRequest=r.NextRequest,t.NextResponse=r.NextResponse,t.ImageResponse=r.ImageResponse,t.userAgentFromString=r.userAgentFromString,t.userAgent=r.userAgent,t.URLPattern=r.URLPattern})(we,we.exports);var $e=we.exports;async function On({apiUrl:e,extraData:t,fetchOptions:r}){var x,R;const n=`${e}/api/dataentities`,o=`${e}/api/io/v1/extrato/get-total`,{MASTER_DATA_ENTITY:a,MASTER_DATA_FIELDS:c,AUTH_TOKEN_COOKIE:i,requestHeaders:d,cookies:g}=t,{address:s,client:u}=a,{address:w,client:v}=c,y=((x=g==null?void 0:g.find(E=>(E==null?void 0:E.name)===i))==null?void 0:x.value)||"";if(!y)return $e.NextResponse.json({error:"Token not found. Unauthorized"},{status:200});const{sub:_,userId:p}=wt.decodeJwt(y),b=Object.fromEntries(Object.entries(d).map(([E,F])=>[E,String(F||"")])),h=async(E,F,$=!1)=>{try{const U=await fetch(`${$?o:n}${E}`,{headers:{...F,...r==null?void 0:r.headers}}).then(J=>J.json()),B=Array.isArray(U)?U[0]:U;return Array.isArray(B)?B[0]:B}catch(D){return console.error(`Erro no fetch: ${E}`,D),null}},m=await h(`/${u}/search?email=${_}&_fields=${v.join(",")}`,b);if(!(m!=null&&m.id))return $e.NextResponse.json({sub:_},{status:200});const f=(R=m.document)==null?void 0:R.replace(/\D/g,""),A=await h(`/${s}/search?userId=${m.id}&_fields=${w.join(",")}&_sort=lastInteractionIn DESC`,{...b,"REST-Range":"resources=0-1000"}),N=f?await h(`/${f}?user_code=${m.userId},${_}&per_page=1&page=1`,b,!0):null;return{...m,...A,userCredits:N,sub:_,userId:p}}const jn=Object.freeze(Object.defineProperty({__proto__:null,getUserData:On},Symbol.toStringTag,{value:"Module"})),qn={parseSearchState:C.parseSearchState,convertSearchParams:C.convertSearchParams,filterNonRootFacets:C.filterNonRootFacets,filterNonCategorySelected:C.filterNonCategorySelected},Nn={checkout:Cr,catalog:jr,cms:C.cms,search:rn,masterdata:dn,user:jn,wishlist:{...hn}},Fn={catalog:C.catalogHelpers,search:qn,product:C.productHelpers,cms:{...C.cmsHelpers,...C.cmsUtils}},$n={template:{pdp:{}}};exports.serverAPIs=Nn;exports.serverCMS=Dt;exports.serverComponents=$n;exports.serverHelpers=Fn;
|