@agrada_digital/pbm 0.0.88 → 0.0.89
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/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist-wc/pbm-wc.js +2 -2
- package/package.json +1 -1
package/dist-wc/pbm-wc.js
CHANGED
|
@@ -241,7 +241,7 @@ Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="func
|
|
|
241
241
|
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Ty.createRoot=function(e,t){if(!ie(e))throw Error("Target container is not a DOM element.");j0(e);var a=!1,r="",s=jm,d=Rg,g=zg;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Ri&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
242
242
|
|
|
243
243
|
let root = createRoot(domContainer);
|
|
244
|
-
root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=M1(e,1,!1,null,null,a,r,null,s,d,g,H1),e[Ui]=t.current,Hd(e),new Jr(t)},Ty.hydrateRoot=function(e,t,a){if(!ie(e))throw Error("Target container is not a DOM element.");j0(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=!1,s="",d=jm,g=Rg,b=zg,T=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(T=a.formState)),t=M1(e,1,!0,t,a??null,r,s,T,d,g,b,H1),t.context=R0(null),a=t.current,r=La(a),r=Dn(r),s=Cr(r),s.callback=null,dl(a,s,r),Gi(r,"hydrateRoot()",null),a=r,t.current.lanes=a,Ut(t,a),gl(t),e[Ui]=t.current,Hd(e),new Id(t)},Ty.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),Ty}var qT;function YC(){if(qT)return Lv.exports;qT=1;var u={};function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(u.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(f){console.error(f)}}}return u.NODE_ENV==="production"?(o(),Lv.exports=qC()):Lv.exports=LC(),Lv.exports}var GC=YC();const ZC=kv(GC),LT=u=>{let o;const f=new Set,h=(w,B)=>{const j=typeof w=="function"?w(o):w;if(!Object.is(j,o)){const N=o;o=B??(typeof j!="object"||j===null)?j:Object.assign({},o,j),f.forEach(D=>D(o,N))}},p=()=>o,E={setState:h,getState:p,getInitialState:()=>x,subscribe:w=>(f.add(w),()=>f.delete(w))},x=o=u(h,p,E);return E},YT=(u=>u?LT(u):LT);var vt=Mh();const ga=kv(vt),GT=zC({__proto__:null,default:ga},[vt]),XC=u=>u;function ZT(u,o=XC){const f=ga.useSyncExternalStore(u.subscribe,ga.useCallback(()=>o(u.getState()),[u,o]),ga.useCallback(()=>o(u.getInitialState()),[u,o]));return ga.useDebugValue(f),f}const XT=u=>{const o=YT(u),f=h=>ZT(o,h);return Object.assign(f,o),f},$C=(u=>u?XT(u):XT),QC={securityNumber:"",cardID:"",state:"isEmpty",availableDiscountSelected:{quantity:0,discount:{unit:0,total:0},totalPrice:0,grossPrice:0},targetProduct:null,campaign:"pbm_campaign",isAuthenticatedShopper:!1,customLoginUrl:"/login"},Zv=YT(u=>({...QC,setSecurityNumber:o=>u({securityNumber:o}),setState:o=>u({state:o}),setTargetProduct:o=>u({targetProduct:o}),setAvailableDiscountSelected:o=>u({availableDiscountSelected:o}),setUrlAcceptTerms:o=>u({urlAcceptTerms:o}),setUrlRegisterIndustry:o=>u({urlRegisterIndustry:o}),setIsAuthenticatedShopper:o=>u({isAuthenticatedShopper:o}),setCustomLoginUrl:o=>u({customLoginUrl:o}),setCardID:o=>u({cardID:o})})),JC=()=>({getState:()=>{const u=Zv.getState(),{setSecurityNumber:o,setState:f,setAvailableDiscountSelected:h,setTargetProduct:p,setUrlAcceptTerms:v,setUrlRegisterIndustry:S,setIsAuthenticatedShopper:E,setCustomLoginUrl:x,setCardID:w,...B}=u,{quantity:j,productId:N,skuId:D,discountMax:L,netPrice:Y,stockBalance:Z,listPrice:ie,price:re,...Oe}=u.targetProduct;return{...B,targetProduct:Oe}}});function Xu(u){return ZT(Zv,o=>o)}function KC({originalProductPrice:u}){const{targetProduct:o,state:f}=Xu(),h=o?.listPrice||u,p=h*((o?.discountMax||0)/100);return Ee.jsxs(Ee.Fragment,{children:[o?.informativeMessage&&Ee.jsx("span",{className:"absolute w-11/12 -top-6 bg-emerald-500 px-4 py-1 rounded-lg text-sm text-center font-medium text-white",children:o?.informativeMessage}),Ee.jsxs("header",{className:"flex items-center justify-between w-full p-0.5 rounded-xl bg-[#44c2c0]/30 mt-5",id:"header_pbm",children:[Ee.jsx("span",{className:"py-1 px-6 rounded-xl bg-[#44c2c0] shrink-0 text-white text-xl font-bold flex items-center justify-start gap-2 relative","data-testid":"test_id_header_price",id:"header_price",children:Ee.jsxs("section",{className:"flex items-center gap-2 justify-center-safe",children:[Ee.jsx("span",{className:"line-through text-sm font-light",children:Number(h)?.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})}),Number(h-p)?.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})]})}),Ee.jsx("h1",{id:"header_title",className:"text-center w-full text-[#339c9b] font-bold text-xs px-4 md:text-sm",children:"Desconto de Laboratório"})]})]})}var ZS={exports:{}};var $T;function FC(){return $T||($T=1,(function(u){(function(){var o={}.hasOwnProperty;function f(){for(var v="",S=0;S<arguments.length;S++){var E=arguments[S];E&&(v=p(v,h(E)))}return v}function h(v){if(typeof v=="string"||typeof v=="number")return v;if(typeof v!="object")return"";if(Array.isArray(v))return f.apply(null,v);if(v.toString!==Object.prototype.toString&&!v.toString.toString().includes("[native code]"))return v.toString();var S="";for(var E in v)o.call(v,E)&&v[E]&&(S=p(S,E));return S}function p(v,S){return S?v?v+" "+S:v+S:v}u.exports?(f.default=f,u.exports=f):window.classNames=f})()})(ZS)),ZS.exports}var WC=FC();const Hi=kv(WC);function XS({children:u,variant:o}){return Ee.jsx("main",{className:Hi({"border-3 border-[#44c2c0] flex flex-col items-center justify-center min-w-[var(--min-container)] max-w-[var(--max-container)] w-full h-auto rounded-xl p-4 bg-white gap-4 relative":o==="main","w-full h-auto relative":o==="simple"}),"data-testid":"test_id_container","data-variant":o,id:"container_pbm",children:u})}function IC(){const{targetProduct:u,state:o}=Xu();return Ee.jsx("footer",{className:"w-full h-auto relative",id:"footer_pbm",children:Ee.jsxs("section",{className:Hi("flex items-center w-full h-auto gap-4",{"justify-center":u?.industryLogo,"justify-start":!u?.industryLogo}),children:[Ee.jsxs("section",{className:"w-4/5 h-auto",children:[Ee.jsx("h3",{className:"text-start font-semibold text-sm",children:"Economize com o benefício do laboratório."}),Ee.jsx("p",{className:"text-start font-normal text-sm",children:"Este produto tem preço exclusivo para clientes cadastrados no programa."})]}),u?.industryLogo&&Ee.jsx("img",{src:u.industryLogo,alt:"parceiro",className:"w-1/5 min-w-20 h-auto aspect-auto rounded-xl",loading:"eager",id:"footer_industry_logo_pbm","data-testid":"footer_industry_logo_pbm"})]})})}var nn;(function(u){u.assertEqual=p=>{};function o(p){}u.assertIs=o;function f(p){throw new Error}u.assertNever=f,u.arrayToEnum=p=>{const v={};for(const S of p)v[S]=S;return v},u.getValidEnumValues=p=>{const v=u.objectKeys(p).filter(E=>typeof p[p[E]]!="number"),S={};for(const E of v)S[E]=p[E];return u.objectValues(S)},u.objectValues=p=>u.objectKeys(p).map(function(v){return p[v]}),u.objectKeys=typeof Object.keys=="function"?p=>Object.keys(p):p=>{const v=[];for(const S in p)Object.prototype.hasOwnProperty.call(p,S)&&v.push(S);return v},u.find=(p,v)=>{for(const S of p)if(v(S))return S},u.isInteger=typeof Number.isInteger=="function"?p=>Number.isInteger(p):p=>typeof p=="number"&&Number.isFinite(p)&&Math.floor(p)===p;function h(p,v=" | "){return p.map(S=>typeof S=="string"?`'${S}'`:S).join(v)}u.joinValues=h,u.jsonStringifyReplacer=(p,v)=>typeof v=="bigint"?v.toString():v})(nn||(nn={}));var QT;(function(u){u.mergeShapes=(o,f)=>({...o,...f})})(QT||(QT={}));const tt=nn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kc=u=>{switch(typeof u){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return Number.isNaN(u)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(u)?tt.array:u===null?tt.null:u.then&&typeof u.then=="function"&&u.catch&&typeof u.catch=="function"?tt.promise:typeof Map<"u"&&u instanceof Map?tt.map:typeof Set<"u"&&u instanceof Set?tt.set:typeof Date<"u"&&u instanceof Date?tt.date:tt.object;default:return tt.unknown}},He=nn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class No extends Error{get errors(){return this.issues}constructor(o){super(),this.issues=[],this.addIssue=h=>{this.issues=[...this.issues,h]},this.addIssues=(h=[])=>{this.issues=[...this.issues,...h]};const f=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,f):this.__proto__=f,this.name="ZodError",this.issues=o}format(o){const f=o||function(v){return v.message},h={_errors:[]},p=v=>{for(const S of v.issues)if(S.code==="invalid_union")S.unionErrors.map(p);else if(S.code==="invalid_return_type")p(S.returnTypeError);else if(S.code==="invalid_arguments")p(S.argumentsError);else if(S.path.length===0)h._errors.push(f(S));else{let E=h,x=0;for(;x<S.path.length;){const w=S.path[x];x===S.path.length-1?(E[w]=E[w]||{_errors:[]},E[w]._errors.push(f(S))):E[w]=E[w]||{_errors:[]},E=E[w],x++}}};return p(this),h}static assert(o){if(!(o instanceof No))throw new Error(`Not a ZodError: ${o}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(o=f=>f.message){const f={},h=[];for(const p of this.issues)if(p.path.length>0){const v=p.path[0];f[v]=f[v]||[],f[v].push(o(p))}else h.push(o(p));return{formErrors:h,fieldErrors:f}}get formErrors(){return this.flatten()}}No.create=u=>new No(u);const $S=(u,o)=>{let f;switch(u.code){case He.invalid_type:u.received===tt.undefined?f="Required":f=`Expected ${u.expected}, received ${u.received}`;break;case He.invalid_literal:f=`Invalid literal value, expected ${JSON.stringify(u.expected,nn.jsonStringifyReplacer)}`;break;case He.unrecognized_keys:f=`Unrecognized key(s) in object: ${nn.joinValues(u.keys,", ")}`;break;case He.invalid_union:f="Invalid input";break;case He.invalid_union_discriminator:f=`Invalid discriminator value. Expected ${nn.joinValues(u.options)}`;break;case He.invalid_enum_value:f=`Invalid enum value. Expected ${nn.joinValues(u.options)}, received '${u.received}'`;break;case He.invalid_arguments:f="Invalid function arguments";break;case He.invalid_return_type:f="Invalid function return type";break;case He.invalid_date:f="Invalid date";break;case He.invalid_string:typeof u.validation=="object"?"includes"in u.validation?(f=`Invalid input: must include "${u.validation.includes}"`,typeof u.validation.position=="number"&&(f=`${f} at one or more positions greater than or equal to ${u.validation.position}`)):"startsWith"in u.validation?f=`Invalid input: must start with "${u.validation.startsWith}"`:"endsWith"in u.validation?f=`Invalid input: must end with "${u.validation.endsWith}"`:nn.assertNever(u.validation):u.validation!=="regex"?f=`Invalid ${u.validation}`:f="Invalid";break;case He.too_small:u.type==="array"?f=`Array must contain ${u.exact?"exactly":u.inclusive?"at least":"more than"} ${u.minimum} element(s)`:u.type==="string"?f=`String must contain ${u.exact?"exactly":u.inclusive?"at least":"over"} ${u.minimum} character(s)`:u.type==="number"?f=`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:u.type==="bigint"?f=`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:u.type==="date"?f=`Date must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(u.minimum))}`:f="Invalid input";break;case He.too_big:u.type==="array"?f=`Array must contain ${u.exact?"exactly":u.inclusive?"at most":"less than"} ${u.maximum} element(s)`:u.type==="string"?f=`String must contain ${u.exact?"exactly":u.inclusive?"at most":"under"} ${u.maximum} character(s)`:u.type==="number"?f=`Number must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="bigint"?f=`BigInt must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="date"?f=`Date must be ${u.exact?"exactly":u.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(u.maximum))}`:f="Invalid input";break;case He.custom:f="Invalid input";break;case He.invalid_intersection_types:f="Intersection results could not be merged";break;case He.not_multiple_of:f=`Number must be a multiple of ${u.multipleOf}`;break;case He.not_finite:f="Number must be finite";break;default:f=o.defaultError,nn.assertNever(u)}return{message:f}};let PC=$S;function e3(){return PC}const t3=u=>{const{data:o,path:f,errorMaps:h,issueData:p}=u,v=[...f,...p.path||[]],S={...p,path:v};if(p.message!==void 0)return{...p,path:v,message:p.message};let E="";const x=h.filter(w=>!!w).slice().reverse();for(const w of x)E=w(S,{data:o,defaultError:E}).message;return{...p,path:v,message:E}};function $e(u,o){const f=e3(),h=t3({issueData:o,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,f,f===$S?void 0:$S].filter(p=>!!p)});u.common.issues.push(h)}class ki{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(o,f){const h=[];for(const p of f){if(p.status==="aborted")return Et;p.status==="dirty"&&o.dirty(),h.push(p.value)}return{status:o.value,value:h}}static async mergeObjectAsync(o,f){const h=[];for(const p of f){const v=await p.key,S=await p.value;h.push({key:v,value:S})}return ki.mergeObjectSync(o,h)}static mergeObjectSync(o,f){const h={};for(const p of f){const{key:v,value:S}=p;if(v.status==="aborted"||S.status==="aborted")return Et;v.status==="dirty"&&o.dirty(),S.status==="dirty"&&o.dirty(),v.value!=="__proto__"&&(typeof S.value<"u"||p.alwaysSet)&&(h[v.value]=S.value)}return{status:o.value,value:h}}}const Et=Object.freeze({status:"aborted"}),xy=u=>({status:"dirty",value:u}),or=u=>({status:"valid",value:u}),JT=u=>u.status==="aborted",KT=u=>u.status==="dirty",Uh=u=>u.status==="valid",Xv=u=>typeof Promise<"u"&&u instanceof Promise;var lt;(function(u){u.errToObj=o=>typeof o=="string"?{message:o}:o||{},u.toString=o=>typeof o=="string"?o:o?.message})(lt||(lt={}));class Fc{constructor(o,f,h,p){this._cachedPath=[],this.parent=o,this.data=f,this._path=h,this._key=p}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const FT=(u,o)=>{if(Uh(o))return{success:!0,data:o.value};if(!u.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const f=new No(u.common.issues);return this._error=f,this._error}}};function Ht(u){if(!u)return{};const{errorMap:o,invalid_type_error:f,required_error:h,description:p}=u;if(o&&(f||h))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return o?{errorMap:o,description:p}:{errorMap:(S,E)=>{const{message:x}=u;return S.code==="invalid_enum_value"?{message:x??E.defaultError}:typeof E.data>"u"?{message:x??h??E.defaultError}:S.code!=="invalid_type"?{message:E.defaultError}:{message:x??f??E.defaultError}},description:p}}class It{get description(){return this._def.description}_getType(o){return Kc(o.data)}_getOrReturnCtx(o,f){return f||{common:o.parent.common,data:o.data,parsedType:Kc(o.data),schemaErrorMap:this._def.errorMap,path:o.path,parent:o.parent}}_processInputParams(o){return{status:new ki,ctx:{common:o.parent.common,data:o.data,parsedType:Kc(o.data),schemaErrorMap:this._def.errorMap,path:o.path,parent:o.parent}}}_parseSync(o){const f=this._parse(o);if(Xv(f))throw new Error("Synchronous parse encountered promise.");return f}_parseAsync(o){const f=this._parse(o);return Promise.resolve(f)}parse(o,f){const h=this.safeParse(o,f);if(h.success)return h.data;throw h.error}safeParse(o,f){const h={common:{issues:[],async:f?.async??!1,contextualErrorMap:f?.errorMap},path:f?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:Kc(o)},p=this._parseSync({data:o,path:h.path,parent:h});return FT(h,p)}"~validate"(o){const f={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:Kc(o)};if(!this["~standard"].async)try{const h=this._parseSync({data:o,path:[],parent:f});return Uh(h)?{value:h.value}:{issues:f.common.issues}}catch(h){h?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),f.common={issues:[],async:!0}}return this._parseAsync({data:o,path:[],parent:f}).then(h=>Uh(h)?{value:h.value}:{issues:f.common.issues})}async parseAsync(o,f){const h=await this.safeParseAsync(o,f);if(h.success)return h.data;throw h.error}async safeParseAsync(o,f){const h={common:{issues:[],contextualErrorMap:f?.errorMap,async:!0},path:f?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:Kc(o)},p=this._parse({data:o,path:h.path,parent:h}),v=await(Xv(p)?p:Promise.resolve(p));return FT(h,v)}refine(o,f){const h=p=>typeof f=="string"||typeof f>"u"?{message:f}:typeof f=="function"?f(p):f;return this._refinement((p,v)=>{const S=o(p),E=()=>v.addIssue({code:He.custom,...h(p)});return typeof Promise<"u"&&S instanceof Promise?S.then(x=>x?!0:(E(),!1)):S?!0:(E(),!1)})}refinement(o,f){return this._refinement((h,p)=>o(h)?!0:(p.addIssue(typeof f=="function"?f(h,p):f),!1))}_refinement(o){return new Bh({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:o}})}superRefine(o){return this._refinement(o)}constructor(o){this.spa=this.safeParseAsync,this._def=o,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:f=>this["~validate"](f)}}optional(){return Pc.create(this,this._def)}nullable(){return Hh.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $u.create(this)}promise(){return Kv.create(this,this._def)}or(o){return Qv.create([this,o],this._def)}and(o){return Jv.create(this,o,this._def)}transform(o){return new Bh({...Ht(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:o}})}default(o){const f=typeof o=="function"?o:()=>o;return new KS({...Ht(this._def),innerType:this,defaultValue:f,typeName:Tt.ZodDefault})}brand(){return new x3({typeName:Tt.ZodBranded,type:this,...Ht(this._def)})}catch(o){const f=typeof o=="function"?o:()=>o;return new FS({...Ht(this._def),innerType:this,catchValue:f,typeName:Tt.ZodCatch})}describe(o){const f=this.constructor;return new f({...this._def,description:o})}pipe(o){return WS.create(this,o)}readonly(){return IS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const n3=/^c[^\s-]{8,}$/i,a3=/^[0-9a-z]+$/,l3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,i3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,r3=/^[a-z0-9_-]{21}$/i,u3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,o3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,c3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,s3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let QS;const f3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,d3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,h3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,m3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,p3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,y3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,WT="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",g3=new RegExp(`^${WT}$`);function IT(u){let o="[0-5]\\d";u.precision?o=`${o}\\.\\d{${u.precision}}`:u.precision==null&&(o=`${o}(\\.\\d+)?`);const f=u.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${o})${f}`}function v3(u){return new RegExp(`^${IT(u)}$`)}function b3(u){let o=`${WT}T${IT(u)}`;const f=[];return f.push(u.local?"Z?":"Z"),u.offset&&f.push("([+-]\\d{2}:?\\d{2})"),o=`${o}(${f.join("|")})`,new RegExp(`^${o}$`)}function S3(u,o){return!!((o==="v4"||!o)&&f3.test(u)||(o==="v6"||!o)&&h3.test(u))}function _3(u,o){if(!u3.test(u))return!1;try{const[f]=u.split(".");if(!f)return!1;const h=f.replace(/-/g,"+").replace(/_/g,"/").padEnd(f.length+(4-f.length%4)%4,"="),p=JSON.parse(atob(h));return!(typeof p!="object"||p===null||"typ"in p&&p?.typ!=="JWT"||!p.alg||o&&p.alg!==o)}catch{return!1}}function E3(u,o){return!!((o==="v4"||!o)&&d3.test(u)||(o==="v6"||!o)&&m3.test(u))}class Wc extends It{_parse(o){if(this._def.coerce&&(o.data=String(o.data)),this._getType(o)!==tt.string){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_type,expected:tt.string,received:v.parsedType}),Et}const h=new ki;let p;for(const v of this._def.checks)if(v.kind==="min")o.data.length<v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_small,minimum:v.value,type:"string",inclusive:!0,exact:!1,message:v.message}),h.dirty());else if(v.kind==="max")o.data.length>v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_big,maximum:v.value,type:"string",inclusive:!0,exact:!1,message:v.message}),h.dirty());else if(v.kind==="length"){const S=o.data.length>v.value,E=o.data.length<v.value;(S||E)&&(p=this._getOrReturnCtx(o,p),S?$e(p,{code:He.too_big,maximum:v.value,type:"string",inclusive:!0,exact:!0,message:v.message}):E&&$e(p,{code:He.too_small,minimum:v.value,type:"string",inclusive:!0,exact:!0,message:v.message}),h.dirty())}else if(v.kind==="email")c3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"email",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="emoji")QS||(QS=new RegExp(s3,"u")),QS.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"emoji",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="uuid")i3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"uuid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="nanoid")r3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"nanoid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="cuid")n3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"cuid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="cuid2")a3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"cuid2",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="ulid")l3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"ulid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="url")try{new URL(o.data)}catch{p=this._getOrReturnCtx(o,p),$e(p,{validation:"url",code:He.invalid_string,message:v.message}),h.dirty()}else v.kind==="regex"?(v.regex.lastIndex=0,v.regex.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"regex",code:He.invalid_string,message:v.message}),h.dirty())):v.kind==="trim"?o.data=o.data.trim():v.kind==="includes"?o.data.includes(v.value,v.position)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:{includes:v.value,position:v.position},message:v.message}),h.dirty()):v.kind==="toLowerCase"?o.data=o.data.toLowerCase():v.kind==="toUpperCase"?o.data=o.data.toUpperCase():v.kind==="startsWith"?o.data.startsWith(v.value)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:{startsWith:v.value},message:v.message}),h.dirty()):v.kind==="endsWith"?o.data.endsWith(v.value)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:{endsWith:v.value},message:v.message}),h.dirty()):v.kind==="datetime"?b3(v).test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:"datetime",message:v.message}),h.dirty()):v.kind==="date"?g3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:"date",message:v.message}),h.dirty()):v.kind==="time"?v3(v).test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:"time",message:v.message}),h.dirty()):v.kind==="duration"?o3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"duration",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="ip"?S3(o.data,v.version)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"ip",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="jwt"?_3(o.data,v.alg)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"jwt",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="cidr"?E3(o.data,v.version)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"cidr",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="base64"?p3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"base64",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="base64url"?y3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"base64url",code:He.invalid_string,message:v.message}),h.dirty()):nn.assertNever(v);return{status:h.value,value:o.data}}_regex(o,f,h){return this.refinement(p=>o.test(p),{validation:f,code:He.invalid_string,...lt.errToObj(h)})}_addCheck(o){return new Wc({...this._def,checks:[...this._def.checks,o]})}email(o){return this._addCheck({kind:"email",...lt.errToObj(o)})}url(o){return this._addCheck({kind:"url",...lt.errToObj(o)})}emoji(o){return this._addCheck({kind:"emoji",...lt.errToObj(o)})}uuid(o){return this._addCheck({kind:"uuid",...lt.errToObj(o)})}nanoid(o){return this._addCheck({kind:"nanoid",...lt.errToObj(o)})}cuid(o){return this._addCheck({kind:"cuid",...lt.errToObj(o)})}cuid2(o){return this._addCheck({kind:"cuid2",...lt.errToObj(o)})}ulid(o){return this._addCheck({kind:"ulid",...lt.errToObj(o)})}base64(o){return this._addCheck({kind:"base64",...lt.errToObj(o)})}base64url(o){return this._addCheck({kind:"base64url",...lt.errToObj(o)})}jwt(o){return this._addCheck({kind:"jwt",...lt.errToObj(o)})}ip(o){return this._addCheck({kind:"ip",...lt.errToObj(o)})}cidr(o){return this._addCheck({kind:"cidr",...lt.errToObj(o)})}datetime(o){return typeof o=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:o}):this._addCheck({kind:"datetime",precision:typeof o?.precision>"u"?null:o?.precision,offset:o?.offset??!1,local:o?.local??!1,...lt.errToObj(o?.message)})}date(o){return this._addCheck({kind:"date",message:o})}time(o){return typeof o=="string"?this._addCheck({kind:"time",precision:null,message:o}):this._addCheck({kind:"time",precision:typeof o?.precision>"u"?null:o?.precision,...lt.errToObj(o?.message)})}duration(o){return this._addCheck({kind:"duration",...lt.errToObj(o)})}regex(o,f){return this._addCheck({kind:"regex",regex:o,...lt.errToObj(f)})}includes(o,f){return this._addCheck({kind:"includes",value:o,position:f?.position,...lt.errToObj(f?.message)})}startsWith(o,f){return this._addCheck({kind:"startsWith",value:o,...lt.errToObj(f)})}endsWith(o,f){return this._addCheck({kind:"endsWith",value:o,...lt.errToObj(f)})}min(o,f){return this._addCheck({kind:"min",value:o,...lt.errToObj(f)})}max(o,f){return this._addCheck({kind:"max",value:o,...lt.errToObj(f)})}length(o,f){return this._addCheck({kind:"length",value:o,...lt.errToObj(f)})}nonempty(o){return this.min(1,lt.errToObj(o))}trim(){return new Wc({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(o=>o.kind==="datetime")}get isDate(){return!!this._def.checks.find(o=>o.kind==="date")}get isTime(){return!!this._def.checks.find(o=>o.kind==="time")}get isDuration(){return!!this._def.checks.find(o=>o.kind==="duration")}get isEmail(){return!!this._def.checks.find(o=>o.kind==="email")}get isURL(){return!!this._def.checks.find(o=>o.kind==="url")}get isEmoji(){return!!this._def.checks.find(o=>o.kind==="emoji")}get isUUID(){return!!this._def.checks.find(o=>o.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(o=>o.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(o=>o.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(o=>o.kind==="cuid2")}get isULID(){return!!this._def.checks.find(o=>o.kind==="ulid")}get isIP(){return!!this._def.checks.find(o=>o.kind==="ip")}get isCIDR(){return!!this._def.checks.find(o=>o.kind==="cidr")}get isBase64(){return!!this._def.checks.find(o=>o.kind==="base64")}get isBase64url(){return!!this._def.checks.find(o=>o.kind==="base64url")}get minLength(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o}get maxLength(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o}}Wc.create=u=>new Wc({checks:[],typeName:Tt.ZodString,coerce:u?.coerce??!1,...Ht(u)});function T3(u,o){const f=(u.toString().split(".")[1]||"").length,h=(o.toString().split(".")[1]||"").length,p=f>h?f:h,v=Number.parseInt(u.toFixed(p).replace(".","")),S=Number.parseInt(o.toFixed(p).replace(".",""));return v%S/10**p}class Ay extends It{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(o){if(this._def.coerce&&(o.data=Number(o.data)),this._getType(o)!==tt.number){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_type,expected:tt.number,received:v.parsedType}),Et}let h;const p=new ki;for(const v of this._def.checks)v.kind==="int"?nn.isInteger(o.data)||(h=this._getOrReturnCtx(o,h),$e(h,{code:He.invalid_type,expected:"integer",received:"float",message:v.message}),p.dirty()):v.kind==="min"?(v.inclusive?o.data<v.value:o.data<=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_small,minimum:v.value,type:"number",inclusive:v.inclusive,exact:!1,message:v.message}),p.dirty()):v.kind==="max"?(v.inclusive?o.data>v.value:o.data>=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_big,maximum:v.value,type:"number",inclusive:v.inclusive,exact:!1,message:v.message}),p.dirty()):v.kind==="multipleOf"?T3(o.data,v.value)!==0&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.not_multiple_of,multipleOf:v.value,message:v.message}),p.dirty()):v.kind==="finite"?Number.isFinite(o.data)||(h=this._getOrReturnCtx(o,h),$e(h,{code:He.not_finite,message:v.message}),p.dirty()):nn.assertNever(v);return{status:p.value,value:o.data}}gte(o,f){return this.setLimit("min",o,!0,lt.toString(f))}gt(o,f){return this.setLimit("min",o,!1,lt.toString(f))}lte(o,f){return this.setLimit("max",o,!0,lt.toString(f))}lt(o,f){return this.setLimit("max",o,!1,lt.toString(f))}setLimit(o,f,h,p){return new Ay({...this._def,checks:[...this._def.checks,{kind:o,value:f,inclusive:h,message:lt.toString(p)}]})}_addCheck(o){return new Ay({...this._def,checks:[...this._def.checks,o]})}int(o){return this._addCheck({kind:"int",message:lt.toString(o)})}positive(o){return this._addCheck({kind:"min",value:0,inclusive:!1,message:lt.toString(o)})}negative(o){return this._addCheck({kind:"max",value:0,inclusive:!1,message:lt.toString(o)})}nonpositive(o){return this._addCheck({kind:"max",value:0,inclusive:!0,message:lt.toString(o)})}nonnegative(o){return this._addCheck({kind:"min",value:0,inclusive:!0,message:lt.toString(o)})}multipleOf(o,f){return this._addCheck({kind:"multipleOf",value:o,message:lt.toString(f)})}finite(o){return this._addCheck({kind:"finite",message:lt.toString(o)})}safe(o){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:lt.toString(o)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:lt.toString(o)})}get minValue(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o}get maxValue(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o}get isInt(){return!!this._def.checks.find(o=>o.kind==="int"||o.kind==="multipleOf"&&nn.isInteger(o.value))}get isFinite(){let o=null,f=null;for(const h of this._def.checks){if(h.kind==="finite"||h.kind==="int"||h.kind==="multipleOf")return!0;h.kind==="min"?(f===null||h.value>f)&&(f=h.value):h.kind==="max"&&(o===null||h.value<o)&&(o=h.value)}return Number.isFinite(f)&&Number.isFinite(o)}}Ay.create=u=>new Ay({checks:[],typeName:Tt.ZodNumber,coerce:u?.coerce||!1,...Ht(u)});class wy extends It{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(o){if(this._def.coerce)try{o.data=BigInt(o.data)}catch{return this._getInvalidInput(o)}if(this._getType(o)!==tt.bigint)return this._getInvalidInput(o);let h;const p=new ki;for(const v of this._def.checks)v.kind==="min"?(v.inclusive?o.data<v.value:o.data<=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_small,type:"bigint",minimum:v.value,inclusive:v.inclusive,message:v.message}),p.dirty()):v.kind==="max"?(v.inclusive?o.data>v.value:o.data>=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_big,type:"bigint",maximum:v.value,inclusive:v.inclusive,message:v.message}),p.dirty()):v.kind==="multipleOf"?o.data%v.value!==BigInt(0)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.not_multiple_of,multipleOf:v.value,message:v.message}),p.dirty()):nn.assertNever(v);return{status:p.value,value:o.data}}_getInvalidInput(o){const f=this._getOrReturnCtx(o);return $e(f,{code:He.invalid_type,expected:tt.bigint,received:f.parsedType}),Et}gte(o,f){return this.setLimit("min",o,!0,lt.toString(f))}gt(o,f){return this.setLimit("min",o,!1,lt.toString(f))}lte(o,f){return this.setLimit("max",o,!0,lt.toString(f))}lt(o,f){return this.setLimit("max",o,!1,lt.toString(f))}setLimit(o,f,h,p){return new wy({...this._def,checks:[...this._def.checks,{kind:o,value:f,inclusive:h,message:lt.toString(p)}]})}_addCheck(o){return new wy({...this._def,checks:[...this._def.checks,o]})}positive(o){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:lt.toString(o)})}negative(o){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:lt.toString(o)})}nonpositive(o){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:lt.toString(o)})}nonnegative(o){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:lt.toString(o)})}multipleOf(o,f){return this._addCheck({kind:"multipleOf",value:o,message:lt.toString(f)})}get minValue(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o}get maxValue(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o}}wy.create=u=>new wy({checks:[],typeName:Tt.ZodBigInt,coerce:u?.coerce??!1,...Ht(u)});class PT extends It{_parse(o){if(this._def.coerce&&(o.data=!!o.data),this._getType(o)!==tt.boolean){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.boolean,received:h.parsedType}),Et}return or(o.data)}}PT.create=u=>new PT({typeName:Tt.ZodBoolean,coerce:u?.coerce||!1,...Ht(u)});class $v extends It{_parse(o){if(this._def.coerce&&(o.data=new Date(o.data)),this._getType(o)!==tt.date){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_type,expected:tt.date,received:v.parsedType}),Et}if(Number.isNaN(o.data.getTime())){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_date}),Et}const h=new ki;let p;for(const v of this._def.checks)v.kind==="min"?o.data.getTime()<v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_small,message:v.message,inclusive:!0,exact:!1,minimum:v.value,type:"date"}),h.dirty()):v.kind==="max"?o.data.getTime()>v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_big,message:v.message,inclusive:!0,exact:!1,maximum:v.value,type:"date"}),h.dirty()):nn.assertNever(v);return{status:h.value,value:new Date(o.data.getTime())}}_addCheck(o){return new $v({...this._def,checks:[...this._def.checks,o]})}min(o,f){return this._addCheck({kind:"min",value:o.getTime(),message:lt.toString(f)})}max(o,f){return this._addCheck({kind:"max",value:o.getTime(),message:lt.toString(f)})}get minDate(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o!=null?new Date(o):null}get maxDate(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o!=null?new Date(o):null}}$v.create=u=>new $v({checks:[],coerce:u?.coerce||!1,typeName:Tt.ZodDate,...Ht(u)});class ex extends It{_parse(o){if(this._getType(o)!==tt.symbol){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.symbol,received:h.parsedType}),Et}return or(o.data)}}ex.create=u=>new ex({typeName:Tt.ZodSymbol,...Ht(u)});class tx extends It{_parse(o){if(this._getType(o)!==tt.undefined){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.undefined,received:h.parsedType}),Et}return or(o.data)}}tx.create=u=>new tx({typeName:Tt.ZodUndefined,...Ht(u)});class nx extends It{_parse(o){if(this._getType(o)!==tt.null){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.null,received:h.parsedType}),Et}return or(o.data)}}nx.create=u=>new nx({typeName:Tt.ZodNull,...Ht(u)});class ax extends It{constructor(){super(...arguments),this._any=!0}_parse(o){return or(o.data)}}ax.create=u=>new ax({typeName:Tt.ZodAny,...Ht(u)});class lx extends It{constructor(){super(...arguments),this._unknown=!0}_parse(o){return or(o.data)}}lx.create=u=>new lx({typeName:Tt.ZodUnknown,...Ht(u)});class Ic extends It{_parse(o){const f=this._getOrReturnCtx(o);return $e(f,{code:He.invalid_type,expected:tt.never,received:f.parsedType}),Et}}Ic.create=u=>new Ic({typeName:Tt.ZodNever,...Ht(u)});class ix extends It{_parse(o){if(this._getType(o)!==tt.undefined){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.void,received:h.parsedType}),Et}return or(o.data)}}ix.create=u=>new ix({typeName:Tt.ZodVoid,...Ht(u)});class $u extends It{_parse(o){const{ctx:f,status:h}=this._processInputParams(o),p=this._def;if(f.parsedType!==tt.array)return $e(f,{code:He.invalid_type,expected:tt.array,received:f.parsedType}),Et;if(p.exactLength!==null){const S=f.data.length>p.exactLength.value,E=f.data.length<p.exactLength.value;(S||E)&&($e(f,{code:S?He.too_big:He.too_small,minimum:E?p.exactLength.value:void 0,maximum:S?p.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:p.exactLength.message}),h.dirty())}if(p.minLength!==null&&f.data.length<p.minLength.value&&($e(f,{code:He.too_small,minimum:p.minLength.value,type:"array",inclusive:!0,exact:!1,message:p.minLength.message}),h.dirty()),p.maxLength!==null&&f.data.length>p.maxLength.value&&($e(f,{code:He.too_big,maximum:p.maxLength.value,type:"array",inclusive:!0,exact:!1,message:p.maxLength.message}),h.dirty()),f.common.async)return Promise.all([...f.data].map((S,E)=>p.type._parseAsync(new Fc(f,S,f.path,E)))).then(S=>ki.mergeArray(h,S));const v=[...f.data].map((S,E)=>p.type._parseSync(new Fc(f,S,f.path,E)));return ki.mergeArray(h,v)}get element(){return this._def.type}min(o,f){return new $u({...this._def,minLength:{value:o,message:lt.toString(f)}})}max(o,f){return new $u({...this._def,maxLength:{value:o,message:lt.toString(f)}})}length(o,f){return new $u({...this._def,exactLength:{value:o,message:lt.toString(f)}})}nonempty(o){return this.min(1,o)}}$u.create=(u,o)=>new $u({type:u,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...Ht(o)});function Nh(u){if(u instanceof va){const o={};for(const f in u.shape){const h=u.shape[f];o[f]=Pc.create(Nh(h))}return new va({...u._def,shape:()=>o})}else return u instanceof $u?new $u({...u._def,type:Nh(u.element)}):u instanceof Pc?Pc.create(Nh(u.unwrap())):u instanceof Hh?Hh.create(Nh(u.unwrap())):u instanceof Ef?Ef.create(u.items.map(o=>Nh(o))):u}class va extends It{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const o=this._def.shape(),f=nn.objectKeys(o);return this._cached={shape:o,keys:f},this._cached}_parse(o){if(this._getType(o)!==tt.object){const w=this._getOrReturnCtx(o);return $e(w,{code:He.invalid_type,expected:tt.object,received:w.parsedType}),Et}const{status:h,ctx:p}=this._processInputParams(o),{shape:v,keys:S}=this._getCached(),E=[];if(!(this._def.catchall instanceof Ic&&this._def.unknownKeys==="strip"))for(const w in p.data)S.includes(w)||E.push(w);const x=[];for(const w of S){const B=v[w],j=p.data[w];x.push({key:{status:"valid",value:w},value:B._parse(new Fc(p,j,p.path,w)),alwaysSet:w in p.data})}if(this._def.catchall instanceof Ic){const w=this._def.unknownKeys;if(w==="passthrough")for(const B of E)x.push({key:{status:"valid",value:B},value:{status:"valid",value:p.data[B]}});else if(w==="strict")E.length>0&&($e(p,{code:He.unrecognized_keys,keys:E}),h.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const w=this._def.catchall;for(const B of E){const j=p.data[B];x.push({key:{status:"valid",value:B},value:w._parse(new Fc(p,j,p.path,B)),alwaysSet:B in p.data})}}return p.common.async?Promise.resolve().then(async()=>{const w=[];for(const B of x){const j=await B.key,N=await B.value;w.push({key:j,value:N,alwaysSet:B.alwaysSet})}return w}).then(w=>ki.mergeObjectSync(h,w)):ki.mergeObjectSync(h,x)}get shape(){return this._def.shape()}strict(o){return lt.errToObj,new va({...this._def,unknownKeys:"strict",...o!==void 0?{errorMap:(f,h)=>{const p=this._def.errorMap?.(f,h).message??h.defaultError;return f.code==="unrecognized_keys"?{message:lt.errToObj(o).message??p}:{message:p}}}:{}})}strip(){return new va({...this._def,unknownKeys:"strip"})}passthrough(){return new va({...this._def,unknownKeys:"passthrough"})}extend(o){return new va({...this._def,shape:()=>({...this._def.shape(),...o})})}merge(o){return new va({unknownKeys:o._def.unknownKeys,catchall:o._def.catchall,shape:()=>({...this._def.shape(),...o._def.shape()}),typeName:Tt.ZodObject})}setKey(o,f){return this.augment({[o]:f})}catchall(o){return new va({...this._def,catchall:o})}pick(o){const f={};for(const h of nn.objectKeys(o))o[h]&&this.shape[h]&&(f[h]=this.shape[h]);return new va({...this._def,shape:()=>f})}omit(o){const f={};for(const h of nn.objectKeys(this.shape))o[h]||(f[h]=this.shape[h]);return new va({...this._def,shape:()=>f})}deepPartial(){return Nh(this)}partial(o){const f={};for(const h of nn.objectKeys(this.shape)){const p=this.shape[h];o&&!o[h]?f[h]=p:f[h]=p.optional()}return new va({...this._def,shape:()=>f})}required(o){const f={};for(const h of nn.objectKeys(this.shape))if(o&&!o[h])f[h]=this.shape[h];else{let v=this.shape[h];for(;v instanceof Pc;)v=v._def.innerType;f[h]=v}return new va({...this._def,shape:()=>f})}keyof(){return cx(nn.objectKeys(this.shape))}}va.create=(u,o)=>new va({shape:()=>u,unknownKeys:"strip",catchall:Ic.create(),typeName:Tt.ZodObject,...Ht(o)}),va.strictCreate=(u,o)=>new va({shape:()=>u,unknownKeys:"strict",catchall:Ic.create(),typeName:Tt.ZodObject,...Ht(o)}),va.lazycreate=(u,o)=>new va({shape:u,unknownKeys:"strip",catchall:Ic.create(),typeName:Tt.ZodObject,...Ht(o)});class Qv extends It{_parse(o){const{ctx:f}=this._processInputParams(o),h=this._def.options;function p(v){for(const E of v)if(E.result.status==="valid")return E.result;for(const E of v)if(E.result.status==="dirty")return f.common.issues.push(...E.ctx.common.issues),E.result;const S=v.map(E=>new No(E.ctx.common.issues));return $e(f,{code:He.invalid_union,unionErrors:S}),Et}if(f.common.async)return Promise.all(h.map(async v=>{const S={...f,common:{...f.common,issues:[]},parent:null};return{result:await v._parseAsync({data:f.data,path:f.path,parent:S}),ctx:S}})).then(p);{let v;const S=[];for(const x of h){const w={...f,common:{...f.common,issues:[]},parent:null},B=x._parseSync({data:f.data,path:f.path,parent:w});if(B.status==="valid")return B;B.status==="dirty"&&!v&&(v={result:B,ctx:w}),w.common.issues.length&&S.push(w.common.issues)}if(v)return f.common.issues.push(...v.ctx.common.issues),v.result;const E=S.map(x=>new No(x));return $e(f,{code:He.invalid_union,unionErrors:E}),Et}}get options(){return this._def.options}}Qv.create=(u,o)=>new Qv({options:u,typeName:Tt.ZodUnion,...Ht(o)});function JS(u,o){const f=Kc(u),h=Kc(o);if(u===o)return{valid:!0,data:u};if(f===tt.object&&h===tt.object){const p=nn.objectKeys(o),v=nn.objectKeys(u).filter(E=>p.indexOf(E)!==-1),S={...u,...o};for(const E of v){const x=JS(u[E],o[E]);if(!x.valid)return{valid:!1};S[E]=x.data}return{valid:!0,data:S}}else if(f===tt.array&&h===tt.array){if(u.length!==o.length)return{valid:!1};const p=[];for(let v=0;v<u.length;v++){const S=u[v],E=o[v],x=JS(S,E);if(!x.valid)return{valid:!1};p.push(x.data)}return{valid:!0,data:p}}else return f===tt.date&&h===tt.date&&+u==+o?{valid:!0,data:u}:{valid:!1}}class Jv extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o),p=(v,S)=>{if(JT(v)||JT(S))return Et;const E=JS(v.value,S.value);return E.valid?((KT(v)||KT(S))&&f.dirty(),{status:f.value,value:E.data}):($e(h,{code:He.invalid_intersection_types}),Et)};return h.common.async?Promise.all([this._def.left._parseAsync({data:h.data,path:h.path,parent:h}),this._def.right._parseAsync({data:h.data,path:h.path,parent:h})]).then(([v,S])=>p(v,S)):p(this._def.left._parseSync({data:h.data,path:h.path,parent:h}),this._def.right._parseSync({data:h.data,path:h.path,parent:h}))}}Jv.create=(u,o,f)=>new Jv({left:u,right:o,typeName:Tt.ZodIntersection,...Ht(f)});class Ef extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.parsedType!==tt.array)return $e(h,{code:He.invalid_type,expected:tt.array,received:h.parsedType}),Et;if(h.data.length<this._def.items.length)return $e(h,{code:He.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Et;!this._def.rest&&h.data.length>this._def.items.length&&($e(h,{code:He.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),f.dirty());const v=[...h.data].map((S,E)=>{const x=this._def.items[E]||this._def.rest;return x?x._parse(new Fc(h,S,h.path,E)):null}).filter(S=>!!S);return h.common.async?Promise.all(v).then(S=>ki.mergeArray(f,S)):ki.mergeArray(f,v)}get items(){return this._def.items}rest(o){return new Ef({...this._def,rest:o})}}Ef.create=(u,o)=>{if(!Array.isArray(u))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ef({items:u,typeName:Tt.ZodTuple,rest:null,...Ht(o)})};class rx extends It{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.parsedType!==tt.map)return $e(h,{code:He.invalid_type,expected:tt.map,received:h.parsedType}),Et;const p=this._def.keyType,v=this._def.valueType,S=[...h.data.entries()].map(([E,x],w)=>({key:p._parse(new Fc(h,E,h.path,[w,"key"])),value:v._parse(new Fc(h,x,h.path,[w,"value"]))}));if(h.common.async){const E=new Map;return Promise.resolve().then(async()=>{for(const x of S){const w=await x.key,B=await x.value;if(w.status==="aborted"||B.status==="aborted")return Et;(w.status==="dirty"||B.status==="dirty")&&f.dirty(),E.set(w.value,B.value)}return{status:f.value,value:E}})}else{const E=new Map;for(const x of S){const w=x.key,B=x.value;if(w.status==="aborted"||B.status==="aborted")return Et;(w.status==="dirty"||B.status==="dirty")&&f.dirty(),E.set(w.value,B.value)}return{status:f.value,value:E}}}}rx.create=(u,o,f)=>new rx({valueType:o,keyType:u,typeName:Tt.ZodMap,...Ht(f)});class Oy extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.parsedType!==tt.set)return $e(h,{code:He.invalid_type,expected:tt.set,received:h.parsedType}),Et;const p=this._def;p.minSize!==null&&h.data.size<p.minSize.value&&($e(h,{code:He.too_small,minimum:p.minSize.value,type:"set",inclusive:!0,exact:!1,message:p.minSize.message}),f.dirty()),p.maxSize!==null&&h.data.size>p.maxSize.value&&($e(h,{code:He.too_big,maximum:p.maxSize.value,type:"set",inclusive:!0,exact:!1,message:p.maxSize.message}),f.dirty());const v=this._def.valueType;function S(x){const w=new Set;for(const B of x){if(B.status==="aborted")return Et;B.status==="dirty"&&f.dirty(),w.add(B.value)}return{status:f.value,value:w}}const E=[...h.data.values()].map((x,w)=>v._parse(new Fc(h,x,h.path,w)));return h.common.async?Promise.all(E).then(x=>S(x)):S(E)}min(o,f){return new Oy({...this._def,minSize:{value:o,message:lt.toString(f)}})}max(o,f){return new Oy({...this._def,maxSize:{value:o,message:lt.toString(f)}})}size(o,f){return this.min(o,f).max(o,f)}nonempty(o){return this.min(1,o)}}Oy.create=(u,o)=>new Oy({valueType:u,minSize:null,maxSize:null,typeName:Tt.ZodSet,...Ht(o)});class ux extends It{get schema(){return this._def.getter()}_parse(o){const{ctx:f}=this._processInputParams(o);return this._def.getter()._parse({data:f.data,path:f.path,parent:f})}}ux.create=(u,o)=>new ux({getter:u,typeName:Tt.ZodLazy,...Ht(o)});class ox extends It{_parse(o){if(o.data!==this._def.value){const f=this._getOrReturnCtx(o);return $e(f,{received:f.data,code:He.invalid_literal,expected:this._def.value}),Et}return{status:"valid",value:o.data}}get value(){return this._def.value}}ox.create=(u,o)=>new ox({value:u,typeName:Tt.ZodLiteral,...Ht(o)});function cx(u,o){return new jh({values:u,typeName:Tt.ZodEnum,...Ht(o)})}class jh extends It{_parse(o){if(typeof o.data!="string"){const f=this._getOrReturnCtx(o),h=this._def.values;return $e(f,{expected:nn.joinValues(h),received:f.parsedType,code:He.invalid_type}),Et}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(o.data)){const f=this._getOrReturnCtx(o),h=this._def.values;return $e(f,{received:f.data,code:He.invalid_enum_value,options:h}),Et}return or(o.data)}get options(){return this._def.values}get enum(){const o={};for(const f of this._def.values)o[f]=f;return o}get Values(){const o={};for(const f of this._def.values)o[f]=f;return o}get Enum(){const o={};for(const f of this._def.values)o[f]=f;return o}extract(o,f=this._def){return jh.create(o,{...this._def,...f})}exclude(o,f=this._def){return jh.create(this.options.filter(h=>!o.includes(h)),{...this._def,...f})}}jh.create=cx;class sx extends It{_parse(o){const f=nn.getValidEnumValues(this._def.values),h=this._getOrReturnCtx(o);if(h.parsedType!==tt.string&&h.parsedType!==tt.number){const p=nn.objectValues(f);return $e(h,{expected:nn.joinValues(p),received:h.parsedType,code:He.invalid_type}),Et}if(this._cache||(this._cache=new Set(nn.getValidEnumValues(this._def.values))),!this._cache.has(o.data)){const p=nn.objectValues(f);return $e(h,{received:h.data,code:He.invalid_enum_value,options:p}),Et}return or(o.data)}get enum(){return this._def.values}}sx.create=(u,o)=>new sx({values:u,typeName:Tt.ZodNativeEnum,...Ht(o)});class Kv extends It{unwrap(){return this._def.type}_parse(o){const{ctx:f}=this._processInputParams(o);if(f.parsedType!==tt.promise&&f.common.async===!1)return $e(f,{code:He.invalid_type,expected:tt.promise,received:f.parsedType}),Et;const h=f.parsedType===tt.promise?f.data:Promise.resolve(f.data);return or(h.then(p=>this._def.type.parseAsync(p,{path:f.path,errorMap:f.common.contextualErrorMap})))}}Kv.create=(u,o)=>new Kv({type:u,typeName:Tt.ZodPromise,...Ht(o)});class Bh extends It{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(o){const{status:f,ctx:h}=this._processInputParams(o),p=this._def.effect||null,v={addIssue:S=>{$e(h,S),S.fatal?f.abort():f.dirty()},get path(){return h.path}};if(v.addIssue=v.addIssue.bind(v),p.type==="preprocess"){const S=p.transform(h.data,v);if(h.common.async)return Promise.resolve(S).then(async E=>{if(f.value==="aborted")return Et;const x=await this._def.schema._parseAsync({data:E,path:h.path,parent:h});return x.status==="aborted"?Et:x.status==="dirty"||f.value==="dirty"?xy(x.value):x});{if(f.value==="aborted")return Et;const E=this._def.schema._parseSync({data:S,path:h.path,parent:h});return E.status==="aborted"?Et:E.status==="dirty"||f.value==="dirty"?xy(E.value):E}}if(p.type==="refinement"){const S=E=>{const x=p.refinement(E,v);if(h.common.async)return Promise.resolve(x);if(x instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return E};if(h.common.async===!1){const E=this._def.schema._parseSync({data:h.data,path:h.path,parent:h});return E.status==="aborted"?Et:(E.status==="dirty"&&f.dirty(),S(E.value),{status:f.value,value:E.value})}else return this._def.schema._parseAsync({data:h.data,path:h.path,parent:h}).then(E=>E.status==="aborted"?Et:(E.status==="dirty"&&f.dirty(),S(E.value).then(()=>({status:f.value,value:E.value}))))}if(p.type==="transform")if(h.common.async===!1){const S=this._def.schema._parseSync({data:h.data,path:h.path,parent:h});if(!Uh(S))return Et;const E=p.transform(S.value,v);if(E instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:f.value,value:E}}else return this._def.schema._parseAsync({data:h.data,path:h.path,parent:h}).then(S=>Uh(S)?Promise.resolve(p.transform(S.value,v)).then(E=>({status:f.value,value:E})):Et);nn.assertNever(p)}}Bh.create=(u,o,f)=>new Bh({schema:u,typeName:Tt.ZodEffects,effect:o,...Ht(f)}),Bh.createWithPreprocess=(u,o,f)=>new Bh({schema:o,effect:{type:"preprocess",transform:u},typeName:Tt.ZodEffects,...Ht(f)});class Pc extends It{_parse(o){return this._getType(o)===tt.undefined?or(void 0):this._def.innerType._parse(o)}unwrap(){return this._def.innerType}}Pc.create=(u,o)=>new Pc({innerType:u,typeName:Tt.ZodOptional,...Ht(o)});class Hh extends It{_parse(o){return this._getType(o)===tt.null?or(null):this._def.innerType._parse(o)}unwrap(){return this._def.innerType}}Hh.create=(u,o)=>new Hh({innerType:u,typeName:Tt.ZodNullable,...Ht(o)});class KS extends It{_parse(o){const{ctx:f}=this._processInputParams(o);let h=f.data;return f.parsedType===tt.undefined&&(h=this._def.defaultValue()),this._def.innerType._parse({data:h,path:f.path,parent:f})}removeDefault(){return this._def.innerType}}KS.create=(u,o)=>new KS({innerType:u,typeName:Tt.ZodDefault,defaultValue:typeof o.default=="function"?o.default:()=>o.default,...Ht(o)});class FS extends It{_parse(o){const{ctx:f}=this._processInputParams(o),h={...f,common:{...f.common,issues:[]}},p=this._def.innerType._parse({data:h.data,path:h.path,parent:{...h}});return Xv(p)?p.then(v=>({status:"valid",value:v.status==="valid"?v.value:this._def.catchValue({get error(){return new No(h.common.issues)},input:h.data})})):{status:"valid",value:p.status==="valid"?p.value:this._def.catchValue({get error(){return new No(h.common.issues)},input:h.data})}}removeCatch(){return this._def.innerType}}FS.create=(u,o)=>new FS({innerType:u,typeName:Tt.ZodCatch,catchValue:typeof o.catch=="function"?o.catch:()=>o.catch,...Ht(o)});class fx extends It{_parse(o){if(this._getType(o)!==tt.nan){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.nan,received:h.parsedType}),Et}return{status:"valid",value:o.data}}}fx.create=u=>new fx({typeName:Tt.ZodNaN,...Ht(u)});class x3 extends It{_parse(o){const{ctx:f}=this._processInputParams(o),h=f.data;return this._def.type._parse({data:h,path:f.path,parent:f})}unwrap(){return this._def.type}}class WS extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.common.async)return(async()=>{const v=await this._def.in._parseAsync({data:h.data,path:h.path,parent:h});return v.status==="aborted"?Et:v.status==="dirty"?(f.dirty(),xy(v.value)):this._def.out._parseAsync({data:v.value,path:h.path,parent:h})})();{const p=this._def.in._parseSync({data:h.data,path:h.path,parent:h});return p.status==="aborted"?Et:p.status==="dirty"?(f.dirty(),{status:"dirty",value:p.value}):this._def.out._parseSync({data:p.value,path:h.path,parent:h})}}static create(o,f){return new WS({in:o,out:f,typeName:Tt.ZodPipeline})}}class IS extends It{_parse(o){const f=this._def.innerType._parse(o),h=p=>(Uh(p)&&(p.value=Object.freeze(p.value)),p);return Xv(f)?f.then(p=>h(p)):h(f)}unwrap(){return this._def.innerType}}IS.create=(u,o)=>new IS({innerType:u,typeName:Tt.ZodReadonly,...Ht(o)});var Tt;(function(u){u.ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const dx=Wc.create;Ic.create,$u.create;const A3=va.create;Qv.create,Jv.create,Ef.create,jh.create,Kv.create,Pc.create,Hh.create;const w3=A3({securityNumber:dx({required_error:"CPF é obrigatório."}).refine(u=>u.replace(/\D/g,"").length>=11,"CPF deve conter no mínimo 11 caracteres.").refine(u=>{const o=u.replace(/\D/g,"");return!!Number(o)},"CPF deve conter apenas números."),coupon:dx({required_error:"Cupom / ID do Cartão obrigatório."}).optional()}),O3=u=>{const o=u.replace(/\D/g,"");if(o.length<=11)return o.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1")};var Cy=u=>u.type==="checkbox",Tf=u=>u instanceof Date,mi=u=>u==null;const hx=u=>typeof u=="object";var ba=u=>!mi(u)&&!Array.isArray(u)&&hx(u)&&!Tf(u),C3=u=>ba(u)&&u.target?Cy(u.target)?u.target.checked:u.target.value:u,R3=u=>u.substring(0,u.search(/\.\d+(\.|$)/))||u,z3=(u,o)=>u.has(R3(o)),D3=u=>{const o=u.constructor&&u.constructor.prototype;return ba(o)&&o.hasOwnProperty("isPrototypeOf")},PS=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ma(u){if(u instanceof Date)return new Date(u);const o=typeof FileList<"u"&&u instanceof FileList;if(PS&&(u instanceof Blob||o))return u;const f=Array.isArray(u);if(!f&&!(ba(u)&&D3(u)))return u;const h=f?[]:Object.create(Object.getPrototypeOf(u));for(const p in u)Object.prototype.hasOwnProperty.call(u,p)&&(h[p]=Ma(u[p]));return h}var Fv=u=>/^\w*$/.test(u),Wn=u=>u===void 0,e_=u=>Array.isArray(u)?u.filter(Boolean):[],t_=u=>e_(u.replace(/["|']|\]/g,"").split(/\.|\[/)),We=(u,o,f)=>{if(!o||!ba(u))return f;const h=(Fv(o)?[o]:t_(o)).reduce((p,v)=>mi(p)?p:p[v],u);return Wn(h)||h===u?Wn(u[o])?f:u[o]:h},Qu=u=>typeof u=="boolean",su=u=>typeof u=="function",On=(u,o,f)=>{let h=-1;const p=Fv(o)?[o]:t_(o),v=p.length,S=v-1;for(;++h<v;){const E=p[h];let x=f;if(h!==S){const w=u[E];x=ba(w)||Array.isArray(w)?w:isNaN(+p[h+1])?{}:[]}if(E==="__proto__"||E==="constructor"||E==="prototype")return;u[E]=x,u=u[E]}};const mx={BLUR:"blur",FOCUS_OUT:"focusout"},fu={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},jo={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},M3=ga.createContext(null);M3.displayName="HookFormControlContext";var U3=(u,o,f,h=!0)=>{const p={defaultValues:o._defaultValues};for(const v in u)Object.defineProperty(p,v,{get:()=>{const S=v;return o._proxyFormState[S]!==fu.all&&(o._proxyFormState[S]=!h||fu.all),u[S]}});return p};const N3=typeof window<"u"?ga.useLayoutEffect:ga.useEffect;var Vi=u=>typeof u=="string",j3=(u,o,f,h,p)=>Vi(u)?(h&&o.watch.add(u),We(f,u,p)):Array.isArray(u)?u.map(v=>(h&&o.watch.add(v),We(f,v))):(h&&(o.watchAll=!0),f),n_=u=>mi(u)||!hx(u);function es(u,o,f=new WeakSet){if(n_(u)||n_(o))return Object.is(u,o);if(Tf(u)&&Tf(o))return Object.is(u.getTime(),o.getTime());const h=Object.keys(u),p=Object.keys(o);if(h.length!==p.length)return!1;if(f.has(u)||f.has(o))return!0;f.add(u),f.add(o);for(const v of h){const S=u[v];if(!p.includes(v))return!1;if(v!=="ref"){const E=o[v];if(Tf(S)&&Tf(E)||ba(S)&&ba(E)||Array.isArray(S)&&Array.isArray(E)?!es(S,E,f):!Object.is(S,E))return!1}}return!0}const B3=ga.createContext(null);B3.displayName="HookFormContext";var a_=(u,o,f,h,p)=>o?{...f[u],types:{...f[u]&&f[u].types?f[u].types:{},[h]:p||!0}}:{},Ry=u=>Array.isArray(u)?u:[u],px=()=>{let u=[];return{get observers(){return u},next:p=>{for(const v of u)v.next&&v.next(p)},subscribe:p=>(u.push(p),{unsubscribe:()=>{u=u.filter(v=>v!==p)}}),unsubscribe:()=>{u=[]}}};function yx(u,o){const f={};for(const h in u)if(u.hasOwnProperty(h)){const p=u[h],v=o[h];if(p&&ba(p)&&v){const S=yx(p,v);ba(S)&&(f[h]=S)}else u[h]&&(f[h]=v)}return f}var $l=u=>ba(u)&&!Object.keys(u).length,l_=u=>u.type==="file",Wv=u=>{if(!PS)return!1;const o=u?u.ownerDocument:0;return u instanceof(o&&o.defaultView?o.defaultView.HTMLElement:HTMLElement)},gx=u=>u.type==="select-multiple",i_=u=>u.type==="radio",H3=u=>i_(u)||Cy(u),r_=u=>Wv(u)&&u.isConnected;function k3(u,o){const f=o.slice(0,-1).length;let h=0;for(;h<f;)u=Wn(u)?h++:u[o[h++]];return u}function V3(u){for(const o in u)if(u.hasOwnProperty(o)&&!Wn(u[o]))return!1;return!0}function Sa(u,o){const f=Array.isArray(o)?o:Fv(o)?[o]:t_(o),h=f.length===1?u:k3(u,f),p=f.length-1,v=f[p];return h&&delete h[v],p!==0&&(ba(h)&&$l(h)||Array.isArray(h)&&V3(h))&&Sa(u,f.slice(0,-1)),u}var q3=u=>{for(const o in u)if(su(u[o]))return!0;return!1};function vx(u){return Array.isArray(u)||ba(u)&&!q3(u)}function u_(u,o={}){for(const f in u){const h=u[f];vx(h)?(o[f]=Array.isArray(h)?[]:{},u_(h,o[f])):Wn(h)||(o[f]=!0)}return o}function kh(u,o,f){f||(f=u_(o));for(const h in u){const p=u[h];if(vx(p))Wn(o)||n_(f[h])?f[h]=u_(p,Array.isArray(p)?[]:{}):kh(p,mi(o)?{}:o[h],f[h]);else{const v=o[h];f[h]=!es(p,v)}}return f}const bx={value:!1,isValid:!1},Sx={value:!0,isValid:!0};var _x=u=>{if(Array.isArray(u)){if(u.length>1){const o=u.filter(f=>f&&f.checked&&!f.disabled).map(f=>f.value);return{value:o,isValid:!!o.length}}return u[0].checked&&!u[0].disabled?u[0].attributes&&!Wn(u[0].attributes.value)?Wn(u[0].value)||u[0].value===""?Sx:{value:u[0].value,isValid:!0}:Sx:bx}return bx},Ex=(u,{valueAsNumber:o,valueAsDate:f,setValueAs:h})=>Wn(u)?u:o?u===""?NaN:u&&+u:f&&Vi(u)?new Date(u):h?h(u):u;const Tx={isValid:!1,value:null};var xx=u=>Array.isArray(u)?u.reduce((o,f)=>f&&f.checked&&!f.disabled?{isValid:!0,value:f.value}:o,Tx):Tx;function Ax(u){const o=u.ref;return l_(o)?o.files:i_(o)?xx(u.refs).value:gx(o)?[...o.selectedOptions].map(({value:f})=>f):Cy(o)?_x(u.refs).value:Ex(Wn(o.value)?u.ref.value:o.value,u)}var L3=(u,o,f,h)=>{const p={};for(const v of u){const S=We(o,v);S&&On(p,v,S._f)}return{criteriaMode:f,names:[...u],fields:p,shouldUseNativeValidation:h}},Iv=u=>u instanceof RegExp,zy=u=>Wn(u)?u:Iv(u)?u.source:ba(u)?Iv(u.value)?u.value.source:u.value:u,wx=u=>({isOnSubmit:!u||u===fu.onSubmit,isOnBlur:u===fu.onBlur,isOnChange:u===fu.onChange,isOnAll:u===fu.all,isOnTouch:u===fu.onTouched});const Ox="AsyncFunction";var Y3=u=>!!u&&!!u.validate&&!!(su(u.validate)&&u.validate.constructor.name===Ox||ba(u.validate)&&Object.values(u.validate).find(o=>o.constructor.name===Ox)),G3=u=>u.mount&&(u.required||u.min||u.max||u.maxLength||u.minLength||u.pattern||u.validate),Cx=(u,o,f)=>!f&&(o.watchAll||o.watch.has(u)||[...o.watch].some(h=>u.startsWith(h)&&/^\.\w+/.test(u.slice(h.length))));const Dy=(u,o,f,h)=>{for(const p of f||Object.keys(u)){const v=We(u,p);if(v){const{_f:S,...E}=v;if(S){if(S.refs&&S.refs[0]&&o(S.refs[0],p)&&!h)return!0;if(S.ref&&o(S.ref,S.name)&&!h)return!0;if(Dy(E,o))break}else if(ba(E)&&Dy(E,o))break}}};function Rx(u,o,f){const h=We(u,f);if(h||Fv(f))return{error:h,name:f};const p=f.split(".");for(;p.length;){const v=p.join("."),S=We(o,v),E=We(u,v);if(S&&!Array.isArray(S)&&f!==v)return{name:f};if(E&&E.type)return{name:v,error:E};if(E&&E.root&&E.root.type)return{name:`${v}.root`,error:E.root};p.pop()}return{name:f}}var Z3=(u,o,f,h)=>{f(u);const{name:p,...v}=u;return $l(v)||Object.keys(v).length>=Object.keys(o).length||Object.keys(v).find(S=>o[S]===(!h||fu.all))},X3=(u,o,f)=>!u||!o||u===o||Ry(u).some(h=>h&&(f?h===o:h.startsWith(o)||o.startsWith(h))),$3=(u,o,f,h,p)=>p.isOnAll?!1:!f&&p.isOnTouch?!(o||u):(f?h.isOnBlur:p.isOnBlur)?!u:(f?h.isOnChange:p.isOnChange)?u:!0,Q3=(u,o)=>!e_(We(u,o)).length&&Sa(u,o),J3=(u,o,f)=>{const h=Ry(We(u,f));return On(h,"root",o[f]),On(u,f,h),u};function zx(u,o,f="validate"){if(Vi(u)||Array.isArray(u)&&u.every(Vi)||Qu(u)&&!u)return{type:f,message:Vi(u)?u:"",ref:o}}var Vh=u=>ba(u)&&!Iv(u)?u:{value:u,message:""},Dx=async(u,o,f,h,p,v)=>{const{ref:S,refs:E,required:x,maxLength:w,minLength:B,min:j,max:N,pattern:D,validate:L,name:Y,valueAsNumber:Z,mount:ie}=u._f,re=We(f,Y);if(!ie||o.has(Y))return{};const Oe=E?E[0]:S,Ce=R=>{p&&Oe.reportValidity&&(Oe.setCustomValidity(Qu(R)?"":R||""),Oe.reportValidity())},I={},Se=i_(S),Te=Cy(S),Ie=Se||Te,Ge=(Z||l_(S))&&Wn(S.value)&&Wn(re)||Wv(S)&&S.value===""||re===""||Array.isArray(re)&&!re.length,nt=a_.bind(null,Y,h,I),we=(R,oe,fe,De=jo.maxLength,W=jo.minLength)=>{const J=R?oe:fe;I[Y]={type:R?De:W,message:J,ref:S,...nt(R?De:W,J)}};if(v?!Array.isArray(re)||!re.length:x&&(!Ie&&(Ge||mi(re))||Qu(re)&&!re||Te&&!_x(E).isValid||Se&&!xx(E).isValid)){const{value:R,message:oe}=Vi(x)?{value:!!x,message:x}:Vh(x);if(R&&(I[Y]={type:jo.required,message:oe,ref:Oe,...nt(jo.required,oe)},!h))return Ce(oe),I}if(!Ge&&(!mi(j)||!mi(N))){let R,oe;const fe=Vh(N),De=Vh(j);if(!mi(re)&&!isNaN(re)){const W=S.valueAsNumber||re&&+re;mi(fe.value)||(R=W>fe.value),mi(De.value)||(oe=W<De.value)}else{const W=S.valueAsDate||new Date(re),J=Xe=>new Date(new Date().toDateString()+" "+Xe),be=S.type=="time",je=S.type=="week";Vi(fe.value)&&re&&(R=be?J(re)>J(fe.value):je?re>fe.value:W>new Date(fe.value)),Vi(De.value)&&re&&(oe=be?J(re)<J(De.value):je?re<De.value:W<new Date(De.value))}if((R||oe)&&(we(!!R,fe.message,De.message,jo.max,jo.min),!h))return Ce(I[Y].message),I}if((w||B)&&!Ge&&(Vi(re)||v&&Array.isArray(re))){const R=Vh(w),oe=Vh(B),fe=!mi(R.value)&&re.length>+R.value,De=!mi(oe.value)&&re.length<+oe.value;if((fe||De)&&(we(fe,R.message,oe.message),!h))return Ce(I[Y].message),I}if(D&&!Ge&&Vi(re)){const{value:R,message:oe}=Vh(D);if(Iv(R)&&!re.match(R)&&(I[Y]={type:jo.pattern,message:oe,ref:S,...nt(jo.pattern,oe)},!h))return Ce(oe),I}if(L){if(su(L)){const R=await L(re,f),oe=zx(R,Oe);if(oe&&(I[Y]={...oe,...nt(jo.validate,oe.message)},!h))return Ce(oe.message),I}else if(ba(L)){let R={};for(const oe in L){if(!$l(R)&&!h)break;const fe=zx(await L[oe](re,f),Oe,oe);fe&&(R={...fe,...nt(oe,fe.message)},Ce(fe.message),h&&(I[Y]=R))}if(!$l(R)&&(I[Y]={ref:Oe,...R},!h))return I}}return Ce(!0),I};const K3={mode:fu.onSubmit,reValidateMode:fu.onChange,shouldFocusError:!0};function F3(u={}){let o={...K3,...u},f={submitCount:0,isDirty:!1,isReady:!1,isLoading:su(o.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:o.errors||{},disabled:o.disabled||!1},h={},p=ba(o.defaultValues)||ba(o.values)?Ma(o.defaultValues||o.values)||{}:{},v=o.shouldUnregister?{}:Ma(p),S={action:!1,mount:!1,watch:!1,keepIsValid:!1},E={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},x,w=0;const B={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},j={...B};let N={...j};const D={array:px(),state:px()},L=o.criteriaMode===fu.all,Y=U=>P=>{clearTimeout(w),w=setTimeout(U,P)},Z=async U=>{if(!S.keepIsValid&&!o.disabled&&(j.isValid||N.isValid||U)){let P;o.resolver?(P=$l((await Ie()).errors),ie()):P=await nt(h,!0),P!==f.isValid&&D.state.next({isValid:P})}},ie=(U,P)=>{!o.disabled&&(j.isValidating||j.validatingFields||N.isValidating||N.validatingFields)&&((U||Array.from(E.mount)).forEach(de=>{de&&(P?On(f.validatingFields,de,P):Sa(f.validatingFields,de))}),D.state.next({validatingFields:f.validatingFields,isValidating:!$l(f.validatingFields)}))},re=(U,P=[],de,ze,Me=!0,Re=!0)=>{if(ze&&de&&!o.disabled){if(S.action=!0,Re&&Array.isArray(We(h,U))){const et=de(We(h,U),ze.argA,ze.argB);Me&&On(h,U,et)}if(Re&&Array.isArray(We(f.errors,U))){const et=de(We(f.errors,U),ze.argA,ze.argB);Me&&On(f.errors,U,et),Q3(f.errors,U)}if((j.touchedFields||N.touchedFields)&&Re&&Array.isArray(We(f.touchedFields,U))){const et=de(We(f.touchedFields,U),ze.argA,ze.argB);Me&&On(f.touchedFields,U,et)}(j.dirtyFields||N.dirtyFields)&&(f.dirtyFields=kh(p,v)),D.state.next({name:U,isDirty:R(U,P),dirtyFields:f.dirtyFields,errors:f.errors,isValid:f.isValid})}else On(v,U,P)},Oe=(U,P)=>{On(f.errors,U,P),D.state.next({errors:f.errors})},Ce=U=>{f.errors=U,D.state.next({errors:f.errors,isValid:!1})},I=(U,P,de,ze)=>{const Me=We(h,U);if(Me){const Re=We(v,U,Wn(de)?We(p,U):de);Wn(Re)||ze&&ze.defaultChecked||P?On(v,U,P?Re:Ax(Me._f)):De(U,Re),S.mount&&!S.action&&Z()}},Se=(U,P,de,ze,Me)=>{let Re=!1,et=!1;const Mt={name:U};if(!o.disabled){if(!de||ze){(j.isDirty||N.isDirty)&&(et=f.isDirty,f.isDirty=Mt.isDirty=R(),Re=et!==Mt.isDirty);const Ut=es(We(p,U),P);et=!!We(f.dirtyFields,U),Ut?Sa(f.dirtyFields,U):On(f.dirtyFields,U,!0),Mt.dirtyFields=f.dirtyFields,Re=Re||(j.dirtyFields||N.dirtyFields)&&et!==!Ut}if(de){const Ut=We(f.touchedFields,U);Ut||(On(f.touchedFields,U,de),Mt.touchedFields=f.touchedFields,Re=Re||(j.touchedFields||N.touchedFields)&&Ut!==de)}Re&&Me&&D.state.next(Mt)}return Re?Mt:{}},Te=(U,P,de,ze)=>{const Me=We(f.errors,U),Re=(j.isValid||N.isValid)&&Qu(P)&&f.isValid!==P;if(o.delayError&&de?(x=Y(()=>Oe(U,de)),x(o.delayError)):(clearTimeout(w),x=null,de?On(f.errors,U,de):Sa(f.errors,U)),(de?!es(Me,de):Me)||!$l(ze)||Re){const et={...ze,...Re&&Qu(P)?{isValid:P}:{},errors:f.errors,name:U};f={...f,...et},D.state.next(et)}},Ie=async U=>(ie(U,!0),await o.resolver(v,o.context,L3(U||E.mount,h,o.criteriaMode,o.shouldUseNativeValidation))),Ge=async U=>{const{errors:P}=await Ie(U);if(ie(U),U)for(const de of U){const ze=We(P,de);ze?On(f.errors,de,ze):Sa(f.errors,de)}else f.errors=P;return P},nt=async(U,P,de={valid:!0})=>{for(const ze in U){const Me=U[ze];if(Me){const{_f:Re,...et}=Me;if(Re){const Mt=E.array.has(Re.name),Ut=Me._f&&Y3(Me._f);Ut&&j.validatingFields&&ie([Re.name],!0);const In=await Dx(Me,E.disabled,v,L,o.shouldUseNativeValidation&&!P,Mt);if(Ut&&j.validatingFields&&ie([Re.name]),In[Re.name]&&(de.valid=!1,P||u.shouldUseNativeValidation))break;!P&&(We(In,Re.name)?Mt?J3(f.errors,In,Re.name):On(f.errors,Re.name,In[Re.name]):Sa(f.errors,Re.name))}!$l(et)&&await nt(et,P,de)}}return de.valid},we=()=>{for(const U of E.unMount){const P=We(h,U);P&&(P._f.refs?P._f.refs.every(de=>!r_(de)):!r_(P._f.ref))&&Ve(U)}E.unMount=new Set},R=(U,P)=>!o.disabled&&(U&&P&&On(v,U,P),!es(z(),p)),oe=(U,P,de)=>j3(U,E,{...S.mount?v:Wn(P)?p:Vi(U)?{[U]:P}:P},de,P),fe=U=>e_(We(S.mount?v:p,U,o.shouldUnregister?We(p,U,[]):[])),De=(U,P,de={})=>{const ze=We(h,U);let Me=P;if(ze){const Re=ze._f;Re&&(!Re.disabled&&On(v,U,Ex(P,Re)),Me=Wv(Re.ref)&&mi(P)?"":P,gx(Re.ref)?[...Re.ref.options].forEach(et=>et.selected=Me.includes(et.value)):Re.refs?Cy(Re.ref)?Re.refs.forEach(et=>{(!et.defaultChecked||!et.disabled)&&(Array.isArray(Me)?et.checked=!!Me.find(Mt=>Mt===et.value):et.checked=Me===et.value||!!Me)}):Re.refs.forEach(et=>et.checked=et.value===Me):l_(Re.ref)?Re.ref.value="":(Re.ref.value=Me,Re.ref.type||D.state.next({name:U,values:Ma(v)})))}(de.shouldDirty||de.shouldTouch)&&Se(U,Me,de.shouldTouch,de.shouldDirty,!0),de.shouldValidate&&Xe(U)},W=(U,P,de)=>{for(const ze in P){if(!P.hasOwnProperty(ze))return;const Me=P[ze],Re=U+"."+ze,et=We(h,Re);(E.array.has(U)||ba(Me)||et&&!et._f)&&!Tf(Me)?W(Re,Me,de):De(Re,Me,de)}},J=(U,P,de={})=>{const ze=We(h,U),Me=E.array.has(U),Re=Ma(P);On(v,U,Re),Me?(D.array.next({name:U,values:Ma(v)}),(j.isDirty||j.dirtyFields||N.isDirty||N.dirtyFields)&&de.shouldDirty&&D.state.next({name:U,dirtyFields:kh(p,v),isDirty:R(U,Re)})):ze&&!ze._f&&!mi(Re)?W(U,Re,de):De(U,Re,de),Cx(U,E)?D.state.next({...f,name:U,values:Ma(v)}):D.state.next({name:S.mount?U:void 0,values:Ma(v)})},be=async U=>{S.mount=!0;const P=U.target;let de=P.name,ze=!0;const Me=We(h,de),Re=Ut=>{ze=Number.isNaN(Ut)||Tf(Ut)&&isNaN(Ut.getTime())||es(Ut,We(v,de,Ut))},et=wx(o.mode),Mt=wx(o.reValidateMode);if(Me){let Ut,In;const Ql=P.type?Ax(Me._f):C3(U),xl=U.type===mx.BLUR||U.type===mx.FOCUS_OUT,Jl=!G3(Me._f)&&!o.resolver&&!We(f.errors,de)&&!Me._f.deps||$3(xl,We(f.touchedFields,de),f.isSubmitted,Mt,et),Dn=Cx(de,E,xl);On(v,de,Ql),xl?(!P||!P.readOnly)&&(Me._f.onBlur&&Me._f.onBlur(U),x&&x(0)):Me._f.onChange&&Me._f.onChange(U);const Ea=Se(de,Ql,xl),la=!$l(Ea)||Dn;if(!xl&&D.state.next({name:de,type:U.type,values:Ma(v)}),Jl)return(j.isValid||N.isValid)&&(o.mode==="onBlur"?xl&&Z():xl||Z()),la&&D.state.next({name:de,...Dn?{}:Ea});if(!xl&&Dn&&D.state.next({...f}),o.resolver){const{errors:hu}=await Ie([de]);if(ie([de]),Re(Ql),ze){const fr=Rx(f.errors,h,de),O=Rx(hu,h,fr.name||de);Ut=O.error,de=O.name,In=$l(hu)}}else ie([de],!0),Ut=(await Dx(Me,E.disabled,v,L,o.shouldUseNativeValidation))[de],ie([de]),Re(Ql),ze&&(Ut?In=!1:(j.isValid||N.isValid)&&(In=await nt(h,!0)));ze&&(Me._f.deps&&(!Array.isArray(Me._f.deps)||Me._f.deps.length>0)&&Xe(Me._f.deps),Te(de,In,Ut,Ea))}},je=(U,P)=>{if(We(f.errors,P)&&U.focus)return U.focus(),1},Xe=async(U,P={})=>{let de,ze;const Me=Ry(U);if(o.resolver){const Re=await Ge(Wn(U)?U:Me);de=$l(Re),ze=U?!Me.some(et=>We(Re,et)):de}else U?(ze=(await Promise.all(Me.map(async Re=>{const et=We(h,Re);return await nt(et&&et._f?{[Re]:et}:et)}))).every(Boolean),!(!ze&&!f.isValid)&&Z()):ze=de=await nt(h);return D.state.next({...!Vi(U)||(j.isValid||N.isValid)&&de!==f.isValid?{}:{name:U},...o.resolver||!U?{isValid:de}:{},errors:f.errors}),P.shouldFocus&&!ze&&Dy(h,je,U?Me:E.mount),ze},z=(U,P)=>{let de={...S.mount?v:p};return P&&(de=yx(P.dirtyFields?f.dirtyFields:f.touchedFields,de)),Wn(U)?de:Vi(U)?We(de,U):U.map(ze=>We(de,ze))},M=(U,P)=>({invalid:!!We((P||f).errors,U),isDirty:!!We((P||f).dirtyFields,U),error:We((P||f).errors,U),isValidating:!!We(f.validatingFields,U),isTouched:!!We((P||f).touchedFields,U)}),te=U=>{U&&Ry(U).forEach(P=>Sa(f.errors,P)),D.state.next({errors:U?f.errors:{}})},he=(U,P,de)=>{const ze=(We(h,U,{_f:{}})._f||{}).ref,Me=We(f.errors,U)||{},{ref:Re,message:et,type:Mt,...Ut}=Me;On(f.errors,U,{...Ut,...P,ref:ze}),D.state.next({name:U,errors:f.errors,isValid:!1}),de&&de.shouldFocus&&ze&&ze.focus&&ze.focus()},me=(U,P)=>su(U)?D.state.subscribe({next:de=>"values"in de&&U(oe(void 0,P),de)}):oe(U,P,!0),Ue=U=>D.state.subscribe({next:P=>{X3(U.name,P.name,U.exact)&&Z3(P,U.formState||j,sa,U.reRenderRoot)&&U.callback({values:{...v},...f,...P,defaultValues:p})}}).unsubscribe,Le=U=>(S.mount=!0,N={...N,...U.formState},Ue({...U,formState:{...B,...U.formState}})),Ve=(U,P={})=>{for(const de of U?Ry(U):E.mount)E.mount.delete(de),E.array.delete(de),P.keepValue||(Sa(h,de),Sa(v,de)),!P.keepError&&Sa(f.errors,de),!P.keepDirty&&Sa(f.dirtyFields,de),!P.keepTouched&&Sa(f.touchedFields,de),!P.keepIsValidating&&Sa(f.validatingFields,de),!o.shouldUnregister&&!P.keepDefaultValue&&Sa(p,de);D.state.next({values:Ma(v)}),D.state.next({...f,...P.keepDirty?{isDirty:R()}:{}}),!P.keepIsValid&&Z()},Je=({disabled:U,name:P})=>{if(Qu(U)&&S.mount||U||E.disabled.has(P)){const Me=E.disabled.has(P)!==!!U;U?E.disabled.add(P):E.disabled.delete(P),Me&&S.mount&&!S.action&&Z()}},st=(U,P={})=>{let de=We(h,U);const ze=Qu(P.disabled)||Qu(o.disabled);return On(h,U,{...de||{},_f:{...de&&de._f?de._f:{ref:{name:U}},name:U,mount:!0,...P}}),E.mount.add(U),de?Je({disabled:Qu(P.disabled)?P.disabled:o.disabled,name:U}):I(U,!0,P.value),{...ze?{disabled:P.disabled||o.disabled}:{},...o.progressive?{required:!!P.required,min:zy(P.min),max:zy(P.max),minLength:zy(P.minLength),maxLength:zy(P.maxLength),pattern:zy(P.pattern)}:{},name:U,onChange:be,onBlur:be,ref:Me=>{if(Me){st(U,P),de=We(h,U);const Re=Wn(Me.value)&&Me.querySelectorAll&&Me.querySelectorAll("input,select,textarea")[0]||Me,et=H3(Re),Mt=de._f.refs||[];if(et?Mt.find(Ut=>Ut===Re):Re===de._f.ref)return;On(h,U,{_f:{...de._f,...et?{refs:[...Mt.filter(r_),Re,...Array.isArray(We(p,U))?[{}]:[]],ref:{type:Re.type,name:U}}:{ref:Re}}}),I(U,!1,void 0,Re)}else de=We(h,U,{}),de._f&&(de._f.mount=!1),(o.shouldUnregister||P.shouldUnregister)&&!(z3(E.array,U)&&S.action)&&E.unMount.add(U)}}},dt=()=>o.shouldFocusError&&Dy(h,je,E.mount),Ne=U=>{Qu(U)&&(D.state.next({disabled:U}),Dy(h,(P,de)=>{const ze=We(h,de);ze&&(P.disabled=ze._f.disabled||U,Array.isArray(ze._f.refs)&&ze._f.refs.forEach(Me=>{Me.disabled=ze._f.disabled||U}))},0,!1))},qe=(U,P)=>async de=>{let ze;de&&(de.preventDefault&&de.preventDefault(),de.persist&&de.persist());let Me=Ma(v);if(D.state.next({isSubmitting:!0}),o.resolver){const{errors:Re,values:et}=await Ie();ie(),f.errors=Re,Me=Ma(et)}else await nt(h);if(E.disabled.size)for(const Re of E.disabled)Sa(Me,Re);if(Sa(f.errors,"root"),$l(f.errors)){D.state.next({errors:{}});try{await U(Me,de)}catch(Re){ze=Re}}else P&&await P({...f.errors},de),dt(),setTimeout(dt);if(D.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$l(f.errors)&&!ze,submitCount:f.submitCount+1,errors:f.errors}),ze)throw ze},_n=(U,P={})=>{We(h,U)&&(Wn(P.defaultValue)?J(U,Ma(We(p,U))):(J(U,P.defaultValue),On(p,U,Ma(P.defaultValue))),P.keepTouched||Sa(f.touchedFields,U),P.keepDirty||(Sa(f.dirtyFields,U),f.isDirty=P.defaultValue?R(U,Ma(We(p,U))):R()),P.keepError||(Sa(f.errors,U),j.isValid&&Z()),D.state.next({...f}))},Ua=(U,P={})=>{const de=U?Ma(U):p,ze=Ma(de),Me=$l(U),Re=Me?p:ze;if(P.keepDefaultValues||(p=de),!P.keepValues){if(P.keepDirtyValues){const et=new Set([...E.mount,...Object.keys(kh(p,v))]);for(const Mt of Array.from(et)){const Ut=We(f.dirtyFields,Mt),In=We(v,Mt),Ql=We(Re,Mt);Ut&&!Wn(In)?On(Re,Mt,In):!Ut&&!Wn(Ql)&&J(Mt,Ql)}}else{if(PS&&Wn(U))for(const et of E.mount){const Mt=We(h,et);if(Mt&&Mt._f){const Ut=Array.isArray(Mt._f.refs)?Mt._f.refs[0]:Mt._f.ref;if(Wv(Ut)){const In=Ut.closest("form");if(In){In.reset();break}}}}if(P.keepFieldsRef)for(const et of E.mount)J(et,We(Re,et));else h={}}v=o.shouldUnregister?P.keepDefaultValues?Ma(p):{}:Ma(Re),D.array.next({values:{...Re}}),D.state.next({values:{...Re}})}E={mount:P.keepDirtyValues?E.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},S.mount=!j.isValid||!!P.keepIsValid||!!P.keepDirtyValues||!o.shouldUnregister&&!$l(Re),S.watch=!!o.shouldUnregister,S.keepIsValid=!!P.keepIsValid,S.action=!1,P.keepErrors||(f.errors={}),D.state.next({submitCount:P.keepSubmitCount?f.submitCount:0,isDirty:Me?!1:P.keepDirty?f.isDirty:!!(P.keepDefaultValues&&!es(U,p)),isSubmitted:P.keepIsSubmitted?f.isSubmitted:!1,dirtyFields:Me?{}:P.keepDirtyValues?P.keepDefaultValues&&v?kh(p,v):f.dirtyFields:P.keepDefaultValues&&U?kh(p,U):P.keepDirty?f.dirtyFields:{},touchedFields:P.keepTouched?f.touchedFields:{},errors:P.keepErrors?f.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?f.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:p})},Ka=(U,P)=>Ua(su(U)?U(v):U,{...o.resetOptions,...P}),Kt=(U,P={})=>{const de=We(h,U),ze=de&&de._f;if(ze){const Me=ze.refs?ze.refs[0]:ze.ref;Me.focus&&setTimeout(()=>{Me.focus(),P.shouldSelect&&su(Me.select)&&Me.select()})}},sa=U=>{f={...f,...U}},Iu={control:{register:st,unregister:Ve,getFieldState:M,handleSubmit:qe,setError:he,_subscribe:Ue,_runSchema:Ie,_updateIsValidating:ie,_focusError:dt,_getWatch:oe,_getDirty:R,_setValid:Z,_setFieldArray:re,_setDisabledField:Je,_setErrors:Ce,_getFieldArray:fe,_reset:Ua,_resetDefaultValues:()=>su(o.defaultValues)&&o.defaultValues().then(U=>{Ka(U,o.resetOptions),D.state.next({isLoading:!1})}),_removeUnmounted:we,_disableForm:Ne,_subjects:D,_proxyFormState:j,get _fields(){return h},get _formValues(){return v},get _state(){return S},set _state(U){S=U},get _defaultValues(){return p},get _names(){return E},set _names(U){E=U},get _formState(){return f},get _options(){return o},set _options(U){o={...o,...U}}},subscribe:Le,trigger:Xe,register:st,handleSubmit:qe,watch:me,setValue:J,getValues:z,reset:Ka,resetField:_n,clearErrors:te,unregister:Ve,setError:he,setFocus:Kt,getFieldState:M};return{...Iu,formControl:Iu}}function W3(u={}){const o=ga.useRef(void 0),f=ga.useRef(void 0),[h,p]=ga.useState({isDirty:!1,isValidating:!1,isLoading:su(u.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:u.errors||{},disabled:u.disabled||!1,isReady:!1,defaultValues:su(u.defaultValues)?void 0:u.defaultValues});if(!o.current)if(u.formControl)o.current={...u.formControl,formState:h},u.defaultValues&&!su(u.defaultValues)&&u.formControl.reset(u.defaultValues,u.resetOptions);else{const{formControl:S,...E}=F3(u);o.current={...E,formState:h}}const v=o.current.control;return v._options=u,N3(()=>{const S=v._subscribe({formState:v._proxyFormState,callback:()=>p({...v._formState}),reRenderRoot:!0});return p(E=>({...E,isReady:!0})),v._formState.isReady=!0,S},[v]),ga.useEffect(()=>v._disableForm(u.disabled),[v,u.disabled]),ga.useEffect(()=>{u.mode&&(v._options.mode=u.mode),u.reValidateMode&&(v._options.reValidateMode=u.reValidateMode)},[v,u.mode,u.reValidateMode]),ga.useEffect(()=>{u.errors&&(v._setErrors(u.errors),v._focusError())},[v,u.errors]),ga.useEffect(()=>{u.shouldUnregister&&v._subjects.state.next({values:v._getWatch()})},[v,u.shouldUnregister]),ga.useEffect(()=>{if(v._proxyFormState.isDirty){const S=v._getDirty();S!==h.isDirty&&v._subjects.state.next({isDirty:S})}},[v,h.isDirty]),ga.useEffect(()=>{var S;u.values&&!es(u.values,f.current)?(v._reset(u.values,{keepFieldsRef:!0,...v._options.resetOptions}),!((S=v._options.resetOptions)===null||S===void 0)&&S.keepIsValid||v._setValid(),f.current=u.values,p(E=>({...E}))):v._resetDefaultValues()},[v,u.values]),ga.useEffect(()=>{v._state.mount||(v._setValid(),v._state.mount=!0),v._state.watch&&(v._state.watch=!1,v._subjects.state.next({...v._formState})),v._removeUnmounted()}),o.current.formState=ga.useMemo(()=>U3(h,v),[v,h]),o.current}const Mx=(u,o,f)=>{if(u&&"reportValidity"in u){const h=We(f,o);u.setCustomValidity(h&&h.message||""),u.reportValidity()}},o_=(u,o)=>{for(const f in o.fields){const h=o.fields[f];h&&h.ref&&"reportValidity"in h.ref?Mx(h.ref,f,u):h&&h.refs&&h.refs.forEach(p=>Mx(p,f,u))}},Ux=(u,o)=>{o.shouldUseNativeValidation&&o_(u,o);const f={};for(const h in u){const p=We(o.fields,h),v=Object.assign(u[h]||{},{ref:p&&p.ref});if(I3(o.names||Object.keys(u),h)){const S=Object.assign({},We(f,h));On(S,"root",v),On(f,h,S)}else On(f,h,v)}return f},I3=(u,o)=>{const f=Nx(o);return u.some(h=>Nx(h).match(`^${f}\\.\\d+`))};function Nx(u){return u.replace(/\]|\[/g,"")}function jx(u,o,f){function h(E,x){var w;Object.defineProperty(E,"_zod",{value:E._zod??{},enumerable:!1}),(w=E._zod).traits??(w.traits=new Set),E._zod.traits.add(u),o(E,x);for(const B in S.prototype)B in E||Object.defineProperty(E,B,{value:S.prototype[B].bind(E)});E._zod.constr=S,E._zod.def=x}const p=f?.Parent??Object;class v extends p{}Object.defineProperty(v,"name",{value:u});function S(E){var x;const w=f?.Parent?new v:this;h(w,E),(x=w._zod).deferred??(x.deferred=[]);for(const B of w._zod.deferred)B();return w}return Object.defineProperty(S,"init",{value:h}),Object.defineProperty(S,Symbol.hasInstance,{value:E=>f?.Parent&&E instanceof f.Parent?!0:E?._zod?.traits?.has(u)}),Object.defineProperty(S,"name",{value:u}),S}class P3 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const e4={};function Bx(u){return e4}function t4(u,o){return typeof o=="bigint"?o.toString():o}const Hx=Error.captureStackTrace?Error.captureStackTrace:(...u)=>{};function Pv(u){return typeof u=="string"?u:u?.message}function kx(u,o,f){const h={...u,path:u.path??[]};if(!u.message){const p=Pv(u.inst?._zod.def?.error?.(u))??Pv(o?.error?.(u))??Pv(f.customError?.(u))??Pv(f.localeError?.(u))??"Invalid input";h.message=p}return delete h.inst,delete h.continue,o?.reportInput||delete h.input,h}const Vx=(u,o)=>{u.name="$ZodError",Object.defineProperty(u,"_zod",{value:u._zod,enumerable:!1}),Object.defineProperty(u,"issues",{value:o,enumerable:!1}),Object.defineProperty(u,"message",{get(){return JSON.stringify(o,t4,2)},enumerable:!0}),Object.defineProperty(u,"toString",{value:()=>u.message,enumerable:!1})},n4=jx("$ZodError",Vx),qx=jx("$ZodError",Vx,{Parent:Error}),a4=(u=>(o,f,h,p)=>{const v=h?Object.assign(h,{async:!1}):{async:!1},S=o._zod.run({value:f,issues:[]},v);if(S instanceof Promise)throw new P3;if(S.issues.length){const E=new(p?.Err??u)(S.issues.map(x=>kx(x,v,Bx())));throw Hx(E,p?.callee),E}return S.value})(qx),l4=(u=>async(o,f,h,p)=>{const v=h?Object.assign(h,{async:!0}):{async:!0};let S=o._zod.run({value:f,issues:[]},v);if(S instanceof Promise&&(S=await S),S.issues.length){const E=new(p?.Err??u)(S.issues.map(x=>kx(x,v,Bx())));throw Hx(E,p?.callee),E}return S.value})(qx);function Lx(u,o){try{var f=u()}catch(h){return o(h)}return f&&f.then?f.then(void 0,o):f}function i4(u,o){for(var f={};u.length;){var h=u[0],p=h.code,v=h.message,S=h.path.join(".");if(!f[S])if("unionErrors"in h){var E=h.unionErrors[0].errors[0];f[S]={message:E.message,type:E.code}}else f[S]={message:v,type:p};if("unionErrors"in h&&h.unionErrors.forEach(function(B){return B.errors.forEach(function(j){return u.push(j)})}),o){var x=f[S].types,w=x&&x[h.code];f[S]=a_(S,o,f,p,w?[].concat(w,h.message):h.message)}u.shift()}return f}function r4(u,o){for(var f={};u.length;){var h=u[0],p=h.code,v=h.message,S=h.path.join(".");if(!f[S])if(h.code==="invalid_union"&&h.errors.length>0){var E=h.errors[0][0];f[S]={message:E.message,type:E.code}}else f[S]={message:v,type:p};if(h.code==="invalid_union"&&h.errors.forEach(function(B){return B.forEach(function(j){return u.push(j)})}),o){var x=f[S].types,w=x&&x[h.code];f[S]=a_(S,o,f,p,w?[].concat(w,h.message):h.message)}u.shift()}return f}function u4(u,o,f){if(f===void 0&&(f={}),(function(h){return"_def"in h&&typeof h._def=="object"&&"typeName"in h._def})(u))return function(h,p,v){try{return Promise.resolve(Lx(function(){return Promise.resolve(u[f.mode==="sync"?"parse":"parseAsync"](h,o)).then(function(S){return v.shouldUseNativeValidation&&o_({},v),{errors:{},values:f.raw?Object.assign({},h):S}})},function(S){if((function(E){return Array.isArray(E?.issues)})(S))return{values:{},errors:Ux(i4(S.errors,!v.shouldUseNativeValidation&&v.criteriaMode==="all"),v)};throw S}))}catch(S){return Promise.reject(S)}};if((function(h){return"_zod"in h&&typeof h._zod=="object"})(u))return function(h,p,v){try{return Promise.resolve(Lx(function(){return Promise.resolve((f.mode==="sync"?a4:l4)(u,h,o)).then(function(S){return v.shouldUseNativeValidation&&o_({},v),{errors:{},values:f.raw?Object.assign({},h):S}})},function(S){if((function(E){return E instanceof n4})(S))return{values:{},errors:Ux(r4(S.issues,!v.shouldUseNativeValidation&&v.criteriaMode==="all"),v)};throw S}))}catch(S){return Promise.reject(S)}};throw new Error("Invalid input: not a Zod schema")}const o4=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c4=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,f,h)=>h?h.toUpperCase():f.toLowerCase()),Yx=u=>{const o=c4(u);return o.charAt(0).toUpperCase()+o.slice(1)},Gx=(...u)=>u.filter((o,f,h)=>!!o&&o.trim()!==""&&h.indexOf(o)===f).join(" ").trim(),s4=u=>{for(const o in u)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};var f4={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const d4=vt.forwardRef(({color:u="currentColor",size:o=24,strokeWidth:f=2,absoluteStrokeWidth:h,className:p="",children:v,iconNode:S,...E},x)=>vt.createElement("svg",{ref:x,...f4,width:o,height:o,stroke:u,strokeWidth:h?Number(f)*24/Number(o):f,className:Gx("lucide",p),...!v&&!s4(E)&&{"aria-hidden":"true"},...E},[...S.map(([w,B])=>vt.createElement(w,B)),...Array.isArray(v)?v:[v]]));const Zx=(u,o)=>{const f=vt.forwardRef(({className:h,...p},v)=>vt.createElement(d4,{ref:v,iconNode:o,className:Gx(`lucide-${o4(Yx(u))}`,`lucide-${u}`,h),...p}));return f.displayName=Yx(u),f};const c_=Zx("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const h4=Zx("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function eb(u){for(var o=1;o<arguments.length;o++){var f=arguments[o];for(var h in f)u[h]=f[h]}return u}var m4={read:function(u){return u[0]==='"'&&(u=u.slice(1,-1)),u.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(u){return encodeURIComponent(u).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function s_(u,o){function f(p,v,S){if(!(typeof document>"u")){S=eb({},o,S),typeof S.expires=="number"&&(S.expires=new Date(Date.now()+S.expires*864e5)),S.expires&&(S.expires=S.expires.toUTCString()),p=encodeURIComponent(p).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var E="";for(var x in S)S[x]&&(E+="; "+x,S[x]!==!0&&(E+="="+S[x].split(";")[0]));return document.cookie=p+"="+u.write(v,p)+E}}function h(p){if(!(typeof document>"u"||arguments.length&&!p)){for(var v=document.cookie?document.cookie.split("; "):[],S={},E=0;E<v.length;E++){var x=v[E].split("="),w=x.slice(1).join("=");try{var B=decodeURIComponent(x[0]);if(S[B]=u.read(w,B),p===B)break}catch{}}return p?S[p]:S}}return Object.create({set:f,get:h,remove:function(p,v){f(p,"",eb({},v,{expires:-1}))},withAttributes:function(p){return s_(this.converter,eb({},this.attributes,p))},withConverter:function(p){return s_(eb({},this.converter,p),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(u)}})}var qh=s_(m4,{path:"/"});const Xx=async({document:u,products:o})=>{const f="https://pbm.santoremedio.adsolucoes.com.br/api/v1",h=qh.get("pbm-token");if(!h)throw new Error("Token is not defined in cookies or is expired");const v=await(await fetch(`${f}/products/benefitByDocument`,{method:"POST",headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"},body:JSON.stringify({consumer:{document:u},products:o})})).json();if(!v.success)throw new Error(v.message||"Failed to fetch document validation");return v};function xf(u){return Ee.jsx("button",{...u,className:Hi("w-3xs cursor-pointer h-10 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-white text-sm font-semibold transition-colors",u.className),children:u.children})}function p4({setLoading:u}){const{setSecurityNumber:o,setState:f,securityNumber:h,targetProduct:p,setUrlAcceptTerms:v,setUrlRegisterIndustry:S,setCardID:E}=Xu(),[x,w]=vt.useState(!1),{handleSubmit:B,register:j,setValue:N,clearErrors:D,unregister:L,formState:{errors:Y}}=W3({resolver:u4(w3),mode:"onSubmit",defaultValues:{securityNumber:h||"",coupon:""}}),Z=async ie=>{x||N("coupon",void 0,{shouldValidate:!1}),x&&ie.coupon!=null&&E(ie.coupon),u(!0);try{if(p===null){console.error("PBMLOG: Product is not defined!");return}if(!p.productId){console.error("PBMLOG: Product ID is not defined!");return}if(!p.listPrice){console.error("PBMLOG: List Price is not defined!");return}const re=await Xx({document:ie.securityNumber.replace(/\D/g,""),products:[{productId:p.productId,ean:p.ean,requestedQuantity:1,listPrice:p.listPrice,netPrice:p.netPrice??p.listPrice}]});if(re.success){const Oe={acceptance:"isInvalid","industry registration":"isRegistered",active:"isActivated"};if(o(ie.securityNumber),f(Oe[re.data.product[0].statusCustomer]),Oe[re.data.product[0].statusCustomer]==="isInvalid"){v(re.data.product[0].urlAcceptTerm||void 0);return}if(Oe[re.data.product[0].statusCustomer]==="isRegistered"){S(re.data.product[0].informativeLink);return}}}catch(re){console.error("PBMLOG: Error validating document -",re)}finally{u(!1)}};return Ee.jsxs(Ee.Fragment,{children:[Ee.jsxs("form",{onSubmit:B(Z),className:Hi("w-full h-auto flex items-center justify-center mb-0 transition-all duration-150",{"mb-4":Y.securityNumber||Y.coupon&&x,"gap-2":x}),id:"form_security_number_pbm",children:[Ee.jsxs("label",{htmlFor:"cpf",className:"w-4/5 h-auto flex items-start flex-col justify-center relative py-2",id:"label_security_number_pbm",children:[Ee.jsx("input",{type:"text",className:Hi("w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",{"outline outline-red-600":Y.securityNumber,"rounded-lg":x}),placeholder:"Digite seu CPF aqui...",required:!0,maxLength:14,...j("securityNumber",{onChange:ie=>{const re=O3(ie.target.value);N("securityNumber",re,{shouldValidate:!0})}}),defaultValue:h||"",id:"input_security_number_pbm"}),Y.securityNumber&&Ee.jsx("span",{className:"text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap",id:"security_number_form_error",children:Y.securityNumber.message})]}),x&&Ee.jsxs("label",{htmlFor:"coupon",className:"w-4/5 h-auto flex items-start flex-col justify-center relative py-2",id:"label_coupon_pbm",children:[Ee.jsx("input",{type:"text",className:Hi("w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",{"outline outline-red-600":Y.coupon,"rounded-lg":x}),placeholder:"Cupom / ID do Cartão",...j("coupon",{required:x?"Cupom / ID do Cartão obrigatório.":!1,shouldUnregister:!x,onChange:ie=>{N("coupon",ie.target.value,{shouldValidate:x})}}),id:"input_coupon_pbm"}),Y.coupon&&Ee.jsx("span",{className:"text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap",id:"coupon_form_error",children:Y.coupon.message})]}),Ee.jsx("button",{type:"submit",className:Hi("bg-emerald-500 w-1/5 h-10 rounded-e-lg flex items-center justify-center cursor-pointer",{"rounded-lg":x}),id:"button_submit_security_number_pbm",children:Ee.jsx(c_,{size:24,color:"white",strokeWidth:2})})]}),Ee.jsxs("section",{className:"flex items-center-safe justify-between",children:[Ee.jsxs(xf,{className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",onClick:()=>{const ie=!x;w(ie),ie||(L("coupon"),D("coupon"))},id:"check_benefits_button",children:[Ee.jsx("span",{children:x?"Não possui Cupom / ID do Cartão??":"Possui Cupom / ID do Cartão?"}),Ee.jsx(c_,{size:16,className:Hi({"rotate-0":!x,"rotate-180":x})})]}),Ee.jsxs(xf,{className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",onClick:()=>f("isPreview"),id:"check_benefits_button",children:[Ee.jsx("span",{children:"Consultar Benefícios"}),Ee.jsx(c_,{size:16})]})]})]})}function y4({textColor:u}){return Ee.jsxs("main",{className:"flex items-center justify-center gap-4",id:"loading_pbm",children:[Ee.jsx("div",{"data-testid":"test_id_spin",className:"w-8 h-8 border-4 border-t-gray-700 border-gray-300 rounded-full animate-spin",id:"loading_spin"}),Ee.jsx("p",{className:"text-sm font-semibold text-start text-zinc-900",style:{color:u},id:"loading_label",children:"Um momento... estamos verificando seus dados."})]})}function My(u){return Ee.jsx("h2",{className:Hi("text-start font-semibold text-sm text-zinc-900",u.className),style:{color:u.textColor,fontSize:u.textSize,textAlign:u.textAlign},"data-testid":"test_id_title",id:"title_pbm",children:u.children})}const g4={modal:{id:"",open:!1}},$x=$C(u=>({...g4,setModal:o=>u({modal:o})}));function v4({size:u}){return Ee.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Camada 1",viewBox:"0 0 500 500",width:u,height:u,children:Ee.jsx("path",{d:"M421.44 78.56C375.64 32.77 314.76 7.55 250 7.55S124.36 32.77 78.56 78.56C32.77 124.36 7.55 185.24 7.55 250s25.22 125.64 71.01 171.44c45.8 45.79 106.68 71.01 171.44 71.01s125.64-25.22 171.44-71.01c45.79-45.8 71.01-106.68 71.01-171.44s-25.22-125.64-71.01-171.44zm-49.17 121.7L242.88 334.63c-8.98 9.29-23.57 10.17-33.59 2.02l-79.63-64.7c-10.69-8.67-12.33-24.38-3.66-35.07 8.67-10.69 24.38-12.33 35.07-3.65l61.9 50.39L336.5 165.74c4.4-4.75 10.48-7.59 16.95-7.93a24.88 24.88 0 0118.83 7.26c9.72 9.72 9.71 25.48 0 35.19z",fill:"#229b00"})})}function b4({size:u}){return Ee.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Camada 1",viewBox:"0 0 500 500",width:u,height:u,children:[Ee.jsx("circle",{cx:250,cy:250,r:237.45,fill:"#fff"}),Ee.jsx("path",{d:"M250 492.45c-64.76 0-125.64-25.22-171.44-71.01C32.77 375.64 7.55 314.76 7.55 250S32.77 124.36 78.56 78.56C124.36 32.77 185.24 7.55 250 7.55s125.64 25.22 171.44 71.01c45.79 45.79 71.01 106.68 71.01 171.44s-25.22 125.64-71.01 171.44c-45.79 45.79-106.68 71.01-171.44 71.01zm0-474.9C121.83 17.55 17.55 121.83 17.55 250S121.83 482.45 250 482.45 482.45 378.17 482.45 250 378.17 17.55 250 17.55z",fill:"#d8d8d8"})]})}const Qx={CheckON:v4,CheckOFF:b4};function S4({data:u,onChange:o,checked:f}){const{setAvailableDiscountSelected:h,state:p,isAuthenticatedShopper:v}=Xu(),{setModal:S}=$x(),[E,x]=vt.useState(!1),w="unity_quantity_"+u.authorizedQuantity,B=u.discountPercentual/100,j=u.grossPrice*B,N=j*u.authorizedQuantity,D=u.grossPrice*u.authorizedQuantity-N,L=vt.useCallback(()=>{if(f){const Z=ie=>Math.round(ie*100)/100;h({discount:{total:Z(N),unit:Z(j)},quantity:u.authorizedQuantity,totalPrice:Z(D),grossPrice:u.grossPrice})}},[f,u.authorizedQuantity,h,N,D,j]);vt.useEffect(()=>{L()},[L]);const Y=()=>{v||S({id:"ShopperIsNotAuthenticated",open:!0})};return Ee.jsxs("label",{htmlFor:w,className:Hi("label_benefits w-full flex items-center justify-start bg-zinc-300/60 border border-zinc-400/50 px-4 py-2 hover:bg-zinc-300 transition-colors rounded-lg gap-1",{"cursor-not-allowed":p==="isPreview","cursor-pointer":p==="isActivated"}),id:"label_benefits_"+w,onClick:Y,children:[Ee.jsx("input",{type:"radio",name:"benefits_discount",id:w,className:"hidden",checked:f,onChange:o,disabled:p==="isPreview"}),f?Ee.jsx(Qx.CheckON,{size:20}):Ee.jsx(Qx.CheckOFF,{size:20}),Ee.jsxs("span",{className:"text-zinc-900 font-semibold text-sm",children:[u.authorizedQuantity,"un"]}),Ee.jsxs("section",{className:"ml-auto relative gap-2 flex items-center-safe justify-end-safe",children:[Ee.jsxs("span",{className:"text-white -top-4 py-0.5 font-semibold text-xs bg-[#32b316] px-2 w-auto text-nowrap rounded-2xl -right-3",children:[N.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})," ","OFF"]}),Ee.jsx("strong",{className:"text-zinc-900 font-semibold text-sm text-center",children:D.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})})]})]})}const _4=async({products:u})=>{const o="https://pbm.santoremedio.adsolucoes.com.br/api/v1",f=qh.get("pbm-token");if(!f)throw new Error("Token is not defined in cookies or is expired");const p=await(await fetch(`${o}/products/genericBenefit`,{method:"POST",headers:{Authorization:`Bearer ${f}`,"Content-Type":"application/json"},body:JSON.stringify({products:u})})).json();if(!p.success)throw new Error(p.message||"Failed to fetch benefits without document");return p};function Jx(){const{securityNumber:u,setState:o,state:f,targetProduct:h,customLoginUrl:p,isAuthenticatedShopper:v}=Xu(),[S,E]=vt.useState(null),[x,w]=vt.useState(!0),[B,j]=vt.useState();return vt.useEffect(()=>{f==="isActivated"?(async()=>{if(!u){console.error("PBMLOG: Document is not defined");return}if(!h?.productId){console.error("PBMLOG: Product ID is not defined on targetProduct");return}if(!h.ean){console.error("PBMLOG: EAN is not defined on targetProduct");return}if(!h.listPrice){console.error("PBMLOG: List Price is not defined on targetProduct");return}if(!h.price){console.error("PBMLOG: Price is not defined on targetProduct");return}try{const L={productId:Number(h.productId),ean:h.ean,requestedQuantity:1,listPrice:h.listPrice,netPrice:h.price},Y=await Xx({document:u,products:[L]});Y.success&&Y.data?j(Y.data.product):j(void 0)}catch(L){j(void 0),console.error(L)}finally{w(!1)}})():(async()=>{if(!h?.productId){console.error("PBMLOG: Product ID is not defined on targetProduct");return}if(!h.ean){console.error("PBMLOG: EAN is not defined on targetProduct");return}if(!h.listPrice){console.error("PBMLOG: List Price is not defined on targetProduct");return}if(!h.price){console.error("PBMLOG: Price is not defined on targetProduct");return}try{const L={productId:Number(h.productId),ean:h.ean,requestedQuantity:1,listPrice:h.listPrice,netPrice:h.price},Y=await _4({products:[L]});Y.success&&Y.data?j(Y.data):j(void 0)}catch(L){j(void 0),console.error(L)}finally{w(!1)}})()},[]),x?Ee.jsxs("main",{className:"flex items-center justify-center gap-4",id:"loading_pbm",children:[Ee.jsx("div",{"data-testid":"test_id_spin",className:"w-8 h-8 border-4 border-t-gray-700 border-gray-300 rounded-full animate-spin",id:"loading_spin"}),Ee.jsx("p",{className:"text-sm font-semibold text-start text-zinc-900",id:"loading_label",children:"Buscando beneficios disponíveis..."})]}):Ee.jsxs("section",{className:"flex items-start justify-center gap-4 w-full h-auto flex-col",id:"benefits_table_pbm",children:[Ee.jsx(My,{children:"Descontos disponíveis:"}),Ee.jsxs("form",{className:"flex flex-col items-center justify-start w-full gap-4.5",id:"form_benefits_table_pbm",children:[!B&&Ee.jsx("p",{className:"text-sm font-semibold text-start text-zinc-900",id:"benefits_empty_pbm",children:"Não foi possível encontrar benefícios para esse produto."}),B&&B.map((N,D)=>{const L="unity_quantity_"+N.authorizedQuantity;return Ee.jsx(S4,{data:N,checked:S===L,onChange:()=>E(L)},D)})]}),f==="isPreview"&&Ee.jsxs(xf,{onClick:()=>o("isEmpty"),className:"bg-transparent p-0 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",id:"unauthorized_benefits_button",children:["Atenção: Não é possível utilizar os benefícos sem realizar a consulta do CPF e o Login, por favor"," ",Ee.jsx("span",{className:"underline",children:"insira seu cpf para utilizar os benefícios"})]}),f==="isActivated"&&Ee.jsxs(Ee.Fragment,{children:[!v&&Ee.jsx(xf,{onClick:()=>window.location.href=p||"/login",className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",id:"login",children:Ee.jsx("span",{className:"underline",children:"Por favor, faça o Login para aproveitar os benefícios!"})}),Ee.jsx(xf,{onClick:()=>o("isEmpty"),className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",id:"change_security_number",children:Ee.jsx("span",{className:"underline",children:"Deseja editar o cpf digitado?"})})]})]})}function tb(u){return Ee.jsx("p",{className:Hi("font-normal text-sm text-zinc-900",u.textAlign&&`text-${u.textAlign}`,u.className),style:{color:u.textColor,fontSize:u.textSize,textAlign:u.textAlign},"data-testid":"test_id_text",id:"text_pbm",children:u.children})}const E4=u=>u===void 0?"":"?"+Object.keys(u).map(o=>o+"="+u[o]).join("&");function f_(u){const{setState:o}=Xu();return Ee.jsx("a",{...u,target:"_blank",href:typeof u.href=="string"?u.href:u.href.pathname+E4(u.href.param),className:Hi("w-3xs cursor-pointer h-10 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-white text-sm font-semibold transition-colors flex items-center justify-center",u.className),"data-testid":"test_id_link",id:"link_pbm",onClick:()=>o("isEmpty"),children:u.children})}function T4({textColor:u}){const{urlAcceptTerms:o}=Xu();return Ee.jsxs("section",{"data-testid":"test_id_invalid",className:"flex items-end justify-center gap-2 w-full h-auto flex-col border-y border-zinc-300 py-6",id:"security_number_invalid_container_pbm",children:[Ee.jsx(My,{className:"w-full",textColor:u,children:"CPF não cadastrado."}),Ee.jsxs(tb,{className:"w-full",textColor:u,children:["Conclua seu cadastro para habilitar o benefício. ",Ee.jsx("br",{}),"Ao clicar em “Aceitar os termos”, você irá para uma página externa. Aceite os termos e volte para continuar."]}),Ee.jsx(f_,{href:o||"",children:"Aceitar os termos"})]})}function x4({textColor:u}){const{urlRegisterIndustry:o}=Xu();return Ee.jsxs("section",{"data-testid":"test_id_registered",className:"flex items-end justify-center gap-2 w-full h-auto flex-col border-y border-zinc-300 py-6",id:"security_number_registered_container_pbm",children:[Ee.jsx(My,{className:"w-full",textColor:u,children:"Ops, seu CPF ainda não está habilitado para este produto."}),Ee.jsx(tb,{className:"w-full",textColor:u,children:"Para ativar o benefício, clique em “Ativar CPF” e conclua a etapa na página externa. Depois, é só voltar para continuar — vamos aguardar você aqui."}),Ee.jsx(f_,{href:o||"",children:"Ativar CPF"})]})}const A4=async({clientID:u})=>{const f=await(await fetch("https://pbm-auth-serverless.vercel.app/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({clientId:u})})).json();if(!f.success)throw new Error("Authorization failed");return qh.set("pbm-token",f.tokens.token,{secure:!0,sameSite:"Strict"}),qh.set("pbm-token-refresh",f.tokens.refreshToken,{secure:!0,sameSite:"Strict"}),f},w4=async({PRODUCT_EAN:u})=>{const o="https://pbm.santoremedio.adsolucoes.com.br/api/v1",f=qh.get("pbm-token");if(!f)throw new Error("Token is not defined in cookies or is expired");const p=await(await fetch(`${o}/products/ean/${u}`,{method:"GET",headers:{Authorization:`Bearer ${f}`,"Content-Type":"application/json"}})).json();if(!p.success)throw new Error(p.message||"Failed to fetch authorization");return p};function Kx(u){var o,f,h="";if(typeof u=="string"||typeof u=="number")h+=u;else if(typeof u=="object")if(Array.isArray(u)){var p=u.length;for(o=0;o<p;o++)u[o]&&(f=Kx(u[o]))&&(h&&(h+=" "),h+=f)}else for(f in u)u[f]&&(h&&(h+=" "),h+=f);return h}function Fx(){for(var u,o,f=0,h="",p=arguments.length;f<p;f++)(u=arguments[f])&&(o=Kx(u))&&(h&&(h+=" "),h+=o);return h}var nb={exports:{}},ab={exports:{}},fn={};var Wx;function O4(){if(Wx)return fn;Wx=1;var u=typeof Symbol=="function"&&Symbol.for,o=u?Symbol.for("react.element"):60103,f=u?Symbol.for("react.portal"):60106,h=u?Symbol.for("react.fragment"):60107,p=u?Symbol.for("react.strict_mode"):60108,v=u?Symbol.for("react.profiler"):60114,S=u?Symbol.for("react.provider"):60109,E=u?Symbol.for("react.context"):60110,x=u?Symbol.for("react.async_mode"):60111,w=u?Symbol.for("react.concurrent_mode"):60111,B=u?Symbol.for("react.forward_ref"):60112,j=u?Symbol.for("react.suspense"):60113,N=u?Symbol.for("react.suspense_list"):60120,D=u?Symbol.for("react.memo"):60115,L=u?Symbol.for("react.lazy"):60116,Y=u?Symbol.for("react.block"):60121,Z=u?Symbol.for("react.fundamental"):60117,ie=u?Symbol.for("react.responder"):60118,re=u?Symbol.for("react.scope"):60119;function Oe(I){if(typeof I=="object"&&I!==null){var Se=I.$$typeof;switch(Se){case o:switch(I=I.type,I){case x:case w:case h:case v:case p:case j:return I;default:switch(I=I&&I.$$typeof,I){case E:case B:case L:case D:case S:return I;default:return Se}}case f:return Se}}}function Ce(I){return Oe(I)===w}return fn.AsyncMode=x,fn.ConcurrentMode=w,fn.ContextConsumer=E,fn.ContextProvider=S,fn.Element=o,fn.ForwardRef=B,fn.Fragment=h,fn.Lazy=L,fn.Memo=D,fn.Portal=f,fn.Profiler=v,fn.StrictMode=p,fn.Suspense=j,fn.isAsyncMode=function(I){return Ce(I)||Oe(I)===x},fn.isConcurrentMode=Ce,fn.isContextConsumer=function(I){return Oe(I)===E},fn.isContextProvider=function(I){return Oe(I)===S},fn.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===o},fn.isForwardRef=function(I){return Oe(I)===B},fn.isFragment=function(I){return Oe(I)===h},fn.isLazy=function(I){return Oe(I)===L},fn.isMemo=function(I){return Oe(I)===D},fn.isPortal=function(I){return Oe(I)===f},fn.isProfiler=function(I){return Oe(I)===v},fn.isStrictMode=function(I){return Oe(I)===p},fn.isSuspense=function(I){return Oe(I)===j},fn.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===h||I===w||I===v||I===p||I===j||I===N||typeof I=="object"&&I!==null&&(I.$$typeof===L||I.$$typeof===D||I.$$typeof===S||I.$$typeof===E||I.$$typeof===B||I.$$typeof===Z||I.$$typeof===ie||I.$$typeof===re||I.$$typeof===Y)},fn.typeOf=Oe,fn}var dn={},Ix;function C4(){if(Ix)return dn;Ix=1;var u={};return u.NODE_ENV!=="production"&&(function(){var o=typeof Symbol=="function"&&Symbol.for,f=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,p=o?Symbol.for("react.fragment"):60107,v=o?Symbol.for("react.strict_mode"):60108,S=o?Symbol.for("react.profiler"):60114,E=o?Symbol.for("react.provider"):60109,x=o?Symbol.for("react.context"):60110,w=o?Symbol.for("react.async_mode"):60111,B=o?Symbol.for("react.concurrent_mode"):60111,j=o?Symbol.for("react.forward_ref"):60112,N=o?Symbol.for("react.suspense"):60113,D=o?Symbol.for("react.suspense_list"):60120,L=o?Symbol.for("react.memo"):60115,Y=o?Symbol.for("react.lazy"):60116,Z=o?Symbol.for("react.block"):60121,ie=o?Symbol.for("react.fundamental"):60117,re=o?Symbol.for("react.responder"):60118,Oe=o?Symbol.for("react.scope"):60119;function Ce(qe){return typeof qe=="string"||typeof qe=="function"||qe===p||qe===B||qe===S||qe===v||qe===N||qe===D||typeof qe=="object"&&qe!==null&&(qe.$$typeof===Y||qe.$$typeof===L||qe.$$typeof===E||qe.$$typeof===x||qe.$$typeof===j||qe.$$typeof===ie||qe.$$typeof===re||qe.$$typeof===Oe||qe.$$typeof===Z)}function I(qe){if(typeof qe=="object"&&qe!==null){var _n=qe.$$typeof;switch(_n){case f:var Ua=qe.type;switch(Ua){case w:case B:case p:case S:case v:case N:return Ua;default:var Ka=Ua&&Ua.$$typeof;switch(Ka){case x:case j:case Y:case L:case E:return Ka;default:return _n}}case h:return _n}}}var Se=w,Te=B,Ie=x,Ge=E,nt=f,we=j,R=p,oe=Y,fe=L,De=h,W=S,J=v,be=N,je=!1;function Xe(qe){return je||(je=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(qe)||I(qe)===w}function z(qe){return I(qe)===B}function M(qe){return I(qe)===x}function te(qe){return I(qe)===E}function he(qe){return typeof qe=="object"&&qe!==null&&qe.$$typeof===f}function me(qe){return I(qe)===j}function Ue(qe){return I(qe)===p}function Le(qe){return I(qe)===Y}function Ve(qe){return I(qe)===L}function Je(qe){return I(qe)===h}function st(qe){return I(qe)===S}function dt(qe){return I(qe)===v}function Ne(qe){return I(qe)===N}dn.AsyncMode=Se,dn.ConcurrentMode=Te,dn.ContextConsumer=Ie,dn.ContextProvider=Ge,dn.Element=nt,dn.ForwardRef=we,dn.Fragment=R,dn.Lazy=oe,dn.Memo=fe,dn.Portal=De,dn.Profiler=W,dn.StrictMode=J,dn.Suspense=be,dn.isAsyncMode=Xe,dn.isConcurrentMode=z,dn.isContextConsumer=M,dn.isContextProvider=te,dn.isElement=he,dn.isForwardRef=me,dn.isFragment=Ue,dn.isLazy=Le,dn.isMemo=Ve,dn.isPortal=Je,dn.isProfiler=st,dn.isStrictMode=dt,dn.isSuspense=Ne,dn.isValidElementType=Ce,dn.typeOf=I})(),dn}var Px;function d_(){if(Px)return ab.exports;Px=1;var u={};return u.NODE_ENV==="production"?ab.exports=O4():ab.exports=C4(),ab.exports}var h_,eA;function R4(){if(eA)return h_;eA=1;var u=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;function h(v){if(v==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(v)}function p(){try{if(!Object.assign)return!1;var v=new String("abc");if(v[5]="de",Object.getOwnPropertyNames(v)[0]==="5")return!1;for(var S={},E=0;E<10;E++)S["_"+String.fromCharCode(E)]=E;var x=Object.getOwnPropertyNames(S).map(function(B){return S[B]});if(x.join("")!=="0123456789")return!1;var w={};return"abcdefghijklmnopqrst".split("").forEach(function(B){w[B]=B}),Object.keys(Object.assign({},w)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return h_=p()?Object.assign:function(v,S){for(var E,x=h(v),w,B=1;B<arguments.length;B++){E=Object(arguments[B]);for(var j in E)o.call(E,j)&&(x[j]=E[j]);if(u){w=u(E);for(var N=0;N<w.length;N++)f.call(E,w[N])&&(x[w[N]]=E[w[N]])}}return x},h_}var m_,tA;function p_(){if(tA)return m_;tA=1;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return m_=u,m_}var y_,nA;function aA(){return nA||(nA=1,y_=Function.call.bind(Object.prototype.hasOwnProperty)),y_}var g_,lA;function z4(){if(lA)return g_;lA=1;var u={},o=function(){};if(u.NODE_ENV!=="production"){var f=p_(),h={},p=aA();o=function(S){var E="Warning: "+S;typeof console<"u"&&console.error(E);try{throw new Error(E)}catch{}}}function v(S,E,x,w,B){if(u.NODE_ENV!=="production"){for(var j in S)if(p(S,j)){var N;try{if(typeof S[j]!="function"){var D=Error((w||"React class")+": "+x+" type `"+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[j]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}N=S[j](E,j,w,x,null,f)}catch(Y){N=Y}if(N&&!(N instanceof Error)&&o((w||"React class")+": type specification of "+x+" `"+j+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof N+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),N instanceof Error&&!(N.message in h)){h[N.message]=!0;var L=B?B():"";o("Failed "+x+" type: "+N.message+(L??""))}}}}return v.resetWarningCache=function(){u.NODE_ENV!=="production"&&(h={})},g_=v,g_}var v_,iA;function D4(){if(iA)return v_;iA=1;var u={},o=d_(),f=R4(),h=p_(),p=aA(),v=z4(),S=function(){};u.NODE_ENV!=="production"&&(S=function(x){var w="Warning: "+x;typeof console<"u"&&console.error(w);try{throw new Error(w)}catch{}});function E(){return null}return v_=function(x,w){var B=typeof Symbol=="function"&&Symbol.iterator,j="@@iterator";function N(z){var M=z&&(B&&z[B]||z[j]);if(typeof M=="function")return M}var D="<<anonymous>>",L={array:re("array"),bigint:re("bigint"),bool:re("boolean"),func:re("function"),number:re("number"),object:re("object"),string:re("string"),symbol:re("symbol"),any:Oe(),arrayOf:Ce,element:I(),elementType:Se(),instanceOf:Te,node:we(),objectOf:Ge,oneOf:Ie,oneOfType:nt,shape:oe,exact:fe};function Y(z,M){return z===M?z!==0||1/z===1/M:z!==z&&M!==M}function Z(z,M){this.message=z,this.data=M&&typeof M=="object"?M:{},this.stack=""}Z.prototype=Error.prototype;function ie(z){if(u.NODE_ENV!=="production")var M={},te=0;function he(Ue,Le,Ve,Je,st,dt,Ne){if(Je=Je||D,dt=dt||Ve,Ne!==h){if(w){var qe=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw qe.name="Invariant Violation",qe}else if(u.NODE_ENV!=="production"&&typeof console<"u"){var _n=Je+":"+Ve;!M[_n]&&te<3&&(S("You are manually calling a React.PropTypes validation function for the `"+dt+"` prop on `"+Je+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[_n]=!0,te++)}}return Le[Ve]==null?Ue?Le[Ve]===null?new Z("The "+st+" `"+dt+"` is marked as required "+("in `"+Je+"`, but its value is `null`.")):new Z("The "+st+" `"+dt+"` is marked as required in "+("`"+Je+"`, but its value is `undefined`.")):null:z(Le,Ve,Je,st,dt)}var me=he.bind(null,!1);return me.isRequired=he.bind(null,!0),me}function re(z){function M(te,he,me,Ue,Le,Ve){var Je=te[he],st=J(Je);if(st!==z){var dt=be(Je);return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+dt+"` supplied to `"+me+"`, expected ")+("`"+z+"`."),{expectedType:z})}return null}return ie(M)}function Oe(){return ie(E)}function Ce(z){function M(te,he,me,Ue,Le){if(typeof z!="function")return new Z("Property `"+Le+"` of component `"+me+"` has invalid PropType notation inside arrayOf.");var Ve=te[he];if(!Array.isArray(Ve)){var Je=J(Ve);return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+Je+"` supplied to `"+me+"`, expected an array."))}for(var st=0;st<Ve.length;st++){var dt=z(Ve,st,me,Ue,Le+"["+st+"]",h);if(dt instanceof Error)return dt}return null}return ie(M)}function I(){function z(M,te,he,me,Ue){var Le=M[te];if(!x(Le)){var Ve=J(Le);return new Z("Invalid "+me+" `"+Ue+"` of type "+("`"+Ve+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return ie(z)}function Se(){function z(M,te,he,me,Ue){var Le=M[te];if(!o.isValidElementType(Le)){var Ve=J(Le);return new Z("Invalid "+me+" `"+Ue+"` of type "+("`"+Ve+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return ie(z)}function Te(z){function M(te,he,me,Ue,Le){if(!(te[he]instanceof z)){var Ve=z.name||D,Je=Xe(te[he]);return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+Je+"` supplied to `"+me+"`, expected ")+("instance of `"+Ve+"`."))}return null}return ie(M)}function Ie(z){if(!Array.isArray(z))return u.NODE_ENV!=="production"&&(arguments.length>1?S("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):S("Invalid argument supplied to oneOf, expected an array.")),E;function M(te,he,me,Ue,Le){for(var Ve=te[he],Je=0;Je<z.length;Je++)if(Y(Ve,z[Je]))return null;var st=JSON.stringify(z,function(Ne,qe){var _n=be(qe);return _n==="symbol"?String(qe):qe});return new Z("Invalid "+Ue+" `"+Le+"` of value `"+String(Ve)+"` "+("supplied to `"+me+"`, expected one of "+st+"."))}return ie(M)}function Ge(z){function M(te,he,me,Ue,Le){if(typeof z!="function")return new Z("Property `"+Le+"` of component `"+me+"` has invalid PropType notation inside objectOf.");var Ve=te[he],Je=J(Ve);if(Je!=="object")return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+Je+"` supplied to `"+me+"`, expected an object."));for(var st in Ve)if(p(Ve,st)){var dt=z(Ve,st,me,Ue,Le+"."+st,h);if(dt instanceof Error)return dt}return null}return ie(M)}function nt(z){if(!Array.isArray(z))return u.NODE_ENV!=="production"&&S("Invalid argument supplied to oneOfType, expected an instance of array."),E;for(var M=0;M<z.length;M++){var te=z[M];if(typeof te!="function")return S("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(te)+" at index "+M+"."),E}function he(me,Ue,Le,Ve,Je){for(var st=[],dt=0;dt<z.length;dt++){var Ne=z[dt],qe=Ne(me,Ue,Le,Ve,Je,h);if(qe==null)return null;qe.data&&p(qe.data,"expectedType")&&st.push(qe.data.expectedType)}var _n=st.length>0?", expected one of type ["+st.join(", ")+"]":"";return new Z("Invalid "+Ve+" `"+Je+"` supplied to "+("`"+Le+"`"+_n+"."))}return ie(he)}function we(){function z(M,te,he,me,Ue){return De(M[te])?null:new Z("Invalid "+me+" `"+Ue+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return ie(z)}function R(z,M,te,he,me){return new Z((z||"React class")+": "+M+" type `"+te+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+me+"`.")}function oe(z){function M(te,he,me,Ue,Le){var Ve=te[he],Je=J(Ve);if(Je!=="object")return new Z("Invalid "+Ue+" `"+Le+"` of type `"+Je+"` "+("supplied to `"+me+"`, expected `object`."));for(var st in z){var dt=z[st];if(typeof dt!="function")return R(me,Ue,Le,st,be(dt));var Ne=dt(Ve,st,me,Ue,Le+"."+st,h);if(Ne)return Ne}return null}return ie(M)}function fe(z){function M(te,he,me,Ue,Le){var Ve=te[he],Je=J(Ve);if(Je!=="object")return new Z("Invalid "+Ue+" `"+Le+"` of type `"+Je+"` "+("supplied to `"+me+"`, expected `object`."));var st=f({},te[he],z);for(var dt in st){var Ne=z[dt];if(p(z,dt)&&typeof Ne!="function")return R(me,Ue,Le,dt,be(Ne));if(!Ne)return new Z("Invalid "+Ue+" `"+Le+"` key `"+dt+"` supplied to `"+me+"`.\nBad object: "+JSON.stringify(te[he],null," ")+`
|
|
244
|
+
root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=M1(e,1,!1,null,null,a,r,null,s,d,g,H1),e[Ui]=t.current,Hd(e),new Jr(t)},Ty.hydrateRoot=function(e,t,a){if(!ie(e))throw Error("Target container is not a DOM element.");j0(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=!1,s="",d=jm,g=Rg,b=zg,T=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(T=a.formState)),t=M1(e,1,!0,t,a??null,r,s,T,d,g,b,H1),t.context=R0(null),a=t.current,r=La(a),r=Dn(r),s=Cr(r),s.callback=null,dl(a,s,r),Gi(r,"hydrateRoot()",null),a=r,t.current.lanes=a,Ut(t,a),gl(t),e[Ui]=t.current,Hd(e),new Id(t)},Ty.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),Ty}var qT;function YC(){if(qT)return Lv.exports;qT=1;var u={};function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(u.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(f){console.error(f)}}}return u.NODE_ENV==="production"?(o(),Lv.exports=qC()):Lv.exports=LC(),Lv.exports}var GC=YC();const ZC=kv(GC),LT=u=>{let o;const f=new Set,h=(w,B)=>{const j=typeof w=="function"?w(o):w;if(!Object.is(j,o)){const N=o;o=B??(typeof j!="object"||j===null)?j:Object.assign({},o,j),f.forEach(D=>D(o,N))}},p=()=>o,E={setState:h,getState:p,getInitialState:()=>x,subscribe:w=>(f.add(w),()=>f.delete(w))},x=o=u(h,p,E);return E},YT=(u=>u?LT(u):LT);var vt=Mh();const ga=kv(vt),GT=zC({__proto__:null,default:ga},[vt]),XC=u=>u;function ZT(u,o=XC){const f=ga.useSyncExternalStore(u.subscribe,ga.useCallback(()=>o(u.getState()),[u,o]),ga.useCallback(()=>o(u.getInitialState()),[u,o]));return ga.useDebugValue(f),f}const XT=u=>{const o=YT(u),f=h=>ZT(o,h);return Object.assign(f,o),f},$C=(u=>u?XT(u):XT),QC={securityNumber:"",cardID:"",state:"isEmpty",availableDiscountSelected:{quantity:0,discount:{unit:0,total:0},totalPrice:0,grossPrice:0},targetProduct:null,campaign:"pbm_campaign",isAuthenticatedShopper:!1,customLoginUrl:"/login"},Zv=YT(u=>({...QC,setSecurityNumber:o=>u({securityNumber:o}),setState:o=>u({state:o}),setTargetProduct:o=>u({targetProduct:o}),setAvailableDiscountSelected:o=>u({availableDiscountSelected:o}),setUrlAcceptTerms:o=>u({urlAcceptTerms:o}),setUrlRegisterIndustry:o=>u({urlRegisterIndustry:o}),setIsAuthenticatedShopper:o=>u({isAuthenticatedShopper:o}),setCustomLoginUrl:o=>u({customLoginUrl:o}),setCardID:o=>u({cardID:o})})),JC=()=>({getState:()=>{const u=Zv.getState(),{setSecurityNumber:o,setState:f,setAvailableDiscountSelected:h,setTargetProduct:p,setUrlAcceptTerms:v,setUrlRegisterIndustry:S,setIsAuthenticatedShopper:E,setCustomLoginUrl:x,setCardID:w,...B}=u,{quantity:j,productId:N,skuId:D,discountMax:L,netPrice:Y,stockBalance:Z,listPrice:ie,price:re,...Oe}=u.targetProduct;return{...B,targetProduct:Oe}}});function Xu(u){return ZT(Zv,o=>o)}function KC({originalProductPrice:u}){const{targetProduct:o}=Xu(),f=o?.listPrice||u,h=f*((o?.discountMax||0)/100);return Ee.jsxs(Ee.Fragment,{children:[o?.informativeMessage&&Ee.jsx("span",{className:"absolute w-11/12 -top-6 bg-emerald-500 px-4 py-1 rounded-lg text-sm text-center font-medium text-white",children:o?.informativeMessage}),Ee.jsxs("header",{className:"flex items-center justify-between w-full p-0.5 rounded-xl bg-[#44c2c0]/30 mt-5",id:"header_pbm",children:[Ee.jsx("span",{className:"py-1 px-6 rounded-xl bg-[#44c2c0] shrink-0 text-white text-xl font-bold flex items-center justify-start gap-2 relative","data-testid":"test_id_header_price",id:"header_price",children:Ee.jsxs("section",{className:"flex items-center gap-2 justify-center-safe",children:[Ee.jsx("span",{className:"line-through text-sm font-light",children:Number(f)?.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})}),Number(f-h)?.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})]})}),Ee.jsx("h1",{id:"header_title",className:"text-center w-full text-[#339c9b] font-bold text-xs px-4 md:text-sm",children:"Desconto de Laboratório"})]})]})}var ZS={exports:{}};var $T;function FC(){return $T||($T=1,(function(u){(function(){var o={}.hasOwnProperty;function f(){for(var v="",S=0;S<arguments.length;S++){var E=arguments[S];E&&(v=p(v,h(E)))}return v}function h(v){if(typeof v=="string"||typeof v=="number")return v;if(typeof v!="object")return"";if(Array.isArray(v))return f.apply(null,v);if(v.toString!==Object.prototype.toString&&!v.toString.toString().includes("[native code]"))return v.toString();var S="";for(var E in v)o.call(v,E)&&v[E]&&(S=p(S,E));return S}function p(v,S){return S?v?v+" "+S:v+S:v}u.exports?(f.default=f,u.exports=f):window.classNames=f})()})(ZS)),ZS.exports}var WC=FC();const Hi=kv(WC);function XS({children:u,variant:o}){return Ee.jsx("main",{className:Hi({"border-3 border-[#44c2c0] flex flex-col items-center justify-center min-w-[var(--min-container)] max-w-[var(--max-container)] w-full h-auto rounded-xl p-4 bg-white gap-4 relative":o==="main","w-full h-auto relative":o==="simple"}),"data-testid":"test_id_container","data-variant":o,id:"container_pbm",children:u})}function IC(){const{targetProduct:u,state:o}=Xu();return Ee.jsx("footer",{className:"w-full h-auto relative",id:"footer_pbm",children:Ee.jsxs("section",{className:Hi("flex items-center w-full h-auto gap-4",{"justify-center":u?.industryLogo,"justify-start":!u?.industryLogo}),children:[Ee.jsxs("section",{className:"w-4/5 h-auto",children:[Ee.jsx("h3",{className:"text-start font-semibold text-sm",children:"Economize com o benefício do laboratório."}),Ee.jsx("p",{className:"text-start font-normal text-sm",children:"Este produto tem preço exclusivo para clientes cadastrados no programa."})]}),u?.industryLogo&&Ee.jsx("img",{src:u.industryLogo,alt:"parceiro",className:"w-1/5 min-w-20 h-auto aspect-auto rounded-xl",loading:"eager",id:"footer_industry_logo_pbm","data-testid":"footer_industry_logo_pbm"})]})})}var nn;(function(u){u.assertEqual=p=>{};function o(p){}u.assertIs=o;function f(p){throw new Error}u.assertNever=f,u.arrayToEnum=p=>{const v={};for(const S of p)v[S]=S;return v},u.getValidEnumValues=p=>{const v=u.objectKeys(p).filter(E=>typeof p[p[E]]!="number"),S={};for(const E of v)S[E]=p[E];return u.objectValues(S)},u.objectValues=p=>u.objectKeys(p).map(function(v){return p[v]}),u.objectKeys=typeof Object.keys=="function"?p=>Object.keys(p):p=>{const v=[];for(const S in p)Object.prototype.hasOwnProperty.call(p,S)&&v.push(S);return v},u.find=(p,v)=>{for(const S of p)if(v(S))return S},u.isInteger=typeof Number.isInteger=="function"?p=>Number.isInteger(p):p=>typeof p=="number"&&Number.isFinite(p)&&Math.floor(p)===p;function h(p,v=" | "){return p.map(S=>typeof S=="string"?`'${S}'`:S).join(v)}u.joinValues=h,u.jsonStringifyReplacer=(p,v)=>typeof v=="bigint"?v.toString():v})(nn||(nn={}));var QT;(function(u){u.mergeShapes=(o,f)=>({...o,...f})})(QT||(QT={}));const tt=nn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kc=u=>{switch(typeof u){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return Number.isNaN(u)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(u)?tt.array:u===null?tt.null:u.then&&typeof u.then=="function"&&u.catch&&typeof u.catch=="function"?tt.promise:typeof Map<"u"&&u instanceof Map?tt.map:typeof Set<"u"&&u instanceof Set?tt.set:typeof Date<"u"&&u instanceof Date?tt.date:tt.object;default:return tt.unknown}},He=nn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class No extends Error{get errors(){return this.issues}constructor(o){super(),this.issues=[],this.addIssue=h=>{this.issues=[...this.issues,h]},this.addIssues=(h=[])=>{this.issues=[...this.issues,...h]};const f=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,f):this.__proto__=f,this.name="ZodError",this.issues=o}format(o){const f=o||function(v){return v.message},h={_errors:[]},p=v=>{for(const S of v.issues)if(S.code==="invalid_union")S.unionErrors.map(p);else if(S.code==="invalid_return_type")p(S.returnTypeError);else if(S.code==="invalid_arguments")p(S.argumentsError);else if(S.path.length===0)h._errors.push(f(S));else{let E=h,x=0;for(;x<S.path.length;){const w=S.path[x];x===S.path.length-1?(E[w]=E[w]||{_errors:[]},E[w]._errors.push(f(S))):E[w]=E[w]||{_errors:[]},E=E[w],x++}}};return p(this),h}static assert(o){if(!(o instanceof No))throw new Error(`Not a ZodError: ${o}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(o=f=>f.message){const f={},h=[];for(const p of this.issues)if(p.path.length>0){const v=p.path[0];f[v]=f[v]||[],f[v].push(o(p))}else h.push(o(p));return{formErrors:h,fieldErrors:f}}get formErrors(){return this.flatten()}}No.create=u=>new No(u);const $S=(u,o)=>{let f;switch(u.code){case He.invalid_type:u.received===tt.undefined?f="Required":f=`Expected ${u.expected}, received ${u.received}`;break;case He.invalid_literal:f=`Invalid literal value, expected ${JSON.stringify(u.expected,nn.jsonStringifyReplacer)}`;break;case He.unrecognized_keys:f=`Unrecognized key(s) in object: ${nn.joinValues(u.keys,", ")}`;break;case He.invalid_union:f="Invalid input";break;case He.invalid_union_discriminator:f=`Invalid discriminator value. Expected ${nn.joinValues(u.options)}`;break;case He.invalid_enum_value:f=`Invalid enum value. Expected ${nn.joinValues(u.options)}, received '${u.received}'`;break;case He.invalid_arguments:f="Invalid function arguments";break;case He.invalid_return_type:f="Invalid function return type";break;case He.invalid_date:f="Invalid date";break;case He.invalid_string:typeof u.validation=="object"?"includes"in u.validation?(f=`Invalid input: must include "${u.validation.includes}"`,typeof u.validation.position=="number"&&(f=`${f} at one or more positions greater than or equal to ${u.validation.position}`)):"startsWith"in u.validation?f=`Invalid input: must start with "${u.validation.startsWith}"`:"endsWith"in u.validation?f=`Invalid input: must end with "${u.validation.endsWith}"`:nn.assertNever(u.validation):u.validation!=="regex"?f=`Invalid ${u.validation}`:f="Invalid";break;case He.too_small:u.type==="array"?f=`Array must contain ${u.exact?"exactly":u.inclusive?"at least":"more than"} ${u.minimum} element(s)`:u.type==="string"?f=`String must contain ${u.exact?"exactly":u.inclusive?"at least":"over"} ${u.minimum} character(s)`:u.type==="number"?f=`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:u.type==="bigint"?f=`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:u.type==="date"?f=`Date must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(u.minimum))}`:f="Invalid input";break;case He.too_big:u.type==="array"?f=`Array must contain ${u.exact?"exactly":u.inclusive?"at most":"less than"} ${u.maximum} element(s)`:u.type==="string"?f=`String must contain ${u.exact?"exactly":u.inclusive?"at most":"under"} ${u.maximum} character(s)`:u.type==="number"?f=`Number must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="bigint"?f=`BigInt must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="date"?f=`Date must be ${u.exact?"exactly":u.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(u.maximum))}`:f="Invalid input";break;case He.custom:f="Invalid input";break;case He.invalid_intersection_types:f="Intersection results could not be merged";break;case He.not_multiple_of:f=`Number must be a multiple of ${u.multipleOf}`;break;case He.not_finite:f="Number must be finite";break;default:f=o.defaultError,nn.assertNever(u)}return{message:f}};let PC=$S;function e3(){return PC}const t3=u=>{const{data:o,path:f,errorMaps:h,issueData:p}=u,v=[...f,...p.path||[]],S={...p,path:v};if(p.message!==void 0)return{...p,path:v,message:p.message};let E="";const x=h.filter(w=>!!w).slice().reverse();for(const w of x)E=w(S,{data:o,defaultError:E}).message;return{...p,path:v,message:E}};function $e(u,o){const f=e3(),h=t3({issueData:o,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,f,f===$S?void 0:$S].filter(p=>!!p)});u.common.issues.push(h)}class ki{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(o,f){const h=[];for(const p of f){if(p.status==="aborted")return Et;p.status==="dirty"&&o.dirty(),h.push(p.value)}return{status:o.value,value:h}}static async mergeObjectAsync(o,f){const h=[];for(const p of f){const v=await p.key,S=await p.value;h.push({key:v,value:S})}return ki.mergeObjectSync(o,h)}static mergeObjectSync(o,f){const h={};for(const p of f){const{key:v,value:S}=p;if(v.status==="aborted"||S.status==="aborted")return Et;v.status==="dirty"&&o.dirty(),S.status==="dirty"&&o.dirty(),v.value!=="__proto__"&&(typeof S.value<"u"||p.alwaysSet)&&(h[v.value]=S.value)}return{status:o.value,value:h}}}const Et=Object.freeze({status:"aborted"}),xy=u=>({status:"dirty",value:u}),or=u=>({status:"valid",value:u}),JT=u=>u.status==="aborted",KT=u=>u.status==="dirty",Uh=u=>u.status==="valid",Xv=u=>typeof Promise<"u"&&u instanceof Promise;var lt;(function(u){u.errToObj=o=>typeof o=="string"?{message:o}:o||{},u.toString=o=>typeof o=="string"?o:o?.message})(lt||(lt={}));class Fc{constructor(o,f,h,p){this._cachedPath=[],this.parent=o,this.data=f,this._path=h,this._key=p}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const FT=(u,o)=>{if(Uh(o))return{success:!0,data:o.value};if(!u.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const f=new No(u.common.issues);return this._error=f,this._error}}};function Ht(u){if(!u)return{};const{errorMap:o,invalid_type_error:f,required_error:h,description:p}=u;if(o&&(f||h))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return o?{errorMap:o,description:p}:{errorMap:(S,E)=>{const{message:x}=u;return S.code==="invalid_enum_value"?{message:x??E.defaultError}:typeof E.data>"u"?{message:x??h??E.defaultError}:S.code!=="invalid_type"?{message:E.defaultError}:{message:x??f??E.defaultError}},description:p}}class It{get description(){return this._def.description}_getType(o){return Kc(o.data)}_getOrReturnCtx(o,f){return f||{common:o.parent.common,data:o.data,parsedType:Kc(o.data),schemaErrorMap:this._def.errorMap,path:o.path,parent:o.parent}}_processInputParams(o){return{status:new ki,ctx:{common:o.parent.common,data:o.data,parsedType:Kc(o.data),schemaErrorMap:this._def.errorMap,path:o.path,parent:o.parent}}}_parseSync(o){const f=this._parse(o);if(Xv(f))throw new Error("Synchronous parse encountered promise.");return f}_parseAsync(o){const f=this._parse(o);return Promise.resolve(f)}parse(o,f){const h=this.safeParse(o,f);if(h.success)return h.data;throw h.error}safeParse(o,f){const h={common:{issues:[],async:f?.async??!1,contextualErrorMap:f?.errorMap},path:f?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:Kc(o)},p=this._parseSync({data:o,path:h.path,parent:h});return FT(h,p)}"~validate"(o){const f={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:Kc(o)};if(!this["~standard"].async)try{const h=this._parseSync({data:o,path:[],parent:f});return Uh(h)?{value:h.value}:{issues:f.common.issues}}catch(h){h?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),f.common={issues:[],async:!0}}return this._parseAsync({data:o,path:[],parent:f}).then(h=>Uh(h)?{value:h.value}:{issues:f.common.issues})}async parseAsync(o,f){const h=await this.safeParseAsync(o,f);if(h.success)return h.data;throw h.error}async safeParseAsync(o,f){const h={common:{issues:[],contextualErrorMap:f?.errorMap,async:!0},path:f?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:o,parsedType:Kc(o)},p=this._parse({data:o,path:h.path,parent:h}),v=await(Xv(p)?p:Promise.resolve(p));return FT(h,v)}refine(o,f){const h=p=>typeof f=="string"||typeof f>"u"?{message:f}:typeof f=="function"?f(p):f;return this._refinement((p,v)=>{const S=o(p),E=()=>v.addIssue({code:He.custom,...h(p)});return typeof Promise<"u"&&S instanceof Promise?S.then(x=>x?!0:(E(),!1)):S?!0:(E(),!1)})}refinement(o,f){return this._refinement((h,p)=>o(h)?!0:(p.addIssue(typeof f=="function"?f(h,p):f),!1))}_refinement(o){return new Bh({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:o}})}superRefine(o){return this._refinement(o)}constructor(o){this.spa=this.safeParseAsync,this._def=o,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:f=>this["~validate"](f)}}optional(){return Pc.create(this,this._def)}nullable(){return Hh.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $u.create(this)}promise(){return Kv.create(this,this._def)}or(o){return Qv.create([this,o],this._def)}and(o){return Jv.create(this,o,this._def)}transform(o){return new Bh({...Ht(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:o}})}default(o){const f=typeof o=="function"?o:()=>o;return new KS({...Ht(this._def),innerType:this,defaultValue:f,typeName:Tt.ZodDefault})}brand(){return new x3({typeName:Tt.ZodBranded,type:this,...Ht(this._def)})}catch(o){const f=typeof o=="function"?o:()=>o;return new FS({...Ht(this._def),innerType:this,catchValue:f,typeName:Tt.ZodCatch})}describe(o){const f=this.constructor;return new f({...this._def,description:o})}pipe(o){return WS.create(this,o)}readonly(){return IS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const n3=/^c[^\s-]{8,}$/i,a3=/^[0-9a-z]+$/,l3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,i3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,r3=/^[a-z0-9_-]{21}$/i,u3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,o3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,c3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,s3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let QS;const f3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,d3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,h3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,m3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,p3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,y3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,WT="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",g3=new RegExp(`^${WT}$`);function IT(u){let o="[0-5]\\d";u.precision?o=`${o}\\.\\d{${u.precision}}`:u.precision==null&&(o=`${o}(\\.\\d+)?`);const f=u.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${o})${f}`}function v3(u){return new RegExp(`^${IT(u)}$`)}function b3(u){let o=`${WT}T${IT(u)}`;const f=[];return f.push(u.local?"Z?":"Z"),u.offset&&f.push("([+-]\\d{2}:?\\d{2})"),o=`${o}(${f.join("|")})`,new RegExp(`^${o}$`)}function S3(u,o){return!!((o==="v4"||!o)&&f3.test(u)||(o==="v6"||!o)&&h3.test(u))}function _3(u,o){if(!u3.test(u))return!1;try{const[f]=u.split(".");if(!f)return!1;const h=f.replace(/-/g,"+").replace(/_/g,"/").padEnd(f.length+(4-f.length%4)%4,"="),p=JSON.parse(atob(h));return!(typeof p!="object"||p===null||"typ"in p&&p?.typ!=="JWT"||!p.alg||o&&p.alg!==o)}catch{return!1}}function E3(u,o){return!!((o==="v4"||!o)&&d3.test(u)||(o==="v6"||!o)&&m3.test(u))}class Wc extends It{_parse(o){if(this._def.coerce&&(o.data=String(o.data)),this._getType(o)!==tt.string){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_type,expected:tt.string,received:v.parsedType}),Et}const h=new ki;let p;for(const v of this._def.checks)if(v.kind==="min")o.data.length<v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_small,minimum:v.value,type:"string",inclusive:!0,exact:!1,message:v.message}),h.dirty());else if(v.kind==="max")o.data.length>v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_big,maximum:v.value,type:"string",inclusive:!0,exact:!1,message:v.message}),h.dirty());else if(v.kind==="length"){const S=o.data.length>v.value,E=o.data.length<v.value;(S||E)&&(p=this._getOrReturnCtx(o,p),S?$e(p,{code:He.too_big,maximum:v.value,type:"string",inclusive:!0,exact:!0,message:v.message}):E&&$e(p,{code:He.too_small,minimum:v.value,type:"string",inclusive:!0,exact:!0,message:v.message}),h.dirty())}else if(v.kind==="email")c3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"email",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="emoji")QS||(QS=new RegExp(s3,"u")),QS.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"emoji",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="uuid")i3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"uuid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="nanoid")r3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"nanoid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="cuid")n3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"cuid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="cuid2")a3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"cuid2",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="ulid")l3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"ulid",code:He.invalid_string,message:v.message}),h.dirty());else if(v.kind==="url")try{new URL(o.data)}catch{p=this._getOrReturnCtx(o,p),$e(p,{validation:"url",code:He.invalid_string,message:v.message}),h.dirty()}else v.kind==="regex"?(v.regex.lastIndex=0,v.regex.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"regex",code:He.invalid_string,message:v.message}),h.dirty())):v.kind==="trim"?o.data=o.data.trim():v.kind==="includes"?o.data.includes(v.value,v.position)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:{includes:v.value,position:v.position},message:v.message}),h.dirty()):v.kind==="toLowerCase"?o.data=o.data.toLowerCase():v.kind==="toUpperCase"?o.data=o.data.toUpperCase():v.kind==="startsWith"?o.data.startsWith(v.value)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:{startsWith:v.value},message:v.message}),h.dirty()):v.kind==="endsWith"?o.data.endsWith(v.value)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:{endsWith:v.value},message:v.message}),h.dirty()):v.kind==="datetime"?b3(v).test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:"datetime",message:v.message}),h.dirty()):v.kind==="date"?g3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:"date",message:v.message}),h.dirty()):v.kind==="time"?v3(v).test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{code:He.invalid_string,validation:"time",message:v.message}),h.dirty()):v.kind==="duration"?o3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"duration",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="ip"?S3(o.data,v.version)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"ip",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="jwt"?_3(o.data,v.alg)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"jwt",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="cidr"?E3(o.data,v.version)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"cidr",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="base64"?p3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"base64",code:He.invalid_string,message:v.message}),h.dirty()):v.kind==="base64url"?y3.test(o.data)||(p=this._getOrReturnCtx(o,p),$e(p,{validation:"base64url",code:He.invalid_string,message:v.message}),h.dirty()):nn.assertNever(v);return{status:h.value,value:o.data}}_regex(o,f,h){return this.refinement(p=>o.test(p),{validation:f,code:He.invalid_string,...lt.errToObj(h)})}_addCheck(o){return new Wc({...this._def,checks:[...this._def.checks,o]})}email(o){return this._addCheck({kind:"email",...lt.errToObj(o)})}url(o){return this._addCheck({kind:"url",...lt.errToObj(o)})}emoji(o){return this._addCheck({kind:"emoji",...lt.errToObj(o)})}uuid(o){return this._addCheck({kind:"uuid",...lt.errToObj(o)})}nanoid(o){return this._addCheck({kind:"nanoid",...lt.errToObj(o)})}cuid(o){return this._addCheck({kind:"cuid",...lt.errToObj(o)})}cuid2(o){return this._addCheck({kind:"cuid2",...lt.errToObj(o)})}ulid(o){return this._addCheck({kind:"ulid",...lt.errToObj(o)})}base64(o){return this._addCheck({kind:"base64",...lt.errToObj(o)})}base64url(o){return this._addCheck({kind:"base64url",...lt.errToObj(o)})}jwt(o){return this._addCheck({kind:"jwt",...lt.errToObj(o)})}ip(o){return this._addCheck({kind:"ip",...lt.errToObj(o)})}cidr(o){return this._addCheck({kind:"cidr",...lt.errToObj(o)})}datetime(o){return typeof o=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:o}):this._addCheck({kind:"datetime",precision:typeof o?.precision>"u"?null:o?.precision,offset:o?.offset??!1,local:o?.local??!1,...lt.errToObj(o?.message)})}date(o){return this._addCheck({kind:"date",message:o})}time(o){return typeof o=="string"?this._addCheck({kind:"time",precision:null,message:o}):this._addCheck({kind:"time",precision:typeof o?.precision>"u"?null:o?.precision,...lt.errToObj(o?.message)})}duration(o){return this._addCheck({kind:"duration",...lt.errToObj(o)})}regex(o,f){return this._addCheck({kind:"regex",regex:o,...lt.errToObj(f)})}includes(o,f){return this._addCheck({kind:"includes",value:o,position:f?.position,...lt.errToObj(f?.message)})}startsWith(o,f){return this._addCheck({kind:"startsWith",value:o,...lt.errToObj(f)})}endsWith(o,f){return this._addCheck({kind:"endsWith",value:o,...lt.errToObj(f)})}min(o,f){return this._addCheck({kind:"min",value:o,...lt.errToObj(f)})}max(o,f){return this._addCheck({kind:"max",value:o,...lt.errToObj(f)})}length(o,f){return this._addCheck({kind:"length",value:o,...lt.errToObj(f)})}nonempty(o){return this.min(1,lt.errToObj(o))}trim(){return new Wc({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(o=>o.kind==="datetime")}get isDate(){return!!this._def.checks.find(o=>o.kind==="date")}get isTime(){return!!this._def.checks.find(o=>o.kind==="time")}get isDuration(){return!!this._def.checks.find(o=>o.kind==="duration")}get isEmail(){return!!this._def.checks.find(o=>o.kind==="email")}get isURL(){return!!this._def.checks.find(o=>o.kind==="url")}get isEmoji(){return!!this._def.checks.find(o=>o.kind==="emoji")}get isUUID(){return!!this._def.checks.find(o=>o.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(o=>o.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(o=>o.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(o=>o.kind==="cuid2")}get isULID(){return!!this._def.checks.find(o=>o.kind==="ulid")}get isIP(){return!!this._def.checks.find(o=>o.kind==="ip")}get isCIDR(){return!!this._def.checks.find(o=>o.kind==="cidr")}get isBase64(){return!!this._def.checks.find(o=>o.kind==="base64")}get isBase64url(){return!!this._def.checks.find(o=>o.kind==="base64url")}get minLength(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o}get maxLength(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o}}Wc.create=u=>new Wc({checks:[],typeName:Tt.ZodString,coerce:u?.coerce??!1,...Ht(u)});function T3(u,o){const f=(u.toString().split(".")[1]||"").length,h=(o.toString().split(".")[1]||"").length,p=f>h?f:h,v=Number.parseInt(u.toFixed(p).replace(".","")),S=Number.parseInt(o.toFixed(p).replace(".",""));return v%S/10**p}class Ay extends It{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(o){if(this._def.coerce&&(o.data=Number(o.data)),this._getType(o)!==tt.number){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_type,expected:tt.number,received:v.parsedType}),Et}let h;const p=new ki;for(const v of this._def.checks)v.kind==="int"?nn.isInteger(o.data)||(h=this._getOrReturnCtx(o,h),$e(h,{code:He.invalid_type,expected:"integer",received:"float",message:v.message}),p.dirty()):v.kind==="min"?(v.inclusive?o.data<v.value:o.data<=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_small,minimum:v.value,type:"number",inclusive:v.inclusive,exact:!1,message:v.message}),p.dirty()):v.kind==="max"?(v.inclusive?o.data>v.value:o.data>=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_big,maximum:v.value,type:"number",inclusive:v.inclusive,exact:!1,message:v.message}),p.dirty()):v.kind==="multipleOf"?T3(o.data,v.value)!==0&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.not_multiple_of,multipleOf:v.value,message:v.message}),p.dirty()):v.kind==="finite"?Number.isFinite(o.data)||(h=this._getOrReturnCtx(o,h),$e(h,{code:He.not_finite,message:v.message}),p.dirty()):nn.assertNever(v);return{status:p.value,value:o.data}}gte(o,f){return this.setLimit("min",o,!0,lt.toString(f))}gt(o,f){return this.setLimit("min",o,!1,lt.toString(f))}lte(o,f){return this.setLimit("max",o,!0,lt.toString(f))}lt(o,f){return this.setLimit("max",o,!1,lt.toString(f))}setLimit(o,f,h,p){return new Ay({...this._def,checks:[...this._def.checks,{kind:o,value:f,inclusive:h,message:lt.toString(p)}]})}_addCheck(o){return new Ay({...this._def,checks:[...this._def.checks,o]})}int(o){return this._addCheck({kind:"int",message:lt.toString(o)})}positive(o){return this._addCheck({kind:"min",value:0,inclusive:!1,message:lt.toString(o)})}negative(o){return this._addCheck({kind:"max",value:0,inclusive:!1,message:lt.toString(o)})}nonpositive(o){return this._addCheck({kind:"max",value:0,inclusive:!0,message:lt.toString(o)})}nonnegative(o){return this._addCheck({kind:"min",value:0,inclusive:!0,message:lt.toString(o)})}multipleOf(o,f){return this._addCheck({kind:"multipleOf",value:o,message:lt.toString(f)})}finite(o){return this._addCheck({kind:"finite",message:lt.toString(o)})}safe(o){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:lt.toString(o)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:lt.toString(o)})}get minValue(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o}get maxValue(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o}get isInt(){return!!this._def.checks.find(o=>o.kind==="int"||o.kind==="multipleOf"&&nn.isInteger(o.value))}get isFinite(){let o=null,f=null;for(const h of this._def.checks){if(h.kind==="finite"||h.kind==="int"||h.kind==="multipleOf")return!0;h.kind==="min"?(f===null||h.value>f)&&(f=h.value):h.kind==="max"&&(o===null||h.value<o)&&(o=h.value)}return Number.isFinite(f)&&Number.isFinite(o)}}Ay.create=u=>new Ay({checks:[],typeName:Tt.ZodNumber,coerce:u?.coerce||!1,...Ht(u)});class wy extends It{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(o){if(this._def.coerce)try{o.data=BigInt(o.data)}catch{return this._getInvalidInput(o)}if(this._getType(o)!==tt.bigint)return this._getInvalidInput(o);let h;const p=new ki;for(const v of this._def.checks)v.kind==="min"?(v.inclusive?o.data<v.value:o.data<=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_small,type:"bigint",minimum:v.value,inclusive:v.inclusive,message:v.message}),p.dirty()):v.kind==="max"?(v.inclusive?o.data>v.value:o.data>=v.value)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.too_big,type:"bigint",maximum:v.value,inclusive:v.inclusive,message:v.message}),p.dirty()):v.kind==="multipleOf"?o.data%v.value!==BigInt(0)&&(h=this._getOrReturnCtx(o,h),$e(h,{code:He.not_multiple_of,multipleOf:v.value,message:v.message}),p.dirty()):nn.assertNever(v);return{status:p.value,value:o.data}}_getInvalidInput(o){const f=this._getOrReturnCtx(o);return $e(f,{code:He.invalid_type,expected:tt.bigint,received:f.parsedType}),Et}gte(o,f){return this.setLimit("min",o,!0,lt.toString(f))}gt(o,f){return this.setLimit("min",o,!1,lt.toString(f))}lte(o,f){return this.setLimit("max",o,!0,lt.toString(f))}lt(o,f){return this.setLimit("max",o,!1,lt.toString(f))}setLimit(o,f,h,p){return new wy({...this._def,checks:[...this._def.checks,{kind:o,value:f,inclusive:h,message:lt.toString(p)}]})}_addCheck(o){return new wy({...this._def,checks:[...this._def.checks,o]})}positive(o){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:lt.toString(o)})}negative(o){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:lt.toString(o)})}nonpositive(o){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:lt.toString(o)})}nonnegative(o){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:lt.toString(o)})}multipleOf(o,f){return this._addCheck({kind:"multipleOf",value:o,message:lt.toString(f)})}get minValue(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o}get maxValue(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o}}wy.create=u=>new wy({checks:[],typeName:Tt.ZodBigInt,coerce:u?.coerce??!1,...Ht(u)});class PT extends It{_parse(o){if(this._def.coerce&&(o.data=!!o.data),this._getType(o)!==tt.boolean){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.boolean,received:h.parsedType}),Et}return or(o.data)}}PT.create=u=>new PT({typeName:Tt.ZodBoolean,coerce:u?.coerce||!1,...Ht(u)});class $v extends It{_parse(o){if(this._def.coerce&&(o.data=new Date(o.data)),this._getType(o)!==tt.date){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_type,expected:tt.date,received:v.parsedType}),Et}if(Number.isNaN(o.data.getTime())){const v=this._getOrReturnCtx(o);return $e(v,{code:He.invalid_date}),Et}const h=new ki;let p;for(const v of this._def.checks)v.kind==="min"?o.data.getTime()<v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_small,message:v.message,inclusive:!0,exact:!1,minimum:v.value,type:"date"}),h.dirty()):v.kind==="max"?o.data.getTime()>v.value&&(p=this._getOrReturnCtx(o,p),$e(p,{code:He.too_big,message:v.message,inclusive:!0,exact:!1,maximum:v.value,type:"date"}),h.dirty()):nn.assertNever(v);return{status:h.value,value:new Date(o.data.getTime())}}_addCheck(o){return new $v({...this._def,checks:[...this._def.checks,o]})}min(o,f){return this._addCheck({kind:"min",value:o.getTime(),message:lt.toString(f)})}max(o,f){return this._addCheck({kind:"max",value:o.getTime(),message:lt.toString(f)})}get minDate(){let o=null;for(const f of this._def.checks)f.kind==="min"&&(o===null||f.value>o)&&(o=f.value);return o!=null?new Date(o):null}get maxDate(){let o=null;for(const f of this._def.checks)f.kind==="max"&&(o===null||f.value<o)&&(o=f.value);return o!=null?new Date(o):null}}$v.create=u=>new $v({checks:[],coerce:u?.coerce||!1,typeName:Tt.ZodDate,...Ht(u)});class ex extends It{_parse(o){if(this._getType(o)!==tt.symbol){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.symbol,received:h.parsedType}),Et}return or(o.data)}}ex.create=u=>new ex({typeName:Tt.ZodSymbol,...Ht(u)});class tx extends It{_parse(o){if(this._getType(o)!==tt.undefined){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.undefined,received:h.parsedType}),Et}return or(o.data)}}tx.create=u=>new tx({typeName:Tt.ZodUndefined,...Ht(u)});class nx extends It{_parse(o){if(this._getType(o)!==tt.null){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.null,received:h.parsedType}),Et}return or(o.data)}}nx.create=u=>new nx({typeName:Tt.ZodNull,...Ht(u)});class ax extends It{constructor(){super(...arguments),this._any=!0}_parse(o){return or(o.data)}}ax.create=u=>new ax({typeName:Tt.ZodAny,...Ht(u)});class lx extends It{constructor(){super(...arguments),this._unknown=!0}_parse(o){return or(o.data)}}lx.create=u=>new lx({typeName:Tt.ZodUnknown,...Ht(u)});class Ic extends It{_parse(o){const f=this._getOrReturnCtx(o);return $e(f,{code:He.invalid_type,expected:tt.never,received:f.parsedType}),Et}}Ic.create=u=>new Ic({typeName:Tt.ZodNever,...Ht(u)});class ix extends It{_parse(o){if(this._getType(o)!==tt.undefined){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.void,received:h.parsedType}),Et}return or(o.data)}}ix.create=u=>new ix({typeName:Tt.ZodVoid,...Ht(u)});class $u extends It{_parse(o){const{ctx:f,status:h}=this._processInputParams(o),p=this._def;if(f.parsedType!==tt.array)return $e(f,{code:He.invalid_type,expected:tt.array,received:f.parsedType}),Et;if(p.exactLength!==null){const S=f.data.length>p.exactLength.value,E=f.data.length<p.exactLength.value;(S||E)&&($e(f,{code:S?He.too_big:He.too_small,minimum:E?p.exactLength.value:void 0,maximum:S?p.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:p.exactLength.message}),h.dirty())}if(p.minLength!==null&&f.data.length<p.minLength.value&&($e(f,{code:He.too_small,minimum:p.minLength.value,type:"array",inclusive:!0,exact:!1,message:p.minLength.message}),h.dirty()),p.maxLength!==null&&f.data.length>p.maxLength.value&&($e(f,{code:He.too_big,maximum:p.maxLength.value,type:"array",inclusive:!0,exact:!1,message:p.maxLength.message}),h.dirty()),f.common.async)return Promise.all([...f.data].map((S,E)=>p.type._parseAsync(new Fc(f,S,f.path,E)))).then(S=>ki.mergeArray(h,S));const v=[...f.data].map((S,E)=>p.type._parseSync(new Fc(f,S,f.path,E)));return ki.mergeArray(h,v)}get element(){return this._def.type}min(o,f){return new $u({...this._def,minLength:{value:o,message:lt.toString(f)}})}max(o,f){return new $u({...this._def,maxLength:{value:o,message:lt.toString(f)}})}length(o,f){return new $u({...this._def,exactLength:{value:o,message:lt.toString(f)}})}nonempty(o){return this.min(1,o)}}$u.create=(u,o)=>new $u({type:u,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...Ht(o)});function Nh(u){if(u instanceof va){const o={};for(const f in u.shape){const h=u.shape[f];o[f]=Pc.create(Nh(h))}return new va({...u._def,shape:()=>o})}else return u instanceof $u?new $u({...u._def,type:Nh(u.element)}):u instanceof Pc?Pc.create(Nh(u.unwrap())):u instanceof Hh?Hh.create(Nh(u.unwrap())):u instanceof Ef?Ef.create(u.items.map(o=>Nh(o))):u}class va extends It{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const o=this._def.shape(),f=nn.objectKeys(o);return this._cached={shape:o,keys:f},this._cached}_parse(o){if(this._getType(o)!==tt.object){const w=this._getOrReturnCtx(o);return $e(w,{code:He.invalid_type,expected:tt.object,received:w.parsedType}),Et}const{status:h,ctx:p}=this._processInputParams(o),{shape:v,keys:S}=this._getCached(),E=[];if(!(this._def.catchall instanceof Ic&&this._def.unknownKeys==="strip"))for(const w in p.data)S.includes(w)||E.push(w);const x=[];for(const w of S){const B=v[w],j=p.data[w];x.push({key:{status:"valid",value:w},value:B._parse(new Fc(p,j,p.path,w)),alwaysSet:w in p.data})}if(this._def.catchall instanceof Ic){const w=this._def.unknownKeys;if(w==="passthrough")for(const B of E)x.push({key:{status:"valid",value:B},value:{status:"valid",value:p.data[B]}});else if(w==="strict")E.length>0&&($e(p,{code:He.unrecognized_keys,keys:E}),h.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const w=this._def.catchall;for(const B of E){const j=p.data[B];x.push({key:{status:"valid",value:B},value:w._parse(new Fc(p,j,p.path,B)),alwaysSet:B in p.data})}}return p.common.async?Promise.resolve().then(async()=>{const w=[];for(const B of x){const j=await B.key,N=await B.value;w.push({key:j,value:N,alwaysSet:B.alwaysSet})}return w}).then(w=>ki.mergeObjectSync(h,w)):ki.mergeObjectSync(h,x)}get shape(){return this._def.shape()}strict(o){return lt.errToObj,new va({...this._def,unknownKeys:"strict",...o!==void 0?{errorMap:(f,h)=>{const p=this._def.errorMap?.(f,h).message??h.defaultError;return f.code==="unrecognized_keys"?{message:lt.errToObj(o).message??p}:{message:p}}}:{}})}strip(){return new va({...this._def,unknownKeys:"strip"})}passthrough(){return new va({...this._def,unknownKeys:"passthrough"})}extend(o){return new va({...this._def,shape:()=>({...this._def.shape(),...o})})}merge(o){return new va({unknownKeys:o._def.unknownKeys,catchall:o._def.catchall,shape:()=>({...this._def.shape(),...o._def.shape()}),typeName:Tt.ZodObject})}setKey(o,f){return this.augment({[o]:f})}catchall(o){return new va({...this._def,catchall:o})}pick(o){const f={};for(const h of nn.objectKeys(o))o[h]&&this.shape[h]&&(f[h]=this.shape[h]);return new va({...this._def,shape:()=>f})}omit(o){const f={};for(const h of nn.objectKeys(this.shape))o[h]||(f[h]=this.shape[h]);return new va({...this._def,shape:()=>f})}deepPartial(){return Nh(this)}partial(o){const f={};for(const h of nn.objectKeys(this.shape)){const p=this.shape[h];o&&!o[h]?f[h]=p:f[h]=p.optional()}return new va({...this._def,shape:()=>f})}required(o){const f={};for(const h of nn.objectKeys(this.shape))if(o&&!o[h])f[h]=this.shape[h];else{let v=this.shape[h];for(;v instanceof Pc;)v=v._def.innerType;f[h]=v}return new va({...this._def,shape:()=>f})}keyof(){return cx(nn.objectKeys(this.shape))}}va.create=(u,o)=>new va({shape:()=>u,unknownKeys:"strip",catchall:Ic.create(),typeName:Tt.ZodObject,...Ht(o)}),va.strictCreate=(u,o)=>new va({shape:()=>u,unknownKeys:"strict",catchall:Ic.create(),typeName:Tt.ZodObject,...Ht(o)}),va.lazycreate=(u,o)=>new va({shape:u,unknownKeys:"strip",catchall:Ic.create(),typeName:Tt.ZodObject,...Ht(o)});class Qv extends It{_parse(o){const{ctx:f}=this._processInputParams(o),h=this._def.options;function p(v){for(const E of v)if(E.result.status==="valid")return E.result;for(const E of v)if(E.result.status==="dirty")return f.common.issues.push(...E.ctx.common.issues),E.result;const S=v.map(E=>new No(E.ctx.common.issues));return $e(f,{code:He.invalid_union,unionErrors:S}),Et}if(f.common.async)return Promise.all(h.map(async v=>{const S={...f,common:{...f.common,issues:[]},parent:null};return{result:await v._parseAsync({data:f.data,path:f.path,parent:S}),ctx:S}})).then(p);{let v;const S=[];for(const x of h){const w={...f,common:{...f.common,issues:[]},parent:null},B=x._parseSync({data:f.data,path:f.path,parent:w});if(B.status==="valid")return B;B.status==="dirty"&&!v&&(v={result:B,ctx:w}),w.common.issues.length&&S.push(w.common.issues)}if(v)return f.common.issues.push(...v.ctx.common.issues),v.result;const E=S.map(x=>new No(x));return $e(f,{code:He.invalid_union,unionErrors:E}),Et}}get options(){return this._def.options}}Qv.create=(u,o)=>new Qv({options:u,typeName:Tt.ZodUnion,...Ht(o)});function JS(u,o){const f=Kc(u),h=Kc(o);if(u===o)return{valid:!0,data:u};if(f===tt.object&&h===tt.object){const p=nn.objectKeys(o),v=nn.objectKeys(u).filter(E=>p.indexOf(E)!==-1),S={...u,...o};for(const E of v){const x=JS(u[E],o[E]);if(!x.valid)return{valid:!1};S[E]=x.data}return{valid:!0,data:S}}else if(f===tt.array&&h===tt.array){if(u.length!==o.length)return{valid:!1};const p=[];for(let v=0;v<u.length;v++){const S=u[v],E=o[v],x=JS(S,E);if(!x.valid)return{valid:!1};p.push(x.data)}return{valid:!0,data:p}}else return f===tt.date&&h===tt.date&&+u==+o?{valid:!0,data:u}:{valid:!1}}class Jv extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o),p=(v,S)=>{if(JT(v)||JT(S))return Et;const E=JS(v.value,S.value);return E.valid?((KT(v)||KT(S))&&f.dirty(),{status:f.value,value:E.data}):($e(h,{code:He.invalid_intersection_types}),Et)};return h.common.async?Promise.all([this._def.left._parseAsync({data:h.data,path:h.path,parent:h}),this._def.right._parseAsync({data:h.data,path:h.path,parent:h})]).then(([v,S])=>p(v,S)):p(this._def.left._parseSync({data:h.data,path:h.path,parent:h}),this._def.right._parseSync({data:h.data,path:h.path,parent:h}))}}Jv.create=(u,o,f)=>new Jv({left:u,right:o,typeName:Tt.ZodIntersection,...Ht(f)});class Ef extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.parsedType!==tt.array)return $e(h,{code:He.invalid_type,expected:tt.array,received:h.parsedType}),Et;if(h.data.length<this._def.items.length)return $e(h,{code:He.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Et;!this._def.rest&&h.data.length>this._def.items.length&&($e(h,{code:He.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),f.dirty());const v=[...h.data].map((S,E)=>{const x=this._def.items[E]||this._def.rest;return x?x._parse(new Fc(h,S,h.path,E)):null}).filter(S=>!!S);return h.common.async?Promise.all(v).then(S=>ki.mergeArray(f,S)):ki.mergeArray(f,v)}get items(){return this._def.items}rest(o){return new Ef({...this._def,rest:o})}}Ef.create=(u,o)=>{if(!Array.isArray(u))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ef({items:u,typeName:Tt.ZodTuple,rest:null,...Ht(o)})};class rx extends It{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.parsedType!==tt.map)return $e(h,{code:He.invalid_type,expected:tt.map,received:h.parsedType}),Et;const p=this._def.keyType,v=this._def.valueType,S=[...h.data.entries()].map(([E,x],w)=>({key:p._parse(new Fc(h,E,h.path,[w,"key"])),value:v._parse(new Fc(h,x,h.path,[w,"value"]))}));if(h.common.async){const E=new Map;return Promise.resolve().then(async()=>{for(const x of S){const w=await x.key,B=await x.value;if(w.status==="aborted"||B.status==="aborted")return Et;(w.status==="dirty"||B.status==="dirty")&&f.dirty(),E.set(w.value,B.value)}return{status:f.value,value:E}})}else{const E=new Map;for(const x of S){const w=x.key,B=x.value;if(w.status==="aborted"||B.status==="aborted")return Et;(w.status==="dirty"||B.status==="dirty")&&f.dirty(),E.set(w.value,B.value)}return{status:f.value,value:E}}}}rx.create=(u,o,f)=>new rx({valueType:o,keyType:u,typeName:Tt.ZodMap,...Ht(f)});class Oy extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.parsedType!==tt.set)return $e(h,{code:He.invalid_type,expected:tt.set,received:h.parsedType}),Et;const p=this._def;p.minSize!==null&&h.data.size<p.minSize.value&&($e(h,{code:He.too_small,minimum:p.minSize.value,type:"set",inclusive:!0,exact:!1,message:p.minSize.message}),f.dirty()),p.maxSize!==null&&h.data.size>p.maxSize.value&&($e(h,{code:He.too_big,maximum:p.maxSize.value,type:"set",inclusive:!0,exact:!1,message:p.maxSize.message}),f.dirty());const v=this._def.valueType;function S(x){const w=new Set;for(const B of x){if(B.status==="aborted")return Et;B.status==="dirty"&&f.dirty(),w.add(B.value)}return{status:f.value,value:w}}const E=[...h.data.values()].map((x,w)=>v._parse(new Fc(h,x,h.path,w)));return h.common.async?Promise.all(E).then(x=>S(x)):S(E)}min(o,f){return new Oy({...this._def,minSize:{value:o,message:lt.toString(f)}})}max(o,f){return new Oy({...this._def,maxSize:{value:o,message:lt.toString(f)}})}size(o,f){return this.min(o,f).max(o,f)}nonempty(o){return this.min(1,o)}}Oy.create=(u,o)=>new Oy({valueType:u,minSize:null,maxSize:null,typeName:Tt.ZodSet,...Ht(o)});class ux extends It{get schema(){return this._def.getter()}_parse(o){const{ctx:f}=this._processInputParams(o);return this._def.getter()._parse({data:f.data,path:f.path,parent:f})}}ux.create=(u,o)=>new ux({getter:u,typeName:Tt.ZodLazy,...Ht(o)});class ox extends It{_parse(o){if(o.data!==this._def.value){const f=this._getOrReturnCtx(o);return $e(f,{received:f.data,code:He.invalid_literal,expected:this._def.value}),Et}return{status:"valid",value:o.data}}get value(){return this._def.value}}ox.create=(u,o)=>new ox({value:u,typeName:Tt.ZodLiteral,...Ht(o)});function cx(u,o){return new jh({values:u,typeName:Tt.ZodEnum,...Ht(o)})}class jh extends It{_parse(o){if(typeof o.data!="string"){const f=this._getOrReturnCtx(o),h=this._def.values;return $e(f,{expected:nn.joinValues(h),received:f.parsedType,code:He.invalid_type}),Et}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(o.data)){const f=this._getOrReturnCtx(o),h=this._def.values;return $e(f,{received:f.data,code:He.invalid_enum_value,options:h}),Et}return or(o.data)}get options(){return this._def.values}get enum(){const o={};for(const f of this._def.values)o[f]=f;return o}get Values(){const o={};for(const f of this._def.values)o[f]=f;return o}get Enum(){const o={};for(const f of this._def.values)o[f]=f;return o}extract(o,f=this._def){return jh.create(o,{...this._def,...f})}exclude(o,f=this._def){return jh.create(this.options.filter(h=>!o.includes(h)),{...this._def,...f})}}jh.create=cx;class sx extends It{_parse(o){const f=nn.getValidEnumValues(this._def.values),h=this._getOrReturnCtx(o);if(h.parsedType!==tt.string&&h.parsedType!==tt.number){const p=nn.objectValues(f);return $e(h,{expected:nn.joinValues(p),received:h.parsedType,code:He.invalid_type}),Et}if(this._cache||(this._cache=new Set(nn.getValidEnumValues(this._def.values))),!this._cache.has(o.data)){const p=nn.objectValues(f);return $e(h,{received:h.data,code:He.invalid_enum_value,options:p}),Et}return or(o.data)}get enum(){return this._def.values}}sx.create=(u,o)=>new sx({values:u,typeName:Tt.ZodNativeEnum,...Ht(o)});class Kv extends It{unwrap(){return this._def.type}_parse(o){const{ctx:f}=this._processInputParams(o);if(f.parsedType!==tt.promise&&f.common.async===!1)return $e(f,{code:He.invalid_type,expected:tt.promise,received:f.parsedType}),Et;const h=f.parsedType===tt.promise?f.data:Promise.resolve(f.data);return or(h.then(p=>this._def.type.parseAsync(p,{path:f.path,errorMap:f.common.contextualErrorMap})))}}Kv.create=(u,o)=>new Kv({type:u,typeName:Tt.ZodPromise,...Ht(o)});class Bh extends It{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(o){const{status:f,ctx:h}=this._processInputParams(o),p=this._def.effect||null,v={addIssue:S=>{$e(h,S),S.fatal?f.abort():f.dirty()},get path(){return h.path}};if(v.addIssue=v.addIssue.bind(v),p.type==="preprocess"){const S=p.transform(h.data,v);if(h.common.async)return Promise.resolve(S).then(async E=>{if(f.value==="aborted")return Et;const x=await this._def.schema._parseAsync({data:E,path:h.path,parent:h});return x.status==="aborted"?Et:x.status==="dirty"||f.value==="dirty"?xy(x.value):x});{if(f.value==="aborted")return Et;const E=this._def.schema._parseSync({data:S,path:h.path,parent:h});return E.status==="aborted"?Et:E.status==="dirty"||f.value==="dirty"?xy(E.value):E}}if(p.type==="refinement"){const S=E=>{const x=p.refinement(E,v);if(h.common.async)return Promise.resolve(x);if(x instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return E};if(h.common.async===!1){const E=this._def.schema._parseSync({data:h.data,path:h.path,parent:h});return E.status==="aborted"?Et:(E.status==="dirty"&&f.dirty(),S(E.value),{status:f.value,value:E.value})}else return this._def.schema._parseAsync({data:h.data,path:h.path,parent:h}).then(E=>E.status==="aborted"?Et:(E.status==="dirty"&&f.dirty(),S(E.value).then(()=>({status:f.value,value:E.value}))))}if(p.type==="transform")if(h.common.async===!1){const S=this._def.schema._parseSync({data:h.data,path:h.path,parent:h});if(!Uh(S))return Et;const E=p.transform(S.value,v);if(E instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:f.value,value:E}}else return this._def.schema._parseAsync({data:h.data,path:h.path,parent:h}).then(S=>Uh(S)?Promise.resolve(p.transform(S.value,v)).then(E=>({status:f.value,value:E})):Et);nn.assertNever(p)}}Bh.create=(u,o,f)=>new Bh({schema:u,typeName:Tt.ZodEffects,effect:o,...Ht(f)}),Bh.createWithPreprocess=(u,o,f)=>new Bh({schema:o,effect:{type:"preprocess",transform:u},typeName:Tt.ZodEffects,...Ht(f)});class Pc extends It{_parse(o){return this._getType(o)===tt.undefined?or(void 0):this._def.innerType._parse(o)}unwrap(){return this._def.innerType}}Pc.create=(u,o)=>new Pc({innerType:u,typeName:Tt.ZodOptional,...Ht(o)});class Hh extends It{_parse(o){return this._getType(o)===tt.null?or(null):this._def.innerType._parse(o)}unwrap(){return this._def.innerType}}Hh.create=(u,o)=>new Hh({innerType:u,typeName:Tt.ZodNullable,...Ht(o)});class KS extends It{_parse(o){const{ctx:f}=this._processInputParams(o);let h=f.data;return f.parsedType===tt.undefined&&(h=this._def.defaultValue()),this._def.innerType._parse({data:h,path:f.path,parent:f})}removeDefault(){return this._def.innerType}}KS.create=(u,o)=>new KS({innerType:u,typeName:Tt.ZodDefault,defaultValue:typeof o.default=="function"?o.default:()=>o.default,...Ht(o)});class FS extends It{_parse(o){const{ctx:f}=this._processInputParams(o),h={...f,common:{...f.common,issues:[]}},p=this._def.innerType._parse({data:h.data,path:h.path,parent:{...h}});return Xv(p)?p.then(v=>({status:"valid",value:v.status==="valid"?v.value:this._def.catchValue({get error(){return new No(h.common.issues)},input:h.data})})):{status:"valid",value:p.status==="valid"?p.value:this._def.catchValue({get error(){return new No(h.common.issues)},input:h.data})}}removeCatch(){return this._def.innerType}}FS.create=(u,o)=>new FS({innerType:u,typeName:Tt.ZodCatch,catchValue:typeof o.catch=="function"?o.catch:()=>o.catch,...Ht(o)});class fx extends It{_parse(o){if(this._getType(o)!==tt.nan){const h=this._getOrReturnCtx(o);return $e(h,{code:He.invalid_type,expected:tt.nan,received:h.parsedType}),Et}return{status:"valid",value:o.data}}}fx.create=u=>new fx({typeName:Tt.ZodNaN,...Ht(u)});class x3 extends It{_parse(o){const{ctx:f}=this._processInputParams(o),h=f.data;return this._def.type._parse({data:h,path:f.path,parent:f})}unwrap(){return this._def.type}}class WS extends It{_parse(o){const{status:f,ctx:h}=this._processInputParams(o);if(h.common.async)return(async()=>{const v=await this._def.in._parseAsync({data:h.data,path:h.path,parent:h});return v.status==="aborted"?Et:v.status==="dirty"?(f.dirty(),xy(v.value)):this._def.out._parseAsync({data:v.value,path:h.path,parent:h})})();{const p=this._def.in._parseSync({data:h.data,path:h.path,parent:h});return p.status==="aborted"?Et:p.status==="dirty"?(f.dirty(),{status:"dirty",value:p.value}):this._def.out._parseSync({data:p.value,path:h.path,parent:h})}}static create(o,f){return new WS({in:o,out:f,typeName:Tt.ZodPipeline})}}class IS extends It{_parse(o){const f=this._def.innerType._parse(o),h=p=>(Uh(p)&&(p.value=Object.freeze(p.value)),p);return Xv(f)?f.then(p=>h(p)):h(f)}unwrap(){return this._def.innerType}}IS.create=(u,o)=>new IS({innerType:u,typeName:Tt.ZodReadonly,...Ht(o)});var Tt;(function(u){u.ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const dx=Wc.create;Ic.create,$u.create;const A3=va.create;Qv.create,Jv.create,Ef.create,jh.create,Kv.create,Pc.create,Hh.create;const w3=A3({securityNumber:dx({required_error:"CPF é obrigatório."}).refine(u=>u.replace(/\D/g,"").length>=11,"CPF deve conter no mínimo 11 caracteres.").refine(u=>{const o=u.replace(/\D/g,"");return!!Number(o)},"CPF deve conter apenas números."),coupon:dx({required_error:"Cupom / ID do Cartão obrigatório."}).optional()}),O3=u=>{const o=u.replace(/\D/g,"");if(o.length<=11)return o.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1")};var Cy=u=>u.type==="checkbox",Tf=u=>u instanceof Date,mi=u=>u==null;const hx=u=>typeof u=="object";var ba=u=>!mi(u)&&!Array.isArray(u)&&hx(u)&&!Tf(u),C3=u=>ba(u)&&u.target?Cy(u.target)?u.target.checked:u.target.value:u,R3=u=>u.substring(0,u.search(/\.\d+(\.|$)/))||u,z3=(u,o)=>u.has(R3(o)),D3=u=>{const o=u.constructor&&u.constructor.prototype;return ba(o)&&o.hasOwnProperty("isPrototypeOf")},PS=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ma(u){if(u instanceof Date)return new Date(u);const o=typeof FileList<"u"&&u instanceof FileList;if(PS&&(u instanceof Blob||o))return u;const f=Array.isArray(u);if(!f&&!(ba(u)&&D3(u)))return u;const h=f?[]:Object.create(Object.getPrototypeOf(u));for(const p in u)Object.prototype.hasOwnProperty.call(u,p)&&(h[p]=Ma(u[p]));return h}var Fv=u=>/^\w*$/.test(u),Wn=u=>u===void 0,e_=u=>Array.isArray(u)?u.filter(Boolean):[],t_=u=>e_(u.replace(/["|']|\]/g,"").split(/\.|\[/)),We=(u,o,f)=>{if(!o||!ba(u))return f;const h=(Fv(o)?[o]:t_(o)).reduce((p,v)=>mi(p)?p:p[v],u);return Wn(h)||h===u?Wn(u[o])?f:u[o]:h},Qu=u=>typeof u=="boolean",su=u=>typeof u=="function",On=(u,o,f)=>{let h=-1;const p=Fv(o)?[o]:t_(o),v=p.length,S=v-1;for(;++h<v;){const E=p[h];let x=f;if(h!==S){const w=u[E];x=ba(w)||Array.isArray(w)?w:isNaN(+p[h+1])?{}:[]}if(E==="__proto__"||E==="constructor"||E==="prototype")return;u[E]=x,u=u[E]}};const mx={BLUR:"blur",FOCUS_OUT:"focusout"},fu={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},jo={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},M3=ga.createContext(null);M3.displayName="HookFormControlContext";var U3=(u,o,f,h=!0)=>{const p={defaultValues:o._defaultValues};for(const v in u)Object.defineProperty(p,v,{get:()=>{const S=v;return o._proxyFormState[S]!==fu.all&&(o._proxyFormState[S]=!h||fu.all),u[S]}});return p};const N3=typeof window<"u"?ga.useLayoutEffect:ga.useEffect;var Vi=u=>typeof u=="string",j3=(u,o,f,h,p)=>Vi(u)?(h&&o.watch.add(u),We(f,u,p)):Array.isArray(u)?u.map(v=>(h&&o.watch.add(v),We(f,v))):(h&&(o.watchAll=!0),f),n_=u=>mi(u)||!hx(u);function es(u,o,f=new WeakSet){if(n_(u)||n_(o))return Object.is(u,o);if(Tf(u)&&Tf(o))return Object.is(u.getTime(),o.getTime());const h=Object.keys(u),p=Object.keys(o);if(h.length!==p.length)return!1;if(f.has(u)||f.has(o))return!0;f.add(u),f.add(o);for(const v of h){const S=u[v];if(!p.includes(v))return!1;if(v!=="ref"){const E=o[v];if(Tf(S)&&Tf(E)||ba(S)&&ba(E)||Array.isArray(S)&&Array.isArray(E)?!es(S,E,f):!Object.is(S,E))return!1}}return!0}const B3=ga.createContext(null);B3.displayName="HookFormContext";var a_=(u,o,f,h,p)=>o?{...f[u],types:{...f[u]&&f[u].types?f[u].types:{},[h]:p||!0}}:{},Ry=u=>Array.isArray(u)?u:[u],px=()=>{let u=[];return{get observers(){return u},next:p=>{for(const v of u)v.next&&v.next(p)},subscribe:p=>(u.push(p),{unsubscribe:()=>{u=u.filter(v=>v!==p)}}),unsubscribe:()=>{u=[]}}};function yx(u,o){const f={};for(const h in u)if(u.hasOwnProperty(h)){const p=u[h],v=o[h];if(p&&ba(p)&&v){const S=yx(p,v);ba(S)&&(f[h]=S)}else u[h]&&(f[h]=v)}return f}var $l=u=>ba(u)&&!Object.keys(u).length,l_=u=>u.type==="file",Wv=u=>{if(!PS)return!1;const o=u?u.ownerDocument:0;return u instanceof(o&&o.defaultView?o.defaultView.HTMLElement:HTMLElement)},gx=u=>u.type==="select-multiple",i_=u=>u.type==="radio",H3=u=>i_(u)||Cy(u),r_=u=>Wv(u)&&u.isConnected;function k3(u,o){const f=o.slice(0,-1).length;let h=0;for(;h<f;)u=Wn(u)?h++:u[o[h++]];return u}function V3(u){for(const o in u)if(u.hasOwnProperty(o)&&!Wn(u[o]))return!1;return!0}function Sa(u,o){const f=Array.isArray(o)?o:Fv(o)?[o]:t_(o),h=f.length===1?u:k3(u,f),p=f.length-1,v=f[p];return h&&delete h[v],p!==0&&(ba(h)&&$l(h)||Array.isArray(h)&&V3(h))&&Sa(u,f.slice(0,-1)),u}var q3=u=>{for(const o in u)if(su(u[o]))return!0;return!1};function vx(u){return Array.isArray(u)||ba(u)&&!q3(u)}function u_(u,o={}){for(const f in u){const h=u[f];vx(h)?(o[f]=Array.isArray(h)?[]:{},u_(h,o[f])):Wn(h)||(o[f]=!0)}return o}function kh(u,o,f){f||(f=u_(o));for(const h in u){const p=u[h];if(vx(p))Wn(o)||n_(f[h])?f[h]=u_(p,Array.isArray(p)?[]:{}):kh(p,mi(o)?{}:o[h],f[h]);else{const v=o[h];f[h]=!es(p,v)}}return f}const bx={value:!1,isValid:!1},Sx={value:!0,isValid:!0};var _x=u=>{if(Array.isArray(u)){if(u.length>1){const o=u.filter(f=>f&&f.checked&&!f.disabled).map(f=>f.value);return{value:o,isValid:!!o.length}}return u[0].checked&&!u[0].disabled?u[0].attributes&&!Wn(u[0].attributes.value)?Wn(u[0].value)||u[0].value===""?Sx:{value:u[0].value,isValid:!0}:Sx:bx}return bx},Ex=(u,{valueAsNumber:o,valueAsDate:f,setValueAs:h})=>Wn(u)?u:o?u===""?NaN:u&&+u:f&&Vi(u)?new Date(u):h?h(u):u;const Tx={isValid:!1,value:null};var xx=u=>Array.isArray(u)?u.reduce((o,f)=>f&&f.checked&&!f.disabled?{isValid:!0,value:f.value}:o,Tx):Tx;function Ax(u){const o=u.ref;return l_(o)?o.files:i_(o)?xx(u.refs).value:gx(o)?[...o.selectedOptions].map(({value:f})=>f):Cy(o)?_x(u.refs).value:Ex(Wn(o.value)?u.ref.value:o.value,u)}var L3=(u,o,f,h)=>{const p={};for(const v of u){const S=We(o,v);S&&On(p,v,S._f)}return{criteriaMode:f,names:[...u],fields:p,shouldUseNativeValidation:h}},Iv=u=>u instanceof RegExp,zy=u=>Wn(u)?u:Iv(u)?u.source:ba(u)?Iv(u.value)?u.value.source:u.value:u,wx=u=>({isOnSubmit:!u||u===fu.onSubmit,isOnBlur:u===fu.onBlur,isOnChange:u===fu.onChange,isOnAll:u===fu.all,isOnTouch:u===fu.onTouched});const Ox="AsyncFunction";var Y3=u=>!!u&&!!u.validate&&!!(su(u.validate)&&u.validate.constructor.name===Ox||ba(u.validate)&&Object.values(u.validate).find(o=>o.constructor.name===Ox)),G3=u=>u.mount&&(u.required||u.min||u.max||u.maxLength||u.minLength||u.pattern||u.validate),Cx=(u,o,f)=>!f&&(o.watchAll||o.watch.has(u)||[...o.watch].some(h=>u.startsWith(h)&&/^\.\w+/.test(u.slice(h.length))));const Dy=(u,o,f,h)=>{for(const p of f||Object.keys(u)){const v=We(u,p);if(v){const{_f:S,...E}=v;if(S){if(S.refs&&S.refs[0]&&o(S.refs[0],p)&&!h)return!0;if(S.ref&&o(S.ref,S.name)&&!h)return!0;if(Dy(E,o))break}else if(ba(E)&&Dy(E,o))break}}};function Rx(u,o,f){const h=We(u,f);if(h||Fv(f))return{error:h,name:f};const p=f.split(".");for(;p.length;){const v=p.join("."),S=We(o,v),E=We(u,v);if(S&&!Array.isArray(S)&&f!==v)return{name:f};if(E&&E.type)return{name:v,error:E};if(E&&E.root&&E.root.type)return{name:`${v}.root`,error:E.root};p.pop()}return{name:f}}var Z3=(u,o,f,h)=>{f(u);const{name:p,...v}=u;return $l(v)||Object.keys(v).length>=Object.keys(o).length||Object.keys(v).find(S=>o[S]===(!h||fu.all))},X3=(u,o,f)=>!u||!o||u===o||Ry(u).some(h=>h&&(f?h===o:h.startsWith(o)||o.startsWith(h))),$3=(u,o,f,h,p)=>p.isOnAll?!1:!f&&p.isOnTouch?!(o||u):(f?h.isOnBlur:p.isOnBlur)?!u:(f?h.isOnChange:p.isOnChange)?u:!0,Q3=(u,o)=>!e_(We(u,o)).length&&Sa(u,o),J3=(u,o,f)=>{const h=Ry(We(u,f));return On(h,"root",o[f]),On(u,f,h),u};function zx(u,o,f="validate"){if(Vi(u)||Array.isArray(u)&&u.every(Vi)||Qu(u)&&!u)return{type:f,message:Vi(u)?u:"",ref:o}}var Vh=u=>ba(u)&&!Iv(u)?u:{value:u,message:""},Dx=async(u,o,f,h,p,v)=>{const{ref:S,refs:E,required:x,maxLength:w,minLength:B,min:j,max:N,pattern:D,validate:L,name:Y,valueAsNumber:Z,mount:ie}=u._f,re=We(f,Y);if(!ie||o.has(Y))return{};const Oe=E?E[0]:S,Ce=R=>{p&&Oe.reportValidity&&(Oe.setCustomValidity(Qu(R)?"":R||""),Oe.reportValidity())},I={},Se=i_(S),Te=Cy(S),Ie=Se||Te,Ge=(Z||l_(S))&&Wn(S.value)&&Wn(re)||Wv(S)&&S.value===""||re===""||Array.isArray(re)&&!re.length,nt=a_.bind(null,Y,h,I),we=(R,oe,fe,De=jo.maxLength,W=jo.minLength)=>{const J=R?oe:fe;I[Y]={type:R?De:W,message:J,ref:S,...nt(R?De:W,J)}};if(v?!Array.isArray(re)||!re.length:x&&(!Ie&&(Ge||mi(re))||Qu(re)&&!re||Te&&!_x(E).isValid||Se&&!xx(E).isValid)){const{value:R,message:oe}=Vi(x)?{value:!!x,message:x}:Vh(x);if(R&&(I[Y]={type:jo.required,message:oe,ref:Oe,...nt(jo.required,oe)},!h))return Ce(oe),I}if(!Ge&&(!mi(j)||!mi(N))){let R,oe;const fe=Vh(N),De=Vh(j);if(!mi(re)&&!isNaN(re)){const W=S.valueAsNumber||re&&+re;mi(fe.value)||(R=W>fe.value),mi(De.value)||(oe=W<De.value)}else{const W=S.valueAsDate||new Date(re),J=Xe=>new Date(new Date().toDateString()+" "+Xe),be=S.type=="time",je=S.type=="week";Vi(fe.value)&&re&&(R=be?J(re)>J(fe.value):je?re>fe.value:W>new Date(fe.value)),Vi(De.value)&&re&&(oe=be?J(re)<J(De.value):je?re<De.value:W<new Date(De.value))}if((R||oe)&&(we(!!R,fe.message,De.message,jo.max,jo.min),!h))return Ce(I[Y].message),I}if((w||B)&&!Ge&&(Vi(re)||v&&Array.isArray(re))){const R=Vh(w),oe=Vh(B),fe=!mi(R.value)&&re.length>+R.value,De=!mi(oe.value)&&re.length<+oe.value;if((fe||De)&&(we(fe,R.message,oe.message),!h))return Ce(I[Y].message),I}if(D&&!Ge&&Vi(re)){const{value:R,message:oe}=Vh(D);if(Iv(R)&&!re.match(R)&&(I[Y]={type:jo.pattern,message:oe,ref:S,...nt(jo.pattern,oe)},!h))return Ce(oe),I}if(L){if(su(L)){const R=await L(re,f),oe=zx(R,Oe);if(oe&&(I[Y]={...oe,...nt(jo.validate,oe.message)},!h))return Ce(oe.message),I}else if(ba(L)){let R={};for(const oe in L){if(!$l(R)&&!h)break;const fe=zx(await L[oe](re,f),Oe,oe);fe&&(R={...fe,...nt(oe,fe.message)},Ce(fe.message),h&&(I[Y]=R))}if(!$l(R)&&(I[Y]={ref:Oe,...R},!h))return I}}return Ce(!0),I};const K3={mode:fu.onSubmit,reValidateMode:fu.onChange,shouldFocusError:!0};function F3(u={}){let o={...K3,...u},f={submitCount:0,isDirty:!1,isReady:!1,isLoading:su(o.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:o.errors||{},disabled:o.disabled||!1},h={},p=ba(o.defaultValues)||ba(o.values)?Ma(o.defaultValues||o.values)||{}:{},v=o.shouldUnregister?{}:Ma(p),S={action:!1,mount:!1,watch:!1,keepIsValid:!1},E={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},x,w=0;const B={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},j={...B};let N={...j};const D={array:px(),state:px()},L=o.criteriaMode===fu.all,Y=U=>P=>{clearTimeout(w),w=setTimeout(U,P)},Z=async U=>{if(!S.keepIsValid&&!o.disabled&&(j.isValid||N.isValid||U)){let P;o.resolver?(P=$l((await Ie()).errors),ie()):P=await nt(h,!0),P!==f.isValid&&D.state.next({isValid:P})}},ie=(U,P)=>{!o.disabled&&(j.isValidating||j.validatingFields||N.isValidating||N.validatingFields)&&((U||Array.from(E.mount)).forEach(de=>{de&&(P?On(f.validatingFields,de,P):Sa(f.validatingFields,de))}),D.state.next({validatingFields:f.validatingFields,isValidating:!$l(f.validatingFields)}))},re=(U,P=[],de,ze,Me=!0,Re=!0)=>{if(ze&&de&&!o.disabled){if(S.action=!0,Re&&Array.isArray(We(h,U))){const et=de(We(h,U),ze.argA,ze.argB);Me&&On(h,U,et)}if(Re&&Array.isArray(We(f.errors,U))){const et=de(We(f.errors,U),ze.argA,ze.argB);Me&&On(f.errors,U,et),Q3(f.errors,U)}if((j.touchedFields||N.touchedFields)&&Re&&Array.isArray(We(f.touchedFields,U))){const et=de(We(f.touchedFields,U),ze.argA,ze.argB);Me&&On(f.touchedFields,U,et)}(j.dirtyFields||N.dirtyFields)&&(f.dirtyFields=kh(p,v)),D.state.next({name:U,isDirty:R(U,P),dirtyFields:f.dirtyFields,errors:f.errors,isValid:f.isValid})}else On(v,U,P)},Oe=(U,P)=>{On(f.errors,U,P),D.state.next({errors:f.errors})},Ce=U=>{f.errors=U,D.state.next({errors:f.errors,isValid:!1})},I=(U,P,de,ze)=>{const Me=We(h,U);if(Me){const Re=We(v,U,Wn(de)?We(p,U):de);Wn(Re)||ze&&ze.defaultChecked||P?On(v,U,P?Re:Ax(Me._f)):De(U,Re),S.mount&&!S.action&&Z()}},Se=(U,P,de,ze,Me)=>{let Re=!1,et=!1;const Mt={name:U};if(!o.disabled){if(!de||ze){(j.isDirty||N.isDirty)&&(et=f.isDirty,f.isDirty=Mt.isDirty=R(),Re=et!==Mt.isDirty);const Ut=es(We(p,U),P);et=!!We(f.dirtyFields,U),Ut?Sa(f.dirtyFields,U):On(f.dirtyFields,U,!0),Mt.dirtyFields=f.dirtyFields,Re=Re||(j.dirtyFields||N.dirtyFields)&&et!==!Ut}if(de){const Ut=We(f.touchedFields,U);Ut||(On(f.touchedFields,U,de),Mt.touchedFields=f.touchedFields,Re=Re||(j.touchedFields||N.touchedFields)&&Ut!==de)}Re&&Me&&D.state.next(Mt)}return Re?Mt:{}},Te=(U,P,de,ze)=>{const Me=We(f.errors,U),Re=(j.isValid||N.isValid)&&Qu(P)&&f.isValid!==P;if(o.delayError&&de?(x=Y(()=>Oe(U,de)),x(o.delayError)):(clearTimeout(w),x=null,de?On(f.errors,U,de):Sa(f.errors,U)),(de?!es(Me,de):Me)||!$l(ze)||Re){const et={...ze,...Re&&Qu(P)?{isValid:P}:{},errors:f.errors,name:U};f={...f,...et},D.state.next(et)}},Ie=async U=>(ie(U,!0),await o.resolver(v,o.context,L3(U||E.mount,h,o.criteriaMode,o.shouldUseNativeValidation))),Ge=async U=>{const{errors:P}=await Ie(U);if(ie(U),U)for(const de of U){const ze=We(P,de);ze?On(f.errors,de,ze):Sa(f.errors,de)}else f.errors=P;return P},nt=async(U,P,de={valid:!0})=>{for(const ze in U){const Me=U[ze];if(Me){const{_f:Re,...et}=Me;if(Re){const Mt=E.array.has(Re.name),Ut=Me._f&&Y3(Me._f);Ut&&j.validatingFields&&ie([Re.name],!0);const In=await Dx(Me,E.disabled,v,L,o.shouldUseNativeValidation&&!P,Mt);if(Ut&&j.validatingFields&&ie([Re.name]),In[Re.name]&&(de.valid=!1,P||u.shouldUseNativeValidation))break;!P&&(We(In,Re.name)?Mt?J3(f.errors,In,Re.name):On(f.errors,Re.name,In[Re.name]):Sa(f.errors,Re.name))}!$l(et)&&await nt(et,P,de)}}return de.valid},we=()=>{for(const U of E.unMount){const P=We(h,U);P&&(P._f.refs?P._f.refs.every(de=>!r_(de)):!r_(P._f.ref))&&Ve(U)}E.unMount=new Set},R=(U,P)=>!o.disabled&&(U&&P&&On(v,U,P),!es(z(),p)),oe=(U,P,de)=>j3(U,E,{...S.mount?v:Wn(P)?p:Vi(U)?{[U]:P}:P},de,P),fe=U=>e_(We(S.mount?v:p,U,o.shouldUnregister?We(p,U,[]):[])),De=(U,P,de={})=>{const ze=We(h,U);let Me=P;if(ze){const Re=ze._f;Re&&(!Re.disabled&&On(v,U,Ex(P,Re)),Me=Wv(Re.ref)&&mi(P)?"":P,gx(Re.ref)?[...Re.ref.options].forEach(et=>et.selected=Me.includes(et.value)):Re.refs?Cy(Re.ref)?Re.refs.forEach(et=>{(!et.defaultChecked||!et.disabled)&&(Array.isArray(Me)?et.checked=!!Me.find(Mt=>Mt===et.value):et.checked=Me===et.value||!!Me)}):Re.refs.forEach(et=>et.checked=et.value===Me):l_(Re.ref)?Re.ref.value="":(Re.ref.value=Me,Re.ref.type||D.state.next({name:U,values:Ma(v)})))}(de.shouldDirty||de.shouldTouch)&&Se(U,Me,de.shouldTouch,de.shouldDirty,!0),de.shouldValidate&&Xe(U)},W=(U,P,de)=>{for(const ze in P){if(!P.hasOwnProperty(ze))return;const Me=P[ze],Re=U+"."+ze,et=We(h,Re);(E.array.has(U)||ba(Me)||et&&!et._f)&&!Tf(Me)?W(Re,Me,de):De(Re,Me,de)}},J=(U,P,de={})=>{const ze=We(h,U),Me=E.array.has(U),Re=Ma(P);On(v,U,Re),Me?(D.array.next({name:U,values:Ma(v)}),(j.isDirty||j.dirtyFields||N.isDirty||N.dirtyFields)&&de.shouldDirty&&D.state.next({name:U,dirtyFields:kh(p,v),isDirty:R(U,Re)})):ze&&!ze._f&&!mi(Re)?W(U,Re,de):De(U,Re,de),Cx(U,E)?D.state.next({...f,name:U,values:Ma(v)}):D.state.next({name:S.mount?U:void 0,values:Ma(v)})},be=async U=>{S.mount=!0;const P=U.target;let de=P.name,ze=!0;const Me=We(h,de),Re=Ut=>{ze=Number.isNaN(Ut)||Tf(Ut)&&isNaN(Ut.getTime())||es(Ut,We(v,de,Ut))},et=wx(o.mode),Mt=wx(o.reValidateMode);if(Me){let Ut,In;const Ql=P.type?Ax(Me._f):C3(U),xl=U.type===mx.BLUR||U.type===mx.FOCUS_OUT,Jl=!G3(Me._f)&&!o.resolver&&!We(f.errors,de)&&!Me._f.deps||$3(xl,We(f.touchedFields,de),f.isSubmitted,Mt,et),Dn=Cx(de,E,xl);On(v,de,Ql),xl?(!P||!P.readOnly)&&(Me._f.onBlur&&Me._f.onBlur(U),x&&x(0)):Me._f.onChange&&Me._f.onChange(U);const Ea=Se(de,Ql,xl),la=!$l(Ea)||Dn;if(!xl&&D.state.next({name:de,type:U.type,values:Ma(v)}),Jl)return(j.isValid||N.isValid)&&(o.mode==="onBlur"?xl&&Z():xl||Z()),la&&D.state.next({name:de,...Dn?{}:Ea});if(!xl&&Dn&&D.state.next({...f}),o.resolver){const{errors:hu}=await Ie([de]);if(ie([de]),Re(Ql),ze){const fr=Rx(f.errors,h,de),O=Rx(hu,h,fr.name||de);Ut=O.error,de=O.name,In=$l(hu)}}else ie([de],!0),Ut=(await Dx(Me,E.disabled,v,L,o.shouldUseNativeValidation))[de],ie([de]),Re(Ql),ze&&(Ut?In=!1:(j.isValid||N.isValid)&&(In=await nt(h,!0)));ze&&(Me._f.deps&&(!Array.isArray(Me._f.deps)||Me._f.deps.length>0)&&Xe(Me._f.deps),Te(de,In,Ut,Ea))}},je=(U,P)=>{if(We(f.errors,P)&&U.focus)return U.focus(),1},Xe=async(U,P={})=>{let de,ze;const Me=Ry(U);if(o.resolver){const Re=await Ge(Wn(U)?U:Me);de=$l(Re),ze=U?!Me.some(et=>We(Re,et)):de}else U?(ze=(await Promise.all(Me.map(async Re=>{const et=We(h,Re);return await nt(et&&et._f?{[Re]:et}:et)}))).every(Boolean),!(!ze&&!f.isValid)&&Z()):ze=de=await nt(h);return D.state.next({...!Vi(U)||(j.isValid||N.isValid)&&de!==f.isValid?{}:{name:U},...o.resolver||!U?{isValid:de}:{},errors:f.errors}),P.shouldFocus&&!ze&&Dy(h,je,U?Me:E.mount),ze},z=(U,P)=>{let de={...S.mount?v:p};return P&&(de=yx(P.dirtyFields?f.dirtyFields:f.touchedFields,de)),Wn(U)?de:Vi(U)?We(de,U):U.map(ze=>We(de,ze))},M=(U,P)=>({invalid:!!We((P||f).errors,U),isDirty:!!We((P||f).dirtyFields,U),error:We((P||f).errors,U),isValidating:!!We(f.validatingFields,U),isTouched:!!We((P||f).touchedFields,U)}),te=U=>{U&&Ry(U).forEach(P=>Sa(f.errors,P)),D.state.next({errors:U?f.errors:{}})},he=(U,P,de)=>{const ze=(We(h,U,{_f:{}})._f||{}).ref,Me=We(f.errors,U)||{},{ref:Re,message:et,type:Mt,...Ut}=Me;On(f.errors,U,{...Ut,...P,ref:ze}),D.state.next({name:U,errors:f.errors,isValid:!1}),de&&de.shouldFocus&&ze&&ze.focus&&ze.focus()},me=(U,P)=>su(U)?D.state.subscribe({next:de=>"values"in de&&U(oe(void 0,P),de)}):oe(U,P,!0),Ue=U=>D.state.subscribe({next:P=>{X3(U.name,P.name,U.exact)&&Z3(P,U.formState||j,sa,U.reRenderRoot)&&U.callback({values:{...v},...f,...P,defaultValues:p})}}).unsubscribe,Le=U=>(S.mount=!0,N={...N,...U.formState},Ue({...U,formState:{...B,...U.formState}})),Ve=(U,P={})=>{for(const de of U?Ry(U):E.mount)E.mount.delete(de),E.array.delete(de),P.keepValue||(Sa(h,de),Sa(v,de)),!P.keepError&&Sa(f.errors,de),!P.keepDirty&&Sa(f.dirtyFields,de),!P.keepTouched&&Sa(f.touchedFields,de),!P.keepIsValidating&&Sa(f.validatingFields,de),!o.shouldUnregister&&!P.keepDefaultValue&&Sa(p,de);D.state.next({values:Ma(v)}),D.state.next({...f,...P.keepDirty?{isDirty:R()}:{}}),!P.keepIsValid&&Z()},Je=({disabled:U,name:P})=>{if(Qu(U)&&S.mount||U||E.disabled.has(P)){const Me=E.disabled.has(P)!==!!U;U?E.disabled.add(P):E.disabled.delete(P),Me&&S.mount&&!S.action&&Z()}},st=(U,P={})=>{let de=We(h,U);const ze=Qu(P.disabled)||Qu(o.disabled);return On(h,U,{...de||{},_f:{...de&&de._f?de._f:{ref:{name:U}},name:U,mount:!0,...P}}),E.mount.add(U),de?Je({disabled:Qu(P.disabled)?P.disabled:o.disabled,name:U}):I(U,!0,P.value),{...ze?{disabled:P.disabled||o.disabled}:{},...o.progressive?{required:!!P.required,min:zy(P.min),max:zy(P.max),minLength:zy(P.minLength),maxLength:zy(P.maxLength),pattern:zy(P.pattern)}:{},name:U,onChange:be,onBlur:be,ref:Me=>{if(Me){st(U,P),de=We(h,U);const Re=Wn(Me.value)&&Me.querySelectorAll&&Me.querySelectorAll("input,select,textarea")[0]||Me,et=H3(Re),Mt=de._f.refs||[];if(et?Mt.find(Ut=>Ut===Re):Re===de._f.ref)return;On(h,U,{_f:{...de._f,...et?{refs:[...Mt.filter(r_),Re,...Array.isArray(We(p,U))?[{}]:[]],ref:{type:Re.type,name:U}}:{ref:Re}}}),I(U,!1,void 0,Re)}else de=We(h,U,{}),de._f&&(de._f.mount=!1),(o.shouldUnregister||P.shouldUnregister)&&!(z3(E.array,U)&&S.action)&&E.unMount.add(U)}}},dt=()=>o.shouldFocusError&&Dy(h,je,E.mount),Ne=U=>{Qu(U)&&(D.state.next({disabled:U}),Dy(h,(P,de)=>{const ze=We(h,de);ze&&(P.disabled=ze._f.disabled||U,Array.isArray(ze._f.refs)&&ze._f.refs.forEach(Me=>{Me.disabled=ze._f.disabled||U}))},0,!1))},qe=(U,P)=>async de=>{let ze;de&&(de.preventDefault&&de.preventDefault(),de.persist&&de.persist());let Me=Ma(v);if(D.state.next({isSubmitting:!0}),o.resolver){const{errors:Re,values:et}=await Ie();ie(),f.errors=Re,Me=Ma(et)}else await nt(h);if(E.disabled.size)for(const Re of E.disabled)Sa(Me,Re);if(Sa(f.errors,"root"),$l(f.errors)){D.state.next({errors:{}});try{await U(Me,de)}catch(Re){ze=Re}}else P&&await P({...f.errors},de),dt(),setTimeout(dt);if(D.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$l(f.errors)&&!ze,submitCount:f.submitCount+1,errors:f.errors}),ze)throw ze},_n=(U,P={})=>{We(h,U)&&(Wn(P.defaultValue)?J(U,Ma(We(p,U))):(J(U,P.defaultValue),On(p,U,Ma(P.defaultValue))),P.keepTouched||Sa(f.touchedFields,U),P.keepDirty||(Sa(f.dirtyFields,U),f.isDirty=P.defaultValue?R(U,Ma(We(p,U))):R()),P.keepError||(Sa(f.errors,U),j.isValid&&Z()),D.state.next({...f}))},Ua=(U,P={})=>{const de=U?Ma(U):p,ze=Ma(de),Me=$l(U),Re=Me?p:ze;if(P.keepDefaultValues||(p=de),!P.keepValues){if(P.keepDirtyValues){const et=new Set([...E.mount,...Object.keys(kh(p,v))]);for(const Mt of Array.from(et)){const Ut=We(f.dirtyFields,Mt),In=We(v,Mt),Ql=We(Re,Mt);Ut&&!Wn(In)?On(Re,Mt,In):!Ut&&!Wn(Ql)&&J(Mt,Ql)}}else{if(PS&&Wn(U))for(const et of E.mount){const Mt=We(h,et);if(Mt&&Mt._f){const Ut=Array.isArray(Mt._f.refs)?Mt._f.refs[0]:Mt._f.ref;if(Wv(Ut)){const In=Ut.closest("form");if(In){In.reset();break}}}}if(P.keepFieldsRef)for(const et of E.mount)J(et,We(Re,et));else h={}}v=o.shouldUnregister?P.keepDefaultValues?Ma(p):{}:Ma(Re),D.array.next({values:{...Re}}),D.state.next({values:{...Re}})}E={mount:P.keepDirtyValues?E.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},S.mount=!j.isValid||!!P.keepIsValid||!!P.keepDirtyValues||!o.shouldUnregister&&!$l(Re),S.watch=!!o.shouldUnregister,S.keepIsValid=!!P.keepIsValid,S.action=!1,P.keepErrors||(f.errors={}),D.state.next({submitCount:P.keepSubmitCount?f.submitCount:0,isDirty:Me?!1:P.keepDirty?f.isDirty:!!(P.keepDefaultValues&&!es(U,p)),isSubmitted:P.keepIsSubmitted?f.isSubmitted:!1,dirtyFields:Me?{}:P.keepDirtyValues?P.keepDefaultValues&&v?kh(p,v):f.dirtyFields:P.keepDefaultValues&&U?kh(p,U):P.keepDirty?f.dirtyFields:{},touchedFields:P.keepTouched?f.touchedFields:{},errors:P.keepErrors?f.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?f.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:p})},Ka=(U,P)=>Ua(su(U)?U(v):U,{...o.resetOptions,...P}),Kt=(U,P={})=>{const de=We(h,U),ze=de&&de._f;if(ze){const Me=ze.refs?ze.refs[0]:ze.ref;Me.focus&&setTimeout(()=>{Me.focus(),P.shouldSelect&&su(Me.select)&&Me.select()})}},sa=U=>{f={...f,...U}},Iu={control:{register:st,unregister:Ve,getFieldState:M,handleSubmit:qe,setError:he,_subscribe:Ue,_runSchema:Ie,_updateIsValidating:ie,_focusError:dt,_getWatch:oe,_getDirty:R,_setValid:Z,_setFieldArray:re,_setDisabledField:Je,_setErrors:Ce,_getFieldArray:fe,_reset:Ua,_resetDefaultValues:()=>su(o.defaultValues)&&o.defaultValues().then(U=>{Ka(U,o.resetOptions),D.state.next({isLoading:!1})}),_removeUnmounted:we,_disableForm:Ne,_subjects:D,_proxyFormState:j,get _fields(){return h},get _formValues(){return v},get _state(){return S},set _state(U){S=U},get _defaultValues(){return p},get _names(){return E},set _names(U){E=U},get _formState(){return f},get _options(){return o},set _options(U){o={...o,...U}}},subscribe:Le,trigger:Xe,register:st,handleSubmit:qe,watch:me,setValue:J,getValues:z,reset:Ka,resetField:_n,clearErrors:te,unregister:Ve,setError:he,setFocus:Kt,getFieldState:M};return{...Iu,formControl:Iu}}function W3(u={}){const o=ga.useRef(void 0),f=ga.useRef(void 0),[h,p]=ga.useState({isDirty:!1,isValidating:!1,isLoading:su(u.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:u.errors||{},disabled:u.disabled||!1,isReady:!1,defaultValues:su(u.defaultValues)?void 0:u.defaultValues});if(!o.current)if(u.formControl)o.current={...u.formControl,formState:h},u.defaultValues&&!su(u.defaultValues)&&u.formControl.reset(u.defaultValues,u.resetOptions);else{const{formControl:S,...E}=F3(u);o.current={...E,formState:h}}const v=o.current.control;return v._options=u,N3(()=>{const S=v._subscribe({formState:v._proxyFormState,callback:()=>p({...v._formState}),reRenderRoot:!0});return p(E=>({...E,isReady:!0})),v._formState.isReady=!0,S},[v]),ga.useEffect(()=>v._disableForm(u.disabled),[v,u.disabled]),ga.useEffect(()=>{u.mode&&(v._options.mode=u.mode),u.reValidateMode&&(v._options.reValidateMode=u.reValidateMode)},[v,u.mode,u.reValidateMode]),ga.useEffect(()=>{u.errors&&(v._setErrors(u.errors),v._focusError())},[v,u.errors]),ga.useEffect(()=>{u.shouldUnregister&&v._subjects.state.next({values:v._getWatch()})},[v,u.shouldUnregister]),ga.useEffect(()=>{if(v._proxyFormState.isDirty){const S=v._getDirty();S!==h.isDirty&&v._subjects.state.next({isDirty:S})}},[v,h.isDirty]),ga.useEffect(()=>{var S;u.values&&!es(u.values,f.current)?(v._reset(u.values,{keepFieldsRef:!0,...v._options.resetOptions}),!((S=v._options.resetOptions)===null||S===void 0)&&S.keepIsValid||v._setValid(),f.current=u.values,p(E=>({...E}))):v._resetDefaultValues()},[v,u.values]),ga.useEffect(()=>{v._state.mount||(v._setValid(),v._state.mount=!0),v._state.watch&&(v._state.watch=!1,v._subjects.state.next({...v._formState})),v._removeUnmounted()}),o.current.formState=ga.useMemo(()=>U3(h,v),[v,h]),o.current}const Mx=(u,o,f)=>{if(u&&"reportValidity"in u){const h=We(f,o);u.setCustomValidity(h&&h.message||""),u.reportValidity()}},o_=(u,o)=>{for(const f in o.fields){const h=o.fields[f];h&&h.ref&&"reportValidity"in h.ref?Mx(h.ref,f,u):h&&h.refs&&h.refs.forEach(p=>Mx(p,f,u))}},Ux=(u,o)=>{o.shouldUseNativeValidation&&o_(u,o);const f={};for(const h in u){const p=We(o.fields,h),v=Object.assign(u[h]||{},{ref:p&&p.ref});if(I3(o.names||Object.keys(u),h)){const S=Object.assign({},We(f,h));On(S,"root",v),On(f,h,S)}else On(f,h,v)}return f},I3=(u,o)=>{const f=Nx(o);return u.some(h=>Nx(h).match(`^${f}\\.\\d+`))};function Nx(u){return u.replace(/\]|\[/g,"")}function jx(u,o,f){function h(E,x){var w;Object.defineProperty(E,"_zod",{value:E._zod??{},enumerable:!1}),(w=E._zod).traits??(w.traits=new Set),E._zod.traits.add(u),o(E,x);for(const B in S.prototype)B in E||Object.defineProperty(E,B,{value:S.prototype[B].bind(E)});E._zod.constr=S,E._zod.def=x}const p=f?.Parent??Object;class v extends p{}Object.defineProperty(v,"name",{value:u});function S(E){var x;const w=f?.Parent?new v:this;h(w,E),(x=w._zod).deferred??(x.deferred=[]);for(const B of w._zod.deferred)B();return w}return Object.defineProperty(S,"init",{value:h}),Object.defineProperty(S,Symbol.hasInstance,{value:E=>f?.Parent&&E instanceof f.Parent?!0:E?._zod?.traits?.has(u)}),Object.defineProperty(S,"name",{value:u}),S}class P3 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const e4={};function Bx(u){return e4}function t4(u,o){return typeof o=="bigint"?o.toString():o}const Hx=Error.captureStackTrace?Error.captureStackTrace:(...u)=>{};function Pv(u){return typeof u=="string"?u:u?.message}function kx(u,o,f){const h={...u,path:u.path??[]};if(!u.message){const p=Pv(u.inst?._zod.def?.error?.(u))??Pv(o?.error?.(u))??Pv(f.customError?.(u))??Pv(f.localeError?.(u))??"Invalid input";h.message=p}return delete h.inst,delete h.continue,o?.reportInput||delete h.input,h}const Vx=(u,o)=>{u.name="$ZodError",Object.defineProperty(u,"_zod",{value:u._zod,enumerable:!1}),Object.defineProperty(u,"issues",{value:o,enumerable:!1}),Object.defineProperty(u,"message",{get(){return JSON.stringify(o,t4,2)},enumerable:!0}),Object.defineProperty(u,"toString",{value:()=>u.message,enumerable:!1})},n4=jx("$ZodError",Vx),qx=jx("$ZodError",Vx,{Parent:Error}),a4=(u=>(o,f,h,p)=>{const v=h?Object.assign(h,{async:!1}):{async:!1},S=o._zod.run({value:f,issues:[]},v);if(S instanceof Promise)throw new P3;if(S.issues.length){const E=new(p?.Err??u)(S.issues.map(x=>kx(x,v,Bx())));throw Hx(E,p?.callee),E}return S.value})(qx),l4=(u=>async(o,f,h,p)=>{const v=h?Object.assign(h,{async:!0}):{async:!0};let S=o._zod.run({value:f,issues:[]},v);if(S instanceof Promise&&(S=await S),S.issues.length){const E=new(p?.Err??u)(S.issues.map(x=>kx(x,v,Bx())));throw Hx(E,p?.callee),E}return S.value})(qx);function Lx(u,o){try{var f=u()}catch(h){return o(h)}return f&&f.then?f.then(void 0,o):f}function i4(u,o){for(var f={};u.length;){var h=u[0],p=h.code,v=h.message,S=h.path.join(".");if(!f[S])if("unionErrors"in h){var E=h.unionErrors[0].errors[0];f[S]={message:E.message,type:E.code}}else f[S]={message:v,type:p};if("unionErrors"in h&&h.unionErrors.forEach(function(B){return B.errors.forEach(function(j){return u.push(j)})}),o){var x=f[S].types,w=x&&x[h.code];f[S]=a_(S,o,f,p,w?[].concat(w,h.message):h.message)}u.shift()}return f}function r4(u,o){for(var f={};u.length;){var h=u[0],p=h.code,v=h.message,S=h.path.join(".");if(!f[S])if(h.code==="invalid_union"&&h.errors.length>0){var E=h.errors[0][0];f[S]={message:E.message,type:E.code}}else f[S]={message:v,type:p};if(h.code==="invalid_union"&&h.errors.forEach(function(B){return B.forEach(function(j){return u.push(j)})}),o){var x=f[S].types,w=x&&x[h.code];f[S]=a_(S,o,f,p,w?[].concat(w,h.message):h.message)}u.shift()}return f}function u4(u,o,f){if(f===void 0&&(f={}),(function(h){return"_def"in h&&typeof h._def=="object"&&"typeName"in h._def})(u))return function(h,p,v){try{return Promise.resolve(Lx(function(){return Promise.resolve(u[f.mode==="sync"?"parse":"parseAsync"](h,o)).then(function(S){return v.shouldUseNativeValidation&&o_({},v),{errors:{},values:f.raw?Object.assign({},h):S}})},function(S){if((function(E){return Array.isArray(E?.issues)})(S))return{values:{},errors:Ux(i4(S.errors,!v.shouldUseNativeValidation&&v.criteriaMode==="all"),v)};throw S}))}catch(S){return Promise.reject(S)}};if((function(h){return"_zod"in h&&typeof h._zod=="object"})(u))return function(h,p,v){try{return Promise.resolve(Lx(function(){return Promise.resolve((f.mode==="sync"?a4:l4)(u,h,o)).then(function(S){return v.shouldUseNativeValidation&&o_({},v),{errors:{},values:f.raw?Object.assign({},h):S}})},function(S){if((function(E){return E instanceof n4})(S))return{values:{},errors:Ux(r4(S.issues,!v.shouldUseNativeValidation&&v.criteriaMode==="all"),v)};throw S}))}catch(S){return Promise.reject(S)}};throw new Error("Invalid input: not a Zod schema")}const o4=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c4=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,f,h)=>h?h.toUpperCase():f.toLowerCase()),Yx=u=>{const o=c4(u);return o.charAt(0).toUpperCase()+o.slice(1)},Gx=(...u)=>u.filter((o,f,h)=>!!o&&o.trim()!==""&&h.indexOf(o)===f).join(" ").trim(),s4=u=>{for(const o in u)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};var f4={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const d4=vt.forwardRef(({color:u="currentColor",size:o=24,strokeWidth:f=2,absoluteStrokeWidth:h,className:p="",children:v,iconNode:S,...E},x)=>vt.createElement("svg",{ref:x,...f4,width:o,height:o,stroke:u,strokeWidth:h?Number(f)*24/Number(o):f,className:Gx("lucide",p),...!v&&!s4(E)&&{"aria-hidden":"true"},...E},[...S.map(([w,B])=>vt.createElement(w,B)),...Array.isArray(v)?v:[v]]));const Zx=(u,o)=>{const f=vt.forwardRef(({className:h,...p},v)=>vt.createElement(d4,{ref:v,iconNode:o,className:Gx(`lucide-${o4(Yx(u))}`,`lucide-${u}`,h),...p}));return f.displayName=Yx(u),f};const c_=Zx("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const h4=Zx("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function eb(u){for(var o=1;o<arguments.length;o++){var f=arguments[o];for(var h in f)u[h]=f[h]}return u}var m4={read:function(u){return u[0]==='"'&&(u=u.slice(1,-1)),u.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(u){return encodeURIComponent(u).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function s_(u,o){function f(p,v,S){if(!(typeof document>"u")){S=eb({},o,S),typeof S.expires=="number"&&(S.expires=new Date(Date.now()+S.expires*864e5)),S.expires&&(S.expires=S.expires.toUTCString()),p=encodeURIComponent(p).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var E="";for(var x in S)S[x]&&(E+="; "+x,S[x]!==!0&&(E+="="+S[x].split(";")[0]));return document.cookie=p+"="+u.write(v,p)+E}}function h(p){if(!(typeof document>"u"||arguments.length&&!p)){for(var v=document.cookie?document.cookie.split("; "):[],S={},E=0;E<v.length;E++){var x=v[E].split("="),w=x.slice(1).join("=");try{var B=decodeURIComponent(x[0]);if(S[B]=u.read(w,B),p===B)break}catch{}}return p?S[p]:S}}return Object.create({set:f,get:h,remove:function(p,v){f(p,"",eb({},v,{expires:-1}))},withAttributes:function(p){return s_(this.converter,eb({},this.attributes,p))},withConverter:function(p){return s_(eb({},this.converter,p),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(u)}})}var qh=s_(m4,{path:"/"});const Xx=async({document:u,products:o})=>{const f="https://pbm.santoremedio.adsolucoes.com.br/api/v1",h=qh.get("pbm-token");if(!h)throw new Error("Token is not defined in cookies or is expired");const v=await(await fetch(`${f}/products/benefitByDocument`,{method:"POST",headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"},body:JSON.stringify({consumer:{document:u},products:o})})).json();if(!v.success)throw new Error(v.message||"Failed to fetch document validation");return v};function xf(u){return Ee.jsx("button",{...u,className:Hi("w-3xs cursor-pointer h-10 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-white text-sm font-semibold transition-colors",u.className),children:u.children})}function p4({setLoading:u}){const{setSecurityNumber:o,setState:f,securityNumber:h,targetProduct:p,setUrlAcceptTerms:v,setUrlRegisterIndustry:S,setCardID:E}=Xu(),[x,w]=vt.useState(!1),{handleSubmit:B,register:j,setValue:N,clearErrors:D,unregister:L,formState:{errors:Y}}=W3({resolver:u4(w3),mode:"onSubmit",defaultValues:{securityNumber:h||"",coupon:""}}),Z=async ie=>{x||N("coupon",void 0,{shouldValidate:!1}),x&&ie.coupon!=null&&E(ie.coupon),u(!0);try{if(p===null){console.error("PBMLOG: Product is not defined!");return}if(!p.productId){console.error("PBMLOG: Product ID is not defined!");return}if(!p.listPrice){console.error("PBMLOG: List Price is not defined!");return}const re=await Xx({document:ie.securityNumber.replace(/\D/g,""),products:[{productId:p.productId,ean:p.ean,requestedQuantity:1,listPrice:p.listPrice,netPrice:p.netPrice??p.listPrice}]});if(re.success){const Oe={acceptance:"isInvalid","industry registration":"isRegistered",active:"isActivated"};if(o(ie.securityNumber),f(Oe[re.data.product[0].statusCustomer]),Oe[re.data.product[0].statusCustomer]==="isInvalid"){v(re.data.product[0].urlAcceptTerm||void 0);return}if(Oe[re.data.product[0].statusCustomer]==="isRegistered"){S(re.data.product[0].informativeLink);return}}}catch(re){console.error("PBMLOG: Error validating document -",re)}finally{u(!1)}};return Ee.jsxs(Ee.Fragment,{children:[Ee.jsxs("form",{onSubmit:B(Z),className:Hi("w-full h-auto flex items-center justify-center mb-0 transition-all duration-150",{"mb-4":Y.securityNumber||Y.coupon&&x,"gap-2":x}),id:"form_security_number_pbm",children:[Ee.jsxs("label",{htmlFor:"cpf",className:"w-4/5 h-auto flex items-start flex-col justify-center relative py-2",id:"label_security_number_pbm",children:[Ee.jsx("input",{type:"text",className:Hi("w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",{"outline outline-red-600":Y.securityNumber,"rounded-lg":x}),placeholder:"Digite seu CPF aqui...",required:!0,maxLength:14,...j("securityNumber",{onChange:ie=>{const re=O3(ie.target.value);N("securityNumber",re,{shouldValidate:!0})}}),defaultValue:h||"",id:"input_security_number_pbm"}),Y.securityNumber&&Ee.jsx("span",{className:"text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap",id:"security_number_form_error",children:Y.securityNumber.message})]}),x&&Ee.jsxs("label",{htmlFor:"coupon",className:"w-4/5 h-auto flex items-start flex-col justify-center relative py-2",id:"label_coupon_pbm",children:[Ee.jsx("input",{type:"text",className:Hi("w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",{"outline outline-red-600":Y.coupon,"rounded-lg":x}),placeholder:"Cupom / ID do Cartão",...j("coupon",{required:x?"Cupom / ID do Cartão obrigatório.":!1,shouldUnregister:!x,onChange:ie=>{N("coupon",ie.target.value,{shouldValidate:x})}}),id:"input_coupon_pbm"}),Y.coupon&&Ee.jsx("span",{className:"text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap",id:"coupon_form_error",children:Y.coupon.message})]}),Ee.jsx("button",{type:"submit",className:Hi("bg-emerald-500 w-1/5 h-10 rounded-e-lg flex items-center justify-center cursor-pointer",{"rounded-lg":x}),id:"button_submit_security_number_pbm",children:Ee.jsx(c_,{size:24,color:"white",strokeWidth:2})})]}),Ee.jsxs("section",{className:"flex items-center-safe justify-between",children:[Ee.jsxs(xf,{className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",onClick:()=>{const ie=!x;w(ie),ie||(L("coupon"),D("coupon"))},id:"check_benefits_button",children:[Ee.jsx("span",{children:x?"Não possui Cupom / ID do Cartão??":"Possui Cupom / ID do Cartão?"}),Ee.jsx(c_,{size:16,className:Hi({"rotate-0":!x,"rotate-180":x})})]}),Ee.jsxs(xf,{className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",onClick:()=>f("isPreview"),id:"check_benefits_button",children:[Ee.jsx("span",{children:"Consultar Benefícios"}),Ee.jsx(c_,{size:16})]})]})]})}function y4({textColor:u}){return Ee.jsxs("main",{className:"flex items-center justify-center gap-4",id:"loading_pbm",children:[Ee.jsx("div",{"data-testid":"test_id_spin",className:"w-8 h-8 border-4 border-t-gray-700 border-gray-300 rounded-full animate-spin",id:"loading_spin"}),Ee.jsx("p",{className:"text-sm font-semibold text-start text-zinc-900",style:{color:u},id:"loading_label",children:"Um momento... estamos verificando seus dados."})]})}function My(u){return Ee.jsx("h2",{className:Hi("text-start font-semibold text-sm text-zinc-900",u.className),style:{color:u.textColor,fontSize:u.textSize,textAlign:u.textAlign},"data-testid":"test_id_title",id:"title_pbm",children:u.children})}const g4={modal:{id:"",open:!1}},$x=$C(u=>({...g4,setModal:o=>u({modal:o})}));function v4({size:u}){return Ee.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Camada 1",viewBox:"0 0 500 500",width:u,height:u,children:Ee.jsx("path",{d:"M421.44 78.56C375.64 32.77 314.76 7.55 250 7.55S124.36 32.77 78.56 78.56C32.77 124.36 7.55 185.24 7.55 250s25.22 125.64 71.01 171.44c45.8 45.79 106.68 71.01 171.44 71.01s125.64-25.22 171.44-71.01c45.79-45.8 71.01-106.68 71.01-171.44s-25.22-125.64-71.01-171.44zm-49.17 121.7L242.88 334.63c-8.98 9.29-23.57 10.17-33.59 2.02l-79.63-64.7c-10.69-8.67-12.33-24.38-3.66-35.07 8.67-10.69 24.38-12.33 35.07-3.65l61.9 50.39L336.5 165.74c4.4-4.75 10.48-7.59 16.95-7.93a24.88 24.88 0 0118.83 7.26c9.72 9.72 9.71 25.48 0 35.19z",fill:"#229b00"})})}function b4({size:u}){return Ee.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Camada 1",viewBox:"0 0 500 500",width:u,height:u,children:[Ee.jsx("circle",{cx:250,cy:250,r:237.45,fill:"#fff"}),Ee.jsx("path",{d:"M250 492.45c-64.76 0-125.64-25.22-171.44-71.01C32.77 375.64 7.55 314.76 7.55 250S32.77 124.36 78.56 78.56C124.36 32.77 185.24 7.55 250 7.55s125.64 25.22 171.44 71.01c45.79 45.79 71.01 106.68 71.01 171.44s-25.22 125.64-71.01 171.44c-45.79 45.79-106.68 71.01-171.44 71.01zm0-474.9C121.83 17.55 17.55 121.83 17.55 250S121.83 482.45 250 482.45 482.45 378.17 482.45 250 378.17 17.55 250 17.55z",fill:"#d8d8d8"})]})}const Qx={CheckON:v4,CheckOFF:b4};function S4({data:u,onChange:o,checked:f}){const{setAvailableDiscountSelected:h,state:p,isAuthenticatedShopper:v}=Xu(),{setModal:S}=$x(),[E,x]=vt.useState(!1),w="unity_quantity_"+u.authorizedQuantity,B=u.discountPercentual/100,j=u.grossPrice*B,N=j*u.authorizedQuantity,D=u.grossPrice*u.authorizedQuantity-N,L=vt.useCallback(()=>{if(f){const Z=ie=>Math.round(ie*100)/100;h({discount:{total:Z(N),unit:Z(j)},quantity:u.authorizedQuantity,totalPrice:Z(D),grossPrice:u.grossPrice})}},[f,u.authorizedQuantity,h,N,D,j]);vt.useEffect(()=>{L()},[L]);const Y=()=>{v||S({id:"ShopperIsNotAuthenticated",open:!0})};return Ee.jsxs("label",{htmlFor:w,className:Hi("label_benefits w-full flex items-center justify-start bg-zinc-300/60 border border-zinc-400/50 px-4 py-2 hover:bg-zinc-300 transition-colors rounded-lg gap-1",{"cursor-not-allowed":p==="isPreview","cursor-pointer":p==="isActivated"}),id:"label_benefits_"+w,onClick:Y,children:[Ee.jsx("input",{type:"radio",name:"benefits_discount",id:w,className:"hidden",checked:f,onChange:o,disabled:p==="isPreview"}),f?Ee.jsx(Qx.CheckON,{size:20}):Ee.jsx(Qx.CheckOFF,{size:20}),Ee.jsxs("span",{className:"text-zinc-900 font-semibold text-sm",children:[u.authorizedQuantity,"un"]}),Ee.jsxs("section",{className:"ml-auto relative gap-2 flex items-center-safe justify-end-safe",children:[Ee.jsxs("span",{className:"text-white -top-4 py-0.5 font-semibold text-xs bg-[#32b316] px-2 w-auto text-nowrap rounded-2xl -right-3",children:[N.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})," ","OFF"]}),Ee.jsx("strong",{className:"text-zinc-900 font-semibold text-sm text-center",children:D.toLocaleString("pt-BR",{currency:"BRL",currencyDisplay:"symbol",currencySign:"standard",style:"currency"})})]})]})}const _4=async({products:u})=>{const o="https://pbm.santoremedio.adsolucoes.com.br/api/v1",f=qh.get("pbm-token");if(!f)throw new Error("Token is not defined in cookies or is expired");const p=await(await fetch(`${o}/products/genericBenefit`,{method:"POST",headers:{Authorization:`Bearer ${f}`,"Content-Type":"application/json"},body:JSON.stringify({products:u})})).json();if(!p.success)throw new Error(p.message||"Failed to fetch benefits without document");return p};function Jx(){const{securityNumber:u,setState:o,state:f,targetProduct:h,customLoginUrl:p,isAuthenticatedShopper:v}=Xu(),[S,E]=vt.useState(null),[x,w]=vt.useState(!0),[B,j]=vt.useState();return vt.useEffect(()=>{f==="isActivated"?(async()=>{if(!u){console.error("PBMLOG: Document is not defined");return}if(!h?.productId){console.error("PBMLOG: Product ID is not defined on targetProduct");return}if(!h.ean){console.error("PBMLOG: EAN is not defined on targetProduct");return}if(!h.listPrice){console.error("PBMLOG: List Price is not defined on targetProduct");return}if(!h.price){console.error("PBMLOG: Price is not defined on targetProduct");return}try{const L={productId:Number(h.productId),ean:h.ean,requestedQuantity:1,listPrice:h.listPrice,netPrice:h.price},Y=await Xx({document:u,products:[L]});Y.success&&Y.data?j(Y.data.product):j(void 0)}catch(L){j(void 0),console.error(L)}finally{w(!1)}})():(async()=>{if(!h?.productId){console.error("PBMLOG: Product ID is not defined on targetProduct");return}if(!h.ean){console.error("PBMLOG: EAN is not defined on targetProduct");return}if(!h.listPrice){console.error("PBMLOG: List Price is not defined on targetProduct");return}if(!h.price){console.error("PBMLOG: Price is not defined on targetProduct");return}try{const L={productId:Number(h.productId),ean:h.ean,requestedQuantity:1,listPrice:h.listPrice,netPrice:h.price},Y=await _4({products:[L]});Y.success&&Y.data?j(Y.data):j(void 0)}catch(L){j(void 0),console.error(L)}finally{w(!1)}})()},[]),x?Ee.jsxs("main",{className:"flex items-center justify-center gap-4",id:"loading_pbm",children:[Ee.jsx("div",{"data-testid":"test_id_spin",className:"w-8 h-8 border-4 border-t-gray-700 border-gray-300 rounded-full animate-spin",id:"loading_spin"}),Ee.jsx("p",{className:"text-sm font-semibold text-start text-zinc-900",id:"loading_label",children:"Buscando beneficios disponíveis..."})]}):Ee.jsxs("section",{className:"flex items-start justify-center gap-4 w-full h-auto flex-col",id:"benefits_table_pbm",children:[Ee.jsx(My,{children:"Descontos disponíveis:"}),Ee.jsxs("form",{className:"flex flex-col items-center justify-start w-full gap-4.5",id:"form_benefits_table_pbm",children:[!B&&Ee.jsx("p",{className:"text-sm font-semibold text-start text-zinc-900",id:"benefits_empty_pbm",children:"Não foi possível encontrar benefícios para esse produto."}),B&&B.map((N,D)=>{const L="unity_quantity_"+N.authorizedQuantity;return Ee.jsx(S4,{data:N,checked:S===L,onChange:()=>E(L)},D)})]}),f==="isPreview"&&Ee.jsxs(xf,{onClick:()=>o("isEmpty"),className:"bg-transparent p-0 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",id:"unauthorized_benefits_button",children:["Atenção: Não é possível utilizar os benefícos sem realizar a consulta do CPF e o Login, por favor"," ",Ee.jsx("span",{className:"underline",children:"insira seu cpf para utilizar os benefícios"})]}),f==="isActivated"&&Ee.jsxs(Ee.Fragment,{children:[!v&&Ee.jsx(xf,{onClick:()=>window.location.href=p||"/login",className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",id:"login",children:Ee.jsx("span",{className:"underline",children:"Por favor, faça o Login para aproveitar os benefícios!"})}),Ee.jsx(xf,{onClick:()=>o("isEmpty"),className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",id:"change_security_number",children:Ee.jsx("span",{className:"underline",children:"Deseja editar o cpf digitado?"})})]})]})}function tb(u){return Ee.jsx("p",{className:Hi("font-normal text-sm text-zinc-900",u.textAlign&&`text-${u.textAlign}`,u.className),style:{color:u.textColor,fontSize:u.textSize,textAlign:u.textAlign},"data-testid":"test_id_text",id:"text_pbm",children:u.children})}const E4=u=>u===void 0?"":"?"+Object.keys(u).map(o=>o+"="+u[o]).join("&");function f_(u){const{setState:o}=Xu();return Ee.jsx("a",{...u,target:"_blank",href:typeof u.href=="string"?u.href:u.href.pathname+E4(u.href.param),className:Hi("w-3xs cursor-pointer h-10 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-white text-sm font-semibold transition-colors flex items-center justify-center",u.className),"data-testid":"test_id_link",id:"link_pbm",onClick:()=>o("isEmpty"),children:u.children})}function T4({textColor:u}){const{urlAcceptTerms:o}=Xu();return Ee.jsxs("section",{"data-testid":"test_id_invalid",className:"flex items-end justify-center gap-2 w-full h-auto flex-col border-y border-zinc-300 py-6",id:"security_number_invalid_container_pbm",children:[Ee.jsx(My,{className:"w-full",textColor:u,children:"CPF não cadastrado."}),Ee.jsxs(tb,{className:"w-full",textColor:u,children:["Conclua seu cadastro para habilitar o benefício. ",Ee.jsx("br",{}),"Ao clicar em “Aceitar os termos”, você irá para uma página externa. Aceite os termos e volte para continuar."]}),Ee.jsx(f_,{href:o||"",children:"Aceitar os termos"})]})}function x4({textColor:u}){const{urlRegisterIndustry:o}=Xu();return Ee.jsxs("section",{"data-testid":"test_id_registered",className:"flex items-end justify-center gap-2 w-full h-auto flex-col border-y border-zinc-300 py-6",id:"security_number_registered_container_pbm",children:[Ee.jsx(My,{className:"w-full",textColor:u,children:"Ops, seu CPF ainda não está habilitado para este produto."}),Ee.jsx(tb,{className:"w-full",textColor:u,children:"Para ativar o benefício, clique em “Ativar CPF” e conclua a etapa na página externa. Depois, é só voltar para continuar — vamos aguardar você aqui."}),Ee.jsx(f_,{href:o||"",children:"Ativar CPF"})]})}const A4=async({clientID:u})=>{const f=await(await fetch("https://pbm-auth-serverless.vercel.app/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({clientId:u})})).json();if(!f.success)throw new Error("Authorization failed");return qh.set("pbm-token",f.tokens.token,{secure:!0,sameSite:"Strict"}),qh.set("pbm-token-refresh",f.tokens.refreshToken,{secure:!0,sameSite:"Strict"}),f},w4=async({PRODUCT_EAN:u})=>{const o="https://pbm.santoremedio.adsolucoes.com.br/api/v1",f=qh.get("pbm-token");if(!f)throw new Error("Token is not defined in cookies or is expired");const p=await(await fetch(`${o}/products/ean/${u}`,{method:"GET",headers:{Authorization:`Bearer ${f}`,"Content-Type":"application/json"}})).json();if(!p.success)throw new Error(p.message||"Failed to fetch authorization");return p};function Kx(u){var o,f,h="";if(typeof u=="string"||typeof u=="number")h+=u;else if(typeof u=="object")if(Array.isArray(u)){var p=u.length;for(o=0;o<p;o++)u[o]&&(f=Kx(u[o]))&&(h&&(h+=" "),h+=f)}else for(f in u)u[f]&&(h&&(h+=" "),h+=f);return h}function Fx(){for(var u,o,f=0,h="",p=arguments.length;f<p;f++)(u=arguments[f])&&(o=Kx(u))&&(h&&(h+=" "),h+=o);return h}var nb={exports:{}},ab={exports:{}},fn={};var Wx;function O4(){if(Wx)return fn;Wx=1;var u=typeof Symbol=="function"&&Symbol.for,o=u?Symbol.for("react.element"):60103,f=u?Symbol.for("react.portal"):60106,h=u?Symbol.for("react.fragment"):60107,p=u?Symbol.for("react.strict_mode"):60108,v=u?Symbol.for("react.profiler"):60114,S=u?Symbol.for("react.provider"):60109,E=u?Symbol.for("react.context"):60110,x=u?Symbol.for("react.async_mode"):60111,w=u?Symbol.for("react.concurrent_mode"):60111,B=u?Symbol.for("react.forward_ref"):60112,j=u?Symbol.for("react.suspense"):60113,N=u?Symbol.for("react.suspense_list"):60120,D=u?Symbol.for("react.memo"):60115,L=u?Symbol.for("react.lazy"):60116,Y=u?Symbol.for("react.block"):60121,Z=u?Symbol.for("react.fundamental"):60117,ie=u?Symbol.for("react.responder"):60118,re=u?Symbol.for("react.scope"):60119;function Oe(I){if(typeof I=="object"&&I!==null){var Se=I.$$typeof;switch(Se){case o:switch(I=I.type,I){case x:case w:case h:case v:case p:case j:return I;default:switch(I=I&&I.$$typeof,I){case E:case B:case L:case D:case S:return I;default:return Se}}case f:return Se}}}function Ce(I){return Oe(I)===w}return fn.AsyncMode=x,fn.ConcurrentMode=w,fn.ContextConsumer=E,fn.ContextProvider=S,fn.Element=o,fn.ForwardRef=B,fn.Fragment=h,fn.Lazy=L,fn.Memo=D,fn.Portal=f,fn.Profiler=v,fn.StrictMode=p,fn.Suspense=j,fn.isAsyncMode=function(I){return Ce(I)||Oe(I)===x},fn.isConcurrentMode=Ce,fn.isContextConsumer=function(I){return Oe(I)===E},fn.isContextProvider=function(I){return Oe(I)===S},fn.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===o},fn.isForwardRef=function(I){return Oe(I)===B},fn.isFragment=function(I){return Oe(I)===h},fn.isLazy=function(I){return Oe(I)===L},fn.isMemo=function(I){return Oe(I)===D},fn.isPortal=function(I){return Oe(I)===f},fn.isProfiler=function(I){return Oe(I)===v},fn.isStrictMode=function(I){return Oe(I)===p},fn.isSuspense=function(I){return Oe(I)===j},fn.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===h||I===w||I===v||I===p||I===j||I===N||typeof I=="object"&&I!==null&&(I.$$typeof===L||I.$$typeof===D||I.$$typeof===S||I.$$typeof===E||I.$$typeof===B||I.$$typeof===Z||I.$$typeof===ie||I.$$typeof===re||I.$$typeof===Y)},fn.typeOf=Oe,fn}var dn={},Ix;function C4(){if(Ix)return dn;Ix=1;var u={};return u.NODE_ENV!=="production"&&(function(){var o=typeof Symbol=="function"&&Symbol.for,f=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,p=o?Symbol.for("react.fragment"):60107,v=o?Symbol.for("react.strict_mode"):60108,S=o?Symbol.for("react.profiler"):60114,E=o?Symbol.for("react.provider"):60109,x=o?Symbol.for("react.context"):60110,w=o?Symbol.for("react.async_mode"):60111,B=o?Symbol.for("react.concurrent_mode"):60111,j=o?Symbol.for("react.forward_ref"):60112,N=o?Symbol.for("react.suspense"):60113,D=o?Symbol.for("react.suspense_list"):60120,L=o?Symbol.for("react.memo"):60115,Y=o?Symbol.for("react.lazy"):60116,Z=o?Symbol.for("react.block"):60121,ie=o?Symbol.for("react.fundamental"):60117,re=o?Symbol.for("react.responder"):60118,Oe=o?Symbol.for("react.scope"):60119;function Ce(qe){return typeof qe=="string"||typeof qe=="function"||qe===p||qe===B||qe===S||qe===v||qe===N||qe===D||typeof qe=="object"&&qe!==null&&(qe.$$typeof===Y||qe.$$typeof===L||qe.$$typeof===E||qe.$$typeof===x||qe.$$typeof===j||qe.$$typeof===ie||qe.$$typeof===re||qe.$$typeof===Oe||qe.$$typeof===Z)}function I(qe){if(typeof qe=="object"&&qe!==null){var _n=qe.$$typeof;switch(_n){case f:var Ua=qe.type;switch(Ua){case w:case B:case p:case S:case v:case N:return Ua;default:var Ka=Ua&&Ua.$$typeof;switch(Ka){case x:case j:case Y:case L:case E:return Ka;default:return _n}}case h:return _n}}}var Se=w,Te=B,Ie=x,Ge=E,nt=f,we=j,R=p,oe=Y,fe=L,De=h,W=S,J=v,be=N,je=!1;function Xe(qe){return je||(je=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(qe)||I(qe)===w}function z(qe){return I(qe)===B}function M(qe){return I(qe)===x}function te(qe){return I(qe)===E}function he(qe){return typeof qe=="object"&&qe!==null&&qe.$$typeof===f}function me(qe){return I(qe)===j}function Ue(qe){return I(qe)===p}function Le(qe){return I(qe)===Y}function Ve(qe){return I(qe)===L}function Je(qe){return I(qe)===h}function st(qe){return I(qe)===S}function dt(qe){return I(qe)===v}function Ne(qe){return I(qe)===N}dn.AsyncMode=Se,dn.ConcurrentMode=Te,dn.ContextConsumer=Ie,dn.ContextProvider=Ge,dn.Element=nt,dn.ForwardRef=we,dn.Fragment=R,dn.Lazy=oe,dn.Memo=fe,dn.Portal=De,dn.Profiler=W,dn.StrictMode=J,dn.Suspense=be,dn.isAsyncMode=Xe,dn.isConcurrentMode=z,dn.isContextConsumer=M,dn.isContextProvider=te,dn.isElement=he,dn.isForwardRef=me,dn.isFragment=Ue,dn.isLazy=Le,dn.isMemo=Ve,dn.isPortal=Je,dn.isProfiler=st,dn.isStrictMode=dt,dn.isSuspense=Ne,dn.isValidElementType=Ce,dn.typeOf=I})(),dn}var Px;function d_(){if(Px)return ab.exports;Px=1;var u={};return u.NODE_ENV==="production"?ab.exports=O4():ab.exports=C4(),ab.exports}var h_,eA;function R4(){if(eA)return h_;eA=1;var u=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;function h(v){if(v==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(v)}function p(){try{if(!Object.assign)return!1;var v=new String("abc");if(v[5]="de",Object.getOwnPropertyNames(v)[0]==="5")return!1;for(var S={},E=0;E<10;E++)S["_"+String.fromCharCode(E)]=E;var x=Object.getOwnPropertyNames(S).map(function(B){return S[B]});if(x.join("")!=="0123456789")return!1;var w={};return"abcdefghijklmnopqrst".split("").forEach(function(B){w[B]=B}),Object.keys(Object.assign({},w)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return h_=p()?Object.assign:function(v,S){for(var E,x=h(v),w,B=1;B<arguments.length;B++){E=Object(arguments[B]);for(var j in E)o.call(E,j)&&(x[j]=E[j]);if(u){w=u(E);for(var N=0;N<w.length;N++)f.call(E,w[N])&&(x[w[N]]=E[w[N]])}}return x},h_}var m_,tA;function p_(){if(tA)return m_;tA=1;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return m_=u,m_}var y_,nA;function aA(){return nA||(nA=1,y_=Function.call.bind(Object.prototype.hasOwnProperty)),y_}var g_,lA;function z4(){if(lA)return g_;lA=1;var u={},o=function(){};if(u.NODE_ENV!=="production"){var f=p_(),h={},p=aA();o=function(S){var E="Warning: "+S;typeof console<"u"&&console.error(E);try{throw new Error(E)}catch{}}}function v(S,E,x,w,B){if(u.NODE_ENV!=="production"){for(var j in S)if(p(S,j)){var N;try{if(typeof S[j]!="function"){var D=Error((w||"React class")+": "+x+" type `"+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[j]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}N=S[j](E,j,w,x,null,f)}catch(Y){N=Y}if(N&&!(N instanceof Error)&&o((w||"React class")+": type specification of "+x+" `"+j+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof N+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),N instanceof Error&&!(N.message in h)){h[N.message]=!0;var L=B?B():"";o("Failed "+x+" type: "+N.message+(L??""))}}}}return v.resetWarningCache=function(){u.NODE_ENV!=="production"&&(h={})},g_=v,g_}var v_,iA;function D4(){if(iA)return v_;iA=1;var u={},o=d_(),f=R4(),h=p_(),p=aA(),v=z4(),S=function(){};u.NODE_ENV!=="production"&&(S=function(x){var w="Warning: "+x;typeof console<"u"&&console.error(w);try{throw new Error(w)}catch{}});function E(){return null}return v_=function(x,w){var B=typeof Symbol=="function"&&Symbol.iterator,j="@@iterator";function N(z){var M=z&&(B&&z[B]||z[j]);if(typeof M=="function")return M}var D="<<anonymous>>",L={array:re("array"),bigint:re("bigint"),bool:re("boolean"),func:re("function"),number:re("number"),object:re("object"),string:re("string"),symbol:re("symbol"),any:Oe(),arrayOf:Ce,element:I(),elementType:Se(),instanceOf:Te,node:we(),objectOf:Ge,oneOf:Ie,oneOfType:nt,shape:oe,exact:fe};function Y(z,M){return z===M?z!==0||1/z===1/M:z!==z&&M!==M}function Z(z,M){this.message=z,this.data=M&&typeof M=="object"?M:{},this.stack=""}Z.prototype=Error.prototype;function ie(z){if(u.NODE_ENV!=="production")var M={},te=0;function he(Ue,Le,Ve,Je,st,dt,Ne){if(Je=Je||D,dt=dt||Ve,Ne!==h){if(w){var qe=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw qe.name="Invariant Violation",qe}else if(u.NODE_ENV!=="production"&&typeof console<"u"){var _n=Je+":"+Ve;!M[_n]&&te<3&&(S("You are manually calling a React.PropTypes validation function for the `"+dt+"` prop on `"+Je+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[_n]=!0,te++)}}return Le[Ve]==null?Ue?Le[Ve]===null?new Z("The "+st+" `"+dt+"` is marked as required "+("in `"+Je+"`, but its value is `null`.")):new Z("The "+st+" `"+dt+"` is marked as required in "+("`"+Je+"`, but its value is `undefined`.")):null:z(Le,Ve,Je,st,dt)}var me=he.bind(null,!1);return me.isRequired=he.bind(null,!0),me}function re(z){function M(te,he,me,Ue,Le,Ve){var Je=te[he],st=J(Je);if(st!==z){var dt=be(Je);return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+dt+"` supplied to `"+me+"`, expected ")+("`"+z+"`."),{expectedType:z})}return null}return ie(M)}function Oe(){return ie(E)}function Ce(z){function M(te,he,me,Ue,Le){if(typeof z!="function")return new Z("Property `"+Le+"` of component `"+me+"` has invalid PropType notation inside arrayOf.");var Ve=te[he];if(!Array.isArray(Ve)){var Je=J(Ve);return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+Je+"` supplied to `"+me+"`, expected an array."))}for(var st=0;st<Ve.length;st++){var dt=z(Ve,st,me,Ue,Le+"["+st+"]",h);if(dt instanceof Error)return dt}return null}return ie(M)}function I(){function z(M,te,he,me,Ue){var Le=M[te];if(!x(Le)){var Ve=J(Le);return new Z("Invalid "+me+" `"+Ue+"` of type "+("`"+Ve+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return ie(z)}function Se(){function z(M,te,he,me,Ue){var Le=M[te];if(!o.isValidElementType(Le)){var Ve=J(Le);return new Z("Invalid "+me+" `"+Ue+"` of type "+("`"+Ve+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return ie(z)}function Te(z){function M(te,he,me,Ue,Le){if(!(te[he]instanceof z)){var Ve=z.name||D,Je=Xe(te[he]);return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+Je+"` supplied to `"+me+"`, expected ")+("instance of `"+Ve+"`."))}return null}return ie(M)}function Ie(z){if(!Array.isArray(z))return u.NODE_ENV!=="production"&&(arguments.length>1?S("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):S("Invalid argument supplied to oneOf, expected an array.")),E;function M(te,he,me,Ue,Le){for(var Ve=te[he],Je=0;Je<z.length;Je++)if(Y(Ve,z[Je]))return null;var st=JSON.stringify(z,function(Ne,qe){var _n=be(qe);return _n==="symbol"?String(qe):qe});return new Z("Invalid "+Ue+" `"+Le+"` of value `"+String(Ve)+"` "+("supplied to `"+me+"`, expected one of "+st+"."))}return ie(M)}function Ge(z){function M(te,he,me,Ue,Le){if(typeof z!="function")return new Z("Property `"+Le+"` of component `"+me+"` has invalid PropType notation inside objectOf.");var Ve=te[he],Je=J(Ve);if(Je!=="object")return new Z("Invalid "+Ue+" `"+Le+"` of type "+("`"+Je+"` supplied to `"+me+"`, expected an object."));for(var st in Ve)if(p(Ve,st)){var dt=z(Ve,st,me,Ue,Le+"."+st,h);if(dt instanceof Error)return dt}return null}return ie(M)}function nt(z){if(!Array.isArray(z))return u.NODE_ENV!=="production"&&S("Invalid argument supplied to oneOfType, expected an instance of array."),E;for(var M=0;M<z.length;M++){var te=z[M];if(typeof te!="function")return S("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(te)+" at index "+M+"."),E}function he(me,Ue,Le,Ve,Je){for(var st=[],dt=0;dt<z.length;dt++){var Ne=z[dt],qe=Ne(me,Ue,Le,Ve,Je,h);if(qe==null)return null;qe.data&&p(qe.data,"expectedType")&&st.push(qe.data.expectedType)}var _n=st.length>0?", expected one of type ["+st.join(", ")+"]":"";return new Z("Invalid "+Ve+" `"+Je+"` supplied to "+("`"+Le+"`"+_n+"."))}return ie(he)}function we(){function z(M,te,he,me,Ue){return De(M[te])?null:new Z("Invalid "+me+" `"+Ue+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return ie(z)}function R(z,M,te,he,me){return new Z((z||"React class")+": "+M+" type `"+te+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+me+"`.")}function oe(z){function M(te,he,me,Ue,Le){var Ve=te[he],Je=J(Ve);if(Je!=="object")return new Z("Invalid "+Ue+" `"+Le+"` of type `"+Je+"` "+("supplied to `"+me+"`, expected `object`."));for(var st in z){var dt=z[st];if(typeof dt!="function")return R(me,Ue,Le,st,be(dt));var Ne=dt(Ve,st,me,Ue,Le+"."+st,h);if(Ne)return Ne}return null}return ie(M)}function fe(z){function M(te,he,me,Ue,Le){var Ve=te[he],Je=J(Ve);if(Je!=="object")return new Z("Invalid "+Ue+" `"+Le+"` of type `"+Je+"` "+("supplied to `"+me+"`, expected `object`."));var st=f({},te[he],z);for(var dt in st){var Ne=z[dt];if(p(z,dt)&&typeof Ne!="function")return R(me,Ue,Le,dt,be(Ne));if(!Ne)return new Z("Invalid "+Ue+" `"+Le+"` key `"+dt+"` supplied to `"+me+"`.\nBad object: "+JSON.stringify(te[he],null," ")+`
|
|
245
245
|
Valid keys: `+JSON.stringify(Object.keys(z),null," "));var qe=Ne(Ve,dt,me,Ue,Le+"."+dt,h);if(qe)return qe}return null}return ie(M)}function De(z){switch(typeof z){case"number":case"string":case"undefined":return!0;case"boolean":return!z;case"object":if(Array.isArray(z))return z.every(De);if(z===null||x(z))return!0;var M=N(z);if(M){var te=M.call(z),he;if(M!==z.entries){for(;!(he=te.next()).done;)if(!De(he.value))return!1}else for(;!(he=te.next()).done;){var me=he.value;if(me&&!De(me[1]))return!1}}else return!1;return!0;default:return!1}}function W(z,M){return z==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function J(z){var M=typeof z;return Array.isArray(z)?"array":z instanceof RegExp?"object":W(M,z)?"symbol":M}function be(z){if(typeof z>"u"||z===null)return""+z;var M=J(z);if(M==="object"){if(z instanceof Date)return"date";if(z instanceof RegExp)return"regexp"}return M}function je(z){var M=be(z);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function Xe(z){return!z.constructor||!z.constructor.name?D:z.constructor.name}return L.checkPropTypes=v,L.resetWarningCache=v.resetWarningCache,L.PropTypes=L,L},v_}var b_,rA;function M4(){if(rA)return b_;rA=1;var u=p_();function o(){}function f(){}return f.resetWarningCache=o,b_=function(){function h(S,E,x,w,B,j){if(j!==u){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}}h.isRequired=h;function p(){return h}var v={array:h,bigint:h,bool:h,func:h,number:h,object:h,string:h,symbol:h,any:h,arrayOf:p,element:h,elementType:h,instanceOf:p,node:h,objectOf:p,oneOf:p,oneOfType:p,shape:p,exact:p,checkPropTypes:f,resetWarningCache:o};return v.PropTypes=v,v},b_}var uA;function U4(){if(uA)return nb.exports;uA=1;var u={};if(u.NODE_ENV!=="production"){var o=d_(),f=!0;nb.exports=D4()(o.isElement,f)}else nb.exports=M4()();return nb.exports}var N4=U4();const an=kv(N4);function j4(u,o,f=void 0){const h={};for(const p in u){const v=u[p];let S="",E=!0;for(let x=0;x<v.length;x+=1){const w=v[x];w&&(S+=(E===!0?"":" ")+o(w),E=!1,f&&f[w]&&(S+=" "+f[w]))}h[p]=S}return h}function ts(u,...o){const f=new URL(`https://mui.com/production-error/?code=${u}`);return o.forEach(h=>f.searchParams.append("args[]",h)),`Minified MUI error #${u}; visit ${f} for the full message.`}const B4="$$material";function S_(){return S_=Object.assign?Object.assign.bind():function(u){for(var o=1;o<arguments.length;o++){var f=arguments[o];for(var h in f)({}).hasOwnProperty.call(f,h)&&(u[h]=f[h])}return u},S_.apply(null,arguments)}function H4(u){if(u.sheet)return u.sheet;for(var o=0;o<document.styleSheets.length;o++)if(document.styleSheets[o].ownerNode===u)return document.styleSheets[o]}function k4(u){var o=document.createElement("style");return o.setAttribute("data-emotion",u.key),u.nonce!==void 0&&o.setAttribute("nonce",u.nonce),o.appendChild(document.createTextNode("")),o.setAttribute("data-s",""),o}var V4=(function(){function u(f){var h=this;this._insertTag=function(p){var v;h.tags.length===0?h.insertionPoint?v=h.insertionPoint.nextSibling:h.prepend?v=h.container.firstChild:v=h.before:v=h.tags[h.tags.length-1].nextSibling,h.container.insertBefore(p,v),h.tags.push(p)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var o=u.prototype;return o.hydrate=function(h){h.forEach(this._insertTag)},o.insert=function(h){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(k4(this));var p=this.tags[this.tags.length-1];if(this.isSpeedy){var v=H4(p);try{v.insertRule(h,v.cssRules.length)}catch{}}else p.appendChild(document.createTextNode(h));this.ctr++},o.flush=function(){this.tags.forEach(function(h){var p;return(p=h.parentNode)==null?void 0:p.removeChild(h)}),this.tags=[],this.ctr=0},u})(),Tl="-ms-",lb="-moz-",ln="-webkit-",oA="comm",__="rule",E_="decl",q4="@import",cA="@keyframes",L4="@layer",Y4=Math.abs,ib=String.fromCharCode,G4=Object.assign;function Z4(u,o){return ol(u,0)^45?(((o<<2^ol(u,0))<<2^ol(u,1))<<2^ol(u,2))<<2^ol(u,3):0}function sA(u){return u.trim()}function X4(u,o){return(u=o.exec(u))?u[0]:u}function rn(u,o,f){return u.replace(o,f)}function T_(u,o){return u.indexOf(o)}function ol(u,o){return u.charCodeAt(o)|0}function Uy(u,o,f){return u.slice(o,f)}function Ju(u){return u.length}function x_(u){return u.length}function rb(u,o){return o.push(u),u}function $4(u,o){return u.map(o).join("")}var ub=1,Lh=1,fA=0,pi=0,_a=0,Yh="";function ob(u,o,f,h,p,v,S){return{value:u,root:o,parent:f,type:h,props:p,children:v,line:ub,column:Lh,length:S,return:""}}function Ny(u,o){return G4(ob("",null,null,"",null,null,0),u,{length:-u.length},o)}function Q4(){return _a}function J4(){return _a=pi>0?ol(Yh,--pi):0,Lh--,_a===10&&(Lh=1,ub--),_a}function qi(){return _a=pi<fA?ol(Yh,pi++):0,Lh++,_a===10&&(Lh=1,ub++),_a}function Ku(){return ol(Yh,pi)}function cb(){return pi}function jy(u,o){return Uy(Yh,u,o)}function By(u){switch(u){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dA(u){return ub=Lh=1,fA=Ju(Yh=u),pi=0,[]}function hA(u){return Yh="",u}function sb(u){return sA(jy(pi-1,A_(u===91?u+2:u===40?u+1:u)))}function K4(u){for(;(_a=Ku())&&_a<33;)qi();return By(u)>2||By(_a)>3?"":" "}function F4(u,o){for(;--o&&qi()&&!(_a<48||_a>102||_a>57&&_a<65||_a>70&&_a<97););return jy(u,cb()+(o<6&&Ku()==32&&qi()==32))}function A_(u){for(;qi();)switch(_a){case u:return pi;case 34:case 39:u!==34&&u!==39&&A_(_a);break;case 40:u===41&&A_(u);break;case 92:qi();break}return pi}function W4(u,o){for(;qi()&&u+_a!==57;)if(u+_a===84&&Ku()===47)break;return"/*"+jy(o,pi-1)+"*"+ib(u===47?u:qi())}function I4(u){for(;!By(Ku());)qi();return jy(u,pi)}function P4(u){return hA(fb("",null,null,null,[""],u=dA(u),0,[0],u))}function fb(u,o,f,h,p,v,S,E,x){for(var w=0,B=0,j=S,N=0,D=0,L=0,Y=1,Z=1,ie=1,re=0,Oe="",Ce=p,I=v,Se=h,Te=Oe;Z;)switch(L=re,re=qi()){case 40:if(L!=108&&ol(Te,j-1)==58){T_(Te+=rn(sb(re),"&","&\f"),"&\f")!=-1&&(ie=-1);break}case 34:case 39:case 91:Te+=sb(re);break;case 9:case 10:case 13:case 32:Te+=K4(L);break;case 92:Te+=F4(cb()-1,7);continue;case 47:switch(Ku()){case 42:case 47:rb(e5(W4(qi(),cb()),o,f),x);break;default:Te+="/"}break;case 123*Y:E[w++]=Ju(Te)*ie;case 125*Y:case 59:case 0:switch(re){case 0:case 125:Z=0;case 59+B:ie==-1&&(Te=rn(Te,/\f/g,"")),D>0&&Ju(Te)-j&&rb(D>32?pA(Te+";",h,f,j-1):pA(rn(Te," ","")+";",h,f,j-2),x);break;case 59:Te+=";";default:if(rb(Se=mA(Te,o,f,w,B,p,E,Oe,Ce=[],I=[],j),v),re===123)if(B===0)fb(Te,o,Se,Se,Ce,v,j,E,I);else switch(N===99&&ol(Te,3)===110?100:N){case 100:case 108:case 109:case 115:fb(u,Se,Se,h&&rb(mA(u,Se,Se,0,0,p,E,Oe,p,Ce=[],j),I),p,I,j,E,h?Ce:I);break;default:fb(Te,Se,Se,Se,[""],I,0,E,I)}}w=B=D=0,Y=ie=1,Oe=Te="",j=S;break;case 58:j=1+Ju(Te),D=L;default:if(Y<1){if(re==123)--Y;else if(re==125&&Y++==0&&J4()==125)continue}switch(Te+=ib(re),re*Y){case 38:ie=B>0?1:(Te+="\f",-1);break;case 44:E[w++]=(Ju(Te)-1)*ie,ie=1;break;case 64:Ku()===45&&(Te+=sb(qi())),N=Ku(),B=j=Ju(Oe=Te+=I4(cb())),re++;break;case 45:L===45&&Ju(Te)==2&&(Y=0)}}return v}function mA(u,o,f,h,p,v,S,E,x,w,B){for(var j=p-1,N=p===0?v:[""],D=x_(N),L=0,Y=0,Z=0;L<h;++L)for(var ie=0,re=Uy(u,j+1,j=Y4(Y=S[L])),Oe=u;ie<D;++ie)(Oe=sA(Y>0?N[ie]+" "+re:rn(re,/&\f/g,N[ie])))&&(x[Z++]=Oe);return ob(u,o,f,p===0?__:E,x,w,B)}function e5(u,o,f){return ob(u,o,f,oA,ib(Q4()),Uy(u,2,-2),0)}function pA(u,o,f,h){return ob(u,o,f,E_,Uy(u,0,h),Uy(u,h+1,-1),h)}function Gh(u,o){for(var f="",h=x_(u),p=0;p<h;p++)f+=o(u[p],p,u,o)||"";return f}function t5(u,o,f,h){switch(u.type){case L4:if(u.children.length)break;case q4:case E_:return u.return=u.return||u.value;case oA:return"";case cA:return u.return=u.value+"{"+Gh(u.children,h)+"}";case __:u.value=u.props.join(",")}return Ju(f=Gh(u.children,h))?u.return=u.value+"{"+f+"}":""}function n5(u){var o=x_(u);return function(f,h,p,v){for(var S="",E=0;E<o;E++)S+=u[E](f,h,p,v)||"";return S}}function a5(u){return function(o){o.root||(o=o.return)&&u(o)}}function yA(u){var o=Object.create(null);return function(f){return o[f]===void 0&&(o[f]=u(f)),o[f]}}var l5=function(o,f,h){for(var p=0,v=0;p=v,v=Ku(),p===38&&v===12&&(f[h]=1),!By(v);)qi();return jy(o,pi)},i5=function(o,f){var h=-1,p=44;do switch(By(p)){case 0:p===38&&Ku()===12&&(f[h]=1),o[h]+=l5(pi-1,f,h);break;case 2:o[h]+=sb(p);break;case 4:if(p===44){o[++h]=Ku()===58?"&\f":"",f[h]=o[h].length;break}default:o[h]+=ib(p)}while(p=qi());return o},r5=function(o,f){return hA(i5(dA(o),f))},gA=new WeakMap,u5=function(o){if(!(o.type!=="rule"||!o.parent||o.length<1)){for(var f=o.value,h=o.parent,p=o.column===h.column&&o.line===h.line;h.type!=="rule";)if(h=h.parent,!h)return;if(!(o.props.length===1&&f.charCodeAt(0)!==58&&!gA.get(h))&&!p){gA.set(o,!0);for(var v=[],S=r5(f,v),E=h.props,x=0,w=0;x<S.length;x++)for(var B=0;B<E.length;B++,w++)o.props[w]=v[x]?S[x].replace(/&\f/g,E[B]):E[B]+" "+S[x]}}},o5=function(o){if(o.type==="decl"){var f=o.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(o.return="",o.value="")}};function vA(u,o){switch(Z4(u,o)){case 5103:return ln+"print-"+u+u;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ln+u+u;case 5349:case 4246:case 4810:case 6968:case 2756:return ln+u+lb+u+Tl+u+u;case 6828:case 4268:return ln+u+Tl+u+u;case 6165:return ln+u+Tl+"flex-"+u+u;case 5187:return ln+u+rn(u,/(\w+).+(:[^]+)/,ln+"box-$1$2"+Tl+"flex-$1$2")+u;case 5443:return ln+u+Tl+"flex-item-"+rn(u,/flex-|-self/,"")+u;case 4675:return ln+u+Tl+"flex-line-pack"+rn(u,/align-content|flex-|-self/,"")+u;case 5548:return ln+u+Tl+rn(u,"shrink","negative")+u;case 5292:return ln+u+Tl+rn(u,"basis","preferred-size")+u;case 6060:return ln+"box-"+rn(u,"-grow","")+ln+u+Tl+rn(u,"grow","positive")+u;case 4554:return ln+rn(u,/([^-])(transform)/g,"$1"+ln+"$2")+u;case 6187:return rn(rn(rn(u,/(zoom-|grab)/,ln+"$1"),/(image-set)/,ln+"$1"),u,"")+u;case 5495:case 3959:return rn(u,/(image-set\([^]*)/,ln+"$1$`$1");case 4968:return rn(rn(u,/(.+:)(flex-)?(.*)/,ln+"box-pack:$3"+Tl+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ln+u+u;case 4095:case 3583:case 4068:case 2532:return rn(u,/(.+)-inline(.+)/,ln+"$1$2")+u;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ju(u)-1-o>6)switch(ol(u,o+1)){case 109:if(ol(u,o+4)!==45)break;case 102:return rn(u,/(.+:)(.+)-([^]+)/,"$1"+ln+"$2-$3$1"+lb+(ol(u,o+3)==108?"$3":"$2-$3"))+u;case 115:return~T_(u,"stretch")?vA(rn(u,"stretch","fill-available"),o)+u:u}break;case 4949:if(ol(u,o+1)!==115)break;case 6444:switch(ol(u,Ju(u)-3-(~T_(u,"!important")&&10))){case 107:return rn(u,":",":"+ln)+u;case 101:return rn(u,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ln+(ol(u,14)===45?"inline-":"")+"box$3$1"+ln+"$2$3$1"+Tl+"$2box$3")+u}break;case 5936:switch(ol(u,o+11)){case 114:return ln+u+Tl+rn(u,/[svh]\w+-[tblr]{2}/,"tb")+u;case 108:return ln+u+Tl+rn(u,/[svh]\w+-[tblr]{2}/,"tb-rl")+u;case 45:return ln+u+Tl+rn(u,/[svh]\w+-[tblr]{2}/,"lr")+u}return ln+u+Tl+u+u}return u}var c5=function(o,f,h,p){if(o.length>-1&&!o.return)switch(o.type){case E_:o.return=vA(o.value,o.length);break;case cA:return Gh([Ny(o,{value:rn(o.value,"@","@"+ln)})],p);case __:if(o.length)return $4(o.props,function(v){switch(X4(v,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Gh([Ny(o,{props:[rn(v,/:(read-\w+)/,":"+lb+"$1")]})],p);case"::placeholder":return Gh([Ny(o,{props:[rn(v,/:(plac\w+)/,":"+ln+"input-$1")]}),Ny(o,{props:[rn(v,/:(plac\w+)/,":"+lb+"$1")]}),Ny(o,{props:[rn(v,/:(plac\w+)/,Tl+"input-$1")]})],p)}return""})}},s5=[c5],f5=function(o){var f=o.key;if(f==="css"){var h=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(h,function(Y){var Z=Y.getAttribute("data-emotion");Z.indexOf(" ")!==-1&&(document.head.appendChild(Y),Y.setAttribute("data-s",""))})}var p=o.stylisPlugins||s5,v={},S,E=[];S=o.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(Y){for(var Z=Y.getAttribute("data-emotion").split(" "),ie=1;ie<Z.length;ie++)v[Z[ie]]=!0;E.push(Y)});var x,w=[u5,o5];{var B,j=[t5,a5(function(Y){B.insert(Y)})],N=n5(w.concat(p,j)),D=function(Z){return Gh(P4(Z),N)};x=function(Z,ie,re,Oe){B=re,D(Z?Z+"{"+ie.styles+"}":ie.styles),Oe&&(L.inserted[ie.name]=!0)}}var L={key:f,sheet:new V4({key:f,container:S,nonce:o.nonce,speedy:o.speedy,prepend:o.prepend,insertionPoint:o.insertionPoint}),nonce:o.nonce,inserted:v,registered:{},insert:x};return L.sheet.hydrate(E),L},w_,bA;function d5(){if(bA)return w_;bA=1;var u=d_(),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},h={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},v={};v[u.ForwardRef]=h,v[u.Memo]=p;function S(L){return u.isMemo(L)?p:v[L.$$typeof]||o}var E=Object.defineProperty,x=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,j=Object.getPrototypeOf,N=Object.prototype;function D(L,Y,Z){if(typeof Y!="string"){if(N){var ie=j(Y);ie&&ie!==N&&D(L,ie,Z)}var re=x(Y);w&&(re=re.concat(w(Y)));for(var Oe=S(L),Ce=S(Y),I=0;I<re.length;++I){var Se=re[I];if(!f[Se]&&!(Z&&Z[Se])&&!(Ce&&Ce[Se])&&!(Oe&&Oe[Se])){var Te=B(Y,Se);try{E(L,Se,Te)}catch{}}}}return L}return w_=D,w_}d5();var h5=!0;function SA(u,o,f){var h="";return f.split(" ").forEach(function(p){u[p]!==void 0?o.push(u[p]+";"):p&&(h+=p+" ")}),h}var O_=function(o,f,h){var p=o.key+"-"+f.name;(h===!1||h5===!1)&&o.registered[p]===void 0&&(o.registered[p]=f.styles)},_A=function(o,f,h){O_(o,f,h);var p=o.key+"-"+f.name;if(o.inserted[f.name]===void 0){var v=f;do o.insert(f===v?"."+p:"",v,o.sheet,!0),v=v.next;while(v!==void 0)}};function m5(u){for(var o=0,f,h=0,p=u.length;p>=4;++h,p-=4)f=u.charCodeAt(h)&255|(u.charCodeAt(++h)&255)<<8|(u.charCodeAt(++h)&255)<<16|(u.charCodeAt(++h)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,o=(f&65535)*1540483477+((f>>>16)*59797<<16)^(o&65535)*1540483477+((o>>>16)*59797<<16);switch(p){case 3:o^=(u.charCodeAt(h+2)&255)<<16;case 2:o^=(u.charCodeAt(h+1)&255)<<8;case 1:o^=u.charCodeAt(h)&255,o=(o&65535)*1540483477+((o>>>16)*59797<<16)}return o^=o>>>13,o=(o&65535)*1540483477+((o>>>16)*59797<<16),((o^o>>>15)>>>0).toString(36)}var p5={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},y5=/[A-Z]|^ms/g,g5=/_EMO_([^_]+?)_([^]*?)_EMO_/g,EA=function(o){return o.charCodeAt(1)===45},TA=function(o){return o!=null&&typeof o!="boolean"},C_=yA(function(u){return EA(u)?u:u.replace(y5,"-$&").toLowerCase()}),xA=function(o,f){switch(o){case"animation":case"animationName":if(typeof f=="string")return f.replace(g5,function(h,p,v){return Fu={name:p,styles:v,next:Fu},p})}return p5[o]!==1&&!EA(o)&&typeof f=="number"&&f!==0?f+"px":f};function Hy(u,o,f){if(f==null)return"";var h=f;if(h.__emotion_styles!==void 0)return h;switch(typeof f){case"boolean":return"";case"object":{var p=f;if(p.anim===1)return Fu={name:p.name,styles:p.styles,next:Fu},p.name;var v=f;if(v.styles!==void 0){var S=v.next;if(S!==void 0)for(;S!==void 0;)Fu={name:S.name,styles:S.styles,next:Fu},S=S.next;var E=v.styles+";";return E}return v5(u,o,f)}case"function":{if(u!==void 0){var x=Fu,w=f(u);return Fu=x,Hy(u,o,w)}break}}var B=f;if(o==null)return B;var j=o[B];return j!==void 0?j:B}function v5(u,o,f){var h="";if(Array.isArray(f))for(var p=0;p<f.length;p++)h+=Hy(u,o,f[p])+";";else for(var v in f){var S=f[v];if(typeof S!="object"){var E=S;o!=null&&o[E]!==void 0?h+=v+"{"+o[E]+"}":TA(E)&&(h+=C_(v)+":"+xA(v,E)+";")}else if(Array.isArray(S)&&typeof S[0]=="string"&&(o==null||o[S[0]]===void 0))for(var x=0;x<S.length;x++)TA(S[x])&&(h+=C_(v)+":"+xA(v,S[x])+";");else{var w=Hy(u,o,S);switch(v){case"animation":case"animationName":{h+=C_(v)+":"+w+";";break}default:h+=v+"{"+w+"}"}}}return h}var AA=/label:\s*([^\s;{]+)\s*(;|$)/g,Fu;function db(u,o,f){if(u.length===1&&typeof u[0]=="object"&&u[0]!==null&&u[0].styles!==void 0)return u[0];var h=!0,p="";Fu=void 0;var v=u[0];if(v==null||v.raw===void 0)h=!1,p+=Hy(f,o,v);else{var S=v;p+=S[0]}for(var E=1;E<u.length;E++)if(p+=Hy(f,o,u[E]),h){var x=v;p+=x[E]}AA.lastIndex=0;for(var w="",B;(B=AA.exec(p))!==null;)w+="-"+B[1];var j=m5(p)+w;return{name:j,styles:p,next:Fu}}var b5=function(o){return o()},S5=GT.useInsertionEffect?GT.useInsertionEffect:!1,wA=S5||b5,OA=vt.createContext(typeof HTMLElement<"u"?f5({key:"css"}):null);OA.Provider;var CA=function(o){return vt.forwardRef(function(f,h){var p=vt.useContext(OA);return o(f,p,h)})},RA=vt.createContext({}),R_={}.hasOwnProperty,z_="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",_5=function(o,f){var h={};for(var p in f)R_.call(f,p)&&(h[p]=f[p]);return h[z_]=o,h},E5=function(o){var f=o.cache,h=o.serialized,p=o.isStringTag;return O_(f,h,p),wA(function(){return _A(f,h,p)}),null},T5=CA(function(u,o,f){var h=u.css;typeof h=="string"&&o.registered[h]!==void 0&&(h=o.registered[h]);var p=u[z_],v=[h],S="";typeof u.className=="string"?S=SA(o.registered,v,u.className):u.className!=null&&(S=u.className+" ");var E=db(v,void 0,vt.useContext(RA));S+=o.key+"-"+E.name;var x={};for(var w in u)R_.call(u,w)&&w!=="css"&&w!==z_&&(x[w]=u[w]);return x.className=S,f&&(x.ref=f),vt.createElement(vt.Fragment,null,vt.createElement(E5,{cache:o,serialized:E,isStringTag:typeof p=="string"}),vt.createElement(p,x))}),x5=T5,zA=function(o,f){var h=arguments;if(f==null||!R_.call(f,"css"))return vt.createElement.apply(void 0,h);var p=h.length,v=new Array(p);v[0]=x5,v[1]=_5(o,f);for(var S=2;S<p;S++)v[S]=h[S];return vt.createElement.apply(null,v)};(function(u){var o;o||(o=u.JSX||(u.JSX={}))})(zA||(zA={}));function D_(){for(var u=arguments.length,o=new Array(u),f=0;f<u;f++)o[f]=arguments[f];return db(o)}function DA(){var u=D_.apply(void 0,arguments),o="animation-"+u.name;return{name:o,styles:"@keyframes "+o+"{"+u.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var A5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,w5=yA(function(u){return A5.test(u)||u.charCodeAt(0)===111&&u.charCodeAt(1)===110&&u.charCodeAt(2)<91}),O5=w5,C5=function(o){return o!=="theme"},MA=function(o){return typeof o=="string"&&o.charCodeAt(0)>96?O5:C5},UA=function(o,f,h){var p;if(f){var v=f.shouldForwardProp;p=o.__emotion_forwardProp&&v?function(S){return o.__emotion_forwardProp(S)&&v(S)}:v}return typeof p!="function"&&h&&(p=o.__emotion_forwardProp),p},R5=function(o){var f=o.cache,h=o.serialized,p=o.isStringTag;return O_(f,h,p),wA(function(){return _A(f,h,p)}),null},z5=function u(o,f){var h=o.__emotion_real===o,p=h&&o.__emotion_base||o,v,S;f!==void 0&&(v=f.label,S=f.target);var E=UA(o,f,h),x=E||MA(p),w=!x("as");return function(){var B=arguments,j=h&&o.__emotion_styles!==void 0?o.__emotion_styles.slice(0):[];if(v!==void 0&&j.push("label:"+v+";"),B[0]==null||B[0].raw===void 0)j.push.apply(j,B);else{var N=B[0];j.push(N[0]);for(var D=B.length,L=1;L<D;L++)j.push(B[L],N[L])}var Y=CA(function(Z,ie,re){var Oe=w&&Z.as||p,Ce="",I=[],Se=Z;if(Z.theme==null){Se={};for(var Te in Z)Se[Te]=Z[Te];Se.theme=vt.useContext(RA)}typeof Z.className=="string"?Ce=SA(ie.registered,I,Z.className):Z.className!=null&&(Ce=Z.className+" ");var Ie=db(j.concat(I),ie.registered,Se);Ce+=ie.key+"-"+Ie.name,S!==void 0&&(Ce+=" "+S);var Ge=w&&E===void 0?MA(Oe):x,nt={};for(var we in Z)w&&we==="as"||Ge(we)&&(nt[we]=Z[we]);return nt.className=Ce,re&&(nt.ref=re),vt.createElement(vt.Fragment,null,vt.createElement(R5,{cache:ie,serialized:Ie,isStringTag:typeof Oe=="string"}),vt.createElement(Oe,nt))});return Y.displayName=v!==void 0?v:"Styled("+(typeof p=="string"?p:p.displayName||p.name||"Component")+")",Y.defaultProps=o.defaultProps,Y.__emotion_real=Y,Y.__emotion_base=p,Y.__emotion_styles=j,Y.__emotion_forwardProp=E,Object.defineProperty(Y,"toString",{value:function(){return"."+S}}),Y.withComponent=function(Z,ie){var re=u(Z,S_({},f,ie,{shouldForwardProp:UA(Y,ie,!0)}));return re.apply(void 0,j)},Y}},D5=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],M_=z5.bind(null);D5.forEach(function(u){M_[u]=M_(u)});var M5={};function U5(u,o){const f=M_(u,o);return M5.NODE_ENV!=="production"?(...h)=>{const p=typeof u=="string"?`"${u}"`:"component";return h.length===0?console.error([`MUI: Seems like you called \`styled(${p})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
246
246
|
`)):h.some(v=>v===void 0)&&console.error(`MUI: the styled(${p})(...args) API requires all its args to be defined.`),f(...h)}:f}function N5(u,o){Array.isArray(u.__emotion_styles)&&(u.__emotion_styles=o(u.__emotion_styles))}const NA=[];function Af(u){return NA[0]=u,db(NA)}var hb={exports:{}},bn={};var jA;function j5(){if(jA)return bn;jA=1;var u=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),S=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),N=Symbol.for("react.view_transition"),D=Symbol.for("react.client.reference");function L(Y){if(typeof Y=="object"&&Y!==null){var Z=Y.$$typeof;switch(Z){case u:switch(Y=Y.type,Y){case f:case p:case h:case x:case w:case N:return Y;default:switch(Y=Y&&Y.$$typeof,Y){case S:case E:case j:case B:return Y;case v:return Y;default:return Z}}case o:return Z}}}return bn.ContextConsumer=v,bn.ContextProvider=S,bn.Element=u,bn.ForwardRef=E,bn.Fragment=f,bn.Lazy=j,bn.Memo=B,bn.Portal=o,bn.Profiler=p,bn.StrictMode=h,bn.Suspense=x,bn.SuspenseList=w,bn.isContextConsumer=function(Y){return L(Y)===v},bn.isContextProvider=function(Y){return L(Y)===S},bn.isElement=function(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===u},bn.isForwardRef=function(Y){return L(Y)===E},bn.isFragment=function(Y){return L(Y)===f},bn.isLazy=function(Y){return L(Y)===j},bn.isMemo=function(Y){return L(Y)===B},bn.isPortal=function(Y){return L(Y)===o},bn.isProfiler=function(Y){return L(Y)===p},bn.isStrictMode=function(Y){return L(Y)===h},bn.isSuspense=function(Y){return L(Y)===x},bn.isSuspenseList=function(Y){return L(Y)===w},bn.isValidElementType=function(Y){return typeof Y=="string"||typeof Y=="function"||Y===f||Y===p||Y===h||Y===x||Y===w||typeof Y=="object"&&Y!==null&&(Y.$$typeof===j||Y.$$typeof===B||Y.$$typeof===S||Y.$$typeof===v||Y.$$typeof===E||Y.$$typeof===D||Y.getModuleId!==void 0)},bn.typeOf=L,bn}var Sn={},BA;function B5(){if(BA)return Sn;BA=1;var u={};return u.NODE_ENV!=="production"&&(function(){function o(Z){if(typeof Z=="object"&&Z!==null){var ie=Z.$$typeof;switch(ie){case f:switch(Z=Z.type,Z){case p:case S:case v:case B:case j:case L:return Z;default:switch(Z=Z&&Z.$$typeof,Z){case x:case w:case D:case N:return Z;case E:return Z;default:return ie}}case h:return ie}}}var f=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),x=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),L=Symbol.for("react.view_transition"),Y=Symbol.for("react.client.reference");Sn.ContextConsumer=E,Sn.ContextProvider=x,Sn.Element=f,Sn.ForwardRef=w,Sn.Fragment=p,Sn.Lazy=D,Sn.Memo=N,Sn.Portal=h,Sn.Profiler=S,Sn.StrictMode=v,Sn.Suspense=B,Sn.SuspenseList=j,Sn.isContextConsumer=function(Z){return o(Z)===E},Sn.isContextProvider=function(Z){return o(Z)===x},Sn.isElement=function(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===f},Sn.isForwardRef=function(Z){return o(Z)===w},Sn.isFragment=function(Z){return o(Z)===p},Sn.isLazy=function(Z){return o(Z)===D},Sn.isMemo=function(Z){return o(Z)===N},Sn.isPortal=function(Z){return o(Z)===h},Sn.isProfiler=function(Z){return o(Z)===S},Sn.isStrictMode=function(Z){return o(Z)===v},Sn.isSuspense=function(Z){return o(Z)===B},Sn.isSuspenseList=function(Z){return o(Z)===j},Sn.isValidElementType=function(Z){return typeof Z=="string"||typeof Z=="function"||Z===p||Z===S||Z===v||Z===B||Z===j||typeof Z=="object"&&Z!==null&&(Z.$$typeof===D||Z.$$typeof===N||Z.$$typeof===x||Z.$$typeof===E||Z.$$typeof===w||Z.$$typeof===Y||Z.getModuleId!==void 0)},Sn.typeOf=o})(),Sn}var HA;function H5(){if(HA)return hb.exports;HA=1;var u={};return u.NODE_ENV==="production"?hb.exports=j5():hb.exports=B5(),hb.exports}var mb=H5();function Bo(u){if(typeof u!="object"||u===null)return!1;const o=Object.getPrototypeOf(u);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(Symbol.toStringTag in u)&&!(Symbol.iterator in u)}function kA(u){if(vt.isValidElement(u)||mb.isValidElementType(u)||!Bo(u))return u;const o={};return Object.keys(u).forEach(f=>{o[f]=kA(u[f])}),o}function Li(u,o,f={clone:!0}){const h=f.clone?{...u}:u;return Bo(u)&&Bo(o)&&Object.keys(o).forEach(p=>{vt.isValidElement(o[p])||mb.isValidElementType(o[p])?h[p]=o[p]:Bo(o[p])&&Object.prototype.hasOwnProperty.call(u,p)&&Bo(u[p])?h[p]=Li(u[p],o[p],f):f.clone?h[p]=Bo(o[p])?kA(o[p]):o[p]:h[p]=o[p]}),h}const k5=u=>{const o=Object.keys(u).map(f=>({key:f,val:u[f]}))||[];return o.sort((f,h)=>f.val-h.val),o.reduce((f,h)=>({...f,[h.key]:h.val}),{})};function V5(u){const{values:o={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:f="px",step:h=5,...p}=u,v=k5(o),S=Object.keys(v);function E(N){return`@media (min-width:${typeof o[N]=="number"?o[N]:N}${f})`}function x(N){return`@media (max-width:${(typeof o[N]=="number"?o[N]:N)-h/100}${f})`}function w(N,D){const L=S.indexOf(D);return`@media (min-width:${typeof o[N]=="number"?o[N]:N}${f}) and (max-width:${(L!==-1&&typeof o[S[L]]=="number"?o[S[L]]:D)-h/100}${f})`}function B(N){return S.indexOf(N)+1<S.length?w(N,S[S.indexOf(N)+1]):E(N)}function j(N){const D=S.indexOf(N);return D===0?E(S[1]):D===S.length-1?x(S[D]):w(N,S[S.indexOf(N)+1]).replace("@media","@media not all and")}return{keys:S,values:v,up:E,down:x,between:w,only:B,not:j,unit:f,...p}}var VA={};function qA(u,o){if(!u.containerQueries)return o;const f=Object.keys(o).filter(h=>h.startsWith("@container")).sort((h,p)=>{const v=/min-width:\s*([0-9.]+)/;return+(h.match(v)?.[1]||0)-+(p.match(v)?.[1]||0)});return f.length?f.reduce((h,p)=>{const v=o[p];return delete h[p],h[p]=v,h},{...o}):o}function q5(u,o){return o==="@"||o.startsWith("@")&&(u.some(f=>o.startsWith(`@${f}`))||!!o.match(/^@\d/))}function L5(u,o){const f=o.match(/^@([^/]+)?\/?(.+)?$/);if(!f){if(VA.NODE_ENV!=="production")throw new Error(VA.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${o})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
247
247
|
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ts(18,`(${o})`));return null}const[,h,p]=f,v=Number.isNaN(+h)?h||0:+h;return u.containerQueries(p).up(v)}function Y5(u){const o=(v,S)=>v.replace("@media",S?`@container ${S}`:"@container");function f(v,S){v.up=(...E)=>o(u.breakpoints.up(...E),S),v.down=(...E)=>o(u.breakpoints.down(...E),S),v.between=(...E)=>o(u.breakpoints.between(...E),S),v.only=(...E)=>o(u.breakpoints.only(...E),S),v.not=(...E)=>{const x=o(u.breakpoints.not(...E),S);return x.includes("not all and")?x.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):x}}const h={},p=v=>(f(h,v),h);return f(p),{...u,containerQueries:p}}const G5={borderRadius:4};var Z5={};const ns=Z5.NODE_ENV!=="production"?an.oneOfType([an.number,an.string,an.object,an.array]):{};function ky(u,o){return o?Li(u,o,{clone:!1}):u}const pb={xs:0,sm:600,md:900,lg:1200,xl:1536},LA={keys:["xs","sm","md","lg","xl"],up:u=>`@media (min-width:${pb[u]}px)`},X5={containerQueries:u=>({up:o=>{let f=typeof o=="number"?o:pb[o]||o;return typeof f=="number"&&(f=`${f}px`),u?`@container ${u} (min-width:${f})`:`@container (min-width:${f})`}})};function Ho(u,o,f){const h=u.theme||{};if(Array.isArray(o)){const v=h.breakpoints||LA;return o.reduce((S,E,x)=>(S[v.up(v.keys[x])]=f(o[x]),S),{})}if(typeof o=="object"){const v=h.breakpoints||LA;return Object.keys(o).reduce((S,E)=>{if(q5(v.keys,E)){const x=L5(h.containerQueries?h:X5,E);x&&(S[x]=f(o[E],E))}else if(Object.keys(v.values||pb).includes(E)){const x=v.up(E);S[x]=f(o[E],E)}else{const x=E;S[x]=o[x]}return S},{})}return f(o)}function $5(u={}){return u.keys?.reduce((f,h)=>{const p=u.up(h);return f[p]={},f},{})||{}}function YA(u,o){return u.reduce((f,h)=>{const p=f[h];return(!p||Object.keys(p).length===0)&&delete f[h],f},o)}var Q5={};function U_(u){if(typeof u!="string")throw new Error(Q5.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ts(7));return u.charAt(0).toUpperCase()+u.slice(1)}var J5={};function yb(u,o,f=!0){if(!o||typeof o!="string")return null;if(u&&u.vars&&f){const h=`vars.${o}`.split(".").reduce((p,v)=>p&&p[v]?p[v]:null,u);if(h!=null)return h}return o.split(".").reduce((h,p)=>h&&h[p]!=null?h[p]:null,u)}function gb(u,o,f,h=f){let p;return typeof u=="function"?p=u(f):Array.isArray(u)?p=u[f]||h:p=yb(u,f)||h,o&&(p=o(p,h,u)),p}function ca(u){const{prop:o,cssProperty:f=u.prop,themeKey:h,transform:p}=u,v=S=>{if(S[o]==null)return null;const E=S[o],x=S.theme,w=yb(x,h)||{};return Ho(S,E,j=>{let N=gb(w,p,j);return j===N&&typeof j=="string"&&(N=gb(w,p,`${o}${j==="default"?"":U_(j)}`,j)),f===!1?N:{[f]:N}})};return v.propTypes=J5.NODE_ENV!=="production"?{[o]:ns}:{},v.filterProps=[o],v}function K5(u){const o={};return f=>(o[f]===void 0&&(o[f]=u(f)),o[f])}var Zh={};const F5={m:"margin",p:"padding"},W5={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},GA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},I5=K5(u=>{if(u.length>2)if(GA[u])u=GA[u];else return[u];const[o,f]=u.split(""),h=F5[o],p=W5[f]||"";return Array.isArray(p)?p.map(v=>h+v):[h+p]}),vb=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],P5=[...vb,...bb];function Vy(u,o,f,h){const p=yb(u,o,!0)??f;return typeof p=="number"||typeof p=="string"?v=>typeof v=="string"?v:(Zh.NODE_ENV!=="production"&&typeof v!="number"&&console.error(`MUI: Expected ${h} argument to be a number or a string, got ${v}.`),typeof p=="string"?p.startsWith("var(")&&v===0?0:p.startsWith("var(")&&v===1?p:`calc(${v} * ${p})`:p*v):Array.isArray(p)?v=>{if(typeof v=="string")return v;const S=Math.abs(v);Zh.NODE_ENV!=="production"&&(Number.isInteger(S)?S>p.length-1&&console.error([`MUI: The value provided (${S}) overflows.`,`The supported values are: ${JSON.stringify(p)}.`,`${S} > ${p.length-1}, you need to add the missing values.`].join(`
|
|
@@ -310,4 +310,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${o}Chann
|
|
|
310
310
|
transparent,
|
|
311
311
|
${(u.vars||u).palette.action.hover},
|
|
312
312
|
transparent
|
|
313
|
-
)`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:oD||{"&::after":{animation:`${K_} 2s linear 0.5s infinite`}}}]}})),vw=vt.forwardRef(function(o,f){const h=aD({props:o,name:"MuiSkeleton"}),{animation:p="pulse",className:v,component:S="span",height:E,style:x,variant:w="text",width:B,...j}=h,N={...h,animation:p,component:S,variant:w,hasChildren:!!j.children},D=rD(N);return Ee.jsx(cD,{as:S,ref:f,className:Fx(D.root,v),ownerState:N,...j,style:{width:B,height:E,...x}})});iD.NODE_ENV!=="production"&&(vw.propTypes={animation:an.oneOf(["pulse","wave",!1]),children:an.node,classes:an.object,className:an.string,component:an.elementType,height:an.oneOfType([an.number,an.string]),style:an.object,sx:an.oneOfType([an.arrayOf(an.oneOfType([an.func,an.object,an.bool])),an.func,an.object]),variant:an.oneOfType([an.oneOf(["circular","rectangular","rounded","text"]),an.string]),width:an.oneOfType([an.number,an.string])});const sD=({ID:u})=>{const{customLoginUrl:o}=Xu(),{modal:f,setModal:h}=$x();return Ee.jsxs("main",{className:Hi("fixed inset-0 flex items-center justify-center z-50 flex-col transition-all shadow bg-black/40",{"opacity-100 pointer-events-auto":f.id===u&&f.open,"opacity-0 pointer-events-none":f.id!=u||!f.open}),children:[Ee.jsx("div",{className:"absolute inset-0",onClick:()=>h({id:"",open:!1})}),Ee.jsxs("section",{className:"z-10 bg-white gap-2 flex-col items-center-safe justify-center-safe p-8 rounded-xl",children:[Ee.jsx(My,{textColor:"tomato",textSize:"18px",textAlign:"center",className:"mb-2",children:"Opa! Parece que você não está Logado"}),Ee.jsxs(tb,{className:"mb-2",textAlign:"center",children:["Para aproveitar os benefícios é necessário realizar o ",Ee.jsx("strong",{children:"Login"})," ou ",Ee.jsx("strong",{children:"Cadastro"})," no site!"]}),Ee.jsxs("section",{className:"flex items-center-safe justify-center-safe gap-4",children:[Ee.jsx(xf,{className:"bg-gray-600 hover:bg-gray-500",onClick:()=>h({id:"",open:!1}),children:"Seguir sem Benefícios"}),Ee.jsx(f_,{href:o||"/login",children:"Aproveitar Benefícios"})]})]})]})},fD=async()=>{const u="https://pbm.santoremedio.adsolucoes.com.br/api/v1",o=qh.get("pbm-token");if(!o)throw new Error("Token is not defined in cookies or is expired");const h=await(await fetch(`${u}/products/list`,{method:"GET",headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json"}})).json();if(!h.success)throw new Error(h.message||"Failed to fetch authorization");return h};function dD({eanProduct:u}){const[o,f]=vt.useState(!1),[h,p]=vt.useState(!0),[v,S]=vt.useState(),E=vt.useCallback(async()=>{try{const x=await fD();if(x.success){const B=x.data.some(j=>j.ean==u);f(B)}}catch(x){S(x),console.error(x)}},[]);return vt.useEffect(()=>{E()},[E]),{IsValid:o,Loading:h,Error:v}}function hD({originalProductPrice:u,clientID:o,eanProduct:f,isAuthenticatedShopper:h,customLoginUrl:p}){const v=Number(String(u).replace(",",".")),[S,E]=vt.useState(!1),[x,w]=vt.useState(!1),{state:B,setTargetProduct:j,targetProduct:N,setIsAuthenticatedShopper:D,setCustomLoginUrl:L}=Xu(),[Y,Z]=vt.useState(!0),{IsValid:ie}=dD({eanProduct:f}),re=async()=>{try{if(!f){console.error("PBMLOG: Ean is not defined."),Z(!1);return}const I=await w4({PRODUCT_EAN:f});if(I.success&&I.data){Z(!0);const{pbm:Se,sku:Te,...Ie}=I.data;j({...N,...Ie,productId:Number(Ie.productId),informativeMessage:Se.informativeMessage??"",discountMax:Se.discountMax??0,industryLogo:Se.imageLink??void 0,ean:f}),D(h),L(p)}}catch(I){console.error(I)}finally{E(!0)}},Oe=vt.useCallback(async()=>{try{(await A4({clientID:o})).success?re():console.error("PBMLOG: Authorization failed!")}catch(I){console.error("Error fetching authorization:",I)}},[o]);if(vt.useEffect(()=>{Oe()},[Oe]),!S)return Ee.jsx(vw,{variant:"rectangular",style:{borderRadius:"12px"},width:460,height:358});if(!Y)return Ee.jsx("div",{id:"pbm-library-root",children:Ee.jsxs(XS,{variant:"main",children:[Ee.jsx(My,{children:"Erro ao Aplicar o Benefício"}),Ee.jsxs(tb,{textAlign:"center",children:["O produto não foi encontrado no sistema. ",Ee.jsx("br",{})," Por favor, tente novamente mais tarde ou contate o suporte."]}),Ee.jsxs(xf,{className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",onClick:()=>window.location.reload(),id:"check_benefits_button",children:[Ee.jsx("span",{children:"Tentar novamente"}),Ee.jsx(h4,{size:16})]})]})});if(!ie)return;const Ce=()=>{const I={isEmpty:Ee.jsx(p4,{setLoading:w}),isInvalid:Ee.jsx(T4,{}),isRegistered:Ee.jsx(x4,{}),isActivated:Ee.jsx(Jx,{}),isPreview:Ee.jsx(Jx,{})};return x?Ee.jsx(y4,{}):I[B]};return Ee.jsxs("div",{id:"pbm-library-root",children:[Ee.jsxs(XS,{variant:"main",children:[Ee.jsx(KC,{originalProductPrice:v||0}),Ee.jsx(XS,{variant:"simple",children:Ee.jsx(Ce,{})}),Ee.jsx(IC,{})]}),Ee.jsx(sD,{ID:"ShopperIsNotAuthenticated"})]})}const mD='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-4{top:calc(var(--spacing)*-4)}.-top-6{top:calc(var(--spacing)*-6)}.-right-3{right:calc(var(--spacing)*-3)}.-bottom-3{bottom:calc(var(--spacing)*-3)}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.table{display:table}.aspect-auto{aspect-ratio:auto}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-\\[80\\%\\]{height:80%}.h-auto{height:auto}.w-1\\/5{width:20%}.w-3xs{width:var(--container-3xs)}.w-4\\/5{width:80%}.w-8{width:calc(var(--spacing)*8)}.w-11\\/12{width:91.6667%}.w-auto{width:auto}.w-full{width:100%}.max-w-\\[var\\(--max-container\\)\\]{max-width:var(--max-container)}.max-w-md{max-width:var(--container-md)}.min-w-20{min-width:calc(var(--spacing)*20)}.min-w-\\[var\\(--min-container\\)\\]{min-width:var(--min-container)}.shrink-0{flex-shrink:0}.rotate-0{rotate:none}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-center-safe{align-items:safe center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-center-safe{justify-content:safe center}.justify-end{justify-content:flex-end}.justify-end-safe{justify-content:safe flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}.gap-4\\.5{gap:calc(var(--spacing)*4.5)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-ss-2xl{border-start-start-radius:var(--radius-2xl)}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.rounded-se-2xl{border-start-end-radius:var(--radius-2xl)}.rounded-ee-2xl{border-end-end-radius:var(--radius-2xl)}.rounded-es-2xl{border-end-start-radius:var(--radius-2xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-3{border-style:var(--tw-border-style);border-width:3px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[\\#44c2c0\\]{border-color:#44c2c0}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-300{border-color:var(--color-gray-300)}.border-yellow-500{border-color:var(--color-yellow-500)}.border-zinc-300{border-color:var(--color-zinc-300)}.border-zinc-400\\/50{border-color:#9f9fa980}@supports (color:color-mix(in lab,red,red)){.border-zinc-400\\/50{border-color:color-mix(in oklab,var(--color-zinc-400)50%,transparent)}}.border-t-gray-700{border-top-color:var(--color-gray-700)}.bg-\\[\\#32b316\\]{background-color:#32b316}.bg-\\[\\#44c2c0\\]{background-color:#44c2c0}.bg-\\[\\#44c2c0\\]\\/30{background-color:#44c2c04d}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab,red,red)){.bg-black\\/35{background-color:color-mix(in oklab,var(--color-black)35%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-zinc-300\\/60{background-color:#d4d4d899}@supports (color:color-mix(in lab,red,red)){.bg-zinc-300\\/60{background-color:color-mix(in oklab,var(--color-zinc-300)60%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.text-start{text-align:start}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-nowrap{text-wrap:nowrap}.text-\\[\\#339c9b\\]{color:#339c9b}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-800{color:var(--color-zinc-800)}.text-zinc-900{color:var(--color-zinc-900)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-red-600{outline-color:var(--color-red-600)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.placeholder\\:text-sm::placeholder{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.placeholder\\:font-semibold::placeholder{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.placeholder\\:text-zinc-600::placeholder{color:var(--color-zinc-600)}@media(hover:hover){.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\\:bg-gray-500:hover{background-color:var(--color-gray-500)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-transparent:hover{background-color:#0000}.hover\\:bg-zinc-300:hover{background-color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:text-zinc-900:hover{color:var(--color-zinc-900)}}.focus\\:bg-white:focus{background-color:var(--color-white)}.focus\\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.focus\\:outline-\\[\\#339c9b\\]:focus{outline-color:#339c9b}@media(min-width:48rem){.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}}:root{--max-container:556px;--min-container:350px}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';window.pbm=JC();class pD extends HTMLElement{root=null;props={originalProductPrice:0,clientID:"",eanProduct:"",isAuthenticatedShopper:!1,customLoginUrl:"/login"};static get observedAttributes(){return["originalproductprice","clientid","eanproduct","isauthenticatedshopper","customloginurl"]}constructor(){super(),this.attachShadow({mode:"open"})}updatePropsFromAttributes(){const o=this.getAttribute("originalproductprice"),f=this.getAttribute("clientid"),h=this.getAttribute("eanproduct"),p=this.getAttribute("isauthenticatedshopper"),v=this.getAttribute("customloginurl");p!==null&&(this.props.isAuthenticatedShopper=p==="true"),v!==null&&(this.props.customLoginUrl=v===""?"/login":v),o!==null&&(this.props.originalProductPrice=o),f!==null&&(this.props.clientID=f),h!==null&&(this.props.eanProduct=h,h&&Zv.getState().setTargetProduct({ean:h,quantity:1}))}connectedCallback(){this.updatePropsFromAttributes(),this.mount()}attributeChangedCallback(o,f,h){o==="originalproductprice"&&(this.props.originalProductPrice=parseFloat(h)),o==="clientid"&&(this.props.clientID=h),o==="eanproduct"&&(this.props.eanProduct=h,h&&Zv.getState().setTargetProduct({ean:h,quantity:1})),o==="isauthenticatedshopper"&&(this.props.isAuthenticatedShopper=h==="true"),o==="customloginurl"&&(this.props.customLoginUrl=h===""?"/login":h),this.mount()}mount(){if(!this.isConnected)return;let o=this.shadowRoot;if(!(!o&&(this.attachShadow({mode:"open"}),o=this.shadowRoot,!o))){if(!o.querySelector("#pbm-shadow-root")){const f=document.createElement("div");f.id="pbm-shadow-root";const h=document.createElement("style");h.textContent=mD,o.appendChild(h),o.appendChild(f),this.root=ZC.createRoot(f)}this.root&&this.root.render(Ee.jsx(hD,{...this.props}))}}}customElements.define("pbm-component",pD)})();
|
|
313
|
+
)`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:oD||{"&::after":{animation:`${K_} 2s linear 0.5s infinite`}}}]}})),vw=vt.forwardRef(function(o,f){const h=aD({props:o,name:"MuiSkeleton"}),{animation:p="pulse",className:v,component:S="span",height:E,style:x,variant:w="text",width:B,...j}=h,N={...h,animation:p,component:S,variant:w,hasChildren:!!j.children},D=rD(N);return Ee.jsx(cD,{as:S,ref:f,className:Fx(D.root,v),ownerState:N,...j,style:{width:B,height:E,...x}})});iD.NODE_ENV!=="production"&&(vw.propTypes={animation:an.oneOf(["pulse","wave",!1]),children:an.node,classes:an.object,className:an.string,component:an.elementType,height:an.oneOfType([an.number,an.string]),style:an.object,sx:an.oneOfType([an.arrayOf(an.oneOfType([an.func,an.object,an.bool])),an.func,an.object]),variant:an.oneOfType([an.oneOf(["circular","rectangular","rounded","text"]),an.string]),width:an.oneOfType([an.number,an.string])});const sD=({ID:u})=>{const{customLoginUrl:o}=Xu(),{modal:f,setModal:h}=$x();return Ee.jsxs("main",{className:Hi("fixed inset-0 flex items-center justify-center z-50 flex-col transition-all shadow bg-black/40",{"opacity-100 pointer-events-auto":f.id===u&&f.open,"opacity-0 pointer-events-none":f.id!=u||!f.open}),children:[Ee.jsx("div",{className:"absolute inset-0",onClick:()=>h({id:"",open:!1})}),Ee.jsxs("section",{className:"z-10 bg-white gap-2 flex-col items-center-safe justify-center-safe p-8 rounded-xl",children:[Ee.jsx(My,{textColor:"tomato",textSize:"18px",textAlign:"center",className:"mb-2",children:"Opa! Parece que você não está Logado"}),Ee.jsxs(tb,{className:"mb-2",textAlign:"center",children:["Para aproveitar os benefícios é necessário realizar o ",Ee.jsx("strong",{children:"Login"})," ou ",Ee.jsx("strong",{children:"Cadastro"})," no site!"]}),Ee.jsxs("section",{className:"flex items-center-safe justify-center-safe gap-4",children:[Ee.jsx(xf,{className:"bg-gray-600 hover:bg-gray-500",onClick:()=>h({id:"",open:!1}),children:"Seguir sem Benefícios"}),Ee.jsx(f_,{href:o||"/login",children:"Aproveitar Benefícios"})]})]})]})},fD=async()=>{const u="https://pbm.santoremedio.adsolucoes.com.br/api/v1",o=qh.get("pbm-token");if(!o)throw new Error("Token is not defined in cookies or is expired");const h=await(await fetch(`${u}/products/list`,{method:"GET",headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json"}})).json();if(!h.success)throw new Error(h.message||"Failed to fetch authorization");return h};function dD({eanProduct:u}){const[o,f]=vt.useState(!1),[h,p]=vt.useState(!0),[v,S]=vt.useState(),E=vt.useCallback(async()=>{try{const x=await fD();if(x.success){const B=x.data.some(j=>j.ean==u);f(B)}}catch(x){S(x),console.error(x)}},[]);return vt.useEffect(()=>{E()},[E]),{IsValid:o,Loading:h,Error:v}}function hD({originalProductPrice:u,clientID:o,eanProduct:f,isAuthenticatedShopper:h,customLoginUrl:p}){const v=Number(String(u).replace(",",".")),[S,E]=vt.useState(!1),[x,w]=vt.useState(!1),{state:B,setTargetProduct:j,targetProduct:N,setIsAuthenticatedShopper:D,setCustomLoginUrl:L}=Xu(),[Y,Z]=vt.useState(!0),{IsValid:ie}=dD({eanProduct:f}),re=async()=>{try{if(!f){console.error("PBMLOG: Ean is not defined."),Z(!1);return}const I=await w4({PRODUCT_EAN:f});if(I.success&&I.data){Z(!0);const{pbm:Se,sku:Te,...Ie}=I.data;j({...N,...Ie,productId:Number(Ie.productId),informativeMessage:Se.informativeMessage??"",discountMax:Se.discountMax??0,industryLogo:Se.imageLink??void 0,ean:f}),D(h),L(p)}}catch(I){console.error(I)}finally{E(!0)}},Oe=vt.useCallback(async()=>{try{(await A4({clientID:o})).success&&ie?re():console.error("PBMLOG: Authorization failed!")}catch(I){console.error("Error fetching authorization:",I)}},[o,ie]);if(vt.useEffect(()=>{Oe()},[Oe]),!S)return Ee.jsx(vw,{variant:"rectangular",style:{borderRadius:"12px"},width:460,height:358});if(!Y)return Ee.jsx("div",{id:"pbm-library-root",children:Ee.jsxs(XS,{variant:"main",children:[Ee.jsx(My,{children:"Erro ao Aplicar o Benefício"}),Ee.jsxs(tb,{textAlign:"center",children:["O produto não foi encontrado no sistema. ",Ee.jsx("br",{})," Por favor, tente novamente mais tarde ou contate o suporte."]}),Ee.jsxs(xf,{className:"bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",onClick:()=>window.location.reload(),id:"check_benefits_button",children:[Ee.jsx("span",{children:"Tentar novamente"}),Ee.jsx(h4,{size:16})]})]})});if(!ie)return;const Ce=()=>{const I={isEmpty:Ee.jsx(p4,{setLoading:w}),isInvalid:Ee.jsx(T4,{}),isRegistered:Ee.jsx(x4,{}),isActivated:Ee.jsx(Jx,{}),isPreview:Ee.jsx(Jx,{})};return x?Ee.jsx(y4,{}):I[B]};return Ee.jsxs("div",{id:"pbm-library-root",children:[Ee.jsxs(XS,{variant:"main",children:[Ee.jsx(KC,{originalProductPrice:v||0}),Ee.jsx(XS,{variant:"simple",children:Ee.jsx(Ce,{})}),Ee.jsx(IC,{})]}),Ee.jsx(sD,{ID:"ShopperIsNotAuthenticated"})]})}const mD='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-4{top:calc(var(--spacing)*-4)}.-top-6{top:calc(var(--spacing)*-6)}.-right-3{right:calc(var(--spacing)*-3)}.-bottom-3{bottom:calc(var(--spacing)*-3)}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.table{display:table}.aspect-auto{aspect-ratio:auto}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-\\[80\\%\\]{height:80%}.h-auto{height:auto}.w-1\\/5{width:20%}.w-3xs{width:var(--container-3xs)}.w-4\\/5{width:80%}.w-8{width:calc(var(--spacing)*8)}.w-11\\/12{width:91.6667%}.w-auto{width:auto}.w-full{width:100%}.max-w-\\[var\\(--max-container\\)\\]{max-width:var(--max-container)}.max-w-md{max-width:var(--container-md)}.min-w-20{min-width:calc(var(--spacing)*20)}.min-w-\\[var\\(--min-container\\)\\]{min-width:var(--min-container)}.shrink-0{flex-shrink:0}.rotate-0{rotate:none}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-center-safe{align-items:safe center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-center-safe{justify-content:safe center}.justify-end{justify-content:flex-end}.justify-end-safe{justify-content:safe flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}.gap-4\\.5{gap:calc(var(--spacing)*4.5)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-ss-2xl{border-start-start-radius:var(--radius-2xl)}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.rounded-se-2xl{border-start-end-radius:var(--radius-2xl)}.rounded-ee-2xl{border-end-end-radius:var(--radius-2xl)}.rounded-es-2xl{border-end-start-radius:var(--radius-2xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-3{border-style:var(--tw-border-style);border-width:3px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[\\#44c2c0\\]{border-color:#44c2c0}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-300{border-color:var(--color-gray-300)}.border-yellow-500{border-color:var(--color-yellow-500)}.border-zinc-300{border-color:var(--color-zinc-300)}.border-zinc-400\\/50{border-color:#9f9fa980}@supports (color:color-mix(in lab,red,red)){.border-zinc-400\\/50{border-color:color-mix(in oklab,var(--color-zinc-400)50%,transparent)}}.border-t-gray-700{border-top-color:var(--color-gray-700)}.bg-\\[\\#32b316\\]{background-color:#32b316}.bg-\\[\\#44c2c0\\]{background-color:#44c2c0}.bg-\\[\\#44c2c0\\]\\/30{background-color:#44c2c04d}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab,red,red)){.bg-black\\/35{background-color:color-mix(in oklab,var(--color-black)35%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-zinc-300\\/60{background-color:#d4d4d899}@supports (color:color-mix(in lab,red,red)){.bg-zinc-300\\/60{background-color:color-mix(in oklab,var(--color-zinc-300)60%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.text-start{text-align:start}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-nowrap{text-wrap:nowrap}.text-\\[\\#339c9b\\]{color:#339c9b}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-800{color:var(--color-zinc-800)}.text-zinc-900{color:var(--color-zinc-900)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-red-600{outline-color:var(--color-red-600)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.placeholder\\:text-sm::placeholder{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.placeholder\\:font-semibold::placeholder{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.placeholder\\:text-zinc-600::placeholder{color:var(--color-zinc-600)}@media(hover:hover){.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\\:bg-gray-500:hover{background-color:var(--color-gray-500)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-transparent:hover{background-color:#0000}.hover\\:bg-zinc-300:hover{background-color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:text-zinc-900:hover{color:var(--color-zinc-900)}}.focus\\:bg-white:focus{background-color:var(--color-white)}.focus\\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.focus\\:outline-\\[\\#339c9b\\]:focus{outline-color:#339c9b}@media(min-width:48rem){.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}}:root{--max-container:556px;--min-container:350px}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';window.pbm=JC();class pD extends HTMLElement{root=null;props={originalProductPrice:0,clientID:"",eanProduct:"",isAuthenticatedShopper:!1,customLoginUrl:"/login"};static get observedAttributes(){return["originalproductprice","clientid","eanproduct","isauthenticatedshopper","customloginurl"]}constructor(){super(),this.attachShadow({mode:"open"})}updatePropsFromAttributes(){const o=this.getAttribute("originalproductprice"),f=this.getAttribute("clientid"),h=this.getAttribute("eanproduct"),p=this.getAttribute("isauthenticatedshopper"),v=this.getAttribute("customloginurl");p!==null&&(this.props.isAuthenticatedShopper=p==="true"),v!==null&&(this.props.customLoginUrl=v===""?"/login":v),o!==null&&(this.props.originalProductPrice=o),f!==null&&(this.props.clientID=f),h!==null&&(this.props.eanProduct=h,h&&Zv.getState().setTargetProduct({ean:h,quantity:1}))}connectedCallback(){this.updatePropsFromAttributes(),this.mount()}attributeChangedCallback(o,f,h){o==="originalproductprice"&&(this.props.originalProductPrice=parseFloat(h)),o==="clientid"&&(this.props.clientID=h),o==="eanproduct"&&(this.props.eanProduct=h,h&&Zv.getState().setTargetProduct({ean:h,quantity:1})),o==="isauthenticatedshopper"&&(this.props.isAuthenticatedShopper=h==="true"),o==="customloginurl"&&(this.props.customLoginUrl=h===""?"/login":h),this.mount()}mount(){if(!this.isConnected)return;let o=this.shadowRoot;if(!(!o&&(this.attachShadow({mode:"open"}),o=this.shadowRoot,!o))){if(!o.querySelector("#pbm-shadow-root")){const f=document.createElement("div");f.id="pbm-shadow-root";const h=document.createElement("style");h.textContent=mD,o.appendChild(h),o.appendChild(f),this.root=ZC.createRoot(f)}this.root&&this.root.render(Ee.jsx(hD,{...this.props}))}}}customElements.define("pbm-component",pD)})();
|