@molin.ai/shop-ai 0.4.9 → 0.4.10

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.
@@ -1,23 +1,23 @@
1
- var md=Object.defineProperty;var gd=(t,e,r)=>e in t?md(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var we=(t,e,r)=>(gd(t,typeof e!="symbol"?e+"":e,r),r),Ma=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var N=(t,e,r)=>(Ma(t,e,"read from private field"),r?r.call(t):e.get(t)),se=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Re=(t,e,r,i)=>(Ma(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);var Ul=(t,e,r,i)=>({set _(n){Re(t,e,n,r)},get _(){return N(t,e,i)}}),ue=(t,e,r)=>(Ma(t,e,"access private method"),r);var de;(function(t){t.assertEqual=n=>n;function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let s={};for(let a of n)s[a]=a;return s},t.getValidEnumValues=n=>{let s=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(let o of s)a[o]=n[o];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(s){return n[s]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.push(a);return s},t.find=(n,s)=>{for(let a of n)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=i,t.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(de||(de={}));var Fa;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Fa||(Fa={}));var z=de.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hr=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}},L=de.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"]),yd=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),pt=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)i._errors.push(r(a));else{let o=i,l=0;for(;l<a.path.length;){let h=a.path[l];l===a.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(r(a))):o[h]=o[h]||{_errors:[]},o=o[h],l++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,de.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};pt.create=t=>new pt(t);var Wi=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===z.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,de.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${de.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${de.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${de.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:de.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case L.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,de.assertNever(t)}return{message:r}},Yl=Wi;function vd(t){Yl=t}function Vn(){return Yl}var Nn=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,s=[...r,...n.path||[]],a={...n,path:s},o="",l=i.filter(h=>!!h).slice().reverse();for(let h of l)o=h(a,{data:e,defaultError:o}).message;return{...n,path:s,message:n.message||o}},bd=[];function H(t,e){let r=Nn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Vn(),Wi].filter(i=>!!i)});t.common.issues.push(r)}var Ze=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return ae;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:s,value:a}=n;if(s.status==="aborted"||a.status==="aborted")return ae;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}},ae=Object.freeze({status:"aborted"}),Jl=t=>({status:"dirty",value:t}),Ke=t=>({status:"valid",value:t}),Oa=t=>t.status==="aborted",$a=t=>t.status==="dirty",Zi=t=>t.status==="valid",zn=t=>typeof Promise<"u"&&t instanceof Promise,Q;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Q||(Q={}));var xt=class{constructor(e,r,i,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wl=(t,e)=>{if(Zi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new pt(t.common.issues);return this._error=r,this._error}}};function oe(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:i??o.defaultError}:{message:r??o.defaultError},description:n}}var le=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,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)}get description(){return this._def.description}_getType(e){return hr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:hr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ze,ctx:{common:e.parent.common,data:e.data,parsedType:hr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(zn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Wl(n,s)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(zn(n)?n:Promise.resolve(n));return Wl(i,s)}refine(e,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,s)=>{let a=e(n),o=()=>s.addIssue({code:L.custom,...i(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new dt({schema:this,typeName:re.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ft.create(this,this._def)}nullable(){return Wt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return pr.create(this,this._def)}or(e){return Ir.create([this,e],this._def)}and(e){return Mr.create(this,e,this._def)}transform(e){return new dt({...oe(this._def),schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Rr({...oe(this._def),innerType:this,defaultValue:r,typeName:re.ZodDefault})}brand(){return new qn({typeName:re.ZodBranded,type:this,...oe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new li({...oe(this._def),innerType:this,catchValue:r,typeName:re.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Yi.create(this,e)}readonly(){return ci.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},_d=/^c[^\s-]{8,}$/i,wd=/^[a-z][a-z0-9]*$/,xd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Sd=/^[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,Ed=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Da,Pd=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Ad=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Cd=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Td(t,e){return!!((e==="v4"||!e)&&Pd.test(t)||(e==="v6"||!e)&&Ad.test(t))}var cr=class t extends le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.string,received:s.parsedType}),ae}let i=new Ze,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?H(n,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&H(n,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")Ed.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"email",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Da||(Da=new RegExp(kd,"u")),Da.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"emoji",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Sd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"uuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")_d.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")wd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid2",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")xd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ulid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),H(n,{validation:"url",code:L.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"regex",code:L.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Cd(s).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?Td(e.data,s.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ip",code:L.invalid_string,message:s.message}),i.dirty()):de.assertNever(s);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:L.invalid_string,...Q.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Q.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Q.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Q.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Q.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Q.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Q.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Q.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Q.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,...Q.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Q.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Q.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Q.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Q.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Q.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Q.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Q.errToObj(r)})}nonempty(e){return this.min(1,Q.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.create=t=>{var e;return new cr({checks:[],typeName:re.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};function Id(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,s=parseInt(t.toFixed(n).replace(".","")),a=parseInt(e.toFixed(n).replace(".",""));return s%a/Math.pow(10,n)}var Er=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.number,received:s.parsedType}),ae}let i,n=new Ze;for(let s of this._def.checks)s.kind==="int"?de.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:L.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?Id(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:L.not_finite,message:s.message}),n.dirty()):de.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Q.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Q.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Q.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&de.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Er.create=t=>new Er({checks:[],typeName:re.ZodNumber,coerce:t?.coerce||!1,...oe(t)});var kr=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==z.bigint){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.bigint,received:s.parsedType}),ae}let i,n=new Ze;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):de.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Q.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};kr.create=t=>{var e;return new kr({checks:[],typeName:re.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};var Pr=class extends le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.boolean,received:i.parsedType}),ae}return Ke(e.data)}};Pr.create=t=>new Pr({typeName:re.ZodBoolean,coerce:t?.coerce||!1,...oe(t)});var Ar=class t extends le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.date,received:s.parsedType}),ae}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_date}),ae}let i=new Ze,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):de.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Q.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Q.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Ar.create=t=>new Ar({checks:[],coerce:t?.coerce||!1,typeName:re.ZodDate,...oe(t)});var ni=class extends le{_parse(e){if(this._getType(e)!==z.symbol){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.symbol,received:i.parsedType}),ae}return Ke(e.data)}};ni.create=t=>new ni({typeName:re.ZodSymbol,...oe(t)});var Cr=class extends le{_parse(e){if(this._getType(e)!==z.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.undefined,received:i.parsedType}),ae}return Ke(e.data)}};Cr.create=t=>new Cr({typeName:re.ZodUndefined,...oe(t)});var Tr=class extends le{_parse(e){if(this._getType(e)!==z.null){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.null,received:i.parsedType}),ae}return Ke(e.data)}};Tr.create=t=>new Tr({typeName:re.ZodNull,...oe(t)});var ur=class extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return Ke(e.data)}};ur.create=t=>new ur({typeName:re.ZodAny,...oe(t)});var qt=class extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ke(e.data)}};qt.create=t=>new qt({typeName:re.ZodUnknown,...oe(t)});var Ot=class extends le{_parse(e){let r=this._getOrReturnCtx(e);return H(r,{code:L.invalid_type,expected:z.never,received:r.parsedType}),ae}};Ot.create=t=>new Ot({typeName:re.ZodNever,...oe(t)});var si=class extends le{_parse(e){if(this._getType(e)!==z.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.void,received:i.parsedType}),ae}return Ke(e.data)}};si.create=t=>new si({typeName:re.ZodVoid,...oe(t)});var Ut=class t extends le{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==z.array)return H(r,{code:L.invalid_type,expected:z.array,received:r.parsedType}),ae;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(a||o)&&(H(r,{code:a?L.too_big:L.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(H(r,{code:L.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(H(r,{code:L.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>n.type._parseAsync(new xt(r,a,r.path,o)))).then(a=>Ze.mergeArray(i,a));let s=[...r.data].map((a,o)=>n.type._parseSync(new xt(r,a,r.path,o)));return Ze.mergeArray(i,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Q.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Q.toString(r)}})}nonempty(e){return this.min(1,e)}};Ut.create=(t,e)=>new Ut({type:t,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray,...oe(e)});function ii(t){if(t instanceof st){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=Ft.create(ii(i))}return new st({...t._def,shape:()=>e})}else return t instanceof Ut?new Ut({...t._def,type:ii(t.element)}):t instanceof Ft?Ft.create(ii(t.unwrap())):t instanceof Wt?Wt.create(ii(t.unwrap())):t instanceof Bt?Bt.create(t.items.map(e=>ii(e))):t}var st=class t extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=de.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==z.object){let h=this._getOrReturnCtx(e);return H(h,{code:L.invalid_type,expected:z.object,received:h.parsedType}),ae}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Ot&&this._def.unknownKeys==="strip"))for(let h in n.data)a.includes(h)||o.push(h);let l=[];for(let h of a){let c=s[h],u=n.data[h];l.push({key:{status:"valid",value:h},value:c._parse(new xt(n,u,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof Ot){let h=this._def.unknownKeys;if(h==="passthrough")for(let c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:n.data[c]}});else if(h==="strict")o.length>0&&(H(n,{code:L.unrecognized_keys,keys:o}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let c of o){let u=n.data[c];l.push({key:{status:"valid",value:c},value:h._parse(new xt(n,u,n.path,c)),alwaysSet:c in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let c of l){let u=await c.key;h.push({key:u,value:await c.value,alwaysSet:c.alwaysSet})}return h}).then(h=>Ze.mergeObjectSync(i,h)):Ze.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return Q.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var n,s,a,o;let l=(a=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,r,i).message)!==null&&a!==void 0?a:i.defaultError;return r.code==="unrecognized_keys"?{message:(o=Q.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:re.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return de.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return de.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}deepPartial(){return ii(this)}partial(e){let r={};return de.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];e&&!e[i]?r[i]=n:r[i]=n.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return de.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Ft;)s=s._def.innerType;r[i]=s}}),new t({...this._def,shape:()=>r})}keyof(){return Xl(de.objectKeys(this.shape))}};st.create=(t,e)=>new st({shape:()=>t,unknownKeys:"strip",catchall:Ot.create(),typeName:re.ZodObject,...oe(e)});st.strictCreate=(t,e)=>new st({shape:()=>t,unknownKeys:"strict",catchall:Ot.create(),typeName:re.ZodObject,...oe(e)});st.lazycreate=(t,e)=>new st({shape:t,unknownKeys:"strip",catchall:Ot.create(),typeName:re.ZodObject,...oe(e)});var Ir=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new pt(o.ctx.common.issues));return H(r,{code:L.invalid_union,unionErrors:a}),ae}if(r.common.async)return Promise.all(i.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let s,a=[];for(let l of i){let h={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:h});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:h}),h.common.issues.length&&a.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(l=>new pt(l));return H(r,{code:L.invalid_union,unionErrors:o}),ae}}get options(){return this._def.options}};Ir.create=(t,e)=>new Ir({options:t,typeName:re.ZodUnion,...oe(e)});var Bn=t=>t instanceof Dr?Bn(t.schema):t instanceof dt?Bn(t.innerType()):t instanceof Fr?[t.value]:t instanceof Or?t.options:t instanceof $r?Object.keys(t.enum):t instanceof Rr?Bn(t._def.innerType):t instanceof Cr?[void 0]:t instanceof Tr?[null]:null,jn=class t extends le{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.object)return H(r,{code:L.invalid_type,expected:z.object,received:r.parsedType}),ae;let i=this.discriminator,n=r.data[i],s=this.optionsMap.get(n);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(H(r,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let n=new Map;for(let s of r){let a=Bn(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,s)}}return new t({typeName:re.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...oe(i)})}};function Ra(t,e){let r=hr(t),i=hr(e);if(t===e)return{valid:!0,data:t};if(r===z.object&&i===z.object){let n=de.objectKeys(e),s=de.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of s){let l=Ra(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(r===z.array&&i===z.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],l=Ra(a,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return r===z.date&&i===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Mr=class extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(Oa(s)||Oa(a))return ae;let o=Ra(s.value,a.value);return o.valid?(($a(s)||$a(a))&&r.dirty(),{status:r.value,value:o.data}):(H(i,{code:L.invalid_intersection_types}),ae)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>n(s,a)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Mr.create=(t,e,r)=>new Mr({left:t,right:e,typeName:re.ZodIntersection,...oe(r)});var Bt=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.array)return H(i,{code:L.invalid_type,expected:z.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return H(i,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&i.data.length>this._def.items.length&&(H(i,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...i.data].map((a,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new xt(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>Ze.mergeArray(r,a)):Ze.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Bt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bt({items:t,typeName:re.ZodTuple,rest:null,...oe(e)})};var Hn=class t extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.object)return H(i,{code:L.invalid_type,expected:z.object,received:i.parsedType}),ae;let n=[],s=this._def.keyType,a=this._def.valueType;for(let o in i.data)n.push({key:s._parse(new xt(i,o,i.path,o)),value:a._parse(new xt(i,i.data[o],i.path,o))});return i.common.async?Ze.mergeObjectAsync(r,n):Ze.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof le?new t({keyType:e,valueType:r,typeName:re.ZodRecord,...oe(i)}):new t({keyType:cr.create(),valueType:e,typeName:re.ZodRecord,...oe(r)})}},ai=class extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.map)return H(i,{code:L.invalid_type,expected:z.map,received:i.parsedType}),ae;let n=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],h)=>({key:n._parse(new xt(i,o,i.path,[h,"key"])),value:s._parse(new xt(i,l,i.path,[h,"value"]))}));if(i.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of a){let h=await l.key,c=await l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let l of a){let h=l.key,c=l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}}}};ai.create=(t,e,r)=>new ai({valueType:e,keyType:t,typeName:re.ZodMap,...oe(r)});var oi=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.set)return H(i,{code:L.invalid_type,expected:z.set,received:i.parsedType}),ae;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(H(i,{code:L.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(H(i,{code:L.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let s=this._def.valueType;function a(l){let h=new Set;for(let c of l){if(c.status==="aborted")return ae;c.status==="dirty"&&r.dirty(),h.add(c.value)}return{status:r.value,value:h}}let o=[...i.data.values()].map((l,h)=>s._parse(new xt(i,l,i.path,h)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Q.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};oi.create=(t,e)=>new oi({valueType:t,minSize:null,maxSize:null,typeName:re.ZodSet,...oe(e)});var Gn=class t extends le{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.function)return H(r,{code:L.invalid_type,expected:z.function,received:r.parsedType}),ae;function i(o,l){return Nn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vn(),Wi].filter(h=>!!h),issueData:{code:L.invalid_arguments,argumentsError:l}})}function n(o,l){return Nn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vn(),Wi].filter(h=>!!h),issueData:{code:L.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof pr){let o=this;return Ke(async function(...l){let h=new pt([]),c=await o._def.args.parseAsync(l,s).catch(p=>{throw h.addIssue(i(l,p)),h}),u=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(u,s).catch(p=>{throw h.addIssue(n(u,p)),h})})}else{let o=this;return Ke(function(...l){let h=o._def.args.safeParse(l,s);if(!h.success)throw new pt([i(l,h.error)]);let c=Reflect.apply(a,this,h.data),u=o._def.returns.safeParse(c,s);if(!u.success)throw new pt([n(c,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Bt.create(e).rest(qt.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Bt.create([]).rest(qt.create()),returns:r||qt.create(),typeName:re.ZodFunction,...oe(i)})}},Dr=class extends le{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Dr.create=(t,e)=>new Dr({getter:t,typeName:re.ZodLazy,...oe(e)});var Fr=class extends le{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};Fr.create=(t,e)=>new Fr({value:t,typeName:re.ZodLiteral,...oe(e)});function Xl(t,e){return new Or({values:t,typeName:re.ZodEnum,...oe(e)})}var Or=class t extends le{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{expected:de.joinValues(i),received:r.parsedType,code:L.invalid_type}),ae}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{received:r.data,code:L.invalid_enum_value,options:i}),ae}return Ke(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};Or.create=Xl;var $r=class extends le{_parse(e){let r=de.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==z.string&&i.parsedType!==z.number){let n=de.objectValues(r);return H(i,{expected:de.joinValues(n),received:i.parsedType,code:L.invalid_type}),ae}if(r.indexOf(e.data)===-1){let n=de.objectValues(r);return H(i,{received:i.data,code:L.invalid_enum_value,options:n}),ae}return Ke(e.data)}get enum(){return this._def.values}};$r.create=(t,e)=>new $r({values:t,typeName:re.ZodNativeEnum,...oe(e)});var pr=class extends le{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.promise&&r.common.async===!1)return H(r,{code:L.invalid_type,expected:z.promise,received:r.parsedType}),ae;let i=r.parsedType===z.promise?r.data:Promise.resolve(r.data);return Ke(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};pr.create=(t,e)=>new pr({type:t,typeName:re.ZodPromise,...oe(e)});var dt=class extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:a=>{H(i,a),a.fatal?r.abort():r.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let a=n.transform(i.data,s);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(n.type==="refinement"){let a=o=>{let l=n.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Zi(a))return a;let o=n.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>Zi(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);de.assertNever(n)}};dt.create=(t,e,r)=>new dt({schema:t,typeName:re.ZodEffects,effect:e,...oe(r)});dt.createWithPreprocess=(t,e,r)=>new dt({schema:e,effect:{type:"preprocess",transform:t},typeName:re.ZodEffects,...oe(r)});var Ft=class extends le{_parse(e){return this._getType(e)===z.undefined?Ke(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ft.create=(t,e)=>new Ft({innerType:t,typeName:re.ZodOptional,...oe(e)});var Wt=class extends le{_parse(e){return this._getType(e)===z.null?Ke(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Wt.create=(t,e)=>new Wt({innerType:t,typeName:re.ZodNullable,...oe(e)});var Rr=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===z.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Rr.create=(t,e)=>new Rr({innerType:t,typeName:re.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});var li=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return zn(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new pt(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new pt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};li.create=(t,e)=>new li({innerType:t,typeName:re.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});var hi=class extends le{_parse(e){if(this._getType(e)!==z.nan){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.nan,received:i.parsedType}),ae}return{status:"valid",value:e.data}}};hi.create=t=>new hi({typeName:re.ZodNaN,...oe(t)});var Md=Symbol("zod_brand"),qn=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Yi=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?ae:s.status==="dirty"?(r.dirty(),Jl(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?ae:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:re.ZodPipeline})}},ci=class extends le{_parse(e){let r=this._def.innerType._parse(e);return Zi(r)&&(r.value=Object.freeze(r.value)),r}};ci.create=(t,e)=>new ci({innerType:t,typeName:re.ZodReadonly,...oe(e)});var Kl=(t,e={},r)=>t?ur.create().superRefine((i,n)=>{var s,a;if(!t(i)){let o=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,h=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...h,fatal:l})}}):ur.create(),Dd={object:st.lazycreate},re;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(re||(re={}));var Fd=(t,e={message:`Input not instance of ${t.name}`})=>Kl(r=>r instanceof t,e),Ql=cr.create,eh=Er.create,Od=hi.create,$d=kr.create,th=Pr.create,Rd=Ar.create,Ld=ni.create,Bd=Cr.create,Vd=Tr.create,Nd=ur.create,zd=qt.create,jd=Ot.create,Hd=si.create,Gd=Ut.create,qd=st.create,Ud=st.strictCreate,Wd=Ir.create,Zd=jn.create,Yd=Mr.create,Jd=Bt.create,Xd=Hn.create,Kd=ai.create,Qd=oi.create,ef=Gn.create,tf=Dr.create,rf=Fr.create,nf=Or.create,sf=$r.create,af=pr.create,Zl=dt.create,of=Ft.create,lf=Wt.create,hf=dt.createWithPreprocess,cf=Yi.create,uf=()=>Ql().optional(),pf=()=>eh().optional(),df=()=>th().optional(),ff={string:t=>cr.create({...t,coerce:!0}),number:t=>Er.create({...t,coerce:!0}),boolean:t=>Pr.create({...t,coerce:!0}),bigint:t=>kr.create({...t,coerce:!0}),date:t=>Ar.create({...t,coerce:!0})},mf=ae,ve=Object.freeze({__proto__:null,defaultErrorMap:Wi,setErrorMap:vd,getErrorMap:Vn,makeIssue:Nn,EMPTY_PATH:bd,addIssueToContext:H,ParseStatus:Ze,INVALID:ae,DIRTY:Jl,OK:Ke,isAborted:Oa,isDirty:$a,isValid:Zi,isAsync:zn,get util(){return de},get objectUtil(){return Fa},ZodParsedType:z,getParsedType:hr,ZodType:le,ZodString:cr,ZodNumber:Er,ZodBigInt:kr,ZodBoolean:Pr,ZodDate:Ar,ZodSymbol:ni,ZodUndefined:Cr,ZodNull:Tr,ZodAny:ur,ZodUnknown:qt,ZodNever:Ot,ZodVoid:si,ZodArray:Ut,ZodObject:st,ZodUnion:Ir,ZodDiscriminatedUnion:jn,ZodIntersection:Mr,ZodTuple:Bt,ZodRecord:Hn,ZodMap:ai,ZodSet:oi,ZodFunction:Gn,ZodLazy:Dr,ZodLiteral:Fr,ZodEnum:Or,ZodNativeEnum:$r,ZodPromise:pr,ZodEffects:dt,ZodTransformer:dt,ZodOptional:Ft,ZodNullable:Wt,ZodDefault:Rr,ZodCatch:li,ZodNaN:hi,BRAND:Md,ZodBranded:qn,ZodPipeline:Yi,ZodReadonly:ci,custom:Kl,Schema:le,ZodSchema:le,late:Dd,get ZodFirstPartyTypeKind(){return re},coerce:ff,any:Nd,array:Gd,bigint:$d,boolean:th,date:Rd,discriminatedUnion:Zd,effect:Zl,enum:nf,function:ef,instanceof:Fd,intersection:Yd,lazy:tf,literal:rf,map:Kd,nan:Od,nativeEnum:sf,never:jd,null:Vd,nullable:lf,number:eh,object:qd,oboolean:df,onumber:pf,optional:of,ostring:uf,pipeline:cf,preprocess:hf,promise:af,record:Xd,set:Qd,strictObject:Ud,string:Ql,symbol:Ld,transformer:Zl,tuple:Jd,undefined:Bd,union:Wd,unknown:zd,void:Hd,NEVER:mf,ZodIssueCode:L,quotelessJson:yd,ZodError:pt});var oy=ve.object({wsApiUrl:ve.string(),url:ve.string(),logoSvg:ve.string().optional(),logoUrl:ve.string().optional(),title:ve.string(),status:ve.string(),color:ve.string(),input:ve.object({placeholder:ve.string()}),bubble:ve.object({position:ve.object({bottom:ve.string().optional(),right:ve.string().optional(),left:ve.string().optional()})}),header:ve.object({background:ve.string()}),limitations:ve.object({title:ve.string(),items:ve.array(ve.string())}),examples:ve.object({title:ve.string(),items:ve.array(ve.string())}),instructions:ve.object({items:ve.array(ve.string())})});function gf(t){return t.replace(/[^A-Za-z0-9_-]/gi,"")}window.__INIT_MOLIN_SHOP_AI=function(e){if(!e)throw new Error("options is required");let{widgetId:r,config:i}=e;if(!r)throw new Error("widgetId is required");if(!i)throw new Error("config is required");r=gf(r);let n=document.createElement("molin-shop-ai");n.setAttribute("widget",r),n.config=i,document.body.appendChild(n)};var Un=window,Wn=Un.ShadowRoot&&(Un.ShadyCSS===void 0||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,La=Symbol(),rh=new WeakMap,Ji=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==La)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Wn&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=rh.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&rh.set(r,e))}return e}toString(){return this.cssText}},ih=t=>new Ji(typeof t=="string"?t:t+"",void 0,La),Ba=(t,...e)=>{let r=t.length===1?t[0]:e.reduce((i,n,s)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[s+1],t[0]);return new Ji(r,t,La)},Va=(t,e)=>{Wn?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=Un.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},Zn=Wn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return ih(r)})(t):t;var Na,Yn=window,nh=Yn.trustedTypes,yf=nh?nh.emptyScript:"",sh=Yn.reactiveElementPolyfillSupport,ja={toAttribute(t,e){switch(e){case Boolean:t=t?yf:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},ah=(t,e)=>e!==t&&(e==e||t==t),za={attribute:!0,type:String,converter:ja,reflect:!1,hasChanged:ah},Ha="finalized",Zt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((r,i)=>{let n=this._$Ep(i,r);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,r=za){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){let i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,r);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(n){let s=this[e];this[r]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||za}static finalize(){if(this.hasOwnProperty(Ha))return!1;this[Ha]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let n of i)this.createProperty(n,r[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)r.unshift(Zn(n))}else e!==void 0&&r.push(Zn(e));return r}static _$Ep(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;let r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Va(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=za){var n;let s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){let a=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:ja).toAttribute(r,i.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,r){var i;let n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){let a=n.getPropertyOptions(s),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:ja;this._$El=s,this[s]=o.fromAttribute(r,a.type),this._$El=null}}requestUpdate(e,r,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||ah)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let r=!1,i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw r=!1,this._$Ek(),n}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Zt[Ha]=!0,Zt.elementProperties=new Map,Zt.elementStyles=[],Zt.shadowRootOptions={mode:"open"},sh?.({ReactiveElement:Zt}),((Na=Yn.reactiveElementVersions)!==null&&Na!==void 0?Na:Yn.reactiveElementVersions=[]).push("1.6.3");var Ga,Jn=window,ui=Jn.trustedTypes,oh=ui?ui.createPolicy("lit-html",{createHTML:t=>t}):void 0,Xn="$lit$",Yt=`lit$${(Math.random()+"").slice(9)}$`,Ua="?"+Yt,vf=`<${Ua}>`,Vr=document,Ki=()=>Vr.createComment(""),Qi=t=>t===null||typeof t!="object"&&typeof t!="function",fh=Array.isArray,mh=t=>fh(t)||typeof t?.[Symbol.iterator]=="function",qa=`[
1
+ var md=Object.defineProperty;var gd=(t,e,r)=>e in t?md(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var we=(t,e,r)=>(gd(t,typeof e!="symbol"?e+"":e,r),r),Ma=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var N=(t,e,r)=>(Ma(t,e,"read from private field"),r?r.call(t):e.get(t)),se=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Re=(t,e,r,i)=>(Ma(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);var Ul=(t,e,r,i)=>({set _(n){Re(t,e,n,r)},get _(){return N(t,e,i)}}),ue=(t,e,r)=>(Ma(t,e,"access private method"),r);var fe;(function(t){t.assertEqual=n=>n;function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let s={};for(let a of n)s[a]=a;return s},t.getValidEnumValues=n=>{let s=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(let o of s)a[o]=n[o];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(s){return n[s]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.push(a);return s},t.find=(n,s)=>{for(let a of n)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=i,t.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(fe||(fe={}));var Fa;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Fa||(Fa={}));var z=fe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hr=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}},L=fe.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"]),yd=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),pt=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)i._errors.push(r(a));else{let o=i,l=0;for(;l<a.path.length;){let h=a.path[l];l===a.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(r(a))):o[h]=o[h]||{_errors:[]},o=o[h],l++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,fe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};pt.create=t=>new pt(t);var Wi=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===z.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,fe.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${fe.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${fe.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${fe.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:fe.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case L.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,fe.assertNever(t)}return{message:r}},Yl=Wi;function vd(t){Yl=t}function Vn(){return Yl}var Nn=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,s=[...r,...n.path||[]],a={...n,path:s},o="",l=i.filter(h=>!!h).slice().reverse();for(let h of l)o=h(a,{data:e,defaultError:o}).message;return{...n,path:s,message:n.message||o}},bd=[];function H(t,e){let r=Nn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Vn(),Wi].filter(i=>!!i)});t.common.issues.push(r)}var Ze=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return ae;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:s,value:a}=n;if(s.status==="aborted"||a.status==="aborted")return ae;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}},ae=Object.freeze({status:"aborted"}),Jl=t=>({status:"dirty",value:t}),Ke=t=>({status:"valid",value:t}),Oa=t=>t.status==="aborted",$a=t=>t.status==="dirty",Zi=t=>t.status==="valid",zn=t=>typeof Promise<"u"&&t instanceof Promise,Q;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Q||(Q={}));var xt=class{constructor(e,r,i,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wl=(t,e)=>{if(Zi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new pt(t.common.issues);return this._error=r,this._error}}};function oe(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:i??o.defaultError}:{message:r??o.defaultError},description:n}}var le=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,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)}get description(){return this._def.description}_getType(e){return hr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:hr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ze,ctx:{common:e.parent.common,data:e.data,parsedType:hr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(zn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Wl(n,s)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(zn(n)?n:Promise.resolve(n));return Wl(i,s)}refine(e,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,s)=>{let a=e(n),o=()=>s.addIssue({code:L.custom,...i(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new dt({schema:this,typeName:re.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ft.create(this,this._def)}nullable(){return Wt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return pr.create(this,this._def)}or(e){return Ir.create([this,e],this._def)}and(e){return Mr.create(this,e,this._def)}transform(e){return new dt({...oe(this._def),schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Rr({...oe(this._def),innerType:this,defaultValue:r,typeName:re.ZodDefault})}brand(){return new qn({typeName:re.ZodBranded,type:this,...oe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new li({...oe(this._def),innerType:this,catchValue:r,typeName:re.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Yi.create(this,e)}readonly(){return ci.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},_d=/^c[^\s-]{8,}$/i,wd=/^[a-z][a-z0-9]*$/,xd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Sd=/^[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,Ed=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Da,Pd=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Ad=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Cd=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Td(t,e){return!!((e==="v4"||!e)&&Pd.test(t)||(e==="v6"||!e)&&Ad.test(t))}var cr=class t extends le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.string,received:s.parsedType}),ae}let i=new Ze,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?H(n,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&H(n,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")Ed.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"email",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Da||(Da=new RegExp(kd,"u")),Da.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"emoji",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Sd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"uuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")_d.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")wd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid2",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")xd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ulid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),H(n,{validation:"url",code:L.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"regex",code:L.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Cd(s).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?Td(e.data,s.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ip",code:L.invalid_string,message:s.message}),i.dirty()):fe.assertNever(s);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:L.invalid_string,...Q.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Q.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Q.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Q.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Q.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Q.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Q.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Q.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Q.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,...Q.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Q.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Q.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Q.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Q.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Q.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Q.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Q.errToObj(r)})}nonempty(e){return this.min(1,Q.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.create=t=>{var e;return new cr({checks:[],typeName:re.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};function Id(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,s=parseInt(t.toFixed(n).replace(".","")),a=parseInt(e.toFixed(n).replace(".",""));return s%a/Math.pow(10,n)}var Er=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.number,received:s.parsedType}),ae}let i,n=new Ze;for(let s of this._def.checks)s.kind==="int"?fe.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:L.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?Id(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:L.not_finite,message:s.message}),n.dirty()):fe.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Q.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Q.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Q.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&fe.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Er.create=t=>new Er({checks:[],typeName:re.ZodNumber,coerce:t?.coerce||!1,...oe(t)});var kr=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==z.bigint){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.bigint,received:s.parsedType}),ae}let i,n=new Ze;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):fe.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Q.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Q.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Q.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Q.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Q.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Q.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};kr.create=t=>{var e;return new kr({checks:[],typeName:re.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};var Pr=class extends le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.boolean,received:i.parsedType}),ae}return Ke(e.data)}};Pr.create=t=>new Pr({typeName:re.ZodBoolean,coerce:t?.coerce||!1,...oe(t)});var Ar=class t extends le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_type,expected:z.date,received:s.parsedType}),ae}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return H(s,{code:L.invalid_date}),ae}let i=new Ze,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:L.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):fe.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Q.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Q.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Ar.create=t=>new Ar({checks:[],coerce:t?.coerce||!1,typeName:re.ZodDate,...oe(t)});var ni=class extends le{_parse(e){if(this._getType(e)!==z.symbol){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.symbol,received:i.parsedType}),ae}return Ke(e.data)}};ni.create=t=>new ni({typeName:re.ZodSymbol,...oe(t)});var Cr=class extends le{_parse(e){if(this._getType(e)!==z.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.undefined,received:i.parsedType}),ae}return Ke(e.data)}};Cr.create=t=>new Cr({typeName:re.ZodUndefined,...oe(t)});var Tr=class extends le{_parse(e){if(this._getType(e)!==z.null){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.null,received:i.parsedType}),ae}return Ke(e.data)}};Tr.create=t=>new Tr({typeName:re.ZodNull,...oe(t)});var ur=class extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return Ke(e.data)}};ur.create=t=>new ur({typeName:re.ZodAny,...oe(t)});var qt=class extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ke(e.data)}};qt.create=t=>new qt({typeName:re.ZodUnknown,...oe(t)});var Ot=class extends le{_parse(e){let r=this._getOrReturnCtx(e);return H(r,{code:L.invalid_type,expected:z.never,received:r.parsedType}),ae}};Ot.create=t=>new Ot({typeName:re.ZodNever,...oe(t)});var si=class extends le{_parse(e){if(this._getType(e)!==z.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.void,received:i.parsedType}),ae}return Ke(e.data)}};si.create=t=>new si({typeName:re.ZodVoid,...oe(t)});var Ut=class t extends le{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==z.array)return H(r,{code:L.invalid_type,expected:z.array,received:r.parsedType}),ae;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(a||o)&&(H(r,{code:a?L.too_big:L.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(H(r,{code:L.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(H(r,{code:L.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>n.type._parseAsync(new xt(r,a,r.path,o)))).then(a=>Ze.mergeArray(i,a));let s=[...r.data].map((a,o)=>n.type._parseSync(new xt(r,a,r.path,o)));return Ze.mergeArray(i,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Q.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Q.toString(r)}})}nonempty(e){return this.min(1,e)}};Ut.create=(t,e)=>new Ut({type:t,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray,...oe(e)});function ii(t){if(t instanceof st){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=Ft.create(ii(i))}return new st({...t._def,shape:()=>e})}else return t instanceof Ut?new Ut({...t._def,type:ii(t.element)}):t instanceof Ft?Ft.create(ii(t.unwrap())):t instanceof Wt?Wt.create(ii(t.unwrap())):t instanceof Bt?Bt.create(t.items.map(e=>ii(e))):t}var st=class t extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=fe.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==z.object){let h=this._getOrReturnCtx(e);return H(h,{code:L.invalid_type,expected:z.object,received:h.parsedType}),ae}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Ot&&this._def.unknownKeys==="strip"))for(let h in n.data)a.includes(h)||o.push(h);let l=[];for(let h of a){let c=s[h],u=n.data[h];l.push({key:{status:"valid",value:h},value:c._parse(new xt(n,u,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof Ot){let h=this._def.unknownKeys;if(h==="passthrough")for(let c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:n.data[c]}});else if(h==="strict")o.length>0&&(H(n,{code:L.unrecognized_keys,keys:o}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let c of o){let u=n.data[c];l.push({key:{status:"valid",value:c},value:h._parse(new xt(n,u,n.path,c)),alwaysSet:c in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let c of l){let u=await c.key;h.push({key:u,value:await c.value,alwaysSet:c.alwaysSet})}return h}).then(h=>Ze.mergeObjectSync(i,h)):Ze.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return Q.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var n,s,a,o;let l=(a=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,r,i).message)!==null&&a!==void 0?a:i.defaultError;return r.code==="unrecognized_keys"?{message:(o=Q.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:re.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return fe.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return fe.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}deepPartial(){return ii(this)}partial(e){let r={};return fe.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];e&&!e[i]?r[i]=n:r[i]=n.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return fe.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Ft;)s=s._def.innerType;r[i]=s}}),new t({...this._def,shape:()=>r})}keyof(){return Xl(fe.objectKeys(this.shape))}};st.create=(t,e)=>new st({shape:()=>t,unknownKeys:"strip",catchall:Ot.create(),typeName:re.ZodObject,...oe(e)});st.strictCreate=(t,e)=>new st({shape:()=>t,unknownKeys:"strict",catchall:Ot.create(),typeName:re.ZodObject,...oe(e)});st.lazycreate=(t,e)=>new st({shape:t,unknownKeys:"strip",catchall:Ot.create(),typeName:re.ZodObject,...oe(e)});var Ir=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new pt(o.ctx.common.issues));return H(r,{code:L.invalid_union,unionErrors:a}),ae}if(r.common.async)return Promise.all(i.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let s,a=[];for(let l of i){let h={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:h});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:h}),h.common.issues.length&&a.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(l=>new pt(l));return H(r,{code:L.invalid_union,unionErrors:o}),ae}}get options(){return this._def.options}};Ir.create=(t,e)=>new Ir({options:t,typeName:re.ZodUnion,...oe(e)});var Bn=t=>t instanceof Dr?Bn(t.schema):t instanceof dt?Bn(t.innerType()):t instanceof Fr?[t.value]:t instanceof Or?t.options:t instanceof $r?Object.keys(t.enum):t instanceof Rr?Bn(t._def.innerType):t instanceof Cr?[void 0]:t instanceof Tr?[null]:null,jn=class t extends le{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.object)return H(r,{code:L.invalid_type,expected:z.object,received:r.parsedType}),ae;let i=this.discriminator,n=r.data[i],s=this.optionsMap.get(n);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(H(r,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let n=new Map;for(let s of r){let a=Bn(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,s)}}return new t({typeName:re.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...oe(i)})}};function Ra(t,e){let r=hr(t),i=hr(e);if(t===e)return{valid:!0,data:t};if(r===z.object&&i===z.object){let n=fe.objectKeys(e),s=fe.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of s){let l=Ra(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(r===z.array&&i===z.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],l=Ra(a,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return r===z.date&&i===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Mr=class extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(Oa(s)||Oa(a))return ae;let o=Ra(s.value,a.value);return o.valid?(($a(s)||$a(a))&&r.dirty(),{status:r.value,value:o.data}):(H(i,{code:L.invalid_intersection_types}),ae)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>n(s,a)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Mr.create=(t,e,r)=>new Mr({left:t,right:e,typeName:re.ZodIntersection,...oe(r)});var Bt=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.array)return H(i,{code:L.invalid_type,expected:z.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return H(i,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&i.data.length>this._def.items.length&&(H(i,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...i.data].map((a,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new xt(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>Ze.mergeArray(r,a)):Ze.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Bt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bt({items:t,typeName:re.ZodTuple,rest:null,...oe(e)})};var Hn=class t extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.object)return H(i,{code:L.invalid_type,expected:z.object,received:i.parsedType}),ae;let n=[],s=this._def.keyType,a=this._def.valueType;for(let o in i.data)n.push({key:s._parse(new xt(i,o,i.path,o)),value:a._parse(new xt(i,i.data[o],i.path,o))});return i.common.async?Ze.mergeObjectAsync(r,n):Ze.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof le?new t({keyType:e,valueType:r,typeName:re.ZodRecord,...oe(i)}):new t({keyType:cr.create(),valueType:e,typeName:re.ZodRecord,...oe(r)})}},ai=class extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.map)return H(i,{code:L.invalid_type,expected:z.map,received:i.parsedType}),ae;let n=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],h)=>({key:n._parse(new xt(i,o,i.path,[h,"key"])),value:s._parse(new xt(i,l,i.path,[h,"value"]))}));if(i.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of a){let h=await l.key,c=await l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let l of a){let h=l.key,c=l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}}}};ai.create=(t,e,r)=>new ai({valueType:e,keyType:t,typeName:re.ZodMap,...oe(r)});var oi=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==z.set)return H(i,{code:L.invalid_type,expected:z.set,received:i.parsedType}),ae;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(H(i,{code:L.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(H(i,{code:L.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let s=this._def.valueType;function a(l){let h=new Set;for(let c of l){if(c.status==="aborted")return ae;c.status==="dirty"&&r.dirty(),h.add(c.value)}return{status:r.value,value:h}}let o=[...i.data.values()].map((l,h)=>s._parse(new xt(i,l,i.path,h)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:Q.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Q.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};oi.create=(t,e)=>new oi({valueType:t,minSize:null,maxSize:null,typeName:re.ZodSet,...oe(e)});var Gn=class t extends le{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.function)return H(r,{code:L.invalid_type,expected:z.function,received:r.parsedType}),ae;function i(o,l){return Nn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vn(),Wi].filter(h=>!!h),issueData:{code:L.invalid_arguments,argumentsError:l}})}function n(o,l){return Nn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vn(),Wi].filter(h=>!!h),issueData:{code:L.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof pr){let o=this;return Ke(async function(...l){let h=new pt([]),c=await o._def.args.parseAsync(l,s).catch(p=>{throw h.addIssue(i(l,p)),h}),u=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(u,s).catch(p=>{throw h.addIssue(n(u,p)),h})})}else{let o=this;return Ke(function(...l){let h=o._def.args.safeParse(l,s);if(!h.success)throw new pt([i(l,h.error)]);let c=Reflect.apply(a,this,h.data),u=o._def.returns.safeParse(c,s);if(!u.success)throw new pt([n(c,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Bt.create(e).rest(qt.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Bt.create([]).rest(qt.create()),returns:r||qt.create(),typeName:re.ZodFunction,...oe(i)})}},Dr=class extends le{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Dr.create=(t,e)=>new Dr({getter:t,typeName:re.ZodLazy,...oe(e)});var Fr=class extends le{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};Fr.create=(t,e)=>new Fr({value:t,typeName:re.ZodLiteral,...oe(e)});function Xl(t,e){return new Or({values:t,typeName:re.ZodEnum,...oe(e)})}var Or=class t extends le{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{expected:fe.joinValues(i),received:r.parsedType,code:L.invalid_type}),ae}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{received:r.data,code:L.invalid_enum_value,options:i}),ae}return Ke(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};Or.create=Xl;var $r=class extends le{_parse(e){let r=fe.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==z.string&&i.parsedType!==z.number){let n=fe.objectValues(r);return H(i,{expected:fe.joinValues(n),received:i.parsedType,code:L.invalid_type}),ae}if(r.indexOf(e.data)===-1){let n=fe.objectValues(r);return H(i,{received:i.data,code:L.invalid_enum_value,options:n}),ae}return Ke(e.data)}get enum(){return this._def.values}};$r.create=(t,e)=>new $r({values:t,typeName:re.ZodNativeEnum,...oe(e)});var pr=class extends le{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.promise&&r.common.async===!1)return H(r,{code:L.invalid_type,expected:z.promise,received:r.parsedType}),ae;let i=r.parsedType===z.promise?r.data:Promise.resolve(r.data);return Ke(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};pr.create=(t,e)=>new pr({type:t,typeName:re.ZodPromise,...oe(e)});var dt=class extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:a=>{H(i,a),a.fatal?r.abort():r.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let a=n.transform(i.data,s);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(n.type==="refinement"){let a=o=>{let l=n.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Zi(a))return a;let o=n.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>Zi(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);fe.assertNever(n)}};dt.create=(t,e,r)=>new dt({schema:t,typeName:re.ZodEffects,effect:e,...oe(r)});dt.createWithPreprocess=(t,e,r)=>new dt({schema:e,effect:{type:"preprocess",transform:t},typeName:re.ZodEffects,...oe(r)});var Ft=class extends le{_parse(e){return this._getType(e)===z.undefined?Ke(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ft.create=(t,e)=>new Ft({innerType:t,typeName:re.ZodOptional,...oe(e)});var Wt=class extends le{_parse(e){return this._getType(e)===z.null?Ke(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Wt.create=(t,e)=>new Wt({innerType:t,typeName:re.ZodNullable,...oe(e)});var Rr=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===z.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Rr.create=(t,e)=>new Rr({innerType:t,typeName:re.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});var li=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return zn(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new pt(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new pt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};li.create=(t,e)=>new li({innerType:t,typeName:re.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});var hi=class extends le{_parse(e){if(this._getType(e)!==z.nan){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:z.nan,received:i.parsedType}),ae}return{status:"valid",value:e.data}}};hi.create=t=>new hi({typeName:re.ZodNaN,...oe(t)});var Md=Symbol("zod_brand"),qn=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Yi=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?ae:s.status==="dirty"?(r.dirty(),Jl(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?ae:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:re.ZodPipeline})}},ci=class extends le{_parse(e){let r=this._def.innerType._parse(e);return Zi(r)&&(r.value=Object.freeze(r.value)),r}};ci.create=(t,e)=>new ci({innerType:t,typeName:re.ZodReadonly,...oe(e)});var Kl=(t,e={},r)=>t?ur.create().superRefine((i,n)=>{var s,a;if(!t(i)){let o=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,h=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...h,fatal:l})}}):ur.create(),Dd={object:st.lazycreate},re;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(re||(re={}));var Fd=(t,e={message:`Input not instance of ${t.name}`})=>Kl(r=>r instanceof t,e),Ql=cr.create,eh=Er.create,Od=hi.create,$d=kr.create,th=Pr.create,Rd=Ar.create,Ld=ni.create,Bd=Cr.create,Vd=Tr.create,Nd=ur.create,zd=qt.create,jd=Ot.create,Hd=si.create,Gd=Ut.create,qd=st.create,Ud=st.strictCreate,Wd=Ir.create,Zd=jn.create,Yd=Mr.create,Jd=Bt.create,Xd=Hn.create,Kd=ai.create,Qd=oi.create,ef=Gn.create,tf=Dr.create,rf=Fr.create,nf=Or.create,sf=$r.create,af=pr.create,Zl=dt.create,of=Ft.create,lf=Wt.create,hf=dt.createWithPreprocess,cf=Yi.create,uf=()=>Ql().optional(),pf=()=>eh().optional(),df=()=>th().optional(),ff={string:t=>cr.create({...t,coerce:!0}),number:t=>Er.create({...t,coerce:!0}),boolean:t=>Pr.create({...t,coerce:!0}),bigint:t=>kr.create({...t,coerce:!0}),date:t=>Ar.create({...t,coerce:!0})},mf=ae,ye=Object.freeze({__proto__:null,defaultErrorMap:Wi,setErrorMap:vd,getErrorMap:Vn,makeIssue:Nn,EMPTY_PATH:bd,addIssueToContext:H,ParseStatus:Ze,INVALID:ae,DIRTY:Jl,OK:Ke,isAborted:Oa,isDirty:$a,isValid:Zi,isAsync:zn,get util(){return fe},get objectUtil(){return Fa},ZodParsedType:z,getParsedType:hr,ZodType:le,ZodString:cr,ZodNumber:Er,ZodBigInt:kr,ZodBoolean:Pr,ZodDate:Ar,ZodSymbol:ni,ZodUndefined:Cr,ZodNull:Tr,ZodAny:ur,ZodUnknown:qt,ZodNever:Ot,ZodVoid:si,ZodArray:Ut,ZodObject:st,ZodUnion:Ir,ZodDiscriminatedUnion:jn,ZodIntersection:Mr,ZodTuple:Bt,ZodRecord:Hn,ZodMap:ai,ZodSet:oi,ZodFunction:Gn,ZodLazy:Dr,ZodLiteral:Fr,ZodEnum:Or,ZodNativeEnum:$r,ZodPromise:pr,ZodEffects:dt,ZodTransformer:dt,ZodOptional:Ft,ZodNullable:Wt,ZodDefault:Rr,ZodCatch:li,ZodNaN:hi,BRAND:Md,ZodBranded:qn,ZodPipeline:Yi,ZodReadonly:ci,custom:Kl,Schema:le,ZodSchema:le,late:Dd,get ZodFirstPartyTypeKind(){return re},coerce:ff,any:Nd,array:Gd,bigint:$d,boolean:th,date:Rd,discriminatedUnion:Zd,effect:Zl,enum:nf,function:ef,instanceof:Fd,intersection:Yd,lazy:tf,literal:rf,map:Kd,nan:Od,nativeEnum:sf,never:jd,null:Vd,nullable:lf,number:eh,object:qd,oboolean:df,onumber:pf,optional:of,ostring:uf,pipeline:cf,preprocess:hf,promise:af,record:Xd,set:Qd,strictObject:Ud,string:Ql,symbol:Ld,transformer:Zl,tuple:Jd,undefined:Bd,union:Wd,unknown:zd,void:Hd,NEVER:mf,ZodIssueCode:L,quotelessJson:yd,ZodError:pt});var oy=ye.object({wsApiUrl:ye.string(),url:ye.string(),logoSvg:ye.string().optional(),logoUrl:ye.string().optional(),title:ye.string(),status:ye.string(),color:ye.string(),input:ye.object({placeholder:ye.string()}),bubble:ye.object({imageUrl:ye.string().optional(),position:ye.object({bottom:ye.string().optional(),right:ye.string().optional(),left:ye.string().optional()})}),header:ye.object({background:ye.string()}),limitations:ye.object({title:ye.string(),items:ye.array(ye.string())}),examples:ye.object({title:ye.string(),items:ye.array(ye.string())}),instructions:ye.object({items:ye.array(ye.string())})});function gf(t){return t.replace(/[^A-Za-z0-9_-]/gi,"")}window.__INIT_MOLIN_SHOP_AI=function(e){if(!e)throw new Error("options is required");let{widgetId:r,config:i}=e;if(!r)throw new Error("widgetId is required");if(!i)throw new Error("config is required");r=gf(r);let n=document.createElement("molin-shop-ai");n.setAttribute("widget",r),n.config=i,document.body.appendChild(n)};var Un=window,Wn=Un.ShadowRoot&&(Un.ShadyCSS===void 0||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,La=Symbol(),rh=new WeakMap,Ji=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==La)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(Wn&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=rh.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&rh.set(r,e))}return e}toString(){return this.cssText}},ih=t=>new Ji(typeof t=="string"?t:t+"",void 0,La),Ba=(t,...e)=>{let r=t.length===1?t[0]:e.reduce((i,n,s)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[s+1],t[0]);return new Ji(r,t,La)},Va=(t,e)=>{Wn?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=Un.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},Zn=Wn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return ih(r)})(t):t;var Na,Yn=window,nh=Yn.trustedTypes,yf=nh?nh.emptyScript:"",sh=Yn.reactiveElementPolyfillSupport,ja={toAttribute(t,e){switch(e){case Boolean:t=t?yf:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},ah=(t,e)=>e!==t&&(e==e||t==t),za={attribute:!0,type:String,converter:ja,reflect:!1,hasChanged:ah},Ha="finalized",Zt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((r,i)=>{let n=this._$Ep(i,r);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,r=za){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){let i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,r);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(n){let s=this[e];this[r]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||za}static finalize(){if(this.hasOwnProperty(Ha))return!1;this[Ha]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let n of i)this.createProperty(n,r[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)r.unshift(Zn(n))}else e!==void 0&&r.push(Zn(e));return r}static _$Ep(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;let r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Va(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=za){var n;let s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){let a=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:ja).toAttribute(r,i.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,r){var i;let n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){let a=n.getPropertyOptions(s),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:ja;this._$El=s,this[s]=o.fromAttribute(r,a.type),this._$El=null}}requestUpdate(e,r,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||ah)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let r=!1,i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw r=!1,this._$Ek(),n}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Zt[Ha]=!0,Zt.elementProperties=new Map,Zt.elementStyles=[],Zt.shadowRootOptions={mode:"open"},sh?.({ReactiveElement:Zt}),((Na=Yn.reactiveElementVersions)!==null&&Na!==void 0?Na:Yn.reactiveElementVersions=[]).push("1.6.3");var Ga,Jn=window,ui=Jn.trustedTypes,oh=ui?ui.createPolicy("lit-html",{createHTML:t=>t}):void 0,Xn="$lit$",Yt=`lit$${(Math.random()+"").slice(9)}$`,Ua="?"+Yt,vf=`<${Ua}>`,Vr=document,Ki=()=>Vr.createComment(""),Qi=t=>t===null||typeof t!="object"&&typeof t!="function",fh=Array.isArray,mh=t=>fh(t)||typeof t?.[Symbol.iterator]=="function",qa=`[
2
2
  \f\r]`,Xi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lh=/-->/g,hh=/>/g,Lr=RegExp(`>|${qa}(?:([^\\s"'>=/]+)(${qa}*=${qa}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ch=/'/g,uh=/"/g,gh=/^(?:script|style|textarea|title)$/i,yh=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),me=yh(1),yy=yh(2),ft=Symbol.for("lit-noChange"),Te=Symbol.for("lit-nothing"),ph=new WeakMap,Br=Vr.createTreeWalker(Vr,129,null,!1);function vh(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return oh!==void 0?oh.createHTML(e):e}var bh=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=Xi;for(let o=0;o<r;o++){let l=t[o],h,c,u=-1,f=0;for(;f<l.length&&(a.lastIndex=f,c=a.exec(l),c!==null);)f=a.lastIndex,a===Xi?c[1]==="!--"?a=lh:c[1]!==void 0?a=hh:c[2]!==void 0?(gh.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Lr):c[3]!==void 0&&(a=Lr):a===Lr?c[0]===">"?(a=n??Xi,u=-1):c[1]===void 0?u=-2:(u=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?Lr:c[3]==='"'?uh:ch):a===uh||a===ch?a=Lr:a===lh||a===hh?a=Xi:(a=Lr,n=void 0);let p=a===Lr&&t[o+1].startsWith("/>")?" ":"";s+=a===Xi?l+vf:u>=0?(i.push(h),l.slice(0,u)+Xn+l.slice(u)+Yt+p):l+Yt+(u===-2?(i.push(void 0),o):p)}return[vh(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]},en=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,a=0,o=e.length-1,l=this.parts,[h,c]=bh(e,r);if(this.el=t.createElement(h,i),Br.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=Br.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith(Xn)||f.startsWith(Yt)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+Xn).split(Yt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?Qn:g[1]==="?"?es:g[1]==="@"?ts:zr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(gh.test(n.tagName)){let u=n.textContent.split(Yt),f=u.length-1;if(f>0){n.textContent=ui?ui.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],Ki()),Br.nextNode(),l.push({type:2,index:++s});n.append(u[f],Ki())}}}else if(n.nodeType===8)if(n.data===Ua)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(Yt,u+1))!==-1;)l.push({type:7,index:s}),u+=Yt.length-1}s++}}static createElement(e,r){let i=Vr.createElement("template");return i.innerHTML=e,i}};function Nr(t,e,r=t,i){var n,s,a,o;if(e===ft)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=Qi(e)?void 0:e._$litDirective$;return l?.constructor!==h&&((s=l?._$AO)===null||s===void 0||s.call(l,!1),h===void 0?l=void 0:(l=new h(t),l._$AT(t,r,i)),i!==void 0?((a=(o=r)._$Co)!==null&&a!==void 0?a:o._$Co=[])[i]=l:r._$Cl=l),l!==void 0&&(e=Nr(t,l._$AS(t,e.values),l,i)),e}var Kn=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var r;let{el:{content:i},parts:n}=this._$AD,s=((r=e?.creationScope)!==null&&r!==void 0?r:Vr).importNode(i,!0);Br.currentNode=s;let a=Br.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new pi(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new rs(a,this,e)),this._$AV.push(c),h=n[++l]}o!==h?.index&&(a=Br.nextNode(),o++)}return Br.currentNode=Vr,s}v(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},pi=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=Te,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cp=(s=n?.isConnected)===null||s===void 0||s}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cp}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Nr(this,e,r),Qi(e)?e===Te||e==null||e===""?(this._$AH!==Te&&this._$AR(),this._$AH=Te):e!==this._$AH&&e!==ft&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):mh(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Te&&Qi(this._$AH)?this._$AA.nextSibling.data=e:this.$(Vr.createTextNode(e)),this._$AH=e}g(e){var r;let{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=en.createElement(vh(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.v(i);else{let a=new Kn(s,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(e){let r=ph.get(e.strings);return r===void 0&&ph.set(e.strings,r=new en(e)),r}T(e){fh(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.k(Ki()),this.k(Ki()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){var r;this._$AM===void 0&&(this._$Cp=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}},zr=class{constructor(e,r,i,n,s){this.type=1,this._$AH=Te,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Te}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,n){let s=this.strings,a=!1;if(s===void 0)e=Nr(this,e,r,0),a=!Qi(e)||e!==this._$AH&&e!==ft,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=Nr(this,o[i+l],r,l),h===ft&&(h=this._$AH[l]),a||(a=!Qi(h)||h!==this._$AH[l]),h===Te?e=Te:e!==Te&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===Te?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Qn=class extends zr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Te?void 0:e}},bf=ui?ui.emptyScript:"",es=class extends zr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Te?this.element.setAttribute(this.name,bf):this.element.removeAttribute(this.name)}},ts=class extends zr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=Nr(this,e,r,0))!==null&&i!==void 0?i:Te)===ft)return;let n=this._$AH,s=e===Te&&n!==Te||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Te&&(n===Te||s);s&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,i;typeof this._$AH=="function"?this._$AH.call((i=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}},rs=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Nr(this,e)}},_h={O:Xn,P:Yt,A:Ua,C:1,M:bh,L:Kn,R:mh,D:Nr,I:pi,V:zr,H:es,N:ts,U:Qn,F:rs},dh=Jn.litHtmlPolyfillSupport;dh?.(en,pi),((Ga=Jn.litHtmlVersions)!==null&&Ga!==void 0?Ga:Jn.litHtmlVersions=[]).push("2.8.0");var wh=(t,e,r)=>{var i,n;let s=(i=r?.renderBefore)!==null&&i!==void 0?i:e,a=s._$litPart$;if(a===void 0){let o=(n=r?.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=a=new pi(e.insertBefore(Ki(),o),o,void 0,r??{})}return a._$AI(t),a};var Wa,Za;var Ce=class extends Zt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;let i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=wh(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ft}};Ce.finalized=!0,Ce._$litElement$=!0,(Wa=globalThis.litElementHydrateSupport)===null||Wa===void 0||Wa.call(globalThis,{LitElement:Ce});var xh=globalThis.litElementPolyfillSupport;xh?.({LitElement:Ce});((Za=globalThis.litElementVersions)!==null&&Za!==void 0?Za:globalThis.litElementVersions=[]).push("3.3.3");var di={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},fi=t=>(...e)=>({_$litDirective$:t,values:e}),dr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:_f}=_h;var Sh=()=>document.createComment(""),mi=(t,e,r)=>{var i;let n=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(r===void 0){let a=n.insertBefore(Sh(),s),o=n.insertBefore(Sh(),s);r=new _f(a,o,t,t.options)}else{let a=r._$AB.nextSibling,o=r._$AM,l=o!==t;if(l){let h;(i=r._$AQ)===null||i===void 0||i.call(r,t),r._$AM=t,r._$AP!==void 0&&(h=t._$AU)!==o._$AU&&r._$AP(h)}if(a!==s||l){let h=r._$AA;for(;h!==a;){let c=h.nextSibling;n.insertBefore(h,s),h=c}}}return r},fr=(t,e,r=t)=>(t._$AI(e,r),t),wf={},Eh=(t,e=wf)=>t._$AH=e,kh=t=>t._$AH,is=t=>{var e;(e=t._$AP)===null||e===void 0||e.call(t,!1,!0);let r=t._$AA,i=t._$AB.nextSibling;for(;r!==i;){let n=r.nextSibling;r.remove(),r=n}};var Ph=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},tn=fi(class extends dr{constructor(t){if(super(t),t.type!==di.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);let n=[],s=[],a=0;for(let o of t)n[a]=i?i(o,a):a,s[a]=r(o,a),a++;return{values:s,keys:n}}render(t,e,r){return this.ct(t,e,r).values}update(t,[e,r,i]){var n;let s=kh(t),{values:a,keys:o}=this.ct(e,r,i);if(!Array.isArray(s))return this.ut=o,a;let l=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],h=[],c,u,f=0,p=s.length-1,m=0,g=a.length-1;for(;f<=p&&m<=g;)if(s[f]===null)f++;else if(s[p]===null)p--;else if(l[f]===o[m])h[m]=fr(s[f],a[m]),f++,m++;else if(l[p]===o[g])h[g]=fr(s[p],a[g]),p--,g--;else if(l[f]===o[g])h[g]=fr(s[f],a[g]),mi(t,h[g+1],s[f]),f++,g--;else if(l[p]===o[m])h[m]=fr(s[p],a[m]),mi(t,s[f],s[p]),p--,m++;else if(c===void 0&&(c=Ph(o,m,g),u=Ph(l,f,p)),c.has(l[f]))if(c.has(l[p])){let d=u.get(o[m]),y=d!==void 0?s[d]:null;if(y===null){let v=mi(t,s[f]);fr(v,a[m]),h[m]=v}else h[m]=fr(y,a[m]),mi(t,s[f],y),s[d]=null;m++}else is(s[p]),p--;else is(s[f]),f++;for(;m<=g;){let d=mi(t,h[g+1]);fr(d,a[m]),h[m++]=d}for(;f<=p;){let d=s[f++];d!==null&&is(d)}return this.ut=o,Eh(t,h),ft}});function no(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function xf(t,e=","){return t.map(no).join(e)}var Fh=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function ns(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function os(t,e="@media "){return e+ke(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function ke(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function Ah(t){return t}function ls(){}var Le={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Oh(t){return t.match(/[-=:;]/g)?.length||0}function Qa(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Oh(t),15)<<18}var Sf=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function so({n:t,i:e,v:r=[]},i,n,s){t&&(t=no({n:t,i:e,v:r})),s=[...ke(s)];for(let o of r){let l=i.theme("screens",o);for(let h of ke(l&&os(l)||i.v(o))){var a;s.push(h),n|=l?67108864|Qa(h):o=="dark"?1073741824:h[0]=="@"?Qa(h):(a=h,1<<~(/:([a-z-]+)/.test(a)&&~Sf.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var $h=new Map;function eo(t){if(t.d){let e=[],r=Ya(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?Ya(i,s=>Ya(n,a=>{let o=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(o){let l=s.indexOf(o[1]);return~l?s.slice(0,l)+o[0]+s.slice(l+o[1].length):Ja(s,a)}return Ja(a,s)})):i,"&"),i=>Ja(i,t.n?"."+Fh(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function Ya(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function Ja(t,e){return t.replace(/&/g,e)}var Ch=new Intl.Collator("en",{numeric:!0});function Rh(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=Lh(t[n],e)?r=n+1:i=n}return i}function Lh(t,e){let r=t.p&Le.o;return r==(e.p&Le.o)&&(r==Le.b||r==Le.o)?0:t.p-e.p||t.o-e.o||Ch.compare(Th(t.n),Th(e.n))||Ch.compare(Ih(t.n),Ih(e.n))}function Th(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Ih(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Xa(t,e){return Math.round(parseInt(t,16)*e)}function St(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:i}=e,n=i?`var(${i})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",n);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,a=[17,1,.062272][s-1];return`rgba(${[Xa(t.substr(1,s),a),Xa(t.substr(1+s,s),a),Xa(t.substr(1+2*s,s),a),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function Bh(t,e,r,i,n=[]){return function s(a,{n:o,p:l,r:h=[],i:c},u){let f=[],p="",m=0,g=0;for(let v in a||{}){var d,y;let b=a[v];if(v[0]=="@"){if(!b)continue;if(v[1]=="a"){f.push(...oo(o,l,as(""+b),u,l,h,c,!0));continue}if(v[1]=="l"){for(let _ of ke(b))f.push(...s(_,{n:o,p:(d=Le[v[7]],l&~Le.o|d),r:v[7]=="d"?[]:h,i:c},u));continue}if(v[1]=="i"){f.push(...ke(b).map(_=>({p:-1,o:0,r:[],d:v+" "+_})));continue}if(v[1]=="k"){f.push({p:Le.d,o:0,r:[v],d:s(b,{p:Le.d},u).map(eo).join("")});continue}if(v[1]=="f"){f.push(...ke(b).map(_=>({p:Le.d,o:0,r:[v],d:s(_,{p:Le.d},u).map(eo).join("")})));continue}}if(typeof b!="object"||Array.isArray(b))v=="label"&&b?o=b+ns(JSON.stringify([l,c,a])):(b||b===0)&&(v=v.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),g+=1,m=Math.max(m,(y=v)[0]=="-"?0:Oh(y)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(y)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+ke(b).map(_=>u.s(v,ao(""+_,u.theme)+(c?" !important":""))).join(";"));else if(v[0]=="@"||v.includes("&")){let _=l;v[0]=="@"&&(v=v.replace(/\bscreen\(([^)]+)\)/g,(x,T)=>{let S=u.theme("screens",T);return S?(_|=67108864,os(S,"")):x}),_|=Qa(v)),f.push(...s(b,{n:o,p:_,r:[...h,v],i:c},u))}else f.push(...s(b,{p:l,r:[...h,v]},u))}return f.unshift({n:o,p:l,o:Math.max(0,15-g)+1.5*Math.min(m||15,15),r:h,d:p}),f.sort(Lh)}(t,so(e,r,i,n),r)}function ao(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,i,n,s,a="")=>{let o=e(n,a);return typeof o=="function"&&/color|fill|stroke/i.test(n)?St(o):""+ke(o).filter(l=>Object(l)!==l)})}function Vh(t,e){let r,i=[];for(let n of t)n.d&&n.n?r?.p==n.p&&""+r.r==""+n.r?(r.c=[r.c,n.c].filter(Boolean).join(" "),r.d=r.d+";"+n.d):i.push(r={...n,n:n.n&&e}):i.push({...n,n:n.n&&e});return i}function ss(t,e,r=Le.u,i,n){let s=[];for(let a of t)for(let o of function(l,h,c,u,f){l={...l,i:l.i||f};let p=function(m,g){let d=$h.get(m.n);return d?d(m,g):g.r(m.n,m.v[0]=="dark")}(l,h);return p?typeof p=="string"?({r:u,p:c}=so(l,h,c,u),Vh(ss(as(p),h,c,u,l.i),l.n)):Array.isArray(p)?p.map(m=>{var g,d;return{o:0,...m,r:[...ke(u),...ke(m.r)],p:(g=c,d=m.p??c,g&~Le.o|d)}}):Bh(p,l,h,c,u):[{c:no(l),p:0,o:0,r:[]}]}(a,e,r,i,n))s.splice(Rh(s,o),0,o);return s}function oo(t,e,r,i,n,s,a,o){return Vh((o?r.flatMap(l=>ss([l],i,n,s,a)):ss(r,i,n,s,a)).map(l=>l.p&Le.o&&(l.n||e==Le.b)?{...l,p:l.p&~Le.o|e,o:0}:l),t)}function Ef(t,e,r,i){var n;return n=(s,a)=>{let{n:o,p:l,r:h,i:c}=so(s,a,e);return r&&oo(o,e,r,a,l,h,c,i)},$h.set(t,n),t}function Ka(t,e,r){if(t[t.length-1]!="("){let i=[],n=!1,s=!1,a="";for(let o of t)if(!(o=="("||/[~@]$/.test(o))){if(o[0]=="!"&&(o=o.slice(1),n=!n),o.endsWith(":")){i[o=="dark:"?"unshift":"push"](o.slice(0,-1));continue}o[0]=="-"&&(o=o.slice(1),s=!s),o.endsWith("-")&&(o=o.slice(0,-1)),o&&o!="&"&&(a+=(a&&"-")+o)}a&&(s&&(a="-"+a),e[0].push({n:a,v:i.filter(kf),i:n}))}}function kf(t,e,r){return r.indexOf(t)==e}var Mh=new Map;function as(t){let e=Mh.get(t);if(!e){let r=[],i=[[]],n=0,s=0,a=null,o=0,l=(h,c=0)=>{n!=o&&(r.push(t.slice(n,o+c)),h&&Ka(r,i)),n=o+1};for(;o<t.length;o++){let h=t[o];if(s)t[o-1]!="\\"&&(s+=+(h=="[")||-(h=="]"));else if(h=="[")s+=1;else if(a)t[o-1]!="\\"&&a.test(t.slice(o))&&(a=null,n=o+RegExp.lastMatch.length);else if(h=="/"&&t[o-1]!="\\"&&(t[o+1]=="*"||t[o+1]=="/"))a=t[o+1]=="*"?/^\*\//:/^[\r\n]/;else if(h=="(")l(),r.push(h);else if(h==":")t[o+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(h)){l(!0);let c=r.lastIndexOf("(");if(h==")"){let u=r[c-1];if(/[~@]$/.test(u)){let f=i.shift();r.length=c,Ka([...r,"#"],i);let{v:p}=i[0].pop();for(let m of f)m.v.splice(+(m.v[0]=="dark")-+(p[0]=="dark"),p.length);Ka([...r,Ef(u.length>1?u.slice(0,-1)+ns(JSON.stringify([u,f])):u+"("+xf(f)+")",Le.a,f,/@$/.test(u))],i)}c=r.lastIndexOf("(",c-1)}r.length=c+1}else/[~@]/.test(h)&&t[o+1]=="("&&i.unshift([])}l(!0),Mh.set(t,e=i[0])}return e}function B(t,e,r){return[t,to(e,r)]}function to(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):ro(r,1)}):r=>t||{[r[1]]:ro(r,2)}}function ro(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function V(t,e,r,i){return[t,lo(e,r,i)]}function lo(t,e,r){let i=typeof e=="string"?(n,s)=>({[e]:r?r(n,s):n._}):e||(({1:n,_:s},a,o)=>({[n||o]:s}));return(n,s)=>{let a=Nh(t||n[1]),o=s.theme(a,n.$$)??Vt(n.$$,a,s);if(o!=null)return n._=ro(n,0,o),i(n,s,a)}}function Be(t,e={},r){return[t,Pf(e,r)]}function Pf(t={},e){return(r,i)=>{let{section:n=Nh(r[0]).replace("-","")+"Color"}=t,[s,a]=Af(r.$$);if(!s)return;let o=i.theme(n,s)||Vt(s,n,i);if(!o||typeof o=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:h=n.replace("Color","Opacity"),property:c=n,selector:u}=t,f=i.theme(h,a||"DEFAULT")||a&&Vt(a,h,i),p=e||(({_:g})=>{let d=rn(c,g);return u?{[u]:d}:d});r._={value:St(o,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:g=>St(o,g),opacityVariable:l||void 0,opacityValue:f||void 0};let m=p(r,i);if(!r.dark){let g=i.d(n,s,o);g&&g!==o&&(r._={value:St(g,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:d=>St(g,d),opacityVariable:l||void 0,opacityValue:f||void 0},m={"&":m,[i.v("dark")]:p(r,i)})}return m}}function Af(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function rn(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function Vt(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=gi(ao(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function Nh(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function gi(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>gi(r)+i+gi(n)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function ho({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:ke(e.variants),rules:ke(e.rules),ignorelist:ke(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of ke([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&ke(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=r.darkMode,darkColor:a=r.darkColor,theme:o,variants:l,rules:h,ignorelist:c,hash:u=r.hash,stringify:f=r.stringify,finalize:p}=typeof i=="function"?i(r):i;r={preflight:r.preflight!==!1&&n!==!1&&[...r.preflight,...ke(n)],darkMode:s,darkColor:a,theme:{...r.theme,...o,extend:{...r.theme.extend,...o?.extend}},variants:[...r.variants,...ke(l)],rules:[...r.rules,...ke(h)],ignorelist:[...r.ignorelist,...ke(c)],hash:u,stringify:f,finalize:[...r.finalize,...ke(p)]}}return r}function Dh(t,e,r,i,n,s){for(let a of e){let o=r.get(a);o||r.set(a,o=i(a));let l=o(t,n,s);if(l)return l}}function Cf(t){var e;return io(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Tf(t){var e,r;return Array.isArray(t)?io(t[0],to(t[1],t[2])):io(t,to(e,r))}function io(t,e){return zh(t,(r,i,n,s)=>{let a=i.exec(r);if(a)return a.$$=r.slice(a[0].length),a.dark=s,e(a,n)})}function zh(t,e){let r=ke(t).map(If);return(i,n,s)=>{for(let a of r){let o=e(i,a,n,s);if(o)return o}}}function If(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function jh(t,e){let r=ho(t),i=function({theme:l,darkMode:h,darkColor:c=ls,variants:u,rules:f,hash:p,stringify:m,ignorelist:g,finalize:d}){let y=new Map,v=new Map,b=new Map,_=new Map,x=zh(g,(w,M)=>M.test(w));u.push(["dark",Array.isArray(h)||h=="class"?`${ke(h)[1]||".dark"} &`:typeof h=="string"&&h!="media"?h:"@media (prefers-color-scheme:dark)"]);let T=typeof p=="function"?w=>p(w,ns):p?ns:Ah;T!==Ah&&d.push(w=>({...w,n:w.n&&T(w.n),d:w.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(M,E)=>"--"+T(E).replace("#",""))}));let S={theme:function({extend:w={},...M}){let E={},I={get colors(){return P("colors")},theme:P,negative(){return{}},breakpoints(k){let F={};for(let O in k)typeof k[O]=="string"&&(F["screen-"+O]=k[O]);return F}};return P;function P(k,F,O,D){if(k){if({1:k,2:D}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(k)||[,k],/[.[]/.test(k)){let G=[];k.replace(/\[([^\]]+)\]|([^.[]+)/g,(U,Z,j=Z)=>G.push(j)),k=G.shift(),O=F,F=G.join("-")}let $=E[k]||Object.assign(Object.assign(E[k]={},A(M,k)),A(w,k));if(F==null)return $;F||(F="DEFAULT");let R=$[F]??F.split("-").reduce((G,U)=>G?.[U],$)??O;return D?St(R,{opacityValue:ao(D,P)}):R}let C={};for(let $ of[...Object.keys(M),...Object.keys(w)])C[$]=P($);return C}function A(k,F){let O=k[F];return typeof O=="function"&&(O=O(I)),O&&/color|fill|stroke/i.test(F)?function D(C,$=[]){let R={};for(let G in C){let U=C[G],Z=[...$,G];R[Z.join("-")]=U,G=="DEFAULT"&&(Z=$,R[$.join("-")]=U),typeof U=="object"&&Object.assign(R,D(U,Z))}return R}(O):O}}(l),e:Fh,h:T,s(w,M){return m(w,M,S)},d(w,M,E){return c(w,M,S,E)},v(w){return y.has(w)||y.set(w,Dh(w,u,v,Cf,S)||"&:"+w),y.get(w)},r(w,M){let E=JSON.stringify([w,M]);return b.has(E)||b.set(E,!x(w,S)&&Dh(w,f,_,Tf,S,M)),b.get(E)},f(w){return d.reduce((M,E)=>E(M,S),w)}};return S}(r),n=new Map,s=[],a=new Set;e.resume(l=>n.set(l,l),(l,h)=>{e.insert(l,s.length,h),s.push(h),a.add(l)});function o(l){let h=i.f(l),c=eo(h);if(c&&!a.has(c)){a.add(c);let u=Rh(s,l);e.insert(c,u,l),s.splice(u,0,l)}return h.n}return Object.defineProperties(function(h){if(!n.size)for(let u of ke(r.preflight))typeof u=="function"&&(u=u(i)),u&&(typeof u=="string"?oo("",Le.b,as(u),i,Le.b,[],!1,!0):Bh(u,{},i,Le.b)).forEach(o);h=""+h;let c=n.get(h);if(!c){let u=new Set;for(let f of ss(as(h),i))u.add(f.c).add(o(f));c=[...u].filter(Boolean).join(" "),n.set(h,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:r,snapshot(){let l=e.snapshot(),h=new Set(a),c=new Map(n),u=[...s];return()=>{l(),a=h,n=c,s=u}},clear(){e.clear(),a=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Mf(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function Hh(t){let e=new MutationObserver(r);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),i(n),r([{target:n,type:""}])},disconnect(){e.disconnect()}};function r(n){for(let{type:s,target:a}of n)if(s[0]=="a")i(a);else for(let o of a.querySelectorAll("[class]"))i(o);e.takeRecords()}function i(n){let s,a=n.getAttribute?.("class");a&&Mf(a,s=t(a))&&n.setAttribute("class",s)}}function Df(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function hs(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Df(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,i){try{e.insertRule(r,i)}catch{e.insertRule(":root{}",i)}},resume:ls}}var Ff=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Gh(t){return Ff.get(t)}function qh(t){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function Uh(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Of=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Wh(){return({stringify:t})=>({stringify(e,r,i){let n="",s=Gh(e);s&&(n+=t(s,r,i)+";");let a=qh(e),o=Uh(e,r);for(let l of Of)a&l[1]&&(n+=t(l[0]+e,r,i)+";"),o&l[1]&&(n+=t(e,l[0]+r,i)+";");return n+t(e,r,i)}})}function Yh(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",lo("lineClamp",({_:t})=>Zh(t))],["line-clamp-(\\d+)",({1:t})=>Zh(t)]]}}function Zh(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var sn={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...mt(4,"rem",4,.5,.5),...mt(12,"rem",4,5),14:"3.5rem",...mt(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:pe("blur"),backdropBrightness:pe("brightness"),backdropContrast:pe("contrast"),backdropGrayscale:pe("grayscale"),backdropHueRotate:pe("hueRotate"),backdropInvert:pe("invert"),backdropOpacity:pe("opacity"),backdropSaturate:pe("saturate"),backdropSepia:pe("sepia"),backgroundColor:pe("colors"),backgroundImage:{none:"none"},backgroundOpacity:pe("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...mt(200,"",100,0,50),...mt(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:pe("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:pe("spacing"),borderWidth:{DEFAULT:"1px",...Et(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:pe("colors"),caretColor:pe("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...mt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:pe("borderColor"),divideOpacity:pe("borderOpacity"),divideWidth:pe("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...nn(2,6),...nn(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:pe("spacing"),gradientColorStops:pe("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...nn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...nn(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...mt(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...mt(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:pe("spacing"),placeholderColor:pe("colors"),placeholderOpacity:pe("opacity"),outlineColor:pe("colors"),outlineOffset:Et(8,"px"),outlineWidth:Et(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:pe("colors"),ringOffsetWidth:Et(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Et(8,"px")},rotate:{...Et(2,"deg"),...Et(12,"deg",3),...Et(180,"deg",45)},saturate:mt(200,"",100,0,50),scale:{...mt(150,"",100,0,50),...mt(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:pe("spacing"),scrollPadding:pe("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Et(2,"deg"),...Et(12,"deg",3)},space:pe("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:mt(2),textColor:pe("colors"),textDecorationColor:pe("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Et(8,"px")},textUnderlineOffset:{auto:"auto",...Et(8,"px")},textIndent:pe("spacing"),textOpacity:pe("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:pe("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...nn(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...mt(50,"",1,0,10),auto:"auto"}};function nn(t,e){let r={};do for(var i=1;i<t;i++)r[`${i}/${t}`]=Number((i/t*100).toFixed(6))+"%";while(++t<=e);return r}function Et(t,e,r=0){let i={};for(;r<=t;r=2*r||1)i[r]=r+e;return i}function mt(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function pe(t){return({theme:e})=>e(t)}var Jh={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${sn.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${sn.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var rc=[B("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Vt(`[${e}]`,"",r)}}})),B("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),V("aspect-","aspectRatio"),B("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:i,padding:n}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...a("xs")};for(let o in r){let l=r[o];typeof l=="string"&&(s[os(l)]={"&":{maxWidth:l,...a(o)}})}return s;function a(o){let l=n&&(typeof n=="string"?n:n[o]||n.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),V("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),B("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),B("box-(border|content)","boxSizing",({1:t})=>t+"-box"),B("hidden",{display:"none"}),B("table-(auto|fixed)","tableLayout"),B(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",B("isolate","isolation"),B("object-(contain|cover|fill|none|scale-down)","objectFit"),V("object-","objectPosition"),B("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",cs),B("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),B("(static|fixed|absolute|relative|sticky)","position"),V("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),V("-?(top|bottom|left|right)(?:$|-)","inset"),B("(visible|collapse)","visibility"),B("invisible",{visibility:"hidden"}),V("-?z-","zIndex"),B("flex-((row|col)(-reverse)?)","flexDirection",Xh),B("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),V("(flex-(?:grow|shrink))(?:$|-)"),V("(flex)-"),V("grow(?:$|-)","flexGrow"),V("shrink(?:$|-)","flexShrink"),V("basis-","flexBasis"),V("-?(order)-"),"-?(order)-(\\d+)",V("grid-cols-","gridTemplateColumns"),B("grid-cols-(\\d+)","gridTemplateColumns",tc),V("col-","gridColumn"),B("col-(span)-(\\d+)","gridColumn",ec),V("col-start-","gridColumnStart"),B("col-start-(auto|\\d+)","gridColumnStart"),V("col-end-","gridColumnEnd"),B("col-end-(auto|\\d+)","gridColumnEnd"),V("grid-rows-","gridTemplateRows"),B("grid-rows-(\\d+)","gridTemplateRows",tc),V("row-","gridRow"),B("row-(span)-(\\d+)","gridRow",ec),V("row-start-","gridRowStart"),B("row-start-(auto|\\d+)","gridRowStart"),V("row-end-","gridRowEnd"),B("row-end-(auto|\\d+)","gridRowEnd"),B("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>cs(Xh(t))),B("grid-flow-(dense)","gridAutoFlow"),V("auto-cols-","gridAutoColumns"),V("auto-rows-","gridAutoRows"),V("gap-x(?:$|-)","gap","columnGap"),V("gap-y(?:$|-)","gap","rowGap"),V("gap(?:$|-)","gap"),"(justify-(?:items|self))-",B("justify-","justifyContent",Kh),B("(content|items|self)-",t=>({["align-"+t[1]]:Kh(t)})),B("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),V("p([xytrbl])?(?:$|-)","padding",yi("padding")),V("-?m([xytrbl])?(?:$|-)","margin",yi("margin")),V("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),B("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),V("w-","width"),V("min-w-","minWidth"),V("max-w-","maxWidth"),V("h-","height"),V("min-h-","minHeight"),V("max-h-","maxHeight"),V("font-","fontWeight"),V("font-","fontFamily",({_:t})=>typeof(t=ke(t))[1]=="string"?{fontFamily:$t(t)}:{fontFamily:$t(t[0]),...t[1]}),B("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),B("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),B("italic","fontStyle"),B("not-italic",{fontStyle:"normal"}),B("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...mr({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),V("tracking-","letterSpacing"),V("leading-","lineHeight"),B("list-(inside|outside)","listStylePosition"),V("list-","listStyleType"),B("list-","listStyleType"),V("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Be("placeholder-",{property:"color",selector:"&::placeholder"}),B("text-(left|center|right|justify|start|end)","textAlign"),B("text-(ellipsis|clip)","textOverflow"),V("text-opacity-","textOpacity","--tw-text-opacity"),Be("text-",{property:"color"}),V("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),V("indent-","textIndent"),B("(overline|underline|line-through)","textDecorationLine"),B("no-underline",{textDecorationLine:"none"}),V("underline-offset-","textUnderlineOffset"),Be("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),V("decoration-","textDecorationThickness"),B("decoration-","textDecorationStyle"),B("(uppercase|lowercase|capitalize)","textTransform"),B("normal-case",{textTransform:"none"}),B("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),B("align-","verticalAlign"),B("whitespace-","whiteSpace"),B("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),B("break-words",{overflowWrap:"break-word"}),B("break-all",{wordBreak:"break-all"}),B("break-keep",{wordBreak:"keep-all"}),Be("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Be("accent-",{opacityVariable:!1,opacitySection:"opacity"}),B("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${jr(t," ")},var(--tw-gradient-stops))`),Be("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Be("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Be("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),B("bg-(fixed|local|scroll)","backgroundAttachment"),B("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),B(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),B("bg-blend-","backgroundBlendMode"),B("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),V("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Be("bg-",{section:"backgroundColor"}),V("bg-","backgroundImage"),V("bg-","backgroundPosition"),B("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",cs),V("bg-","backgroundSize"),V("rounded(?:$|-)","borderRadius"),V("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${jr(r[0])}-radius`]:e,[`border-${jr(r[1])}-radius`]:e}}),B("border-(collapse|separate)","borderCollapse"),V("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),B("border-(solid|dashed|dotted|double|none)","borderStyle"),V("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...mr({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Be("border-([xytrbl])-",{section:"borderColor"},yi("border","Color")),Be("border-"),V("border-([xytrbl])(?:$|-)","borderWidth",yi("border","Width")),V("border(?:$|-)","borderWidth"),V("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),B("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),B("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),V("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${jr(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${jr(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Be("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),V("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Be("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),V("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),B("ring-inset",{"--tw-ring-inset":"inset"}),Be("ring-",{property:"--tw-ring-color"}),V("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...mr({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":St(e("ringOffsetColor","","#fff")),"--tw-ring-color":St(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Be("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),V("shadow(?:$|-)","boxShadow",({_:t})=>({...mr({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":$t(t),"--tw-shadow-colored":$t(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),V("(opacity)-"),B("mix-blend-","mixBlendMode"),...Qh(),...Qh("backdrop-"),V("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:$t(t),transitionTimingFunction:t._=="none"?void 0:$t(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:$t(e("transitionDuration",""))})),V("duration(?:$|-)","transitionDuration","transitionDuration",$t),V("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",$t),V("delay(?:$|-)","transitionDelay","transitionDelay",$t),V("animate(?:$|-)","animation",(t,{theme:e,h:r,e:i})=>{let n=$t(t),s=n.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=i(r(s[0])))]:a,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",B("transform",uo),B("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":ic(t=="gpu")})),V("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...uo()})),V("-?(rotate)-","rotate",co),V("-?(translate-[xy])-","translate",co),V("-?(skew-[xy])-","skew",co),B("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",cs),"(appearance)-",V("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",V("(cursor)-"),"(cursor)-",B("snap-(none)","scroll-snap-type"),B("snap-(x|y|both)",({1:t})=>({...mr({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),B("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),B("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),B("snap-(normal|always)","scroll-snap-stop"),B("scroll-(auto|smooth)","scroll-behavior"),V("scroll-p([xytrbl])?(?:$|-)","padding",yi("scroll-padding")),V("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",yi("scroll-margin")),B("touch-(auto|none|manipulation)","touch-action"),B("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...mr({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),B("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),B("outline",{outlineStyle:"solid"}),B("outline-(dashed|dotted|double)","outlineStyle"),V("-?(outline-offset)-"),Be("outline-",{opacityVariable:!1,opacitySection:"opacity"}),V("outline-","outlineWidth"),"(pointer-events)-",V("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],B("select-(none|text|all|auto)","userSelect"),Be("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Be("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),V("stroke-","strokeWidth"),B("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),B("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function cs(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Xh(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function jr(t,e="-"){let r=[];for(let i of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return r.join(e)}function $t(t){return t&&""+(t._||t)}function Kh({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function yi(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...rn(t+"-"+jr(n[0])+e,i),...rn(t+"-"+jr(n[1])+e,i)}:rn(t+e,i)}}function Qh(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let i of e)r[`--tw-${t}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...mr(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,B(`${t}filter`,r),...e.map(i=>V(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:ke(s).map(a=>`${i}(${a})`).join(" "),...r})))]}function co({1:t,_:e}){return{["--tw-"+t]:e,...uo()}}function uo(){return{...mr({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":ic()}),transform:"var(--tw-transform)"}}function ic(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function ec({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function tc({1:t}){return`repeat(${t},minmax(0,1fr))`}function mr(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var nc=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||Vt(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:i="",6:n=e},{e:s,h:a,v:o})=>{let l=gi(i)||(r[0]=="["?r:o(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(t+n))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Vt(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||Vt(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Vt(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&gi(t).replace(/[}]+$/,"").split("{")]];function sc({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:Jh,theme:{...sn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:nc,rules:rc,finalize(r){return r.n&&r.d&&r.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var $f={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Rf={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Lf={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Bf={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Vf={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Nf={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},zf={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},jf={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Hf={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Gf={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},qf={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Uf={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},Wf={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Zf={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Yf={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Jf={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Xf={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Kf={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Qf={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},em={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},tm={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rm={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},ac={__proto__:null,slate:$f,gray:Rf,zinc:Lf,neutral:Bf,stone:Vf,red:Nf,orange:zf,amber:jf,yellow:Hf,lime:Gf,green:qf,emerald:Uf,teal:Wf,cyan:Zf,sky:Yf,blue:Jf,indigo:Xf,violet:Kf,purple:Qf,fuchsia:em,pink:tm,rose:rm};function oc({disablePreflight:t}={}){return sc({colors:ac,disablePreflight:t})}function cc({className:t="prose",defaultColor:e="gray",extend:r={},colors:i={}}={}){return i={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...i,dark:i.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...i.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,a=s])=>[`${t}-${s}`,(o,l)=>uc(t,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,h=>`& :is(${h.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:a})=>[{c:a(s)}]],[`${t}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",({$$:s},a)=>{let o=hc(a.theme("fontSize",s));return o&&{"@layer components":o}}],[t+"-",({$$:s},a)=>n(s,a)],[t,(s,a)=>({...n(e,a),"@layer base":[lc(t,a,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:J(20,16),marginBottom:J(20,16),paddingLeft:J(26,16)},li:{marginTop:J(8,16),marginBottom:J(8,16)},"ol>li,ul>li":{paddingLeft:J(6,16)},">ul>li p":{marginTop:J(12,16),marginBottom:J(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:J(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:J(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:J(12,16),marginBottom:J(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:J(48,16),marginBottom:J(48,16)},blockquote:{marginTop:J(32,20),marginBottom:J(32,20),paddingLeft:J(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:J(20,16),marginBottom:J(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:J(36,16),marginTop:"0",marginBottom:J(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:J(24,16),marginTop:J(48,24),marginBottom:J(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:J(20,16),marginTop:J(32,20),marginBottom:J(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:J(24,16),marginBottom:J(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:J(32,16),marginBottom:J(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:J(14,16),lineHeight:"1.4",marginTop:J(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:J(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:J(21,24)},"h3 code":{fontSize:J(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:J(14,16),lineHeight:"1.7",marginTop:J(24,14),marginBottom:J(24,14),borderRadius:"0.375rem",paddingTop:J(12,14),paddingRight:J(16,14),paddingBottom:J(12,14),paddingLeft:J(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:J(32,16),marginBottom:J(32,16),fontSize:J(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:J(8,14),paddingBottom:J(8,14),paddingLeft:J(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:J(8,14),paddingRight:J(8,14),paddingBottom:J(8,14),paddingLeft:J(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${a.e(a.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:J(20,16),lineHeight:"1.6",marginTop:J(24,20),marginBottom:J(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),lc(t,a,r)],"@layer components":{...hc(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,a){let o={},l={},h=(c,u,f)=>{let p=a.theme(`colors.${s}.${u}`,u);f["--tw-prose-"+c]=St(p);let m=f!=l&&a.d("colors",`${s}-${u}`,p);m&&(l["--tw-prose-"+c]=St(m))};for(let c in i){let u=i[c];c!="dark"&&u&&h(c,u,o)}for(let c in i.dark||{}){let u=i.dark[c];u&&(i.dark?h("invert-"+c,u,o):h(c,u,l))}return Object.keys(o).length?{"@layer defaults":{"&":o,[a.v("dark")]:l}}:void 0}}function lc(t,e,r){let i={};for(let n in r)i[uc(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function uc(t,e,{e:r,h:i},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",o=s,l="")=>n(`${a}:where(${o}):not(:where(.${r(i("not-"+t))} *))${l}`))}function hc(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function J(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var po=ho({darkMode:"class",theme:{extend:{spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]},fontFamily:{sans:["system-ui","Roboto","Helvetica","Arial","sans-serif"],serif:["ui-serif","Georgia","Cambria","serif"],mono:["ui-monospace","Menlo","Monaco","monospace"]}}},presets:[oc(),Wh(),Yh(),cc()],hash:!1});function pc(t,e=!0){let r=function(){if(im)try{let l=hs(new CSSStyleSheet);return l.connect=h=>{let c=fo(h);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=ls,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[hs(s)],o=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(h=>h.snapshot());return()=>l.forEach(h=>h())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,h,c){a[0].insert(l,h,c);let u=this.target.cssRules[h];a.forEach((f,p)=>p&&f.target.insertRule(u.cssText,h))},resume(l,h){return a[0].resume(l,h)},connect(l){let h=document.createElement("style");fo(l).appendChild(h);let c=hs(h),{cssRules:u}=this.target;for(let f=0;f<u.length;f++)c.target.insertRule(u[f].cssText,f);a.push(c),o.set(l,c)},disconnect(l){let h=a.indexOf(o.get(l));h>=0&&a.splice(h,1)}}}(),i=jh({...t,hash:t.hash??e},r),n=Hh(i);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(fo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var im=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function fo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var Ve=t=>pc(po)(t);var ps,dc,ds,fc,us=class extends Ve(Ce){constructor(){super();se(this,ps);se(this,ds);we(this,"render",()=>me`
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ch=/'/g,uh=/"/g,gh=/^(?:script|style|textarea|title)$/i,yh=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),pe=yh(1),yy=yh(2),ft=Symbol.for("lit-noChange"),Te=Symbol.for("lit-nothing"),ph=new WeakMap,Br=Vr.createTreeWalker(Vr,129,null,!1);function vh(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return oh!==void 0?oh.createHTML(e):e}var bh=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=Xi;for(let o=0;o<r;o++){let l=t[o],h,c,u=-1,f=0;for(;f<l.length&&(a.lastIndex=f,c=a.exec(l),c!==null);)f=a.lastIndex,a===Xi?c[1]==="!--"?a=lh:c[1]!==void 0?a=hh:c[2]!==void 0?(gh.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Lr):c[3]!==void 0&&(a=Lr):a===Lr?c[0]===">"?(a=n??Xi,u=-1):c[1]===void 0?u=-2:(u=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?Lr:c[3]==='"'?uh:ch):a===uh||a===ch?a=Lr:a===lh||a===hh?a=Xi:(a=Lr,n=void 0);let p=a===Lr&&t[o+1].startsWith("/>")?" ":"";s+=a===Xi?l+vf:u>=0?(i.push(h),l.slice(0,u)+Xn+l.slice(u)+Yt+p):l+Yt+(u===-2?(i.push(void 0),o):p)}return[vh(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]},en=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,a=0,o=e.length-1,l=this.parts,[h,c]=bh(e,r);if(this.el=t.createElement(h,i),Br.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=Br.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith(Xn)||f.startsWith(Yt)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+Xn).split(Yt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?Qn:g[1]==="?"?es:g[1]==="@"?ts:zr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(gh.test(n.tagName)){let u=n.textContent.split(Yt),f=u.length-1;if(f>0){n.textContent=ui?ui.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],Ki()),Br.nextNode(),l.push({type:2,index:++s});n.append(u[f],Ki())}}}else if(n.nodeType===8)if(n.data===Ua)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(Yt,u+1))!==-1;)l.push({type:7,index:s}),u+=Yt.length-1}s++}}static createElement(e,r){let i=Vr.createElement("template");return i.innerHTML=e,i}};function Nr(t,e,r=t,i){var n,s,a,o;if(e===ft)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=Qi(e)?void 0:e._$litDirective$;return l?.constructor!==h&&((s=l?._$AO)===null||s===void 0||s.call(l,!1),h===void 0?l=void 0:(l=new h(t),l._$AT(t,r,i)),i!==void 0?((a=(o=r)._$Co)!==null&&a!==void 0?a:o._$Co=[])[i]=l:r._$Cl=l),l!==void 0&&(e=Nr(t,l._$AS(t,e.values),l,i)),e}var Kn=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var r;let{el:{content:i},parts:n}=this._$AD,s=((r=e?.creationScope)!==null&&r!==void 0?r:Vr).importNode(i,!0);Br.currentNode=s;let a=Br.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new pi(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new rs(a,this,e)),this._$AV.push(c),h=n[++l]}o!==h?.index&&(a=Br.nextNode(),o++)}return Br.currentNode=Vr,s}v(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},pi=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=Te,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cp=(s=n?.isConnected)===null||s===void 0||s}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cp}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Nr(this,e,r),Qi(e)?e===Te||e==null||e===""?(this._$AH!==Te&&this._$AR(),this._$AH=Te):e!==this._$AH&&e!==ft&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):mh(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Te&&Qi(this._$AH)?this._$AA.nextSibling.data=e:this.$(Vr.createTextNode(e)),this._$AH=e}g(e){var r;let{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=en.createElement(vh(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.v(i);else{let a=new Kn(s,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(e){let r=ph.get(e.strings);return r===void 0&&ph.set(e.strings,r=new en(e)),r}T(e){fh(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.k(Ki()),this.k(Ki()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){var r;this._$AM===void 0&&(this._$Cp=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}},zr=class{constructor(e,r,i,n,s){this.type=1,this._$AH=Te,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Te}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,n){let s=this.strings,a=!1;if(s===void 0)e=Nr(this,e,r,0),a=!Qi(e)||e!==this._$AH&&e!==ft,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=Nr(this,o[i+l],r,l),h===ft&&(h=this._$AH[l]),a||(a=!Qi(h)||h!==this._$AH[l]),h===Te?e=Te:e!==Te&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===Te?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Qn=class extends zr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Te?void 0:e}},bf=ui?ui.emptyScript:"",es=class extends zr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Te?this.element.setAttribute(this.name,bf):this.element.removeAttribute(this.name)}},ts=class extends zr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=Nr(this,e,r,0))!==null&&i!==void 0?i:Te)===ft)return;let n=this._$AH,s=e===Te&&n!==Te||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Te&&(n===Te||s);s&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,i;typeof this._$AH=="function"?this._$AH.call((i=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}},rs=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Nr(this,e)}},_h={O:Xn,P:Yt,A:Ua,C:1,M:bh,L:Kn,R:mh,D:Nr,I:pi,V:zr,H:es,N:ts,U:Qn,F:rs},dh=Jn.litHtmlPolyfillSupport;dh?.(en,pi),((Ga=Jn.litHtmlVersions)!==null&&Ga!==void 0?Ga:Jn.litHtmlVersions=[]).push("2.8.0");var wh=(t,e,r)=>{var i,n;let s=(i=r?.renderBefore)!==null&&i!==void 0?i:e,a=s._$litPart$;if(a===void 0){let o=(n=r?.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=a=new pi(e.insertBefore(Ki(),o),o,void 0,r??{})}return a._$AI(t),a};var Wa,Za;var Ce=class extends Zt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;let i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=wh(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ft}};Ce.finalized=!0,Ce._$litElement$=!0,(Wa=globalThis.litElementHydrateSupport)===null||Wa===void 0||Wa.call(globalThis,{LitElement:Ce});var xh=globalThis.litElementPolyfillSupport;xh?.({LitElement:Ce});((Za=globalThis.litElementVersions)!==null&&Za!==void 0?Za:globalThis.litElementVersions=[]).push("3.3.3");var di={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},fi=t=>(...e)=>({_$litDirective$:t,values:e}),dr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:_f}=_h;var Sh=()=>document.createComment(""),mi=(t,e,r)=>{var i;let n=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(r===void 0){let a=n.insertBefore(Sh(),s),o=n.insertBefore(Sh(),s);r=new _f(a,o,t,t.options)}else{let a=r._$AB.nextSibling,o=r._$AM,l=o!==t;if(l){let h;(i=r._$AQ)===null||i===void 0||i.call(r,t),r._$AM=t,r._$AP!==void 0&&(h=t._$AU)!==o._$AU&&r._$AP(h)}if(a!==s||l){let h=r._$AA;for(;h!==a;){let c=h.nextSibling;n.insertBefore(h,s),h=c}}}return r},fr=(t,e,r=t)=>(t._$AI(e,r),t),wf={},Eh=(t,e=wf)=>t._$AH=e,kh=t=>t._$AH,is=t=>{var e;(e=t._$AP)===null||e===void 0||e.call(t,!1,!0);let r=t._$AA,i=t._$AB.nextSibling;for(;r!==i;){let n=r.nextSibling;r.remove(),r=n}};var Ph=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},tn=fi(class extends dr{constructor(t){if(super(t),t.type!==di.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);let n=[],s=[],a=0;for(let o of t)n[a]=i?i(o,a):a,s[a]=r(o,a),a++;return{values:s,keys:n}}render(t,e,r){return this.ct(t,e,r).values}update(t,[e,r,i]){var n;let s=kh(t),{values:a,keys:o}=this.ct(e,r,i);if(!Array.isArray(s))return this.ut=o,a;let l=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],h=[],c,u,f=0,p=s.length-1,m=0,g=a.length-1;for(;f<=p&&m<=g;)if(s[f]===null)f++;else if(s[p]===null)p--;else if(l[f]===o[m])h[m]=fr(s[f],a[m]),f++,m++;else if(l[p]===o[g])h[g]=fr(s[p],a[g]),p--,g--;else if(l[f]===o[g])h[g]=fr(s[f],a[g]),mi(t,h[g+1],s[f]),f++,g--;else if(l[p]===o[m])h[m]=fr(s[p],a[m]),mi(t,s[f],s[p]),p--,m++;else if(c===void 0&&(c=Ph(o,m,g),u=Ph(l,f,p)),c.has(l[f]))if(c.has(l[p])){let d=u.get(o[m]),y=d!==void 0?s[d]:null;if(y===null){let v=mi(t,s[f]);fr(v,a[m]),h[m]=v}else h[m]=fr(y,a[m]),mi(t,s[f],y),s[d]=null;m++}else is(s[p]),p--;else is(s[f]),f++;for(;m<=g;){let d=mi(t,h[g+1]);fr(d,a[m]),h[m++]=d}for(;f<=p;){let d=s[f++];d!==null&&is(d)}return this.ut=o,Eh(t,h),ft}});function no(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function xf(t,e=","){return t.map(no).join(e)}var Fh=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function ns(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function os(t,e="@media "){return e+ke(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function ke(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function Ah(t){return t}function ls(){}var Le={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Oh(t){return t.match(/[-=:;]/g)?.length||0}function Qa(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Oh(t),15)<<18}var Sf=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function so({n:t,i:e,v:r=[]},i,n,s){t&&(t=no({n:t,i:e,v:r})),s=[...ke(s)];for(let o of r){let l=i.theme("screens",o);for(let h of ke(l&&os(l)||i.v(o))){var a;s.push(h),n|=l?67108864|Qa(h):o=="dark"?1073741824:h[0]=="@"?Qa(h):(a=h,1<<~(/:([a-z-]+)/.test(a)&&~Sf.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var $h=new Map;function eo(t){if(t.d){let e=[],r=Ya(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?Ya(i,s=>Ya(n,a=>{let o=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(o){let l=s.indexOf(o[1]);return~l?s.slice(0,l)+o[0]+s.slice(l+o[1].length):Ja(s,a)}return Ja(a,s)})):i,"&"),i=>Ja(i,t.n?"."+Fh(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function Ya(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function Ja(t,e){return t.replace(/&/g,e)}var Ch=new Intl.Collator("en",{numeric:!0});function Rh(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=Lh(t[n],e)?r=n+1:i=n}return i}function Lh(t,e){let r=t.p&Le.o;return r==(e.p&Le.o)&&(r==Le.b||r==Le.o)?0:t.p-e.p||t.o-e.o||Ch.compare(Th(t.n),Th(e.n))||Ch.compare(Ih(t.n),Ih(e.n))}function Th(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Ih(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Xa(t,e){return Math.round(parseInt(t,16)*e)}function St(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:i}=e,n=i?`var(${i})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",n);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,a=[17,1,.062272][s-1];return`rgba(${[Xa(t.substr(1,s),a),Xa(t.substr(1+s,s),a),Xa(t.substr(1+2*s,s),a),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function Bh(t,e,r,i,n=[]){return function s(a,{n:o,p:l,r:h=[],i:c},u){let f=[],p="",m=0,g=0;for(let v in a||{}){var d,y;let b=a[v];if(v[0]=="@"){if(!b)continue;if(v[1]=="a"){f.push(...oo(o,l,as(""+b),u,l,h,c,!0));continue}if(v[1]=="l"){for(let _ of ke(b))f.push(...s(_,{n:o,p:(d=Le[v[7]],l&~Le.o|d),r:v[7]=="d"?[]:h,i:c},u));continue}if(v[1]=="i"){f.push(...ke(b).map(_=>({p:-1,o:0,r:[],d:v+" "+_})));continue}if(v[1]=="k"){f.push({p:Le.d,o:0,r:[v],d:s(b,{p:Le.d},u).map(eo).join("")});continue}if(v[1]=="f"){f.push(...ke(b).map(_=>({p:Le.d,o:0,r:[v],d:s(_,{p:Le.d},u).map(eo).join("")})));continue}}if(typeof b!="object"||Array.isArray(b))v=="label"&&b?o=b+ns(JSON.stringify([l,c,a])):(b||b===0)&&(v=v.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),g+=1,m=Math.max(m,(y=v)[0]=="-"?0:Oh(y)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(y)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+ke(b).map(_=>u.s(v,ao(""+_,u.theme)+(c?" !important":""))).join(";"));else if(v[0]=="@"||v.includes("&")){let _=l;v[0]=="@"&&(v=v.replace(/\bscreen\(([^)]+)\)/g,(x,T)=>{let S=u.theme("screens",T);return S?(_|=67108864,os(S,"")):x}),_|=Qa(v)),f.push(...s(b,{n:o,p:_,r:[...h,v],i:c},u))}else f.push(...s(b,{p:l,r:[...h,v]},u))}return f.unshift({n:o,p:l,o:Math.max(0,15-g)+1.5*Math.min(m||15,15),r:h,d:p}),f.sort(Lh)}(t,so(e,r,i,n),r)}function ao(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,i,n,s,a="")=>{let o=e(n,a);return typeof o=="function"&&/color|fill|stroke/i.test(n)?St(o):""+ke(o).filter(l=>Object(l)!==l)})}function Vh(t,e){let r,i=[];for(let n of t)n.d&&n.n?r?.p==n.p&&""+r.r==""+n.r?(r.c=[r.c,n.c].filter(Boolean).join(" "),r.d=r.d+";"+n.d):i.push(r={...n,n:n.n&&e}):i.push({...n,n:n.n&&e});return i}function ss(t,e,r=Le.u,i,n){let s=[];for(let a of t)for(let o of function(l,h,c,u,f){l={...l,i:l.i||f};let p=function(m,g){let d=$h.get(m.n);return d?d(m,g):g.r(m.n,m.v[0]=="dark")}(l,h);return p?typeof p=="string"?({r:u,p:c}=so(l,h,c,u),Vh(ss(as(p),h,c,u,l.i),l.n)):Array.isArray(p)?p.map(m=>{var g,d;return{o:0,...m,r:[...ke(u),...ke(m.r)],p:(g=c,d=m.p??c,g&~Le.o|d)}}):Bh(p,l,h,c,u):[{c:no(l),p:0,o:0,r:[]}]}(a,e,r,i,n))s.splice(Rh(s,o),0,o);return s}function oo(t,e,r,i,n,s,a,o){return Vh((o?r.flatMap(l=>ss([l],i,n,s,a)):ss(r,i,n,s,a)).map(l=>l.p&Le.o&&(l.n||e==Le.b)?{...l,p:l.p&~Le.o|e,o:0}:l),t)}function Ef(t,e,r,i){var n;return n=(s,a)=>{let{n:o,p:l,r:h,i:c}=so(s,a,e);return r&&oo(o,e,r,a,l,h,c,i)},$h.set(t,n),t}function Ka(t,e,r){if(t[t.length-1]!="("){let i=[],n=!1,s=!1,a="";for(let o of t)if(!(o=="("||/[~@]$/.test(o))){if(o[0]=="!"&&(o=o.slice(1),n=!n),o.endsWith(":")){i[o=="dark:"?"unshift":"push"](o.slice(0,-1));continue}o[0]=="-"&&(o=o.slice(1),s=!s),o.endsWith("-")&&(o=o.slice(0,-1)),o&&o!="&"&&(a+=(a&&"-")+o)}a&&(s&&(a="-"+a),e[0].push({n:a,v:i.filter(kf),i:n}))}}function kf(t,e,r){return r.indexOf(t)==e}var Mh=new Map;function as(t){let e=Mh.get(t);if(!e){let r=[],i=[[]],n=0,s=0,a=null,o=0,l=(h,c=0)=>{n!=o&&(r.push(t.slice(n,o+c)),h&&Ka(r,i)),n=o+1};for(;o<t.length;o++){let h=t[o];if(s)t[o-1]!="\\"&&(s+=+(h=="[")||-(h=="]"));else if(h=="[")s+=1;else if(a)t[o-1]!="\\"&&a.test(t.slice(o))&&(a=null,n=o+RegExp.lastMatch.length);else if(h=="/"&&t[o-1]!="\\"&&(t[o+1]=="*"||t[o+1]=="/"))a=t[o+1]=="*"?/^\*\//:/^[\r\n]/;else if(h=="(")l(),r.push(h);else if(h==":")t[o+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(h)){l(!0);let c=r.lastIndexOf("(");if(h==")"){let u=r[c-1];if(/[~@]$/.test(u)){let f=i.shift();r.length=c,Ka([...r,"#"],i);let{v:p}=i[0].pop();for(let m of f)m.v.splice(+(m.v[0]=="dark")-+(p[0]=="dark"),p.length);Ka([...r,Ef(u.length>1?u.slice(0,-1)+ns(JSON.stringify([u,f])):u+"("+xf(f)+")",Le.a,f,/@$/.test(u))],i)}c=r.lastIndexOf("(",c-1)}r.length=c+1}else/[~@]/.test(h)&&t[o+1]=="("&&i.unshift([])}l(!0),Mh.set(t,e=i[0])}return e}function B(t,e,r){return[t,to(e,r)]}function to(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):ro(r,1)}):r=>t||{[r[1]]:ro(r,2)}}function ro(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function V(t,e,r,i){return[t,lo(e,r,i)]}function lo(t,e,r){let i=typeof e=="string"?(n,s)=>({[e]:r?r(n,s):n._}):e||(({1:n,_:s},a,o)=>({[n||o]:s}));return(n,s)=>{let a=Nh(t||n[1]),o=s.theme(a,n.$$)??Vt(n.$$,a,s);if(o!=null)return n._=ro(n,0,o),i(n,s,a)}}function Be(t,e={},r){return[t,Pf(e,r)]}function Pf(t={},e){return(r,i)=>{let{section:n=Nh(r[0]).replace("-","")+"Color"}=t,[s,a]=Af(r.$$);if(!s)return;let o=i.theme(n,s)||Vt(s,n,i);if(!o||typeof o=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:h=n.replace("Color","Opacity"),property:c=n,selector:u}=t,f=i.theme(h,a||"DEFAULT")||a&&Vt(a,h,i),p=e||(({_:g})=>{let d=rn(c,g);return u?{[u]:d}:d});r._={value:St(o,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:g=>St(o,g),opacityVariable:l||void 0,opacityValue:f||void 0};let m=p(r,i);if(!r.dark){let g=i.d(n,s,o);g&&g!==o&&(r._={value:St(g,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:d=>St(g,d),opacityVariable:l||void 0,opacityValue:f||void 0},m={"&":m,[i.v("dark")]:p(r,i)})}return m}}function Af(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function rn(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function Vt(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=gi(ao(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function Nh(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function gi(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>gi(r)+i+gi(n)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function ho({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:ke(e.variants),rules:ke(e.rules),ignorelist:ke(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of ke([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&ke(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=r.darkMode,darkColor:a=r.darkColor,theme:o,variants:l,rules:h,ignorelist:c,hash:u=r.hash,stringify:f=r.stringify,finalize:p}=typeof i=="function"?i(r):i;r={preflight:r.preflight!==!1&&n!==!1&&[...r.preflight,...ke(n)],darkMode:s,darkColor:a,theme:{...r.theme,...o,extend:{...r.theme.extend,...o?.extend}},variants:[...r.variants,...ke(l)],rules:[...r.rules,...ke(h)],ignorelist:[...r.ignorelist,...ke(c)],hash:u,stringify:f,finalize:[...r.finalize,...ke(p)]}}return r}function Dh(t,e,r,i,n,s){for(let a of e){let o=r.get(a);o||r.set(a,o=i(a));let l=o(t,n,s);if(l)return l}}function Cf(t){var e;return io(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Tf(t){var e,r;return Array.isArray(t)?io(t[0],to(t[1],t[2])):io(t,to(e,r))}function io(t,e){return zh(t,(r,i,n,s)=>{let a=i.exec(r);if(a)return a.$$=r.slice(a[0].length),a.dark=s,e(a,n)})}function zh(t,e){let r=ke(t).map(If);return(i,n,s)=>{for(let a of r){let o=e(i,a,n,s);if(o)return o}}}function If(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function jh(t,e){let r=ho(t),i=function({theme:l,darkMode:h,darkColor:c=ls,variants:u,rules:f,hash:p,stringify:m,ignorelist:g,finalize:d}){let y=new Map,v=new Map,b=new Map,_=new Map,x=zh(g,(w,M)=>M.test(w));u.push(["dark",Array.isArray(h)||h=="class"?`${ke(h)[1]||".dark"} &`:typeof h=="string"&&h!="media"?h:"@media (prefers-color-scheme:dark)"]);let T=typeof p=="function"?w=>p(w,ns):p?ns:Ah;T!==Ah&&d.push(w=>({...w,n:w.n&&T(w.n),d:w.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(M,E)=>"--"+T(E).replace("#",""))}));let S={theme:function({extend:w={},...M}){let E={},I={get colors(){return P("colors")},theme:P,negative(){return{}},breakpoints(k){let F={};for(let O in k)typeof k[O]=="string"&&(F["screen-"+O]=k[O]);return F}};return P;function P(k,F,O,D){if(k){if({1:k,2:D}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(k)||[,k],/[.[]/.test(k)){let G=[];k.replace(/\[([^\]]+)\]|([^.[]+)/g,(U,Z,j=Z)=>G.push(j)),k=G.shift(),O=F,F=G.join("-")}let $=E[k]||Object.assign(Object.assign(E[k]={},A(M,k)),A(w,k));if(F==null)return $;F||(F="DEFAULT");let R=$[F]??F.split("-").reduce((G,U)=>G?.[U],$)??O;return D?St(R,{opacityValue:ao(D,P)}):R}let C={};for(let $ of[...Object.keys(M),...Object.keys(w)])C[$]=P($);return C}function A(k,F){let O=k[F];return typeof O=="function"&&(O=O(I)),O&&/color|fill|stroke/i.test(F)?function D(C,$=[]){let R={};for(let G in C){let U=C[G],Z=[...$,G];R[Z.join("-")]=U,G=="DEFAULT"&&(Z=$,R[$.join("-")]=U),typeof U=="object"&&Object.assign(R,D(U,Z))}return R}(O):O}}(l),e:Fh,h:T,s(w,M){return m(w,M,S)},d(w,M,E){return c(w,M,S,E)},v(w){return y.has(w)||y.set(w,Dh(w,u,v,Cf,S)||"&:"+w),y.get(w)},r(w,M){let E=JSON.stringify([w,M]);return b.has(E)||b.set(E,!x(w,S)&&Dh(w,f,_,Tf,S,M)),b.get(E)},f(w){return d.reduce((M,E)=>E(M,S),w)}};return S}(r),n=new Map,s=[],a=new Set;e.resume(l=>n.set(l,l),(l,h)=>{e.insert(l,s.length,h),s.push(h),a.add(l)});function o(l){let h=i.f(l),c=eo(h);if(c&&!a.has(c)){a.add(c);let u=Rh(s,l);e.insert(c,u,l),s.splice(u,0,l)}return h.n}return Object.defineProperties(function(h){if(!n.size)for(let u of ke(r.preflight))typeof u=="function"&&(u=u(i)),u&&(typeof u=="string"?oo("",Le.b,as(u),i,Le.b,[],!1,!0):Bh(u,{},i,Le.b)).forEach(o);h=""+h;let c=n.get(h);if(!c){let u=new Set;for(let f of ss(as(h),i))u.add(f.c).add(o(f));c=[...u].filter(Boolean).join(" "),n.set(h,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:r,snapshot(){let l=e.snapshot(),h=new Set(a),c=new Map(n),u=[...s];return()=>{l(),a=h,n=c,s=u}},clear(){e.clear(),a=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Mf(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function Hh(t){let e=new MutationObserver(r);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),i(n),r([{target:n,type:""}])},disconnect(){e.disconnect()}};function r(n){for(let{type:s,target:a}of n)if(s[0]=="a")i(a);else for(let o of a.querySelectorAll("[class]"))i(o);e.takeRecords()}function i(n){let s,a=n.getAttribute?.("class");a&&Mf(a,s=t(a))&&n.setAttribute("class",s)}}function Df(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function hs(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Df(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,i){try{e.insertRule(r,i)}catch{e.insertRule(":root{}",i)}},resume:ls}}var Ff=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Gh(t){return Ff.get(t)}function qh(t){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function Uh(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Of=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Wh(){return({stringify:t})=>({stringify(e,r,i){let n="",s=Gh(e);s&&(n+=t(s,r,i)+";");let a=qh(e),o=Uh(e,r);for(let l of Of)a&l[1]&&(n+=t(l[0]+e,r,i)+";"),o&l[1]&&(n+=t(e,l[0]+r,i)+";");return n+t(e,r,i)}})}function Yh(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",lo("lineClamp",({_:t})=>Zh(t))],["line-clamp-(\\d+)",({1:t})=>Zh(t)]]}}function Zh(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var sn={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...mt(4,"rem",4,.5,.5),...mt(12,"rem",4,5),14:"3.5rem",...mt(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:de("blur"),backdropBrightness:de("brightness"),backdropContrast:de("contrast"),backdropGrayscale:de("grayscale"),backdropHueRotate:de("hueRotate"),backdropInvert:de("invert"),backdropOpacity:de("opacity"),backdropSaturate:de("saturate"),backdropSepia:de("sepia"),backgroundColor:de("colors"),backgroundImage:{none:"none"},backgroundOpacity:de("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...mt(200,"",100,0,50),...mt(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:de("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:de("spacing"),borderWidth:{DEFAULT:"1px",...Et(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:de("colors"),caretColor:de("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...mt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:de("borderColor"),divideOpacity:de("borderOpacity"),divideWidth:de("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...nn(2,6),...nn(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:de("spacing"),gradientColorStops:de("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...nn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...nn(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...mt(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...mt(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:de("spacing"),placeholderColor:de("colors"),placeholderOpacity:de("opacity"),outlineColor:de("colors"),outlineOffset:Et(8,"px"),outlineWidth:Et(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:de("colors"),ringOffsetWidth:Et(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Et(8,"px")},rotate:{...Et(2,"deg"),...Et(12,"deg",3),...Et(180,"deg",45)},saturate:mt(200,"",100,0,50),scale:{...mt(150,"",100,0,50),...mt(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:de("spacing"),scrollPadding:de("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Et(2,"deg"),...Et(12,"deg",3)},space:de("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:mt(2),textColor:de("colors"),textDecorationColor:de("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Et(8,"px")},textUnderlineOffset:{auto:"auto",...Et(8,"px")},textIndent:de("spacing"),textOpacity:de("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:de("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...nn(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...mt(50,"",1,0,10),auto:"auto"}};function nn(t,e){let r={};do for(var i=1;i<t;i++)r[`${i}/${t}`]=Number((i/t*100).toFixed(6))+"%";while(++t<=e);return r}function Et(t,e,r=0){let i={};for(;r<=t;r=2*r||1)i[r]=r+e;return i}function mt(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function de(t){return({theme:e})=>e(t)}var Jh={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${sn.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${sn.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var rc=[B("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Vt(`[${e}]`,"",r)}}})),B("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),V("aspect-","aspectRatio"),B("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:i,padding:n}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...a("xs")};for(let o in r){let l=r[o];typeof l=="string"&&(s[os(l)]={"&":{maxWidth:l,...a(o)}})}return s;function a(o){let l=n&&(typeof n=="string"?n:n[o]||n.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),V("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),B("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),B("box-(border|content)","boxSizing",({1:t})=>t+"-box"),B("hidden",{display:"none"}),B("table-(auto|fixed)","tableLayout"),B(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",B("isolate","isolation"),B("object-(contain|cover|fill|none|scale-down)","objectFit"),V("object-","objectPosition"),B("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",cs),B("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),B("(static|fixed|absolute|relative|sticky)","position"),V("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),V("-?(top|bottom|left|right)(?:$|-)","inset"),B("(visible|collapse)","visibility"),B("invisible",{visibility:"hidden"}),V("-?z-","zIndex"),B("flex-((row|col)(-reverse)?)","flexDirection",Xh),B("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),V("(flex-(?:grow|shrink))(?:$|-)"),V("(flex)-"),V("grow(?:$|-)","flexGrow"),V("shrink(?:$|-)","flexShrink"),V("basis-","flexBasis"),V("-?(order)-"),"-?(order)-(\\d+)",V("grid-cols-","gridTemplateColumns"),B("grid-cols-(\\d+)","gridTemplateColumns",tc),V("col-","gridColumn"),B("col-(span)-(\\d+)","gridColumn",ec),V("col-start-","gridColumnStart"),B("col-start-(auto|\\d+)","gridColumnStart"),V("col-end-","gridColumnEnd"),B("col-end-(auto|\\d+)","gridColumnEnd"),V("grid-rows-","gridTemplateRows"),B("grid-rows-(\\d+)","gridTemplateRows",tc),V("row-","gridRow"),B("row-(span)-(\\d+)","gridRow",ec),V("row-start-","gridRowStart"),B("row-start-(auto|\\d+)","gridRowStart"),V("row-end-","gridRowEnd"),B("row-end-(auto|\\d+)","gridRowEnd"),B("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>cs(Xh(t))),B("grid-flow-(dense)","gridAutoFlow"),V("auto-cols-","gridAutoColumns"),V("auto-rows-","gridAutoRows"),V("gap-x(?:$|-)","gap","columnGap"),V("gap-y(?:$|-)","gap","rowGap"),V("gap(?:$|-)","gap"),"(justify-(?:items|self))-",B("justify-","justifyContent",Kh),B("(content|items|self)-",t=>({["align-"+t[1]]:Kh(t)})),B("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),V("p([xytrbl])?(?:$|-)","padding",yi("padding")),V("-?m([xytrbl])?(?:$|-)","margin",yi("margin")),V("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),B("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),V("w-","width"),V("min-w-","minWidth"),V("max-w-","maxWidth"),V("h-","height"),V("min-h-","minHeight"),V("max-h-","maxHeight"),V("font-","fontWeight"),V("font-","fontFamily",({_:t})=>typeof(t=ke(t))[1]=="string"?{fontFamily:$t(t)}:{fontFamily:$t(t[0]),...t[1]}),B("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),B("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),B("italic","fontStyle"),B("not-italic",{fontStyle:"normal"}),B("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...mr({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),V("tracking-","letterSpacing"),V("leading-","lineHeight"),B("list-(inside|outside)","listStylePosition"),V("list-","listStyleType"),B("list-","listStyleType"),V("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Be("placeholder-",{property:"color",selector:"&::placeholder"}),B("text-(left|center|right|justify|start|end)","textAlign"),B("text-(ellipsis|clip)","textOverflow"),V("text-opacity-","textOpacity","--tw-text-opacity"),Be("text-",{property:"color"}),V("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),V("indent-","textIndent"),B("(overline|underline|line-through)","textDecorationLine"),B("no-underline",{textDecorationLine:"none"}),V("underline-offset-","textUnderlineOffset"),Be("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),V("decoration-","textDecorationThickness"),B("decoration-","textDecorationStyle"),B("(uppercase|lowercase|capitalize)","textTransform"),B("normal-case",{textTransform:"none"}),B("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),B("align-","verticalAlign"),B("whitespace-","whiteSpace"),B("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),B("break-words",{overflowWrap:"break-word"}),B("break-all",{wordBreak:"break-all"}),B("break-keep",{wordBreak:"keep-all"}),Be("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Be("accent-",{opacityVariable:!1,opacitySection:"opacity"}),B("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${jr(t," ")},var(--tw-gradient-stops))`),Be("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Be("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Be("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),B("bg-(fixed|local|scroll)","backgroundAttachment"),B("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),B(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),B("bg-blend-","backgroundBlendMode"),B("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),V("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Be("bg-",{section:"backgroundColor"}),V("bg-","backgroundImage"),V("bg-","backgroundPosition"),B("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",cs),V("bg-","backgroundSize"),V("rounded(?:$|-)","borderRadius"),V("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${jr(r[0])}-radius`]:e,[`border-${jr(r[1])}-radius`]:e}}),B("border-(collapse|separate)","borderCollapse"),V("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),B("border-(solid|dashed|dotted|double|none)","borderStyle"),V("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...mr({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Be("border-([xytrbl])-",{section:"borderColor"},yi("border","Color")),Be("border-"),V("border-([xytrbl])(?:$|-)","borderWidth",yi("border","Width")),V("border(?:$|-)","borderWidth"),V("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),B("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),B("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),V("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${jr(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${jr(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Be("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),V("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Be("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),V("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),B("ring-inset",{"--tw-ring-inset":"inset"}),Be("ring-",{property:"--tw-ring-color"}),V("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...mr({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":St(e("ringOffsetColor","","#fff")),"--tw-ring-color":St(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Be("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),V("shadow(?:$|-)","boxShadow",({_:t})=>({...mr({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":$t(t),"--tw-shadow-colored":$t(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),V("(opacity)-"),B("mix-blend-","mixBlendMode"),...Qh(),...Qh("backdrop-"),V("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:$t(t),transitionTimingFunction:t._=="none"?void 0:$t(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:$t(e("transitionDuration",""))})),V("duration(?:$|-)","transitionDuration","transitionDuration",$t),V("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",$t),V("delay(?:$|-)","transitionDelay","transitionDelay",$t),V("animate(?:$|-)","animation",(t,{theme:e,h:r,e:i})=>{let n=$t(t),s=n.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=i(r(s[0])))]:a,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",B("transform",uo),B("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":ic(t=="gpu")})),V("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...uo()})),V("-?(rotate)-","rotate",co),V("-?(translate-[xy])-","translate",co),V("-?(skew-[xy])-","skew",co),B("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",cs),"(appearance)-",V("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",V("(cursor)-"),"(cursor)-",B("snap-(none)","scroll-snap-type"),B("snap-(x|y|both)",({1:t})=>({...mr({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),B("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),B("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),B("snap-(normal|always)","scroll-snap-stop"),B("scroll-(auto|smooth)","scroll-behavior"),V("scroll-p([xytrbl])?(?:$|-)","padding",yi("scroll-padding")),V("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",yi("scroll-margin")),B("touch-(auto|none|manipulation)","touch-action"),B("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...mr({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),B("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),B("outline",{outlineStyle:"solid"}),B("outline-(dashed|dotted|double)","outlineStyle"),V("-?(outline-offset)-"),Be("outline-",{opacityVariable:!1,opacitySection:"opacity"}),V("outline-","outlineWidth"),"(pointer-events)-",V("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],B("select-(none|text|all|auto)","userSelect"),Be("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Be("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),V("stroke-","strokeWidth"),B("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),B("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function cs(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Xh(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function jr(t,e="-"){let r=[];for(let i of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return r.join(e)}function $t(t){return t&&""+(t._||t)}function Kh({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function yi(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...rn(t+"-"+jr(n[0])+e,i),...rn(t+"-"+jr(n[1])+e,i)}:rn(t+e,i)}}function Qh(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let i of e)r[`--tw-${t}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...mr(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,B(`${t}filter`,r),...e.map(i=>V(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:ke(s).map(a=>`${i}(${a})`).join(" "),...r})))]}function co({1:t,_:e}){return{["--tw-"+t]:e,...uo()}}function uo(){return{...mr({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":ic()}),transform:"var(--tw-transform)"}}function ic(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function ec({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function tc({1:t}){return`repeat(${t},minmax(0,1fr))`}function mr(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var nc=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||Vt(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:i="",6:n=e},{e:s,h:a,v:o})=>{let l=gi(i)||(r[0]=="["?r:o(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(t+n))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Vt(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||Vt(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Vt(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&gi(t).replace(/[}]+$/,"").split("{")]];function sc({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:Jh,theme:{...sn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:nc,rules:rc,finalize(r){return r.n&&r.d&&r.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var $f={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Rf={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Lf={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Bf={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Vf={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Nf={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},zf={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},jf={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Hf={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Gf={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},qf={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Uf={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},Wf={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Zf={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Yf={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Jf={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Xf={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Kf={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Qf={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},em={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},tm={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rm={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},ac={__proto__:null,slate:$f,gray:Rf,zinc:Lf,neutral:Bf,stone:Vf,red:Nf,orange:zf,amber:jf,yellow:Hf,lime:Gf,green:qf,emerald:Uf,teal:Wf,cyan:Zf,sky:Yf,blue:Jf,indigo:Xf,violet:Kf,purple:Qf,fuchsia:em,pink:tm,rose:rm};function oc({disablePreflight:t}={}){return sc({colors:ac,disablePreflight:t})}function cc({className:t="prose",defaultColor:e="gray",extend:r={},colors:i={}}={}){return i={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...i,dark:i.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...i.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,a=s])=>[`${t}-${s}`,(o,l)=>uc(t,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,h=>`& :is(${h.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:a})=>[{c:a(s)}]],[`${t}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",({$$:s},a)=>{let o=hc(a.theme("fontSize",s));return o&&{"@layer components":o}}],[t+"-",({$$:s},a)=>n(s,a)],[t,(s,a)=>({...n(e,a),"@layer base":[lc(t,a,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:J(20,16),marginBottom:J(20,16),paddingLeft:J(26,16)},li:{marginTop:J(8,16),marginBottom:J(8,16)},"ol>li,ul>li":{paddingLeft:J(6,16)},">ul>li p":{marginTop:J(12,16),marginBottom:J(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:J(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:J(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:J(12,16),marginBottom:J(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:J(48,16),marginBottom:J(48,16)},blockquote:{marginTop:J(32,20),marginBottom:J(32,20),paddingLeft:J(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:J(20,16),marginBottom:J(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:J(36,16),marginTop:"0",marginBottom:J(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:J(24,16),marginTop:J(48,24),marginBottom:J(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:J(20,16),marginTop:J(32,20),marginBottom:J(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:J(24,16),marginBottom:J(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:J(32,16),marginBottom:J(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:J(14,16),lineHeight:"1.4",marginTop:J(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:J(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:J(21,24)},"h3 code":{fontSize:J(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:J(14,16),lineHeight:"1.7",marginTop:J(24,14),marginBottom:J(24,14),borderRadius:"0.375rem",paddingTop:J(12,14),paddingRight:J(16,14),paddingBottom:J(12,14),paddingLeft:J(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:J(32,16),marginBottom:J(32,16),fontSize:J(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:J(8,14),paddingBottom:J(8,14),paddingLeft:J(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:J(8,14),paddingRight:J(8,14),paddingBottom:J(8,14),paddingLeft:J(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${a.e(a.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:J(20,16),lineHeight:"1.6",marginTop:J(24,20),marginBottom:J(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),lc(t,a,r)],"@layer components":{...hc(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,a){let o={},l={},h=(c,u,f)=>{let p=a.theme(`colors.${s}.${u}`,u);f["--tw-prose-"+c]=St(p);let m=f!=l&&a.d("colors",`${s}-${u}`,p);m&&(l["--tw-prose-"+c]=St(m))};for(let c in i){let u=i[c];c!="dark"&&u&&h(c,u,o)}for(let c in i.dark||{}){let u=i.dark[c];u&&(i.dark?h("invert-"+c,u,o):h(c,u,l))}return Object.keys(o).length?{"@layer defaults":{"&":o,[a.v("dark")]:l}}:void 0}}function lc(t,e,r){let i={};for(let n in r)i[uc(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function uc(t,e,{e:r,h:i},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",o=s,l="")=>n(`${a}:where(${o}):not(:where(.${r(i("not-"+t))} *))${l}`))}function hc(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function J(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var po=ho({darkMode:"class",theme:{extend:{spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]},fontFamily:{sans:["system-ui","Roboto","Helvetica","Arial","sans-serif"],serif:["ui-serif","Georgia","Cambria","serif"],mono:["ui-monospace","Menlo","Monaco","monospace"]}}},presets:[oc(),Wh(),Yh(),cc()],hash:!1});function pc(t,e=!0){let r=function(){if(im)try{let l=hs(new CSSStyleSheet);return l.connect=h=>{let c=fo(h);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=ls,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[hs(s)],o=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(h=>h.snapshot());return()=>l.forEach(h=>h())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,h,c){a[0].insert(l,h,c);let u=this.target.cssRules[h];a.forEach((f,p)=>p&&f.target.insertRule(u.cssText,h))},resume(l,h){return a[0].resume(l,h)},connect(l){let h=document.createElement("style");fo(l).appendChild(h);let c=hs(h),{cssRules:u}=this.target;for(let f=0;f<u.length;f++)c.target.insertRule(u[f].cssText,f);a.push(c),o.set(l,c)},disconnect(l){let h=a.indexOf(o.get(l));h>=0&&a.splice(h,1)}}}(),i=jh({...t,hash:t.hash??e},r),n=Hh(i);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(fo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var im=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function fo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var Ve=t=>pc(po)(t);var ps,dc,ds,fc,us=class extends Ve(Ce){constructor(){super();se(this,ps);se(this,ds);we(this,"render",()=>pe`
4
4
  <div class="${N(this,ps,dc)?"block":"hidden"} flex h-full w-full flex-col items-stretch justify-center space-y-8 px-4">
5
5
  <!-- limitations section -->
6
- ${this.config.limitations&&this.config.limitations.items.length>0?me`
6
+ ${this.config.limitations&&this.config.limitations.items.length>0?pe`
7
7
  <div class="text-gray-500">
8
8
  <p class="text-center text-lg font-medium">${this.config.limitations.title}</p>
9
9
  <ul class="prose mt-2 text-left text-gray-400">
10
- ${tn(this.config.limitations.items,r=>r,r=>me`<li class="w-full rounded-lg bg-gray-100 px-4 py-3 text-sm">${r}</li>`)}
10
+ ${tn(this.config.limitations.items,r=>r,r=>pe`<li class="w-full rounded-lg bg-gray-100 px-4 py-3 text-sm">${r}</li>`)}
11
11
  </ul>
12
12
  </div>
13
13
  `:""}
14
14
 
15
15
  <!-- examples section -->
16
- ${this.config.examples&&this.config.examples.items.length>0?me`
16
+ ${this.config.examples&&this.config.examples.items.length>0?pe`
17
17
  <div class="text-gray-500">
18
18
  <p class="text-center text-lg font-medium">${this.config.examples.title}</p>
19
19
  <ul class="prose mt-2 text-left text-gray-400">
20
- ${tn(this.config.examples.items,r=>r,r=>me`<li class="w-full rounded-lg bg-gray-100 px-4 py-3 text-sm transition-colors hover:cursor-pointer hover:bg-gray-50" @click="${()=>ue(this,ds,fc).call(this,r)}">“${r}” →</li>`)}
20
+ ${tn(this.config.examples.items,r=>r,r=>pe`<li class="w-full rounded-lg bg-gray-100 px-4 py-3 text-sm transition-colors hover:cursor-pointer hover:bg-gray-50" @click="${()=>ue(this,ds,fc).call(this,r)}">“${r}” →</li>`)}
21
21
  </ul>
22
22
  </div>
23
23
  `:""}
@@ -192,7 +192,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
192
192
  height: 100%;
193
193
  align-items: center;
194
194
  }
195
- `]))),jc={},Xm=function(t,e,r,i,n){var s=new Worker(jc[e]||(jc[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var o=a.data,l=o.$e$;if(l){var h=new Error(l[0]);h.code=l[1],h.stack=l[2],n(h,null)}else n(null,o)},s.postMessage(r,i),s},ce=Uint8Array,Ye=Uint16Array,Mi=Uint32Array,Di=new ce([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fi=new ce([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),mn=new ce([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Eu=function(t,e){for(var r=new Ye(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Mi(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},ku=Eu(Di,2),Uo=ku[0],Ms=ku[1];Uo[28]=258,Ms[258]=28;for(xo=Eu(Fi,0),Wo=xo[0],Ds=xo[1],Pi=new Ye(32768),ge=0;ge<32768;++ge)Jt=(43690&ge)>>>1|(21845&ge)<<1,Jt=(52428&Jt)>>>2|(13107&Jt)<<2,Jt=(61680&Jt)>>>4|(3855&Jt)<<4,Pi[ge]=((65280&Jt)>>>8|(255&Jt)<<8)>>>1;var Jt,xo,Wo,Ds,Pi,ge;for(gt=function(e,r,i){for(var n=e.length,s=0,a=new Ye(r);s<n;++s)e[s]&&++a[e[s]-1];var o,l=new Ye(r);for(s=0;s<r;++s)l[s]=l[s-1]+a[s-1]<<1;if(i){o=new Ye(1<<r);var h=15-r;for(s=0;s<n;++s)if(e[s])for(var c=s<<4|e[s],u=r-e[s],f=l[e[s]-1]++<<u,p=f|(1<<u)-1;f<=p;++f)o[Pi[f]>>>h]=c}else for(o=new Ye(n),s=0;s<n;++s)e[s]&&(o[s]=Pi[l[e[s]-1]++]>>>15-e[s]);return o},zt=new ce(288),ge=0;ge<144;++ge)zt[ge]=8;var gt,zt,ge;for(ge=144;ge<256;++ge)zt[ge]=9;var ge;for(ge=256;ge<280;++ge)zt[ge]=7;var ge;for(ge=280;ge<288;++ge)zt[ge]=8;var ge;for(Wr=new ce(32),ge=0;ge<32;++ge)Wr[ge]=5;var Wr,ge,Pu=gt(zt,9,0),Au=gt(zt,9,1),Cu=gt(Wr,5,0),Tu=gt(Wr,5,1),vs=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},kt=function(t,e,r){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&r},bs=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},gn=function(t){return(t+7)/8|0},Pt=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t.BYTES_PER_ELEMENT==2?Ye:t.BYTES_PER_ELEMENT==4?Mi:ce)(r-e);return i.set(t.subarray(e,r)),i},cb={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Iu=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],X=function(t,e,r){var i=new Error(e||Iu[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,X),!r)throw i;return i},yn=function(t,e,r){var i=t.length;if(!i||r&&r.f&&!r.l)return e||new ce(0);var n=!e||r,s=!r||r.i;r||(r={}),e||(e=new ce(3*i));var a=function(ne){var te=e.length;if(ne>te){var K=new ce(Math.max(2*te,ne));K.set(e),e=K}},o=r.f||0,l=r.p||0,h=r.b||0,c=r.l,u=r.d,f=r.m,p=r.n,m=8*i;do{if(!c){o=kt(t,l,1);var g=kt(t,l+1,3);if(l+=3,!g){var d=t[(I=gn(l)+4)-4]|t[I-3]<<8,y=I+d;if(y>i){s&&X(0);break}n&&a(h+d),e.set(t.subarray(I,y),h),r.b=h+=d,r.p=l=8*y,r.f=o;continue}if(g==1)c=Au,u=Tu,f=9,p=5;else if(g==2){var v=kt(t,l,31)+257,b=kt(t,l+10,15)+4,_=v+kt(t,l+5,31)+1;l+=14;for(var x=new ce(_),T=new ce(19),S=0;S<b;++S)T[mn[S]]=kt(t,l+3*S,7);l+=3*b;var w=vs(T),M=(1<<w)-1,E=gt(T,w,1);for(S=0;S<_;){var I,P=E[kt(t,l,M)];if(l+=15&P,(I=P>>>4)<16)x[S++]=I;else{var A=0,k=0;for(I==16?(k=3+kt(t,l,3),l+=2,A=x[S-1]):I==17?(k=3+kt(t,l,7),l+=3):I==18&&(k=11+kt(t,l,127),l+=7);k--;)x[S++]=A}}var F=x.subarray(0,v),O=x.subarray(v);f=vs(F),p=vs(O),c=gt(F,f,1),u=gt(O,p,1)}else X(1);if(l>m){s&&X(0);break}}n&&a(h+131072);for(var D=(1<<f)-1,C=(1<<p)-1,$=l;;$=l){var R=(A=c[bs(t,l)&D])>>>4;if((l+=15&A)>m){s&&X(0);break}if(A||X(2),R<256)e[h++]=R;else{if(R==256){$=l,c=null;break}var G=R-254;if(R>264){var U=Di[S=R-257];G=kt(t,l,(1<<U)-1)+Uo[S],l+=U}var Z=u[bs(t,l)&C],j=Z>>>4;if(Z||X(3),l+=15&Z,O=Wo[j],j>3&&(U=Fi[j],O+=bs(t,l)&(1<<U)-1,l+=U),l>m){s&&X(0);break}n&&a(h+131072);for(var ee=h+G;h<ee;h+=4)e[h]=e[h-O],e[h+1]=e[h+1-O],e[h+2]=e[h+2-O],e[h+3]=e[h+3-O];h=ee}}r.l=c,r.p=$,r.b=h,r.f=o,c&&(o=1,r.m=f,r.d=u,r.n=p)}while(!o);return h==e.length?e:Pt(e,0,h)},Nt=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8},bi=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},_s=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[er,0];if(n==1){var a=new ce(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new Ye(f+1),m=Fs(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new ce(p),m]},Fs=function(t,e,r){return t.s==-1?Math.max(Fs(t.l,e,r+1),Fs(t.r,e,r+1)):e[t.s]=r},Io=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Ye(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},_i=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Os=function(t,e,r){var i=r.length,n=gn(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Mo=function(t,e,r,i,n,s,a,o,l,h,c){Nt(e,c++,r),++n[256];for(var u=_s(n,15),f=u[0],p=u[1],m=_s(s,15),g=m[0],d=m[1],y=Io(f),v=y[0],b=y[1],_=Io(g),x=_[0],T=_[1],S=new Ye(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=_s(S,7),E=M[0],I=M[1],P=19;P>4&&!E[mn[P-1]];--P);var A,k,F,O,D=h+5<<3,C=_i(n,zt)+_i(s,Wr)+a,$=_i(n,f)+_i(s,g)+a+14+3*P+_i(S,E)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Os(e,c,t.subarray(l,l+h));if(Nt(e,c,1+($<C)),c+=2,$<C){A=gt(f,p,0),k=f,F=gt(g,d,0),O=g;var R=gt(E,I,0);for(Nt(e,c,b-257),Nt(e,c+5,T-1),Nt(e,c+10,P-4),c+=14,w=0;w<P;++w)Nt(e,c+3*w,E[mn[w]]);c+=3*P;for(var G=[v,x],U=0;U<2;++U){var Z=G[U];for(w=0;w<Z.length;++w){var j=31&Z[w];Nt(e,c,R[j]),c+=E[j],j>15&&(Nt(e,c,Z[w]>>>5&127),c+=Z[w]>>>12)}}}else A=Pu,k=zt,F=Cu,O=Wr;for(w=0;w<o;++w)if(i[w]>255){j=i[w]>>>18&31,bi(e,c,A[j+257]),c+=k[j+257],j>7&&(Nt(e,c,i[w]>>>23&31),c+=Di[j]);var ee=31&i[w];bi(e,c,F[ee]),c+=O[ee],ee>3&&(bi(e,c,i[w]>>>5&8191),c+=Fi[ee])}else bi(e,c,A[i[w]]),c+=k[i[w]];return bi(e,c,A[256]),c+k[256]},Mu=new Mi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new ce(0),Du=function(t,e,r,i,n,s){var a=t.length,o=new ce(i+a+5*(1+Math.ceil(a/7e3))+n),l=o.subarray(i,o.length-n),h=0;if(!e||a<8)for(var c=0;c<=a;c+=65535){var u=c+65535;u>=a&&(l[h>>3]=s),h=Os(l,h+1,t.subarray(c,u))}else{for(var f=Mu[e-1],p=f>>>13,m=8191&f,g=(1<<r)-1,d=new Ye(32768),y=new Ye(g+1),v=Math.ceil(r/3),b=2*v,_=function(_e){return(t[_e]^t[_e+1]<<v^t[_e+2]<<b)&g},x=new Mi(25e3),T=new Ye(288),S=new Ye(32),w=0,M=0,E=(c=0,0),I=0,P=0;c<a;++c){var A=_(c),k=32767&c,F=y[A];if(d[k]=F,y[A]=k,I<=c){var O=a-c;if((w>7e3||E>24576)&&O>423){h=Mo(t,l,0,x,T,S,M,E,P,c-P,h),E=w=M=0,P=c;for(var D=0;D<286;++D)T[D]=0;for(D=0;D<30;++D)S[D]=0}var C=2,$=0,R=m,G=k-F&32767;if(O>2&&A==_(c-G))for(var U=Math.min(p,O)-1,Z=Math.min(32767,c),j=Math.min(258,O);G<=Z&&--R&&k!=F;){if(t[c+C]==t[c+C-G]){for(var ee=0;ee<j&&t[c+ee]==t[c+ee-G];++ee);if(ee>C){if(C=ee,$=G,ee>U)break;var ne=Math.min(G,ee-2),te=0;for(D=0;D<ne;++D){var K=c-G+D+32768&32767,be=K-d[K]+32768&32767;be>te&&(te=be,F=K)}}}G+=(k=F)-(F=d[k])+32768&32767}if($){x[E++]=268435456|Ms[C]<<18|Ds[$];var he=31&Ms[C],Ae=31&Ds[$];M+=Di[he]+Fi[Ae],++T[257+he],++S[Ae],I=c+C,++w}else x[E++]=t[c],++T[t[c]]}}h=Mo(t,l,s,x,T,S,M,E,P,c-P,h),!s&&7&h&&(h=Os(l,h+1,er))}return Pt(o,0,i+gn(h)+n)},Fu=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),Oi=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=Fu[255&r^e[i]]^r>>>8;t=r},d:function(){return~t}}},Zo=function(){var t=1,e=0;return{p:function(r){for(var i=t,n=e,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)n+=i+=r[a];i=(65535&i)+15*(i>>16),n=(65535&n)+15*(n>>16)}t=i,e=n},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},Yr=function(t,e,r,i,n){return Du(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},vn=function(t,e){var r={};for(var i in t)r[i]=t[i];for(var i in e)r[i]=e[i];return r},Hc=function(t,e,r){for(var i=t(),n=t.toString(),s=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<i.length;++a){var o=i[a],l=s[a];if(typeof o=="function"){e+=";"+l+"=";var h=o.toString();if(o.prototype)if(h.indexOf("[native code]")!=-1){var c=h.indexOf(" ",8)+1;e+=h.slice(c,h.indexOf("(",c))}else for(var u in e+=h,o.prototype)e+=";"+l+".prototype."+u+"="+o.prototype[u].toString();else e+=h}else r[l]=o}return[e,r]},ms=[],Km=function(t){var e=[];for(var r in t)t[r].buffer&&e.push((t[r]=new t[r].constructor(t[r])).buffer);return e},Ou=function(t,e,r,i){var n;if(!ms[r]){for(var s="",a={},o=t.length-1,l=0;l<o;++l)s=(n=Hc(t[l],s,a))[0],a=n[1];ms[r]=Hc(t[o],s,a)}var h=vn({},ms[r][1]);return Xm(ms[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,h,Km(h),i)},$i=function(){return[ce,Ye,Mi,Di,Fi,mn,Uo,Wo,Au,Tu,Pi,Iu,gt,vs,kt,bs,gn,Pt,X,yn,bn,yr,Yo]},Ri=function(){return[ce,Ye,Mi,Di,Fi,mn,Ms,Ds,Pu,zt,Cu,Wr,Pi,Mu,er,gt,Nt,bi,_s,Fs,Io,_i,Os,Mo,gn,Pt,Du,Yr,Vs,yr]},$u=function(){return[Jo,Ko,ye,Oi,Fu]},Ru=function(){return[Xo,Vu]},Lu=function(){return[Qo,ye,Zo]},Bu=function(){return[Nu]},yr=function(t){return postMessage(t,[t.buffer])},Yo=function(t){return t&&t.size&&new ce(t.size)},Li=function(t,e,r,i,n,s){var a=Ou(r,i,n,function(o,l){a.terminate(),s(o,l)});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},At=function(t){return t.ondata=function(e,r){return postMessage([e,r],[e.buffer])},function(e){return t.push(e.data[0],e.data[1])}},Bi=function(t,e,r,i,n){var s,a=Ou(t,i,n,function(o,l){o?(a.terminate(),e.ondata.call(e,o)):(l[1]&&a.terminate(),e.ondata.call(e,o,l[0],l[1]))});a.postMessage(r),e.push=function(o,l){e.ondata||X(5),s&&e.ondata(X(4,0,1),null,!!l),a.postMessage([o,s=l],[o.buffer])},e.terminate=function(){a.terminate()}},tt=function(t,e){return t[e]|t[e+1]<<8},Ie=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},So=function(t,e){return Ie(t,e)+4294967296*Ie(t,e+4)},ye=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},Jo=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&ye(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},Xo=function(t){t[0]==31&&t[1]==139&&t[2]==8||X(6,"invalid gzip data");var e=t[3],r=10;4&e&&(r+=t[10]|2+(t[11]<<8));for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!t[r++]);return r+(2&e)},Vu=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},Ko=function(t){return 10+(t.filename&&t.filename.length+1||0)},Qo=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},Nu=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&X(6,"invalid zlib data"),32&t[1]&&X(6,"invalid zlib data: preset dictionaries not supported")};function el(t,e){return e||typeof t!="function"||(e=t,t={}),this.ondata=e,t}var tr=function(){function t(e,r){r||typeof e!="function"||(r=e,e={}),this.ondata=r,this.o=e||{}}return t.prototype.p=function(e,r){this.ondata(Yr(e,this.o,0,0,!r),r)},t.prototype.push=function(e,r){this.ondata||X(5),this.d&&X(4),this.d=r,this.p(e,r||!1)},t}(),Qm=function(){return function(t,e){Bi([Ri,function(){return[At,tr]}],this,el.call(this,t,e),function(r){var i=new tr(r.data);onmessage=At(i)},6)}}();function eg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[Ri],function(i){return yr(Vs(i.data[0],i.data[1]))},0,r)}function Vs(t,e){return Yr(t,e||{},0,0)}var yt=function(){function t(e){this.s={},this.p=new ce(0),this.ondata=e}return t.prototype.e=function(e){this.ondata||X(5),this.d&&X(4);var r=this.p.length,i=new ce(r+e.length);i.set(this.p),i.set(e,r),this.p=i},t.prototype.c=function(e){this.d=this.s.i=e||!1;var r=this.s.b,i=yn(this.p,this.o,this.s);this.ondata(Pt(i,r,this.s.b),this.d),this.o=Pt(i,this.s.b-32768),this.s.b=this.o.length,this.p=Pt(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(e,r){this.e(e),this.c(r)},t}(),zu=function(){return function(t){this.ondata=t,Bi([$i,function(){return[At,yt]}],this,0,function(){var e=new yt;onmessage=At(e)},7)}}();function ju(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[$i],function(i){return yr(bn(i.data[0],Yo(i.data[1])))},1,r)}function bn(t,e){return yn(t,e)}var Gc=function(){function t(e,r){this.c=Oi(),this.l=0,this.v=1,tr.call(this,e,r)}return t.prototype.push=function(e,r){tr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e),this.l+=e.length;var i=Yr(e,this.o,this.v&&Ko(this.o),r&&8,!r);this.v&&(Jo(i,this.o),this.v=0),r&&(ye(i,i.length-8,this.c.d()),ye(i,i.length-4,this.l)),this.ondata(i,r)},t}(),ub=function(){return function(t,e){Bi([Ri,$u,function(){return[At,tr,Gc]}],this,el.call(this,t,e),function(r){var i=new Gc(r.data);onmessage=At(i)},8)}}();function pb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[Ri,$u,function(){return[qc]}],function(i){return yr(qc(i.data[0],i.data[1]))},2,r)}function qc(t,e){e||(e={});var r=Oi(),i=t.length;r.p(t);var n=Yr(t,e,Ko(e),8),s=n.length;return Jo(n,e),ye(n,s-8,r.d()),ye(n,s-4,i),n}var Do=function(){function t(e){this.v=1,yt.call(this,e)}return t.prototype.push=function(e,r){if(yt.prototype.e.call(this,e),this.v){var i=this.p.length>3?Xo(this.p):4;if(i>=this.p.length&&!r)return;this.p=this.p.subarray(i),this.v=0}r&&(this.p.length<8&&X(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),yt.prototype.c.call(this,r)},t}(),tg=function(){return function(t){this.ondata=t,Bi([$i,Ru,function(){return[At,yt,Do]}],this,0,function(){var e=new Do;onmessage=At(e)},9)}}();function rg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[$i,Ru,function(){return[Fo]}],function(i){return yr(Fo(i.data[0]))},3,r)}function Fo(t,e){return yn(t.subarray(Xo(t),-8),e||new ce(Vu(t)))}var Uc=function(){function t(e,r){this.c=Zo(),this.v=1,tr.call(this,e,r)}return t.prototype.push=function(e,r){tr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e);var i=Yr(e,this.o,this.v&&2,r&&4,!r);this.v&&(Qo(i,this.o),this.v=0),r&&ye(i,i.length-4,this.c.d()),this.ondata(i,r)},t}(),db=function(){return function(t,e){Bi([Ri,Lu,function(){return[At,tr,Uc]}],this,el.call(this,t,e),function(r){var i=new Uc(r.data);onmessage=At(i)},10)}}();function fb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[Ri,Lu,function(){return[Wc]}],function(i){return yr(Wc(i.data[0],i.data[1]))},4,r)}function Wc(t,e){e||(e={});var r=Zo();r.p(t);var i=Yr(t,e,2,4);return Qo(i,e),ye(i,i.length-4,r.d()),i}var Oo=function(){function t(e){this.v=1,yt.call(this,e)}return t.prototype.push=function(e,r){if(yt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!r)return;this.p=this.p.subarray(2),this.v=0}r&&(this.p.length<4&&X(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),yt.prototype.c.call(this,r)},t}(),ig=function(){return function(t){this.ondata=t,Bi([$i,Bu,function(){return[At,yt,Oo]}],this,0,function(){var e=new Oo;onmessage=At(e)},11)}}();function ng(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[$i,Bu,function(){return[$o]}],function(i){return yr($o(i.data[0],Yo(i.data[1])))},5,r)}function $o(t,e){return yn((Nu(t),t.subarray(2,-4)),e)}var sg=function(){function t(e){this.G=Do,this.I=yt,this.Z=Oo,this.ondata=e}return t.prototype.push=function(e,r){if(this.ondata||X(5),this.s)this.s.push(e,r);else{if(this.p&&this.p.length){var i=new ce(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var n=this,s=function(){n.ondata.apply(n,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(s):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(s):new this.Z(s),this.s.push(this.p,r),this.p=null}}},t}(),mb=function(){function t(e){this.G=tg,this.I=zu,this.Z=ig,this.ondata=e}return t.prototype.push=function(e,r){sg.prototype.push.call(this,e,r)},t}();function gb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),t[0]==31&&t[1]==139&&t[2]==8?rg(t,e,r):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?ju(t,e,r):ng(t,e,r)}function yb(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Fo(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?bn(t,e):$o(t,e)}var tl=function(t,e,r,i){for(var n in t){var s=t[n],a=e+n,o=i;Array.isArray(s)&&(o=vn(i,s[1]),s=s[0]),s instanceof ce?r[a]=[s,o]:(r[a+="/"]=[new ce(0),o],tl(s,a,r,i))}},Zc=typeof TextEncoder<"u"&&new TextEncoder,Ro=typeof TextDecoder<"u"&&new TextDecoder,Hu=0;try{Ro.decode(er,{stream:!0}),Hu=1}catch(t){}var Gu=function(t){for(var e="",r=0;;){var i=t[r++],n=(i>127)+(i>223)+(i>239);if(r+n>t.length)return[e,Pt(t,r-1)];n?n==3?(i=((15&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,e+=String.fromCharCode(55296|i>>10,56320|1023&i)):e+=1&n?String.fromCharCode((31&i)<<6|63&t[r++]):String.fromCharCode((15&i)<<12|(63&t[r++])<<6|63&t[r++]):e+=String.fromCharCode(i)}},vb=function(){function t(e){this.ondata=e,Hu?this.t=new TextDecoder:this.p=er}return t.prototype.push=function(e,r){if(this.ondata||X(5),r=!!r,this.t)return this.ondata(this.t.decode(e,{stream:!0}),r),void(r&&(this.t.decode().length&&X(8),this.t=null));this.p||X(4);var i=new ce(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length);var n=Gu(i),s=n[0],a=n[1];r?(a.length&&X(8),this.p=null):this.p=a,this.ondata(s,r)},t}(),bb=function(){function t(e){this.ondata=e}return t.prototype.push=function(e,r){this.ondata||X(5),this.d&&X(4),this.ondata(Zr(e),this.d=r||!1)},t}();function Zr(t,e){if(e){for(var r=new ce(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}if(Zc)return Zc.encode(t);var n=t.length,s=new ce(t.length+(t.length>>1)),a=0,o=function(c){s[a++]=c};for(i=0;i<n;++i){if(a+5>s.length){var l=new ce(a+8+(n-i<<1));l.set(s),s=l}var h=t.charCodeAt(i);h<128||e?o(h):h<2048?(o(192|h>>6),o(128|63&h)):h>55295&&h<57344?(o(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++i))>>18),o(128|h>>12&63),o(128|h>>6&63),o(128|63&h)):(o(224|h>>12),o(128|h>>6&63),o(128|63&h))}return Pt(s,0,a)}function cn(t,e){if(e){for(var r="",i=0;i<t.length;i+=16384)r+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return r}if(Ro)return Ro.decode(t);var n=Gu(t),s=n[0];return n[1].length&&X(8),s}var qu=function(t){return t==1?3:t<6?2:t==9?1:0},Uu=function(t,e){return e+30+tt(t,e+26)+tt(t,e+28)},Wu=function(t,e,r){var i=tt(t,e+28),n=cn(t.subarray(e+46,e+46+i),!(2048&tt(t,e+8))),s=e+46+i,a=Ie(t,e+20),o=r&&a==4294967295?Zu(t,s):[a,Ie(t,e+24),Ie(t,e+42)],l=o[0],h=o[1],c=o[2];return[tt(t,e+10),l,h,n,s+tt(t,e+30)+tt(t,e+32),c]},Zu=function(t,e){for(;tt(t,e)!=1;e+=4+tt(t,e+2));return[So(t,e+12),So(t,e+4),So(t,e+20)]},gr=function(t){var e=0;if(t)for(var r in t){var i=t[r].length;i>65535&&X(9),e+=i+4}return e},Ai=function(t,e,r,i,n,s,a,o){var l=i.length,h=r.extra,c=o&&o.length,u=gr(h);ye(t,e,a!=null?33639248:67324752),e+=4,a!=null&&(t[e++]=20,t[e++]=r.os),t[e]=20,e+=2,t[e++]=r.flag<<1|(s<0&&8),t[e++]=n&&8,t[e++]=255&r.compression,t[e++]=r.compression>>8;var f=new Date(r.mtime==null?Date.now():r.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&X(10),ye(t,e,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),e+=4,s!=-1&&(ye(t,e,r.crc),ye(t,e+4,s<0?-s-2:s),ye(t,e+8,r.size)),ye(t,e+12,l),ye(t,e+14,u),e+=16,a!=null&&(ye(t,e,c),ye(t,e+6,r.attrs),ye(t,e+10,a),e+=14),t.set(i,e),e+=l,u)for(var m in h){var g=h[m],d=g.length;ye(t,e,+m),ye(t,e+2,d),t.set(g,e+4),e+=4+d}return c&&(t.set(o,e),e+=c),e},rl=function(t,e,r,i,n){ye(t,e,101010256),ye(t,e+8,r),ye(t,e+10,r),ye(t,e+12,i),ye(t,e+16,n)},$s=function(){function t(e){this.filename=e,this.c=Oi(),this.size=0,this.compression=0}return t.prototype.process=function(e,r){this.ondata(null,e,r)},t.prototype.push=function(e,r){this.ondata||X(5),this.c.p(e),this.size+=e.length,r&&(this.crc=this.c.d()),this.process(e,r||!1)},t}(),_b=function(){function t(e,r){var i=this;r||(r={}),$s.call(this,e),this.d=new tr(r,function(n,s){i.ondata(null,n,s)}),this.compression=8,this.flag=qu(r.level)}return t.prototype.process=function(e,r){try{this.d.push(e,r)}catch(i){this.ondata(i,null,r)}},t.prototype.push=function(e,r){$s.prototype.push.call(this,e,r)},t}(),wb=function(){function t(e,r){var i=this;r||(r={}),$s.call(this,e),this.d=new Qm(r,function(n,s,a){i.ondata(n,s,a)}),this.compression=8,this.flag=qu(r.level),this.terminate=this.d.terminate}return t.prototype.process=function(e,r){this.d.push(e,r)},t.prototype.push=function(e,r){$s.prototype.push.call(this,e,r)},t}(),xb=function(){function t(e){this.ondata=e,this.u=[],this.d=1}return t.prototype.add=function(e){var r=this;if(this.ondata||X(5),2&this.d)this.ondata(X(4+8*(1&this.d),0,1),null,!1);else{var i=Zr(e.filename),n=i.length,s=e.comment,a=s&&Zr(s),o=n!=e.filename.length||a&&s.length!=a.length,l=n+gr(e.extra)+30;n>65535&&this.ondata(X(11,0,1),null,!1);var h=new ce(l);Ai(h,0,e,i,o,-1);var c=[h],u=function(){for(var d=0,y=c;d<y.length;d++){var v=y[d];r.ondata(null,v,!1)}c=[]},f=this.d;this.d=0;var p=this.u.length,m=vn(e,{f:i,u:o,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),f){var d=r.u[p+1];d?d.r():r.d=1}f=1}}),g=0;e.ondata=function(d,y,v){if(d)r.ondata(d,y,v),r.terminate();else if(g+=y.length,c.push(y),v){var b=new ce(16);ye(b,0,134695760),ye(b,4,e.crc),ye(b,8,g),ye(b,12,e.size),c.push(b),m.c=g,m.b=l+g+16,m.crc=e.crc,m.size=e.size,f&&m.r(),f=1}else f&&u()},this.u.push(m)}},t.prototype.end=function(){var e=this;2&this.d?this.ondata(X(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var e=0,r=0,i=0,n=0,s=this.u;n<s.length;n++)i+=46+(h=s[n]).f.length+gr(h.extra)+(h.o?h.o.length:0);for(var a=new ce(i+22),o=0,l=this.u;o<l.length;o++){var h=l[o];Ai(a,e,h,h.f,h.u,-h.c-2,r,h.o),e+=46+h.f.length+gr(h.extra)+(h.o?h.o.length:0),r+=h.b}rl(a,e,this.u.length,i,r),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var e=0,r=this.u;e<r.length;e++)r[e].t();this.d=2},t}();function Sb(t,e,r){r||(r=e,e={}),typeof r!="function"&&X(7);var i={};tl(t,"",i,e);var n=Object.keys(i),s=n.length,a=0,o=0,l=s,h=new Array(s),c=[],u=function(){for(var d=0;d<c.length;++d)c[d]()},f=function(d,y){Rs(function(){r(d,y)})};Rs(function(){f=r});var p=function(){var d=new ce(o+22),y=a,v=o-a;o=0;for(var b=0;b<l;++b){var _=h[b];try{var x=_.c.length;Ai(d,o,_,_.f,_.u,x);var T=30+_.f.length+gr(_.extra),S=o+T;d.set(_.c,S),Ai(d,a,_,_.f,_.u,x,o,_.m),a+=16+T+(_.m?_.m.length:0),o=S+x}catch(w){return f(w,null)}}rl(d,a,h.length,v,y),f(null,d)};s||p();for(var m=function(d){var y=n[d],v=i[y],b=v[0],_=v[1],x=Oi(),T=b.length;x.p(b);var S=Zr(y),w=S.length,M=_.comment,E=M&&Zr(M),I=E&&E.length,P=gr(_.extra),A=_.level==0?0:8,k=function(F,O){if(F)u(),f(F,null);else{var D=O.length;h[d]=vn(_,{size:T,crc:x.d(),c:O,f:S,m:E,u:w!=y.length||E&&M.length!=I,compression:A}),a+=30+w+P+D,o+=76+2*(w+P)+(I||0)+D,--s||p()}};if(w>65535&&k(X(11,0,1),null),A)if(T<16e4)try{k(null,Vs(b,_))}catch(F){k(F,null)}else c.push(eg(b,_,k));else k(null,b)},g=0;g<l;++g)m(g);return u}function Eb(t,e){e||(e={});var r={},i=[];tl(t,"",r,e);var n=0,s=0;for(var a in r){var o=r[a],l=o[0],h=o[1],c=h.level==0?0:8,u=(S=Zr(a)).length,f=h.comment,p=f&&Zr(f),m=p&&p.length,g=gr(h.extra);u>65535&&X(11);var d=c?Vs(l,h):l,y=d.length,v=Oi();v.p(l),i.push(vn(h,{size:l.length,crc:v.d(),c:d,f:S,m:p,u:u!=a.length||p&&f.length!=m,o:n,compression:c})),n+=30+u+g+y,s+=76+2*(u+g)+(m||0)+y}for(var b=new ce(s+22),_=n,x=s-n,T=0;T<i.length;++T){var S=i[T];Ai(b,S.o,S,S.f,S.u,S.c.length);var w=30+S.f.length+gr(S.extra);b.set(S.c,S.o+w),Ai(b,n,S,S.f,S.u,S.c.length,S.o,S.m),n+=16+w+(S.m?S.m.length:0)}return rl(b,n,i.length,x,_),b}var ag=function(){function t(){}return t.prototype.push=function(e,r){this.ondata(null,e,r)},t.compression=0,t}(),kb=function(){function t(){var e=this;this.i=new yt(function(r,i){e.ondata(null,r,i)})}return t.prototype.push=function(e,r){try{this.i.push(e,r)}catch(i){this.ondata(i,null,r)}},t.compression=8,t}(),Pb=function(){function t(e,r){var i=this;r<32e4?this.i=new yt(function(n,s){i.ondata(null,n,s)}):(this.i=new zu(function(n,s,a){i.ondata(n,s,a)}),this.terminate=this.i.terminate)}return t.prototype.push=function(e,r){this.i.terminate&&(e=Pt(e,0)),this.i.push(e,r)},t.compression=8,t}(),Ab=function(){function t(e){this.onfile=e,this.k=[],this.o={0:ag},this.p=er}return t.prototype.push=function(e,r){var i=this;if(this.onfile||X(5),this.p||X(4),this.c>0){var n=Math.min(this.c,e.length),s=e.subarray(0,n);if(this.c-=n,this.d?this.d.push(s,!this.c):this.k[0].push(s),(e=e.subarray(n)).length)return this.push(e,r)}else{var a=0,o=0,l=void 0,h=void 0;this.p.length?e.length?((h=new ce(this.p.length+e.length)).set(this.p),h.set(e,this.p.length)):h=this.p:h=e;for(var c=h.length,u=this.c,f=u&&this.d,p=function(){var d,y=Ie(h,o);if(y==67324752){a=1,l=o,m.d=null,m.c=0;var v=tt(h,o+6),b=tt(h,o+8),_=2048&v,x=8&v,T=tt(h,o+26),S=tt(h,o+28);if(c>o+30+T+S){var w=[];m.k.unshift(w),a=2;var M,E=Ie(h,o+18),I=Ie(h,o+22),P=cn(h.subarray(o+30,o+=30+T),!_);E==4294967295?(d=x?[-2]:Zu(h,o),E=d[0],I=d[1]):x&&(E=-1),o+=S,m.c=E;var A={name:P,compression:b,start:function(){if(A.ondata||X(5),E){var k=i.o[b];k||A.ondata(X(14,"unknown compression type "+b,1),null,!1),(M=E<0?new k(P):new k(P,E,I)).ondata=function(C,$,R){A.ondata(C,$,R)};for(var F=0,O=w;F<O.length;F++){var D=O[F];M.push(D,!1)}i.k[0]==w&&i.c?i.d=M:M.push(er,!0)}else A.ondata(null,er,!0)},terminate:function(){M&&M.terminate&&M.terminate()}};E>=0&&(A.size=E,A.originalSize=I),m.onfile(A)}return"break"}if(u){if(y==134695760)return l=o+=12+(u==-2&&8),a=3,m.c=0,"break";if(y==33639248)return l=o-=4,a=3,m.c=0,"break"}},m=this;o<c-4&&p()!=="break";++o);if(this.p=er,u<0){var g=a?h.subarray(0,l-12-(u==-2&&8)-(Ie(h,l-16)==134695760&&4)):h.subarray(0,o);f?f.push(g,!!a):this.k[+(a==2)].push(g)}if(2&a)return this.push(h.subarray(o),r);this.p=h.subarray(o)}r&&(this.c&&X(13),this.p=null)},t.prototype.register=function(e){this.o[e.compression]=e},t}(),Rs=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function og(t,e,r){r||(r=e,e={}),typeof r!="function"&&X(7);var i=[],n=function(){for(var d=0;d<i.length;++d)i[d]()},s={},a=function(d,y){Rs(function(){r(d,y)})};Rs(function(){a=r});for(var o=t.length-22;Ie(t,o)!=101010256;--o)if(!o||t.length-o>65558)return a(X(13,0,1),null),n;var l=tt(t,o+8);if(l){var h=l,c=Ie(t,o+16),u=c==4294967295||h==65535;if(u){var f=Ie(t,o-12);(u=Ie(t,f)==101075792)&&(h=l=Ie(t,f+32),c=Ie(t,f+48))}for(var p=e&&e.filter,m=function(d){var y=Wu(t,c,u),v=y[0],b=y[1],_=y[2],x=y[3],T=y[4],S=y[5],w=Uu(t,S);c=T;var M=function(I,P){I?(n(),a(I,null)):(P&&(s[x]=P),--l||a(null,s))};if(!p||p({name:x,size:b,originalSize:_,compression:v}))if(v)if(v==8){var E=t.subarray(w,w+b);if(b<32e4)try{M(null,bn(E,new ce(_)))}catch(I){M(I,null)}else i.push(ju(E,{size:_},M))}else M(X(14,"unknown compression type "+v,1),null);else M(null,Pt(t,w,w+b));else M(null,null)},g=0;g<h;++g)m()}else a(null,{});return n}function Cb(t,e){for(var r={},i=t.length-22;Ie(t,i)!=101010256;--i)(!i||t.length-i>65558)&&X(13);var n=tt(t,i+8);if(!n)return{};var s=Ie(t,i+16),a=s==4294967295||n==65535;if(a){var o=Ie(t,i-12);(a=Ie(t,o)==101075792)&&(n=Ie(t,o+32),s=Ie(t,o+48))}for(var l=e&&e.filter,h=0;h<n;++h){var c=Wu(t,s,a),u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],d=c[5],y=Uu(t,d);s=g,l&&!l({name:m,size:f,originalSize:p,compression:u})||(u?u==8?r[m]=bn(t.subarray(y,y+f),new ce(p)):X(14,"unknown compression type "+u):r[m]=Pt(t,y,y+f))}return r}var lg="@dotlottie/player-component",hg="1.4.2",cg="dotlottie animation player web component.",ug="dist/dotlottie-player.js",pg="dist/dotlottie-player.esm.js",dg="dist/dotlottie-player.esm.d.ts",fg="https://dotlottie.com/players",mg="https://github.com/dotlottie/player-component.git",gg="https://github.com/dotlottie/player-component/issues",yg="Jawish Hameed <jawish@lottiefiles.com>",vg="MIT",bg={build:"yarn build-dotlottie",buildtsup:"tsup","build-with-coverage":"CODE_COVERAGE=true yarn build-dotlottie","build-dotlottie":"yarn cleanup && rollup -c","build:types":"tsc --declaration",dev:"yarn cleanup && rollup -c --watch",lint:"eslint","lint:fix":"eslint --fix",cleanup:"shx rm -rf dist && shx mkdir dist",serve:"node ./cypress/pages/server.js -p 8000 &","start-cypress":"npx cypress run && npx nyc report --reporter=text-summary","run-tests":"yarn build-with-coverage && yarn serve && yarn start-cypress","postrun-tests":"kill $(lsof -t -i:8000)"},_g={"@rollup/plugin-json":"^6.0.0",fflate:"^0.7.3",lit:"^2.4.1","lottie-web":"^5.10.0",tsup:"^6.1.3"},wg={"@babel/core":"^7.11.0","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-decorators":"^7.10.5","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@changesets/cli":"^2.24.4","@cypress/code-coverage":"^3.9.12","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-babel":"^5.1.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-node-resolve":"^8.4.0","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","babel-plugin-istanbul":"^6.1.1",changesets:"^1.0.2",cypress:"^9.4.1",eslint:"^6.6.0","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.1",fastify:"^3.27.1","fastify-static":"^4.5.0",lerna:"^4.0.0","parcel-bundler":"^1.12.4",prettier:"1.18.2",rollup:"^2.23.0","rollup-plugin-alias":"^2.2.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-filesize":"^9.0.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-serve":"^1.0.3","rollup-plugin-terser":"^6.1.0","rollup-plugin-typescript2":"^0.27.1","rollup-plugin-visualizer":"^4.0.4",shx:"^0.3.3","source-map-support":"^0.5.21","ts-node":"^10.5.0",typescript:"^3.7.5"},xg=["dist"],Sg=["dotlottie","animation","web component","component","lit-element","player"],Eg=["> 3%"],kg={access:"public"},Pg={extends:"@istanbuljs/nyc-config-typescript",all:!0},Yc={name:lg,version:hg,description:cg,main:ug,module:pg,types:dg,homepage:fg,repository:mg,bugs:gg,author:yg,license:vg,scripts:bg,dependencies:_g,devDependencies:wg,files:xg,keywords:Sg,browserslist:Eg,publishConfig:kg,nyc:Pg},at=t=>new Error("[dotLottie-player-component] ".concat(t)),Jc=t=>{let e="[dotLottie-player-component] ".concat(t);console.error(e)},Eo=t=>{let e="[dotLottie-player-component] ".concat(t);console.warn(e)},Xc,Kc,Qc,eu,tu,xe,Xt,Ne;(function(t){t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error"})(xe||(xe={})),function(t){t.Normal="normal",t.Bounce="bounce"}(Xt||(Xt={})),function(t){t.Load="load",t.Error="error",t.Ready="ready",t.Play="play",t.Pause="pause",t.Stop="stop",t.Freeze="freeze",t.Loop="loop",t.Complete="complete",t.Rendered="rendered",t.Frame="frame"}(Ne||(Ne={}));var ru="dotlottie-player",ze=class t extends Gr{constructor(){super(),this.mode=Xt.Normal,this.autoplay=!1,this.background="transparent",this.controls=!1,this.direction=1,this.hover=!1,this.renderer="svg",this.speed=1,this.currentState=xe.Loading,this.intermission=1,this.activeAnimationId=null,this._counter=1,this._activeAnimationIndex=0,this._manifest={animations:[]}}static get properties(){return{mode:{type:String},autoplay:{type:Boolean},background:{type:String},controls:{type:Boolean},direction:{type:Number},hover:{type:Boolean},loop:{type:String},renderer:{type:String},speed:{type:Number},src:{type:String},currentState:{type:String},seeker:{type:Object},intermission:{type:Number},activeAnimationId:{type:String}}}_parseLoop(e){let r=parseInt(e,10);return Number.isInteger(r)&&r>0?(this._count=r,this._loop=!0,!0):typeof e=="string"&&["true","false"].includes(e)?(this._loop=e==="true",this._loop):(Eo("loop must be a positive integer or a boolean"),!1)}_onVisibilityChange(){document.hidden&&this.currentState===xe.Playing?this.freeze():this.currentState===xe.Frozen&&this.play()}_handleSeekChange(e){if(!this._lottie||isNaN(e.target.value))return;let r=e.target.value/100*this._lottie.totalFrames;this.seek(r)}isLottie(e){let r=!1;return e.animations&&e.animations.length?(e.animations.forEach(i=>{this.isLottie(i)||(r=!0)}),r):["v","ip","op","layers","fr","w","h"].every(i=>Object.prototype.hasOwnProperty.call(e,i))}parseSrc(e){if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return new URL(e,window.location.href).toString()}}async _fetchDotLottie(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"arraybuffer"}}).then(r=>r.arrayBuffer()).then(async r=>{let i=[],n={animations:[],manifest:void 0},s=await new Promise((o,l)=>{og(new Uint8Array(r),(h,c)=>{h&&l(h),o(c)})}),a;if(s["manifest.json"]){let o=cn(s["manifest.json"]),l=JSON.parse(o);if(!("animations"in l))throw at("Manifest not found");if(l.animations.length===0)throw at("No animations listed in the manifest");n.manifest=l;for(let h of l.animations)a=JSON.parse(cn(s["animations/".concat(h.id,".json")])),"assets"in a&&a.assets.map(c=>{if(!c.p||!s["images/".concat(c.p)])return;let u=btoa(cn(s["images/".concat(c.p)],!0));c.p="data:;base64,"+u,c.e=1}),i.push(a);return n.manifest=l,n.animations=i,n}throw at("No manifest found in file.")}).catch(r=>{throw at(r)})}async _fetchJsonFile(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"json"}}).then(r=>r.json()).then(r=>{let i=[],n={animations:[{id:e.substring(e.lastIndexOf("/")+1,e.lastIndexOf(".")),speed:1,loop:"true",direction:1}],description:"",author:"",generator:"dotLottie-player-component",revision:1,version:"1.0.0"},s={animations:[],manifest:void 0};return i.push(r),s.animations=i,s.manifest=n,s}).catch(r=>{throw at(r)})}async _fetchFileAndLoad(e){var r;let i={animations:[],manifest:void 0};if(i=((r=e.split(/[#?]/)[0].split(".").pop())===null||r===void 0?void 0:r.toLowerCase())==="json"?await this._fetchJsonFile(e):await this._fetchDotLottie(e),!i.animations||!i.manifest||i.animations.length===0)throw this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),at(i.animations&&i.animations.length?"Manifest not found":"Animations are empty");if(this._animations=i.animations,this._manifest=i.manifest,this.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Eo("Active animation not found in manifest")}else if(this._manifest&&this._manifest.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this._manifest.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Eo("Active animation not found in manifest")}let n=this._animations[this._activeAnimationIndex];if(n===void 0)throw at("No animation to load!");return n}_loadManifestOptions(e){if(this._requireAnimationsInTheManifest(),this._manifest.animations[e]===void 0)throw at("Animation not found in manifest");let{autoplay:r,direction:i,loop:n,playMode:s,speed:a,hover:o,intermission:l}=this._manifest.animations[e];r!==void 0&&(this.autoplay=r),i!==void 0&&(this.direction=i),n!==void 0&&(this.loop=n),s!==void 0&&(this.mode=s),a!==void 0&&(this.speed=a),o!==void 0&&(this.hover=o),l!==void 0&&(this.intermission=l)}_initListeners(){this.dispatchEvent(new CustomEvent(Ne.Load)),this._lottie.addEventListener("enterFrame",()=>{this.seeker=this._lottie.currentFrame/this._lottie.totalFrames*100,this.dispatchEvent(new CustomEvent(Ne.Frame,{detail:{frame:this._lottie.currentFrame,seeker:this.seeker}}))}),this._lottie.addEventListener("complete",()=>{if(this.currentState===xe.Playing){if((!this._loop||this._count&&this._counter>=this._count)&&(this.dispatchEvent(new CustomEvent(Ne.Complete)),this.mode!==Xt.Bounce||this._lottie.currentFrame===0))return;this.mode===Xt.Bounce?(this._count&&(this._counter+=.5),setTimeout(()=>{this.dispatchEvent(new CustomEvent(Ne.Loop)),this.currentState===xe.Playing&&(this._lottie.setDirection(-1*this._lottie.playDirection),this._lottie.play())},this.intermission)):(this._count&&(this._counter+=1),window.setTimeout(()=>{this.dispatchEvent(new CustomEvent(Ne.Loop)),this.currentState===xe.Playing&&(this.direction===-1?(this.seek("99%"),this.play()):(this._lottie.stop(),this.play()))},this.intermission))}else this.dispatchEvent(new CustomEvent(Ne.Complete))}),this._lottie.addEventListener("DOMLoaded",()=>{this.dispatchEvent(new CustomEvent(Ne.Ready))}),this._lottie.addEventListener("data_ready",()=>{this.dispatchEvent(new CustomEvent(Ne.Load))}),this._lottie.addEventListener("data_failed",()=>{this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==xe.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===xe.Playing&&this.stop()})}async load(e,r,i){if(!this.shadowRoot)return;let n={container:this.container,loop:!1,autoplay:!1,renderer:this.renderer,rendererSettings:r||{scaleMode:"noScale",clearCanvas:!1,progressiveLoad:!0,hideOnTransparent:!0}};try{let s=this.parseSrc(e),a=null;if(typeof s=="string")a=await this._fetchFileAndLoad(s);else if(typeof s=="object"&&!this.isLottie(s))throw at("Load method failing. Object is not a valid Lottie.");if(this._lottie&&this._lottie.destroy(),i!==void 0)for(let[o,l]of Object.entries(i))o==="playMode"?this.mode=l==="normal"?Xt.Normal:Xt.Bounce:l!==void 0&&(this[o]=l);else if(this._activeAnimationIndex===0||this._manifest.animations[this._activeAnimationIndex].id===this.activeAnimationId||this._manifest.animations[this._activeAnimationIndex].id===this._manifest.activeAnimationId){let o=this._manifest.animations[this._activeAnimationIndex],l=Object.keys(t.properties),h=Array.from(this.getAttributeNames());for(let u of h){let f=this.getAttribute(u);f&&(this[u]=f)}let c=l.filter(u=>!h.includes(u.toLowerCase())&&this._manifest.animations[this._activeAnimationIndex].hasOwnProperty(u));for(let u of c){let f=o[u];f!==void 0&&(u==="playMode"?this.mode=f==="normal"?Xt.Normal:Xt.Bounce:this[u]=f)}}else this._loadManifestOptions(this._activeAnimationIndex);this._lottie=Ym.loadAnimation(Object.assign(Object.assign({},n),{animationData:a!==null?a:s}))}catch(s){return this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),void console.error(s)}if(!this._lottie)throw this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),at("Player failed to initialize.");this._initListeners(),this.setSpeed(this.speed),this.setDirection(this.direction),this.autoplay&&(this.direction===-1&&this.seek("99%"),this.play())}getActiveId(){return this._manifest.animations?this._manifest.animations[this._activeAnimationIndex].id:null}getActiveAnimationIndex(){return this._activeAnimationIndex}animationCount(){return this._animations?this._animations.length:0}getManifest(){return this._manifest}getLottie(){return this._lottie}getVersions(){return{lottieWebVersion:"".concat(Yc.dependencies["lottie-web"]),dotLottiePlayerVersion:"".concat(Yc.version)}}_requireAnimationsInTheManifest(){if(!this._manifest.animations.length)throw at("No animations found in manifest.")}_requireAnimationsToBeLoaded(){var e;if(!(!((e=this._animations)===null||e===void 0)&&e.length))throw at("No animations have been loaded.")}previous(e){this._activeAnimationIndex=(this._activeAnimationIndex-1+this._manifest.animations.length)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}next(e){this._activeAnimationIndex=(this._activeAnimationIndex+1)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}reset(){this._manifest&&this._manifest.activeAnimationId?this.play(this._manifest.activeAnimationId):this.activeAnimationId?this.play(this.activeAnimationId):this.play(0)}_validateAnimationIndex(e){if(isNaN(e)||e<0||e>=this._manifest.animations.length)throw at("Animation index ".concat(e," is out of bounds."))}play(e,r){if(this._lottie){if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),e===void 0)return this._lottie.play(),this.currentState=xe.Playing,void this.dispatchEvent(new CustomEvent(Ne.Play));if(this._requireAnimationsToBeLoaded(),this._requireAnimationsInTheManifest(),e!==void 0){if(!this._animations)throw at("No animations have been loaded.");if(this._requireAnimationsInTheManifest(),typeof e=="string"){let i=this._manifest.animations.findIndex(n=>n.id===e);i!==-1?(this._activeAnimationIndex=i,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):Jc("No animation with the id '".concat(e,"' was found."))}else typeof e=="number"&&(this._validateAnimationIndex(e),this._manifest.animations&&this._manifest.animations[e]?(this._activeAnimationIndex=e,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):Jc("Animation not found at index: ".concat(e)))}}}pause(){this._lottie&&(this._lottie.pause(),this.currentState=xe.Paused,this.dispatchEvent(new CustomEvent(Ne.Pause)))}stop(){this._lottie&&(this._counter=0,this._lottie.stop(),this.direction===-1&&this._lottie.goToAndStop(this._lottie.totalFrames,!0),this.currentState=xe.Stopped,this.dispatchEvent(new CustomEvent(Ne.Stop)))}seek(e){if(!this._lottie)return;typeof e=="number"&&(e=Math.round(e));let r=/^(\d+)(%?)$/.exec(e.toString());if(!r)return;let i=r[2]==="%"?this._lottie.totalFrames*Number(r[1])/100:Number(r[1]);this.seeker=i,this.currentState===xe.Playing?this._lottie.goToAndPlay(i,!0):(this._lottie.goToAndStop(i,!0),this._lottie.pause())}snapshot(){let e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];if(!this.shadowRoot)return;let r=this.shadowRoot.querySelector(".animation svg"),i=new XMLSerializer().serializeToString(r);if(e){let n=document.createElement("a");n.href="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i),n.download="download_"+this.seeker+".svg",document.body.appendChild(n),n.click(),document.body.removeChild(n)}return i}freeze(){this._lottie&&(this._lottie.pause(),this.currentState=xe.Frozen,this.dispatchEvent(new CustomEvent(Ne.Freeze)))}setSpeed(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._lottie&&this._lottie.setSpeed(e)}setDirection(e){this._lottie&&this._lottie.setDirection(e)}setLooping(e){this._lottie&&(this._lottie.loop=this._parseLoop(e))}isLooping(){return!!this._loop&&this._loop}togglePlay(){return this.currentState===xe.Playing?this.pause():this.play()}toggleLooping(){let e=!this._loop;this.setLooping(e.toString())}static get styles(){return Jm}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(e=>{e[0].isIntersecting?this.currentState===xe.Frozen&&this.play():this.currentState===xe.Playing&&this.freeze()}),this._io.observe(this.container)),document.hidden!==void 0&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange()),this.loop?this._parseLoop(this.loop):this.hasAttribute("loop")&&this._parseLoop("true"),this.src&&await this.load(this.src),this.dispatchEvent(new CustomEvent(Ne.Rendered))}disconnectedCallback(){this._io&&(this._io.disconnect(),this._io=void 0),this._lottie&&this._lottie.destroy(),document.removeEventListener("visibilitychange",()=>this._onVisibilityChange())}renderControls(){let e=this.currentState===xe.Playing,r=this.currentState===xe.Paused,i=this.currentState===xe.Stopped;return fs(Xc||(Xc=vi([`
195
+ `]))),jc={},Xm=function(t,e,r,i,n){var s=new Worker(jc[e]||(jc[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var o=a.data,l=o.$e$;if(l){var h=new Error(l[0]);h.code=l[1],h.stack=l[2],n(h,null)}else n(null,o)},s.postMessage(r,i),s},ce=Uint8Array,Ye=Uint16Array,Mi=Uint32Array,Di=new ce([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fi=new ce([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),mn=new ce([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Eu=function(t,e){for(var r=new Ye(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Mi(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},ku=Eu(Di,2),Uo=ku[0],Ms=ku[1];Uo[28]=258,Ms[258]=28;for(xo=Eu(Fi,0),Wo=xo[0],Ds=xo[1],Pi=new Ye(32768),ge=0;ge<32768;++ge)Jt=(43690&ge)>>>1|(21845&ge)<<1,Jt=(52428&Jt)>>>2|(13107&Jt)<<2,Jt=(61680&Jt)>>>4|(3855&Jt)<<4,Pi[ge]=((65280&Jt)>>>8|(255&Jt)<<8)>>>1;var Jt,xo,Wo,Ds,Pi,ge;for(gt=function(e,r,i){for(var n=e.length,s=0,a=new Ye(r);s<n;++s)e[s]&&++a[e[s]-1];var o,l=new Ye(r);for(s=0;s<r;++s)l[s]=l[s-1]+a[s-1]<<1;if(i){o=new Ye(1<<r);var h=15-r;for(s=0;s<n;++s)if(e[s])for(var c=s<<4|e[s],u=r-e[s],f=l[e[s]-1]++<<u,p=f|(1<<u)-1;f<=p;++f)o[Pi[f]>>>h]=c}else for(o=new Ye(n),s=0;s<n;++s)e[s]&&(o[s]=Pi[l[e[s]-1]++]>>>15-e[s]);return o},zt=new ce(288),ge=0;ge<144;++ge)zt[ge]=8;var gt,zt,ge;for(ge=144;ge<256;++ge)zt[ge]=9;var ge;for(ge=256;ge<280;++ge)zt[ge]=7;var ge;for(ge=280;ge<288;++ge)zt[ge]=8;var ge;for(Wr=new ce(32),ge=0;ge<32;++ge)Wr[ge]=5;var Wr,ge,Pu=gt(zt,9,0),Au=gt(zt,9,1),Cu=gt(Wr,5,0),Tu=gt(Wr,5,1),vs=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},kt=function(t,e,r){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&r},bs=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},gn=function(t){return(t+7)/8|0},Pt=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t.BYTES_PER_ELEMENT==2?Ye:t.BYTES_PER_ELEMENT==4?Mi:ce)(r-e);return i.set(t.subarray(e,r)),i},cb={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Iu=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],X=function(t,e,r){var i=new Error(e||Iu[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,X),!r)throw i;return i},yn=function(t,e,r){var i=t.length;if(!i||r&&r.f&&!r.l)return e||new ce(0);var n=!e||r,s=!r||r.i;r||(r={}),e||(e=new ce(3*i));var a=function(ne){var te=e.length;if(ne>te){var K=new ce(Math.max(2*te,ne));K.set(e),e=K}},o=r.f||0,l=r.p||0,h=r.b||0,c=r.l,u=r.d,f=r.m,p=r.n,m=8*i;do{if(!c){o=kt(t,l,1);var g=kt(t,l+1,3);if(l+=3,!g){var d=t[(I=gn(l)+4)-4]|t[I-3]<<8,y=I+d;if(y>i){s&&X(0);break}n&&a(h+d),e.set(t.subarray(I,y),h),r.b=h+=d,r.p=l=8*y,r.f=o;continue}if(g==1)c=Au,u=Tu,f=9,p=5;else if(g==2){var v=kt(t,l,31)+257,b=kt(t,l+10,15)+4,_=v+kt(t,l+5,31)+1;l+=14;for(var x=new ce(_),T=new ce(19),S=0;S<b;++S)T[mn[S]]=kt(t,l+3*S,7);l+=3*b;var w=vs(T),M=(1<<w)-1,E=gt(T,w,1);for(S=0;S<_;){var I,P=E[kt(t,l,M)];if(l+=15&P,(I=P>>>4)<16)x[S++]=I;else{var A=0,k=0;for(I==16?(k=3+kt(t,l,3),l+=2,A=x[S-1]):I==17?(k=3+kt(t,l,7),l+=3):I==18&&(k=11+kt(t,l,127),l+=7);k--;)x[S++]=A}}var F=x.subarray(0,v),O=x.subarray(v);f=vs(F),p=vs(O),c=gt(F,f,1),u=gt(O,p,1)}else X(1);if(l>m){s&&X(0);break}}n&&a(h+131072);for(var D=(1<<f)-1,C=(1<<p)-1,$=l;;$=l){var R=(A=c[bs(t,l)&D])>>>4;if((l+=15&A)>m){s&&X(0);break}if(A||X(2),R<256)e[h++]=R;else{if(R==256){$=l,c=null;break}var G=R-254;if(R>264){var U=Di[S=R-257];G=kt(t,l,(1<<U)-1)+Uo[S],l+=U}var Z=u[bs(t,l)&C],j=Z>>>4;if(Z||X(3),l+=15&Z,O=Wo[j],j>3&&(U=Fi[j],O+=bs(t,l)&(1<<U)-1,l+=U),l>m){s&&X(0);break}n&&a(h+131072);for(var ee=h+G;h<ee;h+=4)e[h]=e[h-O],e[h+1]=e[h+1-O],e[h+2]=e[h+2-O],e[h+3]=e[h+3-O];h=ee}}r.l=c,r.p=$,r.b=h,r.f=o,c&&(o=1,r.m=f,r.d=u,r.n=p)}while(!o);return h==e.length?e:Pt(e,0,h)},Nt=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8},bi=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},_s=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[er,0];if(n==1){var a=new ce(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new Ye(f+1),m=Fs(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new ce(p),m]},Fs=function(t,e,r){return t.s==-1?Math.max(Fs(t.l,e,r+1),Fs(t.r,e,r+1)):e[t.s]=r},Io=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Ye(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},_i=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Os=function(t,e,r){var i=r.length,n=gn(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Mo=function(t,e,r,i,n,s,a,o,l,h,c){Nt(e,c++,r),++n[256];for(var u=_s(n,15),f=u[0],p=u[1],m=_s(s,15),g=m[0],d=m[1],y=Io(f),v=y[0],b=y[1],_=Io(g),x=_[0],T=_[1],S=new Ye(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=_s(S,7),E=M[0],I=M[1],P=19;P>4&&!E[mn[P-1]];--P);var A,k,F,O,D=h+5<<3,C=_i(n,zt)+_i(s,Wr)+a,$=_i(n,f)+_i(s,g)+a+14+3*P+_i(S,E)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Os(e,c,t.subarray(l,l+h));if(Nt(e,c,1+($<C)),c+=2,$<C){A=gt(f,p,0),k=f,F=gt(g,d,0),O=g;var R=gt(E,I,0);for(Nt(e,c,b-257),Nt(e,c+5,T-1),Nt(e,c+10,P-4),c+=14,w=0;w<P;++w)Nt(e,c+3*w,E[mn[w]]);c+=3*P;for(var G=[v,x],U=0;U<2;++U){var Z=G[U];for(w=0;w<Z.length;++w){var j=31&Z[w];Nt(e,c,R[j]),c+=E[j],j>15&&(Nt(e,c,Z[w]>>>5&127),c+=Z[w]>>>12)}}}else A=Pu,k=zt,F=Cu,O=Wr;for(w=0;w<o;++w)if(i[w]>255){j=i[w]>>>18&31,bi(e,c,A[j+257]),c+=k[j+257],j>7&&(Nt(e,c,i[w]>>>23&31),c+=Di[j]);var ee=31&i[w];bi(e,c,F[ee]),c+=O[ee],ee>3&&(bi(e,c,i[w]>>>5&8191),c+=Fi[ee])}else bi(e,c,A[i[w]]),c+=k[i[w]];return bi(e,c,A[256]),c+k[256]},Mu=new Mi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new ce(0),Du=function(t,e,r,i,n,s){var a=t.length,o=new ce(i+a+5*(1+Math.ceil(a/7e3))+n),l=o.subarray(i,o.length-n),h=0;if(!e||a<8)for(var c=0;c<=a;c+=65535){var u=c+65535;u>=a&&(l[h>>3]=s),h=Os(l,h+1,t.subarray(c,u))}else{for(var f=Mu[e-1],p=f>>>13,m=8191&f,g=(1<<r)-1,d=new Ye(32768),y=new Ye(g+1),v=Math.ceil(r/3),b=2*v,_=function(_e){return(t[_e]^t[_e+1]<<v^t[_e+2]<<b)&g},x=new Mi(25e3),T=new Ye(288),S=new Ye(32),w=0,M=0,E=(c=0,0),I=0,P=0;c<a;++c){var A=_(c),k=32767&c,F=y[A];if(d[k]=F,y[A]=k,I<=c){var O=a-c;if((w>7e3||E>24576)&&O>423){h=Mo(t,l,0,x,T,S,M,E,P,c-P,h),E=w=M=0,P=c;for(var D=0;D<286;++D)T[D]=0;for(D=0;D<30;++D)S[D]=0}var C=2,$=0,R=m,G=k-F&32767;if(O>2&&A==_(c-G))for(var U=Math.min(p,O)-1,Z=Math.min(32767,c),j=Math.min(258,O);G<=Z&&--R&&k!=F;){if(t[c+C]==t[c+C-G]){for(var ee=0;ee<j&&t[c+ee]==t[c+ee-G];++ee);if(ee>C){if(C=ee,$=G,ee>U)break;var ne=Math.min(G,ee-2),te=0;for(D=0;D<ne;++D){var K=c-G+D+32768&32767,be=K-d[K]+32768&32767;be>te&&(te=be,F=K)}}}G+=(k=F)-(F=d[k])+32768&32767}if($){x[E++]=268435456|Ms[C]<<18|Ds[$];var he=31&Ms[C],Ae=31&Ds[$];M+=Di[he]+Fi[Ae],++T[257+he],++S[Ae],I=c+C,++w}else x[E++]=t[c],++T[t[c]]}}h=Mo(t,l,s,x,T,S,M,E,P,c-P,h),!s&&7&h&&(h=Os(l,h+1,er))}return Pt(o,0,i+gn(h)+n)},Fu=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),Oi=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=Fu[255&r^e[i]]^r>>>8;t=r},d:function(){return~t}}},Zo=function(){var t=1,e=0;return{p:function(r){for(var i=t,n=e,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)n+=i+=r[a];i=(65535&i)+15*(i>>16),n=(65535&n)+15*(n>>16)}t=i,e=n},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},Yr=function(t,e,r,i,n){return Du(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},vn=function(t,e){var r={};for(var i in t)r[i]=t[i];for(var i in e)r[i]=e[i];return r},Hc=function(t,e,r){for(var i=t(),n=t.toString(),s=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<i.length;++a){var o=i[a],l=s[a];if(typeof o=="function"){e+=";"+l+"=";var h=o.toString();if(o.prototype)if(h.indexOf("[native code]")!=-1){var c=h.indexOf(" ",8)+1;e+=h.slice(c,h.indexOf("(",c))}else for(var u in e+=h,o.prototype)e+=";"+l+".prototype."+u+"="+o.prototype[u].toString();else e+=h}else r[l]=o}return[e,r]},ms=[],Km=function(t){var e=[];for(var r in t)t[r].buffer&&e.push((t[r]=new t[r].constructor(t[r])).buffer);return e},Ou=function(t,e,r,i){var n;if(!ms[r]){for(var s="",a={},o=t.length-1,l=0;l<o;++l)s=(n=Hc(t[l],s,a))[0],a=n[1];ms[r]=Hc(t[o],s,a)}var h=vn({},ms[r][1]);return Xm(ms[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,h,Km(h),i)},$i=function(){return[ce,Ye,Mi,Di,Fi,mn,Uo,Wo,Au,Tu,Pi,Iu,gt,vs,kt,bs,gn,Pt,X,yn,bn,yr,Yo]},Ri=function(){return[ce,Ye,Mi,Di,Fi,mn,Ms,Ds,Pu,zt,Cu,Wr,Pi,Mu,er,gt,Nt,bi,_s,Fs,Io,_i,Os,Mo,gn,Pt,Du,Yr,Vs,yr]},$u=function(){return[Jo,Ko,ve,Oi,Fu]},Ru=function(){return[Xo,Vu]},Lu=function(){return[Qo,ve,Zo]},Bu=function(){return[Nu]},yr=function(t){return postMessage(t,[t.buffer])},Yo=function(t){return t&&t.size&&new ce(t.size)},Li=function(t,e,r,i,n,s){var a=Ou(r,i,n,function(o,l){a.terminate(),s(o,l)});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},At=function(t){return t.ondata=function(e,r){return postMessage([e,r],[e.buffer])},function(e){return t.push(e.data[0],e.data[1])}},Bi=function(t,e,r,i,n){var s,a=Ou(t,i,n,function(o,l){o?(a.terminate(),e.ondata.call(e,o)):(l[1]&&a.terminate(),e.ondata.call(e,o,l[0],l[1]))});a.postMessage(r),e.push=function(o,l){e.ondata||X(5),s&&e.ondata(X(4,0,1),null,!!l),a.postMessage([o,s=l],[o.buffer])},e.terminate=function(){a.terminate()}},tt=function(t,e){return t[e]|t[e+1]<<8},Ie=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},So=function(t,e){return Ie(t,e)+4294967296*Ie(t,e+4)},ve=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},Jo=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&ve(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},Xo=function(t){t[0]==31&&t[1]==139&&t[2]==8||X(6,"invalid gzip data");var e=t[3],r=10;4&e&&(r+=t[10]|2+(t[11]<<8));for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!t[r++]);return r+(2&e)},Vu=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},Ko=function(t){return 10+(t.filename&&t.filename.length+1||0)},Qo=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},Nu=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&X(6,"invalid zlib data"),32&t[1]&&X(6,"invalid zlib data: preset dictionaries not supported")};function el(t,e){return e||typeof t!="function"||(e=t,t={}),this.ondata=e,t}var tr=function(){function t(e,r){r||typeof e!="function"||(r=e,e={}),this.ondata=r,this.o=e||{}}return t.prototype.p=function(e,r){this.ondata(Yr(e,this.o,0,0,!r),r)},t.prototype.push=function(e,r){this.ondata||X(5),this.d&&X(4),this.d=r,this.p(e,r||!1)},t}(),Qm=function(){return function(t,e){Bi([Ri,function(){return[At,tr]}],this,el.call(this,t,e),function(r){var i=new tr(r.data);onmessage=At(i)},6)}}();function eg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[Ri],function(i){return yr(Vs(i.data[0],i.data[1]))},0,r)}function Vs(t,e){return Yr(t,e||{},0,0)}var yt=function(){function t(e){this.s={},this.p=new ce(0),this.ondata=e}return t.prototype.e=function(e){this.ondata||X(5),this.d&&X(4);var r=this.p.length,i=new ce(r+e.length);i.set(this.p),i.set(e,r),this.p=i},t.prototype.c=function(e){this.d=this.s.i=e||!1;var r=this.s.b,i=yn(this.p,this.o,this.s);this.ondata(Pt(i,r,this.s.b),this.d),this.o=Pt(i,this.s.b-32768),this.s.b=this.o.length,this.p=Pt(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(e,r){this.e(e),this.c(r)},t}(),zu=function(){return function(t){this.ondata=t,Bi([$i,function(){return[At,yt]}],this,0,function(){var e=new yt;onmessage=At(e)},7)}}();function ju(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[$i],function(i){return yr(bn(i.data[0],Yo(i.data[1])))},1,r)}function bn(t,e){return yn(t,e)}var Gc=function(){function t(e,r){this.c=Oi(),this.l=0,this.v=1,tr.call(this,e,r)}return t.prototype.push=function(e,r){tr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e),this.l+=e.length;var i=Yr(e,this.o,this.v&&Ko(this.o),r&&8,!r);this.v&&(Jo(i,this.o),this.v=0),r&&(ve(i,i.length-8,this.c.d()),ve(i,i.length-4,this.l)),this.ondata(i,r)},t}(),ub=function(){return function(t,e){Bi([Ri,$u,function(){return[At,tr,Gc]}],this,el.call(this,t,e),function(r){var i=new Gc(r.data);onmessage=At(i)},8)}}();function pb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[Ri,$u,function(){return[qc]}],function(i){return yr(qc(i.data[0],i.data[1]))},2,r)}function qc(t,e){e||(e={});var r=Oi(),i=t.length;r.p(t);var n=Yr(t,e,Ko(e),8),s=n.length;return Jo(n,e),ve(n,s-8,r.d()),ve(n,s-4,i),n}var Do=function(){function t(e){this.v=1,yt.call(this,e)}return t.prototype.push=function(e,r){if(yt.prototype.e.call(this,e),this.v){var i=this.p.length>3?Xo(this.p):4;if(i>=this.p.length&&!r)return;this.p=this.p.subarray(i),this.v=0}r&&(this.p.length<8&&X(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),yt.prototype.c.call(this,r)},t}(),tg=function(){return function(t){this.ondata=t,Bi([$i,Ru,function(){return[At,yt,Do]}],this,0,function(){var e=new Do;onmessage=At(e)},9)}}();function rg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[$i,Ru,function(){return[Fo]}],function(i){return yr(Fo(i.data[0]))},3,r)}function Fo(t,e){return yn(t.subarray(Xo(t),-8),e||new ce(Vu(t)))}var Uc=function(){function t(e,r){this.c=Zo(),this.v=1,tr.call(this,e,r)}return t.prototype.push=function(e,r){tr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e);var i=Yr(e,this.o,this.v&&2,r&&4,!r);this.v&&(Qo(i,this.o),this.v=0),r&&ve(i,i.length-4,this.c.d()),this.ondata(i,r)},t}(),db=function(){return function(t,e){Bi([Ri,Lu,function(){return[At,tr,Uc]}],this,el.call(this,t,e),function(r){var i=new Uc(r.data);onmessage=At(i)},10)}}();function fb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[Ri,Lu,function(){return[Wc]}],function(i){return yr(Wc(i.data[0],i.data[1]))},4,r)}function Wc(t,e){e||(e={});var r=Zo();r.p(t);var i=Yr(t,e,2,4);return Qo(i,e),ve(i,i.length-4,r.d()),i}var Oo=function(){function t(e){this.v=1,yt.call(this,e)}return t.prototype.push=function(e,r){if(yt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!r)return;this.p=this.p.subarray(2),this.v=0}r&&(this.p.length<4&&X(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),yt.prototype.c.call(this,r)},t}(),ig=function(){return function(t){this.ondata=t,Bi([$i,Bu,function(){return[At,yt,Oo]}],this,0,function(){var e=new Oo;onmessage=At(e)},11)}}();function ng(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),Li(t,e,[$i,Bu,function(){return[$o]}],function(i){return yr($o(i.data[0],Yo(i.data[1])))},5,r)}function $o(t,e){return yn((Nu(t),t.subarray(2,-4)),e)}var sg=function(){function t(e){this.G=Do,this.I=yt,this.Z=Oo,this.ondata=e}return t.prototype.push=function(e,r){if(this.ondata||X(5),this.s)this.s.push(e,r);else{if(this.p&&this.p.length){var i=new ce(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var n=this,s=function(){n.ondata.apply(n,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(s):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(s):new this.Z(s),this.s.push(this.p,r),this.p=null}}},t}(),mb=function(){function t(e){this.G=tg,this.I=zu,this.Z=ig,this.ondata=e}return t.prototype.push=function(e,r){sg.prototype.push.call(this,e,r)},t}();function gb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&X(7),t[0]==31&&t[1]==139&&t[2]==8?rg(t,e,r):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?ju(t,e,r):ng(t,e,r)}function yb(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Fo(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?bn(t,e):$o(t,e)}var tl=function(t,e,r,i){for(var n in t){var s=t[n],a=e+n,o=i;Array.isArray(s)&&(o=vn(i,s[1]),s=s[0]),s instanceof ce?r[a]=[s,o]:(r[a+="/"]=[new ce(0),o],tl(s,a,r,i))}},Zc=typeof TextEncoder<"u"&&new TextEncoder,Ro=typeof TextDecoder<"u"&&new TextDecoder,Hu=0;try{Ro.decode(er,{stream:!0}),Hu=1}catch(t){}var Gu=function(t){for(var e="",r=0;;){var i=t[r++],n=(i>127)+(i>223)+(i>239);if(r+n>t.length)return[e,Pt(t,r-1)];n?n==3?(i=((15&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,e+=String.fromCharCode(55296|i>>10,56320|1023&i)):e+=1&n?String.fromCharCode((31&i)<<6|63&t[r++]):String.fromCharCode((15&i)<<12|(63&t[r++])<<6|63&t[r++]):e+=String.fromCharCode(i)}},vb=function(){function t(e){this.ondata=e,Hu?this.t=new TextDecoder:this.p=er}return t.prototype.push=function(e,r){if(this.ondata||X(5),r=!!r,this.t)return this.ondata(this.t.decode(e,{stream:!0}),r),void(r&&(this.t.decode().length&&X(8),this.t=null));this.p||X(4);var i=new ce(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length);var n=Gu(i),s=n[0],a=n[1];r?(a.length&&X(8),this.p=null):this.p=a,this.ondata(s,r)},t}(),bb=function(){function t(e){this.ondata=e}return t.prototype.push=function(e,r){this.ondata||X(5),this.d&&X(4),this.ondata(Zr(e),this.d=r||!1)},t}();function Zr(t,e){if(e){for(var r=new ce(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}if(Zc)return Zc.encode(t);var n=t.length,s=new ce(t.length+(t.length>>1)),a=0,o=function(c){s[a++]=c};for(i=0;i<n;++i){if(a+5>s.length){var l=new ce(a+8+(n-i<<1));l.set(s),s=l}var h=t.charCodeAt(i);h<128||e?o(h):h<2048?(o(192|h>>6),o(128|63&h)):h>55295&&h<57344?(o(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++i))>>18),o(128|h>>12&63),o(128|h>>6&63),o(128|63&h)):(o(224|h>>12),o(128|h>>6&63),o(128|63&h))}return Pt(s,0,a)}function cn(t,e){if(e){for(var r="",i=0;i<t.length;i+=16384)r+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return r}if(Ro)return Ro.decode(t);var n=Gu(t),s=n[0];return n[1].length&&X(8),s}var qu=function(t){return t==1?3:t<6?2:t==9?1:0},Uu=function(t,e){return e+30+tt(t,e+26)+tt(t,e+28)},Wu=function(t,e,r){var i=tt(t,e+28),n=cn(t.subarray(e+46,e+46+i),!(2048&tt(t,e+8))),s=e+46+i,a=Ie(t,e+20),o=r&&a==4294967295?Zu(t,s):[a,Ie(t,e+24),Ie(t,e+42)],l=o[0],h=o[1],c=o[2];return[tt(t,e+10),l,h,n,s+tt(t,e+30)+tt(t,e+32),c]},Zu=function(t,e){for(;tt(t,e)!=1;e+=4+tt(t,e+2));return[So(t,e+12),So(t,e+4),So(t,e+20)]},gr=function(t){var e=0;if(t)for(var r in t){var i=t[r].length;i>65535&&X(9),e+=i+4}return e},Ai=function(t,e,r,i,n,s,a,o){var l=i.length,h=r.extra,c=o&&o.length,u=gr(h);ve(t,e,a!=null?33639248:67324752),e+=4,a!=null&&(t[e++]=20,t[e++]=r.os),t[e]=20,e+=2,t[e++]=r.flag<<1|(s<0&&8),t[e++]=n&&8,t[e++]=255&r.compression,t[e++]=r.compression>>8;var f=new Date(r.mtime==null?Date.now():r.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&X(10),ve(t,e,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),e+=4,s!=-1&&(ve(t,e,r.crc),ve(t,e+4,s<0?-s-2:s),ve(t,e+8,r.size)),ve(t,e+12,l),ve(t,e+14,u),e+=16,a!=null&&(ve(t,e,c),ve(t,e+6,r.attrs),ve(t,e+10,a),e+=14),t.set(i,e),e+=l,u)for(var m in h){var g=h[m],d=g.length;ve(t,e,+m),ve(t,e+2,d),t.set(g,e+4),e+=4+d}return c&&(t.set(o,e),e+=c),e},rl=function(t,e,r,i,n){ve(t,e,101010256),ve(t,e+8,r),ve(t,e+10,r),ve(t,e+12,i),ve(t,e+16,n)},$s=function(){function t(e){this.filename=e,this.c=Oi(),this.size=0,this.compression=0}return t.prototype.process=function(e,r){this.ondata(null,e,r)},t.prototype.push=function(e,r){this.ondata||X(5),this.c.p(e),this.size+=e.length,r&&(this.crc=this.c.d()),this.process(e,r||!1)},t}(),_b=function(){function t(e,r){var i=this;r||(r={}),$s.call(this,e),this.d=new tr(r,function(n,s){i.ondata(null,n,s)}),this.compression=8,this.flag=qu(r.level)}return t.prototype.process=function(e,r){try{this.d.push(e,r)}catch(i){this.ondata(i,null,r)}},t.prototype.push=function(e,r){$s.prototype.push.call(this,e,r)},t}(),wb=function(){function t(e,r){var i=this;r||(r={}),$s.call(this,e),this.d=new Qm(r,function(n,s,a){i.ondata(n,s,a)}),this.compression=8,this.flag=qu(r.level),this.terminate=this.d.terminate}return t.prototype.process=function(e,r){this.d.push(e,r)},t.prototype.push=function(e,r){$s.prototype.push.call(this,e,r)},t}(),xb=function(){function t(e){this.ondata=e,this.u=[],this.d=1}return t.prototype.add=function(e){var r=this;if(this.ondata||X(5),2&this.d)this.ondata(X(4+8*(1&this.d),0,1),null,!1);else{var i=Zr(e.filename),n=i.length,s=e.comment,a=s&&Zr(s),o=n!=e.filename.length||a&&s.length!=a.length,l=n+gr(e.extra)+30;n>65535&&this.ondata(X(11,0,1),null,!1);var h=new ce(l);Ai(h,0,e,i,o,-1);var c=[h],u=function(){for(var d=0,y=c;d<y.length;d++){var v=y[d];r.ondata(null,v,!1)}c=[]},f=this.d;this.d=0;var p=this.u.length,m=vn(e,{f:i,u:o,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),f){var d=r.u[p+1];d?d.r():r.d=1}f=1}}),g=0;e.ondata=function(d,y,v){if(d)r.ondata(d,y,v),r.terminate();else if(g+=y.length,c.push(y),v){var b=new ce(16);ve(b,0,134695760),ve(b,4,e.crc),ve(b,8,g),ve(b,12,e.size),c.push(b),m.c=g,m.b=l+g+16,m.crc=e.crc,m.size=e.size,f&&m.r(),f=1}else f&&u()},this.u.push(m)}},t.prototype.end=function(){var e=this;2&this.d?this.ondata(X(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var e=0,r=0,i=0,n=0,s=this.u;n<s.length;n++)i+=46+(h=s[n]).f.length+gr(h.extra)+(h.o?h.o.length:0);for(var a=new ce(i+22),o=0,l=this.u;o<l.length;o++){var h=l[o];Ai(a,e,h,h.f,h.u,-h.c-2,r,h.o),e+=46+h.f.length+gr(h.extra)+(h.o?h.o.length:0),r+=h.b}rl(a,e,this.u.length,i,r),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var e=0,r=this.u;e<r.length;e++)r[e].t();this.d=2},t}();function Sb(t,e,r){r||(r=e,e={}),typeof r!="function"&&X(7);var i={};tl(t,"",i,e);var n=Object.keys(i),s=n.length,a=0,o=0,l=s,h=new Array(s),c=[],u=function(){for(var d=0;d<c.length;++d)c[d]()},f=function(d,y){Rs(function(){r(d,y)})};Rs(function(){f=r});var p=function(){var d=new ce(o+22),y=a,v=o-a;o=0;for(var b=0;b<l;++b){var _=h[b];try{var x=_.c.length;Ai(d,o,_,_.f,_.u,x);var T=30+_.f.length+gr(_.extra),S=o+T;d.set(_.c,S),Ai(d,a,_,_.f,_.u,x,o,_.m),a+=16+T+(_.m?_.m.length:0),o=S+x}catch(w){return f(w,null)}}rl(d,a,h.length,v,y),f(null,d)};s||p();for(var m=function(d){var y=n[d],v=i[y],b=v[0],_=v[1],x=Oi(),T=b.length;x.p(b);var S=Zr(y),w=S.length,M=_.comment,E=M&&Zr(M),I=E&&E.length,P=gr(_.extra),A=_.level==0?0:8,k=function(F,O){if(F)u(),f(F,null);else{var D=O.length;h[d]=vn(_,{size:T,crc:x.d(),c:O,f:S,m:E,u:w!=y.length||E&&M.length!=I,compression:A}),a+=30+w+P+D,o+=76+2*(w+P)+(I||0)+D,--s||p()}};if(w>65535&&k(X(11,0,1),null),A)if(T<16e4)try{k(null,Vs(b,_))}catch(F){k(F,null)}else c.push(eg(b,_,k));else k(null,b)},g=0;g<l;++g)m(g);return u}function Eb(t,e){e||(e={});var r={},i=[];tl(t,"",r,e);var n=0,s=0;for(var a in r){var o=r[a],l=o[0],h=o[1],c=h.level==0?0:8,u=(S=Zr(a)).length,f=h.comment,p=f&&Zr(f),m=p&&p.length,g=gr(h.extra);u>65535&&X(11);var d=c?Vs(l,h):l,y=d.length,v=Oi();v.p(l),i.push(vn(h,{size:l.length,crc:v.d(),c:d,f:S,m:p,u:u!=a.length||p&&f.length!=m,o:n,compression:c})),n+=30+u+g+y,s+=76+2*(u+g)+(m||0)+y}for(var b=new ce(s+22),_=n,x=s-n,T=0;T<i.length;++T){var S=i[T];Ai(b,S.o,S,S.f,S.u,S.c.length);var w=30+S.f.length+gr(S.extra);b.set(S.c,S.o+w),Ai(b,n,S,S.f,S.u,S.c.length,S.o,S.m),n+=16+w+(S.m?S.m.length:0)}return rl(b,n,i.length,x,_),b}var ag=function(){function t(){}return t.prototype.push=function(e,r){this.ondata(null,e,r)},t.compression=0,t}(),kb=function(){function t(){var e=this;this.i=new yt(function(r,i){e.ondata(null,r,i)})}return t.prototype.push=function(e,r){try{this.i.push(e,r)}catch(i){this.ondata(i,null,r)}},t.compression=8,t}(),Pb=function(){function t(e,r){var i=this;r<32e4?this.i=new yt(function(n,s){i.ondata(null,n,s)}):(this.i=new zu(function(n,s,a){i.ondata(n,s,a)}),this.terminate=this.i.terminate)}return t.prototype.push=function(e,r){this.i.terminate&&(e=Pt(e,0)),this.i.push(e,r)},t.compression=8,t}(),Ab=function(){function t(e){this.onfile=e,this.k=[],this.o={0:ag},this.p=er}return t.prototype.push=function(e,r){var i=this;if(this.onfile||X(5),this.p||X(4),this.c>0){var n=Math.min(this.c,e.length),s=e.subarray(0,n);if(this.c-=n,this.d?this.d.push(s,!this.c):this.k[0].push(s),(e=e.subarray(n)).length)return this.push(e,r)}else{var a=0,o=0,l=void 0,h=void 0;this.p.length?e.length?((h=new ce(this.p.length+e.length)).set(this.p),h.set(e,this.p.length)):h=this.p:h=e;for(var c=h.length,u=this.c,f=u&&this.d,p=function(){var d,y=Ie(h,o);if(y==67324752){a=1,l=o,m.d=null,m.c=0;var v=tt(h,o+6),b=tt(h,o+8),_=2048&v,x=8&v,T=tt(h,o+26),S=tt(h,o+28);if(c>o+30+T+S){var w=[];m.k.unshift(w),a=2;var M,E=Ie(h,o+18),I=Ie(h,o+22),P=cn(h.subarray(o+30,o+=30+T),!_);E==4294967295?(d=x?[-2]:Zu(h,o),E=d[0],I=d[1]):x&&(E=-1),o+=S,m.c=E;var A={name:P,compression:b,start:function(){if(A.ondata||X(5),E){var k=i.o[b];k||A.ondata(X(14,"unknown compression type "+b,1),null,!1),(M=E<0?new k(P):new k(P,E,I)).ondata=function(C,$,R){A.ondata(C,$,R)};for(var F=0,O=w;F<O.length;F++){var D=O[F];M.push(D,!1)}i.k[0]==w&&i.c?i.d=M:M.push(er,!0)}else A.ondata(null,er,!0)},terminate:function(){M&&M.terminate&&M.terminate()}};E>=0&&(A.size=E,A.originalSize=I),m.onfile(A)}return"break"}if(u){if(y==134695760)return l=o+=12+(u==-2&&8),a=3,m.c=0,"break";if(y==33639248)return l=o-=4,a=3,m.c=0,"break"}},m=this;o<c-4&&p()!=="break";++o);if(this.p=er,u<0){var g=a?h.subarray(0,l-12-(u==-2&&8)-(Ie(h,l-16)==134695760&&4)):h.subarray(0,o);f?f.push(g,!!a):this.k[+(a==2)].push(g)}if(2&a)return this.push(h.subarray(o),r);this.p=h.subarray(o)}r&&(this.c&&X(13),this.p=null)},t.prototype.register=function(e){this.o[e.compression]=e},t}(),Rs=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function og(t,e,r){r||(r=e,e={}),typeof r!="function"&&X(7);var i=[],n=function(){for(var d=0;d<i.length;++d)i[d]()},s={},a=function(d,y){Rs(function(){r(d,y)})};Rs(function(){a=r});for(var o=t.length-22;Ie(t,o)!=101010256;--o)if(!o||t.length-o>65558)return a(X(13,0,1),null),n;var l=tt(t,o+8);if(l){var h=l,c=Ie(t,o+16),u=c==4294967295||h==65535;if(u){var f=Ie(t,o-12);(u=Ie(t,f)==101075792)&&(h=l=Ie(t,f+32),c=Ie(t,f+48))}for(var p=e&&e.filter,m=function(d){var y=Wu(t,c,u),v=y[0],b=y[1],_=y[2],x=y[3],T=y[4],S=y[5],w=Uu(t,S);c=T;var M=function(I,P){I?(n(),a(I,null)):(P&&(s[x]=P),--l||a(null,s))};if(!p||p({name:x,size:b,originalSize:_,compression:v}))if(v)if(v==8){var E=t.subarray(w,w+b);if(b<32e4)try{M(null,bn(E,new ce(_)))}catch(I){M(I,null)}else i.push(ju(E,{size:_},M))}else M(X(14,"unknown compression type "+v,1),null);else M(null,Pt(t,w,w+b));else M(null,null)},g=0;g<h;++g)m()}else a(null,{});return n}function Cb(t,e){for(var r={},i=t.length-22;Ie(t,i)!=101010256;--i)(!i||t.length-i>65558)&&X(13);var n=tt(t,i+8);if(!n)return{};var s=Ie(t,i+16),a=s==4294967295||n==65535;if(a){var o=Ie(t,i-12);(a=Ie(t,o)==101075792)&&(n=Ie(t,o+32),s=Ie(t,o+48))}for(var l=e&&e.filter,h=0;h<n;++h){var c=Wu(t,s,a),u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],d=c[5],y=Uu(t,d);s=g,l&&!l({name:m,size:f,originalSize:p,compression:u})||(u?u==8?r[m]=bn(t.subarray(y,y+f),new ce(p)):X(14,"unknown compression type "+u):r[m]=Pt(t,y,y+f))}return r}var lg="@dotlottie/player-component",hg="1.4.2",cg="dotlottie animation player web component.",ug="dist/dotlottie-player.js",pg="dist/dotlottie-player.esm.js",dg="dist/dotlottie-player.esm.d.ts",fg="https://dotlottie.com/players",mg="https://github.com/dotlottie/player-component.git",gg="https://github.com/dotlottie/player-component/issues",yg="Jawish Hameed <jawish@lottiefiles.com>",vg="MIT",bg={build:"yarn build-dotlottie",buildtsup:"tsup","build-with-coverage":"CODE_COVERAGE=true yarn build-dotlottie","build-dotlottie":"yarn cleanup && rollup -c","build:types":"tsc --declaration",dev:"yarn cleanup && rollup -c --watch",lint:"eslint","lint:fix":"eslint --fix",cleanup:"shx rm -rf dist && shx mkdir dist",serve:"node ./cypress/pages/server.js -p 8000 &","start-cypress":"npx cypress run && npx nyc report --reporter=text-summary","run-tests":"yarn build-with-coverage && yarn serve && yarn start-cypress","postrun-tests":"kill $(lsof -t -i:8000)"},_g={"@rollup/plugin-json":"^6.0.0",fflate:"^0.7.3",lit:"^2.4.1","lottie-web":"^5.10.0",tsup:"^6.1.3"},wg={"@babel/core":"^7.11.0","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-decorators":"^7.10.5","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@changesets/cli":"^2.24.4","@cypress/code-coverage":"^3.9.12","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-babel":"^5.1.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-node-resolve":"^8.4.0","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","babel-plugin-istanbul":"^6.1.1",changesets:"^1.0.2",cypress:"^9.4.1",eslint:"^6.6.0","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.1",fastify:"^3.27.1","fastify-static":"^4.5.0",lerna:"^4.0.0","parcel-bundler":"^1.12.4",prettier:"1.18.2",rollup:"^2.23.0","rollup-plugin-alias":"^2.2.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-filesize":"^9.0.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-serve":"^1.0.3","rollup-plugin-terser":"^6.1.0","rollup-plugin-typescript2":"^0.27.1","rollup-plugin-visualizer":"^4.0.4",shx:"^0.3.3","source-map-support":"^0.5.21","ts-node":"^10.5.0",typescript:"^3.7.5"},xg=["dist"],Sg=["dotlottie","animation","web component","component","lit-element","player"],Eg=["> 3%"],kg={access:"public"},Pg={extends:"@istanbuljs/nyc-config-typescript",all:!0},Yc={name:lg,version:hg,description:cg,main:ug,module:pg,types:dg,homepage:fg,repository:mg,bugs:gg,author:yg,license:vg,scripts:bg,dependencies:_g,devDependencies:wg,files:xg,keywords:Sg,browserslist:Eg,publishConfig:kg,nyc:Pg},at=t=>new Error("[dotLottie-player-component] ".concat(t)),Jc=t=>{let e="[dotLottie-player-component] ".concat(t);console.error(e)},Eo=t=>{let e="[dotLottie-player-component] ".concat(t);console.warn(e)},Xc,Kc,Qc,eu,tu,xe,Xt,Ne;(function(t){t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error"})(xe||(xe={})),function(t){t.Normal="normal",t.Bounce="bounce"}(Xt||(Xt={})),function(t){t.Load="load",t.Error="error",t.Ready="ready",t.Play="play",t.Pause="pause",t.Stop="stop",t.Freeze="freeze",t.Loop="loop",t.Complete="complete",t.Rendered="rendered",t.Frame="frame"}(Ne||(Ne={}));var ru="dotlottie-player",ze=class t extends Gr{constructor(){super(),this.mode=Xt.Normal,this.autoplay=!1,this.background="transparent",this.controls=!1,this.direction=1,this.hover=!1,this.renderer="svg",this.speed=1,this.currentState=xe.Loading,this.intermission=1,this.activeAnimationId=null,this._counter=1,this._activeAnimationIndex=0,this._manifest={animations:[]}}static get properties(){return{mode:{type:String},autoplay:{type:Boolean},background:{type:String},controls:{type:Boolean},direction:{type:Number},hover:{type:Boolean},loop:{type:String},renderer:{type:String},speed:{type:Number},src:{type:String},currentState:{type:String},seeker:{type:Object},intermission:{type:Number},activeAnimationId:{type:String}}}_parseLoop(e){let r=parseInt(e,10);return Number.isInteger(r)&&r>0?(this._count=r,this._loop=!0,!0):typeof e=="string"&&["true","false"].includes(e)?(this._loop=e==="true",this._loop):(Eo("loop must be a positive integer or a boolean"),!1)}_onVisibilityChange(){document.hidden&&this.currentState===xe.Playing?this.freeze():this.currentState===xe.Frozen&&this.play()}_handleSeekChange(e){if(!this._lottie||isNaN(e.target.value))return;let r=e.target.value/100*this._lottie.totalFrames;this.seek(r)}isLottie(e){let r=!1;return e.animations&&e.animations.length?(e.animations.forEach(i=>{this.isLottie(i)||(r=!0)}),r):["v","ip","op","layers","fr","w","h"].every(i=>Object.prototype.hasOwnProperty.call(e,i))}parseSrc(e){if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return new URL(e,window.location.href).toString()}}async _fetchDotLottie(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"arraybuffer"}}).then(r=>r.arrayBuffer()).then(async r=>{let i=[],n={animations:[],manifest:void 0},s=await new Promise((o,l)=>{og(new Uint8Array(r),(h,c)=>{h&&l(h),o(c)})}),a;if(s["manifest.json"]){let o=cn(s["manifest.json"]),l=JSON.parse(o);if(!("animations"in l))throw at("Manifest not found");if(l.animations.length===0)throw at("No animations listed in the manifest");n.manifest=l;for(let h of l.animations)a=JSON.parse(cn(s["animations/".concat(h.id,".json")])),"assets"in a&&a.assets.map(c=>{if(!c.p||!s["images/".concat(c.p)])return;let u=btoa(cn(s["images/".concat(c.p)],!0));c.p="data:;base64,"+u,c.e=1}),i.push(a);return n.manifest=l,n.animations=i,n}throw at("No manifest found in file.")}).catch(r=>{throw at(r)})}async _fetchJsonFile(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"json"}}).then(r=>r.json()).then(r=>{let i=[],n={animations:[{id:e.substring(e.lastIndexOf("/")+1,e.lastIndexOf(".")),speed:1,loop:"true",direction:1}],description:"",author:"",generator:"dotLottie-player-component",revision:1,version:"1.0.0"},s={animations:[],manifest:void 0};return i.push(r),s.animations=i,s.manifest=n,s}).catch(r=>{throw at(r)})}async _fetchFileAndLoad(e){var r;let i={animations:[],manifest:void 0};if(i=((r=e.split(/[#?]/)[0].split(".").pop())===null||r===void 0?void 0:r.toLowerCase())==="json"?await this._fetchJsonFile(e):await this._fetchDotLottie(e),!i.animations||!i.manifest||i.animations.length===0)throw this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),at(i.animations&&i.animations.length?"Manifest not found":"Animations are empty");if(this._animations=i.animations,this._manifest=i.manifest,this.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Eo("Active animation not found in manifest")}else if(this._manifest&&this._manifest.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this._manifest.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Eo("Active animation not found in manifest")}let n=this._animations[this._activeAnimationIndex];if(n===void 0)throw at("No animation to load!");return n}_loadManifestOptions(e){if(this._requireAnimationsInTheManifest(),this._manifest.animations[e]===void 0)throw at("Animation not found in manifest");let{autoplay:r,direction:i,loop:n,playMode:s,speed:a,hover:o,intermission:l}=this._manifest.animations[e];r!==void 0&&(this.autoplay=r),i!==void 0&&(this.direction=i),n!==void 0&&(this.loop=n),s!==void 0&&(this.mode=s),a!==void 0&&(this.speed=a),o!==void 0&&(this.hover=o),l!==void 0&&(this.intermission=l)}_initListeners(){this.dispatchEvent(new CustomEvent(Ne.Load)),this._lottie.addEventListener("enterFrame",()=>{this.seeker=this._lottie.currentFrame/this._lottie.totalFrames*100,this.dispatchEvent(new CustomEvent(Ne.Frame,{detail:{frame:this._lottie.currentFrame,seeker:this.seeker}}))}),this._lottie.addEventListener("complete",()=>{if(this.currentState===xe.Playing){if((!this._loop||this._count&&this._counter>=this._count)&&(this.dispatchEvent(new CustomEvent(Ne.Complete)),this.mode!==Xt.Bounce||this._lottie.currentFrame===0))return;this.mode===Xt.Bounce?(this._count&&(this._counter+=.5),setTimeout(()=>{this.dispatchEvent(new CustomEvent(Ne.Loop)),this.currentState===xe.Playing&&(this._lottie.setDirection(-1*this._lottie.playDirection),this._lottie.play())},this.intermission)):(this._count&&(this._counter+=1),window.setTimeout(()=>{this.dispatchEvent(new CustomEvent(Ne.Loop)),this.currentState===xe.Playing&&(this.direction===-1?(this.seek("99%"),this.play()):(this._lottie.stop(),this.play()))},this.intermission))}else this.dispatchEvent(new CustomEvent(Ne.Complete))}),this._lottie.addEventListener("DOMLoaded",()=>{this.dispatchEvent(new CustomEvent(Ne.Ready))}),this._lottie.addEventListener("data_ready",()=>{this.dispatchEvent(new CustomEvent(Ne.Load))}),this._lottie.addEventListener("data_failed",()=>{this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==xe.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===xe.Playing&&this.stop()})}async load(e,r,i){if(!this.shadowRoot)return;let n={container:this.container,loop:!1,autoplay:!1,renderer:this.renderer,rendererSettings:r||{scaleMode:"noScale",clearCanvas:!1,progressiveLoad:!0,hideOnTransparent:!0}};try{let s=this.parseSrc(e),a=null;if(typeof s=="string")a=await this._fetchFileAndLoad(s);else if(typeof s=="object"&&!this.isLottie(s))throw at("Load method failing. Object is not a valid Lottie.");if(this._lottie&&this._lottie.destroy(),i!==void 0)for(let[o,l]of Object.entries(i))o==="playMode"?this.mode=l==="normal"?Xt.Normal:Xt.Bounce:l!==void 0&&(this[o]=l);else if(this._activeAnimationIndex===0||this._manifest.animations[this._activeAnimationIndex].id===this.activeAnimationId||this._manifest.animations[this._activeAnimationIndex].id===this._manifest.activeAnimationId){let o=this._manifest.animations[this._activeAnimationIndex],l=Object.keys(t.properties),h=Array.from(this.getAttributeNames());for(let u of h){let f=this.getAttribute(u);f&&(this[u]=f)}let c=l.filter(u=>!h.includes(u.toLowerCase())&&this._manifest.animations[this._activeAnimationIndex].hasOwnProperty(u));for(let u of c){let f=o[u];f!==void 0&&(u==="playMode"?this.mode=f==="normal"?Xt.Normal:Xt.Bounce:this[u]=f)}}else this._loadManifestOptions(this._activeAnimationIndex);this._lottie=Ym.loadAnimation(Object.assign(Object.assign({},n),{animationData:a!==null?a:s}))}catch(s){return this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),void console.error(s)}if(!this._lottie)throw this.currentState=xe.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),at("Player failed to initialize.");this._initListeners(),this.setSpeed(this.speed),this.setDirection(this.direction),this.autoplay&&(this.direction===-1&&this.seek("99%"),this.play())}getActiveId(){return this._manifest.animations?this._manifest.animations[this._activeAnimationIndex].id:null}getActiveAnimationIndex(){return this._activeAnimationIndex}animationCount(){return this._animations?this._animations.length:0}getManifest(){return this._manifest}getLottie(){return this._lottie}getVersions(){return{lottieWebVersion:"".concat(Yc.dependencies["lottie-web"]),dotLottiePlayerVersion:"".concat(Yc.version)}}_requireAnimationsInTheManifest(){if(!this._manifest.animations.length)throw at("No animations found in manifest.")}_requireAnimationsToBeLoaded(){var e;if(!(!((e=this._animations)===null||e===void 0)&&e.length))throw at("No animations have been loaded.")}previous(e){this._activeAnimationIndex=(this._activeAnimationIndex-1+this._manifest.animations.length)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}next(e){this._activeAnimationIndex=(this._activeAnimationIndex+1)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}reset(){this._manifest&&this._manifest.activeAnimationId?this.play(this._manifest.activeAnimationId):this.activeAnimationId?this.play(this.activeAnimationId):this.play(0)}_validateAnimationIndex(e){if(isNaN(e)||e<0||e>=this._manifest.animations.length)throw at("Animation index ".concat(e," is out of bounds."))}play(e,r){if(this._lottie){if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),e===void 0)return this._lottie.play(),this.currentState=xe.Playing,void this.dispatchEvent(new CustomEvent(Ne.Play));if(this._requireAnimationsToBeLoaded(),this._requireAnimationsInTheManifest(),e!==void 0){if(!this._animations)throw at("No animations have been loaded.");if(this._requireAnimationsInTheManifest(),typeof e=="string"){let i=this._manifest.animations.findIndex(n=>n.id===e);i!==-1?(this._activeAnimationIndex=i,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):Jc("No animation with the id '".concat(e,"' was found."))}else typeof e=="number"&&(this._validateAnimationIndex(e),this._manifest.animations&&this._manifest.animations[e]?(this._activeAnimationIndex=e,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):Jc("Animation not found at index: ".concat(e)))}}}pause(){this._lottie&&(this._lottie.pause(),this.currentState=xe.Paused,this.dispatchEvent(new CustomEvent(Ne.Pause)))}stop(){this._lottie&&(this._counter=0,this._lottie.stop(),this.direction===-1&&this._lottie.goToAndStop(this._lottie.totalFrames,!0),this.currentState=xe.Stopped,this.dispatchEvent(new CustomEvent(Ne.Stop)))}seek(e){if(!this._lottie)return;typeof e=="number"&&(e=Math.round(e));let r=/^(\d+)(%?)$/.exec(e.toString());if(!r)return;let i=r[2]==="%"?this._lottie.totalFrames*Number(r[1])/100:Number(r[1]);this.seeker=i,this.currentState===xe.Playing?this._lottie.goToAndPlay(i,!0):(this._lottie.goToAndStop(i,!0),this._lottie.pause())}snapshot(){let e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];if(!this.shadowRoot)return;let r=this.shadowRoot.querySelector(".animation svg"),i=new XMLSerializer().serializeToString(r);if(e){let n=document.createElement("a");n.href="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i),n.download="download_"+this.seeker+".svg",document.body.appendChild(n),n.click(),document.body.removeChild(n)}return i}freeze(){this._lottie&&(this._lottie.pause(),this.currentState=xe.Frozen,this.dispatchEvent(new CustomEvent(Ne.Freeze)))}setSpeed(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._lottie&&this._lottie.setSpeed(e)}setDirection(e){this._lottie&&this._lottie.setDirection(e)}setLooping(e){this._lottie&&(this._lottie.loop=this._parseLoop(e))}isLooping(){return!!this._loop&&this._loop}togglePlay(){return this.currentState===xe.Playing?this.pause():this.play()}toggleLooping(){let e=!this._loop;this.setLooping(e.toString())}static get styles(){return Jm}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(e=>{e[0].isIntersecting?this.currentState===xe.Frozen&&this.play():this.currentState===xe.Playing&&this.freeze()}),this._io.observe(this.container)),document.hidden!==void 0&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange()),this.loop?this._parseLoop(this.loop):this.hasAttribute("loop")&&this._parseLoop("true"),this.src&&await this.load(this.src),this.dispatchEvent(new CustomEvent(Ne.Rendered))}disconnectedCallback(){this._io&&(this._io.disconnect(),this._io=void 0),this._lottie&&this._lottie.destroy(),document.removeEventListener("visibilitychange",()=>this._onVisibilityChange())}renderControls(){let e=this.currentState===xe.Playing,r=this.currentState===xe.Paused,i=this.currentState===xe.Stopped;return fs(Xc||(Xc=vi([`
196
196
  <div id="lottie-controls" aria-label="lottie-animation-controls" class="toolbar">
197
197
  <button
198
198
  id="lottie-play-button"
@@ -264,15 +264,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
264
264
  </div>
265
265
  `,`
266
266
  </div>
267
- `])),e,r,this.background,this.currentState===xe.Error?fs(tu||(tu=vi([' <div class="error">\u26A0\uFE0F</div> ']))):void 0,this.controls?this.renderControls():void 0)}};Qe([Gm(".animation")],ze.prototype,"container",void 0),Qe([et()],ze.prototype,"mode",void 0),Qe([et({type:Boolean})],ze.prototype,"autoplay",void 0),Qe([et({type:String})],ze.prototype,"background",void 0),Qe([et({type:Boolean})],ze.prototype,"controls",void 0),Qe([et({type:Number})],ze.prototype,"direction",void 0),Qe([et({type:Boolean})],ze.prototype,"hover",void 0),Qe([et({type:String})],ze.prototype,"loop",void 0),Qe([et({type:String})],ze.prototype,"renderer",void 0),Qe([et({type:Number})],ze.prototype,"speed",void 0),Qe([et({type:String})],ze.prototype,"src",void 0),Qe([et({type:String})],ze.prototype,"currentState",void 0),Qe([et()],ze.prototype,"seeker",void 0),Qe([et()],ze.prototype,"intermission",void 0),Qe([et({type:String})],ze.prototype,"activeAnimationId",void 0),customElements.get(ru)||jm(ru)(ze);var Ns,_n=class extends Ve(Ce){constructor(){super();we(this,"render",()=>me`
267
+ `])),e,r,this.background,this.currentState===xe.Error?fs(tu||(tu=vi([' <div class="error">\u26A0\uFE0F</div> ']))):void 0,this.controls?this.renderControls():void 0)}};Qe([Gm(".animation")],ze.prototype,"container",void 0),Qe([et()],ze.prototype,"mode",void 0),Qe([et({type:Boolean})],ze.prototype,"autoplay",void 0),Qe([et({type:String})],ze.prototype,"background",void 0),Qe([et({type:Boolean})],ze.prototype,"controls",void 0),Qe([et({type:Number})],ze.prototype,"direction",void 0),Qe([et({type:Boolean})],ze.prototype,"hover",void 0),Qe([et({type:String})],ze.prototype,"loop",void 0),Qe([et({type:String})],ze.prototype,"renderer",void 0),Qe([et({type:Number})],ze.prototype,"speed",void 0),Qe([et({type:String})],ze.prototype,"src",void 0),Qe([et({type:String})],ze.prototype,"currentState",void 0),Qe([et()],ze.prototype,"seeker",void 0),Qe([et()],ze.prototype,"intermission",void 0),Qe([et({type:String})],ze.prototype,"activeAnimationId",void 0),customElements.get(ru)||jm(ru)(ze);var Ns,_n=class extends Ve(Ce){constructor(){super();we(this,"render",()=>pe`
268
268
  <button class="leading-0 relative inline-block h-14 w-14 rounded-full shadow-xl">
269
269
  <!-- -->
270
270
  ${N(this,Ns).call(this)}
271
271
  </button>
272
- `);se(this,Ns,()=>me`
272
+ `);se(this,Ns,()=>pe`
273
273
  <div class="h-full w-full rounded-full bg-slate-800 text-sm text-white transition-transform hover:scale-105 active:scale-90">
274
274
  <div class="${this.dialogShown?"invisible opacity-0":"visible opacity-100"} absolute bottom-0 left-0 right-0 top-0 inline-flex items-center justify-center transition-opacity">
275
- <dotlottie-player autoplay loop mode="normal" src="https://assets5.lottiefiles.com/dotlotties/dlf10_hISLmVmo2x.lottie"></dotlottie-player>
275
+ ${this.bubbleImageURL?pe`
276
+ <!-- -->
277
+ <img class="h-full w-full rounded-full" src="${this.bubbleImageURL}" />
278
+ `:pe`
279
+ <!-- -->
280
+ <dotlottie-player autoplay loop mode="normal" src="https://assets5.lottiefiles.com/dotlotties/dlf10_hISLmVmo2x.lottie"></dotlottie-player>
281
+ `}
276
282
  </div>
277
283
  <div class="${this.dialogShown?"visible opacity-100":"invisible opacity-0"} absolute bottom-0 left-0 right-0 top-0 inline-flex items-center justify-center transition-opacity">
278
284
  <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
@@ -280,11 +286,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
280
286
  </svg>
281
287
  </div>
282
288
  </div>
283
- `);this.dialogShown=!1}};Ns=new WeakMap,we(_n,"styles",Ba`
289
+ `);this.dialogShown=!1,this.bubbleImageURL=""}};Ns=new WeakMap,we(_n,"styles",Ba`
284
290
  :host {
285
291
  line-height: 0;
286
292
  }
287
- `),we(_n,"properties",{dialogShown:{type:Boolean,attribute:"dialog-shown"}});customElements.define("mw-bubble",_n);function Ag(t){return!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.keyCode==13}var js,Yu,Hs,Ju,Gs,Xu,qs,Ku,Us,Qu,zs=class extends Ve(Ce){constructor(){super();se(this,js);se(this,Hs);se(this,Gs);se(this,qs);se(this,Us);we(this,"render",()=>me`
293
+ `),we(_n,"properties",{dialogShown:{type:Boolean,attribute:"dialog-shown"},bubbleImageURL:{type:String,attribute:"bubble-image-url"}});customElements.define("mw-bubble",_n);function Ag(t){return!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.keyCode==13}var js,Yu,Hs,Ju,Gs,Xu,qs,Ku,Us,Qu,zs=class extends Ve(Ce){constructor(){super();se(this,js);se(this,Hs);se(this,Gs);se(this,qs);se(this,Us);we(this,"render",()=>pe`
288
294
  <form class="flex items-center space-x-4 border-t bg-white px-4" @submit="${ue(this,Gs,Xu)}">
289
295
  <!-- text input -->
290
296
  <textarea name="input" @keydown="${ue(this,Hs,Ju)}" class="my-2 block w-full flex-1 resize-none rounded py-2 text-[16px] text-gray-800 outline-none transition-colors" placeholder="${this.config.input.placeholder}" autofocus></textarea>
@@ -292,11 +298,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
292
298
  <!-- send/cancel button -->
293
299
  <div class="py-2">
294
300
  <button type="submit" class="select-none">
295
- ${this.disabled?me`
301
+ ${this.disabled?pe`
296
302
  <svg class="hover:bg-[${this.config.color}]/80 inline-block h-8 w-8 rounded-full bg-[${this.config.color}] fill-current p-2 text-white transition-colors" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
297
303
  <path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
298
304
  </svg>
299
- `:me`
305
+ `:pe`
300
306
  <svg class="hover:bg-[${this.config.color}]/80 inline-block h-8 w-8 rounded-full bg-[${this.config.color}] fill-current p-2 text-white transition-colors" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
301
307
  <path d="m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z" />
302
308
  </svg>
@@ -304,7 +310,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
304
310
  </button>
305
311
  </div>
306
312
  </form>
307
- `);this.disabled=!1,this.config}};js=new WeakSet,Yu=function(){return this.shadowRoot?.querySelector("button")},Hs=new WeakSet,Ju=function(r){Ag(r)&&(r.preventDefault(),this.disabled||N(this,js,Yu)?.click())},Gs=new WeakSet,Xu=function(r){if(r.preventDefault(),this.disabled){ue(this,Us,Qu).call(this);return}let i=r.target?.input,n=i.value;n&&(i.value="",ue(this,qs,Ku).call(this,n))},qs=new WeakSet,Ku=function(r){let i={value:r};this.dispatchEvent(new CustomEvent("mw-submit",{detail:i}))},Us=new WeakSet,Qu=function(){let r={};this.dispatchEvent(new CustomEvent("mw-cancel",{detail:r}))},we(zs,"properties",{disabled:{type:Boolean},config:{type:Object}});customElements.define("mw-chat-input",zs);var wn=class extends dr{constructor(e){if(super(e),this.et=Te,e.type!==di.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Te||e==null)return this.ft=void 0,this.et=e;if(e===ft)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;let r=[e];return r.raw=r,this.ft={_$litType$:this.constructor.resultType,strings:r,values:[]}}};wn.directiveName="unsafeHTML",wn.resultType=1;var Vi=fi(wn);var Ws=class extends Ve(Ce){constructor(){super(),this.side="assistant",this.config}render(){switch(this.side){case"user":return me`
313
+ `);this.disabled=!1,this.config}};js=new WeakSet,Yu=function(){return this.shadowRoot?.querySelector("button")},Hs=new WeakSet,Ju=function(r){Ag(r)&&(r.preventDefault(),this.disabled||N(this,js,Yu)?.click())},Gs=new WeakSet,Xu=function(r){if(r.preventDefault(),this.disabled){ue(this,Us,Qu).call(this);return}let i=r.target?.input,n=i.value;n&&(i.value="",ue(this,qs,Ku).call(this,n))},qs=new WeakSet,Ku=function(r){let i={value:r};this.dispatchEvent(new CustomEvent("mw-submit",{detail:i}))},Us=new WeakSet,Qu=function(){let r={};this.dispatchEvent(new CustomEvent("mw-cancel",{detail:r}))},we(zs,"properties",{disabled:{type:Boolean},config:{type:Object}});customElements.define("mw-chat-input",zs);var wn=class extends dr{constructor(e){if(super(e),this.et=Te,e.type!==di.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Te||e==null)return this.ft=void 0,this.et=e;if(e===ft)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;let r=[e];return r.raw=r,this.ft={_$litType$:this.constructor.resultType,strings:r,values:[]}}};wn.directiveName="unsafeHTML",wn.resultType=1;var Vi=fi(wn);var Ws=class extends Ve(Ce){constructor(){super(),this.side="assistant",this.config}render(){switch(this.side){case"user":return pe`
308
314
  <div class="ml-20 flex justify-end">
309
315
  <div class="max-w-full">
310
316
  <!--
@@ -315,14 +321,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
315
321
  </div>
316
322
  </div>
317
323
  </div>
318
- `;case"assistant":return me`
324
+ `;case"assistant":return pe`
319
325
  <div class="mr-8 flex justify-start">
320
326
  <div class="flex max-w-full space-x-2">
321
327
  <!--
322
328
  mt-[9px] because the message is 50px tall, the icon is 32px tall, we want to center it
323
329
  -->
324
330
  <div class="mt-[9px] h-8 w-8 flex-shrink-0 flex-grow-0 overflow-hidden rounded-full">
325
- ${this.config.logoSvg?Vi(this.config.logoSvg):me`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
331
+ ${this.config.logoSvg?Vi(this.config.logoSvg):pe`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
326
332
  </div>
327
333
 
328
334
  <!--
@@ -333,11 +339,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
333
339
  </div>
334
340
  </div>
335
341
  </div>
336
- `;default:throw new Error(`unknown side: ${this.side}`)}}};we(Ws,"properties",{side:{type:String},config:{type:Object}});customElements.define("mw-chat-message",Ws);var Ys,ep,Js,tp,Zs=class extends Ve(Ce){constructor(){super();se(this,Ys);se(this,Js);we(this,"render",()=>me`
342
+ `;default:throw new Error(`unknown side: ${this.side}`)}}};we(Ws,"properties",{side:{type:String},config:{type:Object}});customElements.define("mw-chat-message",Ws);var Ys,ep,Js,tp,Zs=class extends Ve(Ce){constructor(){super();se(this,Ys);se(this,Js);we(this,"render",()=>pe`
337
343
  <div class="flex items-center justify-between space-x-4 p-4">
338
344
  <mw-pulse-dot class="contents" position="bottom-right" color="green-500">
339
345
  <div class="h-10 w-10 overflow-hidden rounded">
340
- ${this.config.logoSvg?Vi(this.config.logoSvg):me`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
346
+ ${this.config.logoSvg?Vi(this.config.logoSvg):pe`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
341
347
  </div>
342
348
  </mw-pulse-dot>
343
349
 
@@ -361,7 +367,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
361
367
  <span class="inline-block h-6 w-6 leading-6">✕</span>
362
368
  </button>
363
369
  </div>
364
- `);this.config,this.messages=0}};Ys=new WeakSet,ep=function(){let r={};this.dispatchEvent(new CustomEvent("mw-close",{detail:r}))},Js=new WeakSet,tp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-delete-history",{detail:r}))},we(Zs,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-header",Zs);var il=class extends Ve(Ce){constructor(){super(...arguments);we(this,"render",()=>me`
370
+ `);this.config,this.messages=0}};Ys=new WeakSet,ep=function(){let r={};this.dispatchEvent(new CustomEvent("mw-close",{detail:r}))},Js=new WeakSet,tp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-delete-history",{detail:r}))},we(Zs,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-header",Zs);var il=class extends Ve(Ce){constructor(){super(...arguments);we(this,"render",()=>pe`
365
371
  <svg class="leading-0 inline-block h-full w-full" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" xml:space="preserve">
366
372
  <circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
367
373
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
@@ -373,7 +379,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
373
379
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
374
380
  </circle>
375
381
  </svg>
376
- `)}};customElements.define("mw-loading",il);var nl=class extends Ve(Ce){constructor(){super(...arguments);we(this,"render",()=>me`
382
+ `)}};customElements.define("mw-loading",il);var nl=class extends Ve(Ce){constructor(){super(...arguments);we(this,"render",()=>pe`
377
383
  <p class="flex items-center justify-center space-x-1 text-xs text-gray-400">
378
384
  <span class="pointer-events-none">Powered by</span>
379
385
  <a class="inline-flex items-center space-x-1 text-gray-600 underline" href="https://molin.ai/" target="_blank">
@@ -390,7 +396,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
390
396
  <span>Molin AI</span>
391
397
  </a>
392
398
  </p>
393
- `)}};customElements.define("mw-powered-by",nl);var Ks,rp,Xs=class extends Ve(Ce){constructor(){super();se(this,Ks);this.color="sky-500",this.animated=!1,this.position="top-right"}render(){return me`
399
+ `)}};customElements.define("mw-powered-by",nl);var Ks,rp,Xs=class extends Ve(Ce){constructor(){super();se(this,Ks);this.color="sky-500",this.animated=!1,this.position="top-right"}render(){return pe`
394
400
  <span class="relative inline-flex">
395
401
  <slot></slot>
396
402
  <span class="${N(this,Ks,rp)} pointer-events-none absolute flex h-3 w-3">
@@ -401,11 +407,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
401
407
  `}};Ks=new WeakSet,rp=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:return""}},we(Xs,"properties",{color:{type:String,attribute:"color"},animated:{type:Boolean,attribute:"animated"},position:{type:String,attribute:"position"}});customElements.define("mw-pulse-dot",Xs);var ip=fi(class extends dr{constructor(t){var e;if(super(t),t.type!==di.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,i;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in e)e[s]&&!(!((r=this.nt)===null||r===void 0)&&r.has(s))&&this.it.add(s);return this.render(e)}let n=t.element.classList;this.it.forEach(s=>{s in e||(n.remove(s),this.it.delete(s))});for(let s in e){let a=!!e[s];a===this.it.has(s)||!((i=this.nt)===null||i===void 0)&&i.has(s)||(a?(n.add(s),this.it.add(s)):(n.remove(s),this.it.delete(s)))}return ft}});var xn,ot,Rt,Sn,sl,Qs=class{constructor(e,r){se(this,Sn);se(this,xn,void 0);se(this,ot,void 0);se(this,Rt,void 0);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");Re(this,xn,e),N(this,xn).addController(this),Re(this,ot,r)}reconnect(e){Re(this,ot,e),N(this,Rt)?.close(),Re(this,Rt,ue(this,Sn,sl).call(this))}hostConnected(){Re(this,Rt,ue(this,Sn,sl).call(this))}hostDisconnected(){N(this,Rt)?.close(),Re(this,Rt,void 0)}send(e){N(this,Rt)?.send(e)}close(){N(this,Rt)?.close(1e3,"new_chat")}render(e={}){switch(N(this,Rt)?.readyState){case WebSocket.CLOSED:return e.closed?.();case WebSocket.CLOSING:return e.closing?.();case WebSocket.CONNECTING:return e.connecting?.();case WebSocket.OPEN:return e.open?.()}}};xn=new WeakMap,ot=new WeakMap,Rt=new WeakMap,Sn=new WeakSet,sl=function(){let e=new WebSocket(N(this,ot).url());return N(this,ot).onClose&&(e.onclose=N(this,ot).onClose),N(this,ot).onOpen&&(e.onopen=N(this,ot).onOpen),N(this,ot).onError&&(e.onerror=N(this,ot).onError),N(this,ot).onMessage&&(e.onmessage=N(this,ot).onMessage),e};var jt,Je,Jr,Ni,En,zi,ea,kn,al,Pn,ol,An,ll,Cn,hl,ra,np,ta=class{constructor(e,r){se(this,zi);se(this,kn);se(this,Pn);se(this,An);se(this,Cn);se(this,ra);se(this,jt,void 0);se(this,Je,void 0);se(this,Jr,void 0);se(this,Ni,!1);we(this,"isStreaming",!1);we(this,"messages",[]);we(this,"conversationId","");se(this,En,0);e.addController(this),Re(this,jt,e),Re(this,Je,r),Re(this,Jr,new Qs(e,{url:()=>N(this,Je).url(this.conversationId,{}),onOpen:i=>ue(this,kn,al).call(this,i),onMessage:i=>ue(this,Pn,ol).call(this,JSON.parse(i.data)),onError:i=>ue(this,An,ll).call(this,i),onClose:i=>ue(this,Cn,hl).call(this,i)}))}sendUserInput(e){ue(this,zi,ea).call(this,{type:"USER_INPUT",value:e},{expectStreaming:!0})}sendUserCancel(){ue(this,zi,ea).call(this,{type:"USER_CANCEL"})}reconnect(){Ul(this,En)._++,setTimeout(()=>{N(this,Je).onReconnect?.(),N(this,Jr).reconnect({url:()=>N(this,Je).url(this.conversationId,{resume:!0}),onOpen:e=>ue(this,kn,al).call(this,e),onMessage:e=>ue(this,Pn,ol).call(this,JSON.parse(e.data)),onError:e=>ue(this,An,ll).call(this,e),onClose:e=>ue(this,Cn,hl).call(this,e)})},1e3*N(this,En))}hostConnected(){let e=N(this,Je).restoreConversationState?.()||{conversationId:crypto.randomUUID(),messages:[]};this.messages=e.messages,this.conversationId=e.conversationId,Re(this,Ni,!0)}hostDisconnected(){Re(this,Ni,!1)}reset(){N(this,Jr).close(),N(this,Je).onReset?.(),this.isStreaming=!1,this.messages=[],this.conversationId=crypto.randomUUID(),N(this,jt).requestUpdate()}};jt=new WeakMap,Je=new WeakMap,Jr=new WeakMap,Ni=new WeakMap,En=new WeakMap,zi=new WeakSet,ea=function(e,{expectStreaming:r=!1}={}){r&&(this.isStreaming=!0,N(this,jt).requestUpdate()),N(this,Jr).send(JSON.stringify(e))},kn=new WeakSet,al=function(e){this.messages.length>0&&setTimeout(()=>{ue(this,zi,ea).call(this,{type:"RESUME",messages:ue(this,ra,np).call(this)})},10)},Pn=new WeakSet,ol=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages.push(e.message),N(this,jt).requestUpdate(),N(this,Je).onNewMessage?.(e.message);break}case"UPDATE_MESSAGE":{let r=this.messages.find(i=>i.id===e.message.id);if(r)Object.assign(r,e.message),N(this,jt).requestUpdate(),N(this,Je).onUpdateMessage?.(e);else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(i=>i.id===e.message.id);if(r?.content==="\xB7 \xB7 \xB7")this.messages=this.messages.filter(i=>i.id!==e.message.id);else if(r)Object.assign(r,e.message);else throw new Error(`Message with id ${e.message.id} not found`);N(this,Je).persistConversationState?.(this.conversationId,this.messages),this.isStreaming=!1,N(this,jt).requestUpdate(),N(this,Je).onMessageDone?.(e);break}case"ERROR":{N(this,Je).onMessageError?.(e);break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},An=new WeakSet,ll=function(e){N(this,Je).onError?.(e)},Cn=new WeakSet,hl=function(e){this.isStreaming=!1,N(this,jt).requestUpdate(),N(this,Ni)&&this.reconnect(),N(this,Je).onClose?.()},ra=new WeakSet,np=function(){return this.messages.map(({id:e,role:r,content:i,timestamp:n})=>({id:e,role:r,content:i,timestamp:n}))};function sp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sp(Object(r),!0).forEach(function(i){Y(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sp(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function xr(t){return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(t)}function De(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ap(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Fe(t,e,r){return e&&ap(t.prototype,e),r&&ap(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $p(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)}function fa(t){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fa(t)}function vl(t,e){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vl(t,e)}function Cg(t,e){if(t==null)return{};var r,i,n=function(a,o){if(a==null)return{};var l,h,c={},u=Object.keys(a);for(h=0;h<u.length;h++)l=u[h],o.indexOf(l)>=0||(c[l]=a[l]);return c}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tg(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Rp(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,i=fa(t);if(e){var n=fa(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return Tg(this,r)}}function ar(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,i){var n=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var s,a,o=[],l=!0,h=!1;try{for(n=n.call(r);!(l=(s=n.next()).done)&&(o.push(s.value),!i||o.length!==i);l=!0);}catch(c){h=!0,a=c}finally{try{l||n.return==null||n.return()}finally{if(h)throw a}}return o}}(t,e)||$l(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
402
408
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function bl(t){return function(e){if(Array.isArray(e))return _l(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||$l(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
403
409
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function $l(t,e){if(t){if(typeof t=="string")return _l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_l(t,e):void 0}}function _l(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function or(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=$l(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
404
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}var Tt={DEBUG:!1,LIB_VERSION:"1.81.2"},Lp=Array.prototype,Bp=Object.prototype,Rl=Bp.toString,Ig=Bp.hasOwnProperty,q=typeof window<"u"?window:{},Kr=q.navigator||{userAgent:""},Me=q.document||{},Lt=Kr.userAgent,Mg=["localhost","127.0.0.1"],op=Lp.forEach,lp=Lp.indexOf,Dg=Array.isArray,Ll={},fe={log:function(){if(Tt.DEBUG&&!Ct(window.console)&&window.console){for(var t=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];try{t.apply(window.console,r)}catch{nr(r,function(s){t(s)})}}},error:function(){if(Tt.DEBUG&&!Ct(window.console)&&window.console){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=["PostHog error:"].concat(e),n="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{n.apply(window.console,i)}catch{nr(i,function(a){n(a)})}}},critical:function(){if(!Ct(window.console)&&window.console){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=["PostHog error:"].concat(e),n="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{n.apply(window.console,i)}catch{nr(i,function(a){n(a)})}}},unintializedWarning:function(t){Tt.DEBUG&&!Ct(window.console)&&window.console&&fe.error("[PostHog] You must initialize PostHog before calling ".concat(t))}},wl=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function nr(t,e,r){if(Array.isArray(t)){if(op&&t.forEach===op)t.forEach(e,r);else if("length"in t&&t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i)===Ll)return}}}function Ee(t,e,r){if(t!=null){if(Array.isArray(t))return nr(t,e,r);for(var i in t)if(Ig.call(t,i)&&e.call(r,t[i],i)===Ll)return}}var Xe=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return nr(r,function(n){for(var s in n)n[s]!==void 0&&(t[s]=n[s])}),t},ir=Dg||function(t){return Rl.call(t)==="[object Array]"},Vp=function(t){try{return/^\s*\bfunction\b/.test(t)}catch{return!1}};function Se(t,e){return t.indexOf(e)!==-1}var xl=function(t){return t===Object(t)&&!ir(t)},Ct=function(t){return t===void 0},Np=function(t){return Rl.call(t)=="[object String]"},Fg=function(t){return Rl.call(t)=="[object Number]"},zp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},jp=function(t){return function(){try{for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.apply(this,r)}catch(n){fe.critical("Implementation error. Please turn on debug and contact support@posthog.com."),fe.critical(n)}}},Sl=function(t){var e={};return Ee(t,function(r,i){Np(r)&&r.length>0&&(e[i]=r)}),e},Og=["$performance_raw"];function $g(t,e){return r=t,i=function(s,a){return a&&Og.indexOf(a)>-1?s:typeof s=="string"&&e!==null?s.slice(0,e):s},n=new Set,function s(a,o){return a!==Object(a)?i?i(a,o):a:n.has(a)?void 0:(n.add(a),ir(a)?(l=[],nr(a,function(h){l.push(s(h))})):(l={},Ee(a,function(h,c){n.has(h)||(l[c]=s(h,c))})),l);var l}(r);var r,i,n}function Bl(t){var e,r,i,n,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,h="",c=[];if(!t)return t;t=Rg(t);do e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,i=s>>6&63,n=63&s,c[l++]=a.charAt(e)+a.charAt(r)+a.charAt(i)+a.charAt(n);while(o<t.length);switch(h=c.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h}var Rg=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,`
410
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}var Tt={DEBUG:!1,LIB_VERSION:"1.81.2"},Lp=Array.prototype,Bp=Object.prototype,Rl=Bp.toString,Ig=Bp.hasOwnProperty,q=typeof window<"u"?window:{},Kr=q.navigator||{userAgent:""},Me=q.document||{},Lt=Kr.userAgent,Mg=["localhost","127.0.0.1"],op=Lp.forEach,lp=Lp.indexOf,Dg=Array.isArray,Ll={},me={log:function(){if(Tt.DEBUG&&!Ct(window.console)&&window.console){for(var t=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];try{t.apply(window.console,r)}catch{nr(r,function(s){t(s)})}}},error:function(){if(Tt.DEBUG&&!Ct(window.console)&&window.console){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=["PostHog error:"].concat(e),n="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{n.apply(window.console,i)}catch{nr(i,function(a){n(a)})}}},critical:function(){if(!Ct(window.console)&&window.console){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=["PostHog error:"].concat(e),n="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{n.apply(window.console,i)}catch{nr(i,function(a){n(a)})}}},unintializedWarning:function(t){Tt.DEBUG&&!Ct(window.console)&&window.console&&me.error("[PostHog] You must initialize PostHog before calling ".concat(t))}},wl=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function nr(t,e,r){if(Array.isArray(t)){if(op&&t.forEach===op)t.forEach(e,r);else if("length"in t&&t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i)===Ll)return}}}function Ee(t,e,r){if(t!=null){if(Array.isArray(t))return nr(t,e,r);for(var i in t)if(Ig.call(t,i)&&e.call(r,t[i],i)===Ll)return}}var Xe=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return nr(r,function(n){for(var s in n)n[s]!==void 0&&(t[s]=n[s])}),t},ir=Dg||function(t){return Rl.call(t)==="[object Array]"},Vp=function(t){try{return/^\s*\bfunction\b/.test(t)}catch{return!1}};function Se(t,e){return t.indexOf(e)!==-1}var xl=function(t){return t===Object(t)&&!ir(t)},Ct=function(t){return t===void 0},Np=function(t){return Rl.call(t)=="[object String]"},Fg=function(t){return Rl.call(t)=="[object Number]"},zp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},jp=function(t){return function(){try{for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.apply(this,r)}catch(n){me.critical("Implementation error. Please turn on debug and contact support@posthog.com."),me.critical(n)}}},Sl=function(t){var e={};return Ee(t,function(r,i){Np(r)&&r.length>0&&(e[i]=r)}),e},Og=["$performance_raw"];function $g(t,e){return r=t,i=function(s,a){return a&&Og.indexOf(a)>-1?s:typeof s=="string"&&e!==null?s.slice(0,e):s},n=new Set,function s(a,o){return a!==Object(a)?i?i(a,o):a:n.has(a)?void 0:(n.add(a),ir(a)?(l=[],nr(a,function(h){l.push(s(h))})):(l={},Ee(a,function(h,c){n.has(h)||(l[c]=s(h,c))})),l);var l}(r);var r,i,n}function Bl(t){var e,r,i,n,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,h="",c=[];if(!t)return t;t=Rg(t);do e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,i=s>>6&63,n=63&s,c[l++]=a.charAt(e)+a.charAt(r)+a.charAt(i)+a.charAt(n);while(o<t.length);switch(h=c.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h}var Rg=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,`
405
411
  `).replace(/\r/g,`
406
- `)).length,n=0;n<i;n++){var a=t.charCodeAt(n),o=null;a<128?r++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),o!==null&&(r>e&&(s+=t.substring(e,r)),s+=o,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},Lg=["ahrefsbot","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","hubspot","linkedinbot","mj12bot","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","twitterbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"],Bg=function(t,e){return Lg.concat(e).some(function(r){return t.includes?t.includes(r):t.indexOf(r)!==-1})},hp=function(t,e){var r=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),i=new RegExp("[\\?&]"+r+"=([^&#]*)").exec(t);if(i===null||i&&typeof i[1]!="string"&&i[1].length)return"";var n=i[1];try{n=decodeURIComponent(n)}catch{fe.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},cp=function(t,e){var r=t.match(new RegExp(e+"=([^&]*)"));return r?r[1]:null},Dn=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,r,i,n,s){if(e)if(e.addEventListener&&!n)e.addEventListener(r,i,!!s);else{var a="on"+r,o=e[a];e[a]=function(l,h,c){return function(u){if(u=u||t(window.event)){var f,p=!0;Vp(c)&&(f=c(u));var m=h.call(l,u);return f!==!1&&m!==!1||(p=!1),p}}}(e,i,o)}else fe.error("No valid element provided to register_event")}}();function ma(t,e){var r=function(){var i=Me.createElement("script");i.type="text/javascript",i.src=t,i.onload=function(a){return e(void 0,a)},i.onerror=function(a){return e(a)};var n,s=Me.querySelectorAll("body > script");s.length>0?(n=s[0].parentNode)===null||n===void 0||n.insertBefore(i,s[0]):Me.body.appendChild(i)};Me.body?r():Me.addEventListener("DOMContentLoaded",r)}var Ge={campaignParams:function(t){var e=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(t||[]),r={};return Ee(e,function(i){var n=hp(Me.URL,i);n.length&&(r[i]=n)}),r},searchEngine:function(){var t=Me.referrer;return t?t.search("https?://(.*)google.([^/?]*)")===0?"google":t.search("https?://(.*)bing.com")===0?"bing":t.search("https?://(.*)yahoo.com")===0?"yahoo":t.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var t=Ge.searchEngine(),e=t!="yahoo"?"q":"p",r={};if(t!==null){r.$search_engine=t;var i=hp(Me.referrer,e);i.length&&(r.ph_keyword=i)}return r},browser:function(t,e,r){return e=e||"",r||Se(t," OPR/")?Se(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":Se(t,"IEMobile")||Se(t,"WPDesktop")?"Internet Explorer Mobile":Se(t,"SamsungBrowser/")?"Samsung Internet":Se(t,"Edge")||Se(t,"Edg/")?"Microsoft Edge":Se(t,"FBIOS")?"Facebook Mobile":Se(t,"Chrome")?"Chrome":Se(t,"CriOS")?"Chrome iOS":Se(t,"UCWEB")||Se(t,"UCBrowser")?"UC Browser":Se(t,"FxiOS")?"Firefox iOS":Se(e,"Apple")?Se(t,"Mobile")?"Mobile Safari":"Safari":Se(t,"Android")?"Android Mobile":Se(t,"Konqueror")?"Konqueror":Se(t,"Firefox")?"Firefox":Se(t,"MSIE")||Se(t,"Trident/")?"Internet Explorer":Se(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,r){var i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[Ge.browser(t,e,r)];if(i===void 0)return null;var n=t.match(i);return n?parseFloat(n[n.length-2]):null},browserLanguage:function(){return Kr.language||Kr.userLanguage},os:function(t){if(/Windows/i.test(t)){if(/Phone/.test(t)||/WPDesktop/.test(t))return{os_name:"Windows Phone",os_version:""};var e=/Windows NT ([0-9.]+)/i.exec(t);return e&&e[1]?{os_name:"Windows",os_version:e[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(t)){var r=/OS (\d+)_(\d+)_?(\d+)?/i.exec(t);return r&&r[1]?{os_name:"iOS",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(t)){var i=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(t);return i&&i[1]?{os_name:"Android",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(t))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(t)){var n=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(t);return n&&n[1]?{os_name:"Mac OS X",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(t)?{os_name:"Linux",os_version:""}:/CrOS/.test(t)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)&&!/Mobile/.test(t)?"Android Tablet":/Android/.test(t)?"Android":""},deviceType:function(t){var e=this.device(t);return e==="iPad"||e==="Android Tablet"?"Tablet":e?"Mobile":"Desktop"},referrer:function(){return Me.referrer||"$direct"},referringDomain:function(){if(!Me.referrer)return"$direct";var t=Me.createElement("a");return t.href=Me.referrer,t.host},properties:function(){var t=Ge.os(Lt),e=t.os_name,r=t.os_version;return Xe(Sl({$os:e,$os_version:r,$browser:Ge.browser(Lt,Kr.vendor,q.opera),$device:Ge.device(Lt),$device_type:Ge.deviceType(Lt)}),{$current_url:q?.location.href,$host:q?.location.host,$pathname:q?.location.pathname,$browser_version:Ge.browserVersion(Lt,Kr.vendor,q.opera),$browser_language:Ge.browserLanguage(),$screen_height:q?.screen.height,$screen_width:q?.screen.width,$viewport_height:q?.innerHeight,$viewport_width:q?.innerWidth,$lib:"web",$lib_version:Tt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:zp()/1e3})},people_properties:function(){var t=Ge.os(Lt),e=t.os_name,r=t.os_version;return Xe(Sl({$os:e,$os_version:r,$browser:Ge.browser(Lt,Kr.vendor,q.opera)}),{$browser_version:Ge.browserVersion(Lt,Kr.vendor,q.opera)})}};function ga(t){switch(xr(t.className)){case"string":return t.className;case"object":return("baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";default:return""}}function ya(t){var e="";return la(t)&&!Gp(t)&&t.childNodes&&t.childNodes.length&&Ee(t.childNodes,function(r){Hp(r)&&r.textContent&&(e+=wl(r.textContent).split(/(\s+)/).filter(ji).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),wl(e)}function up(t){return!!t&&t.nodeType===1}function ti(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function Hp(t){return!!t&&t.nodeType===3}function pp(t){return!!t&&t.nodeType===11}var cl=["a","button","form","input","select","textarea","label"];function la(t){for(var e=t;e.parentNode&&!ti(e,"body");e=e.parentNode){var r=ga(e).split(" ");if(Se(r,"ph-sensitive")||Se(r,"ph-no-capture"))return!1}if(Se(ga(t).split(" "),"ph-include"))return!0;var i=t.type||"";if(typeof i=="string")switch(i.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";return!(typeof n=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))}function Gp(t){return!!(ti(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||ti(t,"select")||ti(t,"textarea")||t.getAttribute("contenteditable")==="true")}function ji(t){return!(t===null||Ct(t)||typeof t=="string"&&(t=wl(t),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((t||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(t)))}function dp(t){var e=ya(t);return ji(e="".concat(e," ").concat(qp(t)).trim())?e:""}function qp(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Ee(t.childNodes,function(r){var i;if(r&&((i=r.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var n=ya(r);e="".concat(e," ").concat(n).trim(),r.childNodes&&r.childNodes.length&&(e="".concat(e," ").concat(qp(r)).trim())}catch(s){console.error(s)}}),e}var Vg=function(){function t(e){De(this,t),this.clicks=[],this.enabled=e}return Fe(t,[{key:"isRageClick",value:function(e,r,i){if(!this.enabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(e-n.x)+Math.abs(r-n.y)<30&&i-n.timestamp<1e3){if(this.clicks.push({x:e,y:r,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:r,timestamp:i}];return!1}}]),t}(),Up="$people_distinct_id",ha="__alias",Mn="__timers",fp="$autocapture_disabled_server_side",El="$session_recording_enabled_server_side",mp="$console_log_recording_enabled_server_side",gp="$session_recording_recorder_version_server_side",va="$sesid",Hi="$enabled_feature_flags",kl="$early_access_features",Gi="$stored_person_properties",_r="$stored_group_properties",Pl="$surveys",ba="$flag_call_reported",Al="$user_state",Cl="$posthog_quota_limited",Ng=[Up,ha,"__cmpns",Mn,El,va,Hi,Al,Cl,kl,_r,Gi,Pl,ba];function ul(t,e){return e.length>t?e.slice(0,t)+"...":e}var wr={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(t){var e,r=this._isDisabledServerSide===null?!((e=t.persistence)===null||e===void 0||!e.props[fp]):this._isDisabledServerSide,i=!!t.config.autocapture;this._isAutocaptureEnabled=i&&!r},_previousElementSibling:function(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!up(e));return e},_getAugmentPropertiesFromElement:function(t){if(!la(t))return{};var e={};return Ee(t.attributes,function(r){if(r.name.indexOf("data-ph-capture-attribute")===0){var i=r.name.replace("data-ph-capture-attribute-",""),n=r.value;i&&n&&ji(n)&&(e[i]=n)}}),e},_getPropertiesFromElement:function(t,e,r){var i,n=t.tagName.toLowerCase(),s={tag_name:n};cl.indexOf(n)>-1&&!r&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=ul(1024,dp(t)):s.$el_text=ul(1024,ya(t)));var a=ga(t);a.length>0&&(s.classes=a.split(" ").filter(function(u){return u!==""}));var o=(i=this.config)===null||i===void 0?void 0:i.element_attribute_ignorelist;Ee(t.attributes,function(u){var f;Gp(t)&&["name","id","class"].indexOf(u.name)===-1||o!=null&&o.includes(u.name)||!e&&ji(u.value)&&(typeof(f=u.name)!="string"||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")&&(s["attr__"+u.name]=ul(1024,u.value))});for(var l=1,h=1,c=t;c=this._previousElementSibling(c);)l++,c.tagName===t.tagName&&h++;return s.nth_child=l,s.nth_of_type=h,s},_getDefaultProperties:function(t){return{$event_type:t,$ce_version:1}},_extractCustomPropertyValue:function(t){var e=[];return Ee(document.querySelectorAll(t.css_selector),function(r){var i;["input","select"].indexOf(r.tagName.toLowerCase())>-1?i=r.value:r.textContent&&(i=r.textContent),ji(i)&&e.push(i)}),e.join(", ")},_getCustomProperties:function(t){var e=this,r={};return Ee(this._customProperties,function(i){Ee(i.event_selectors,function(n){Ee(document.querySelectorAll(n),function(s){Se(t,s)&&la(s)&&(r[i.name]=e._extractCustomPropertyValue(i))})})}),r},_getEventTarget:function(t){return t.target===void 0?t.srcElement||null:(e=t.target)!==null&&e!==void 0&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e},_captureEvent:function(t,e){var r,i=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",s=this._getEventTarget(t);if(Hp(s)&&(s=s.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this._captureEvent(t,e,"$rageclick"),s&&function(g,d){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!g||ti(g,"html")||!up(g))return!1;if(y!=null&&y.url_allowlist){var v=window.location.href,b=y.url_allowlist;if(b&&!b.some(function(k){return v.match(k)}))return!1}if(y!=null&&y.dom_event_allowlist){var _=y.dom_event_allowlist;if(_&&!_.some(function(k){return d.type===k}))return!1}if(y!=null&&y.element_allowlist){var x=y.element_allowlist;if(x&&!x.some(function(k){return g.tagName.toLowerCase()===k}))return!1}if(y!=null&&y.css_selector_allowlist){var T=y.css_selector_allowlist;if(T&&!T.some(function(k){return g.matches(k)}))return!1}for(var S=!1,w=[g],M=!0,E=g;E.parentNode&&!ti(E,"body");)if(pp(E.parentNode))w.push(E.parentNode.host),E=E.parentNode.host;else{if(!(M=E.parentNode||!1))break;if(cl.indexOf(M.tagName.toLowerCase())>-1)S=!0;else{var I=window.getComputedStyle(M);I&&I.getPropertyValue("cursor")==="pointer"&&(S=!0)}w.push(M),E=M}var P=window.getComputedStyle(g);if(P&&P.getPropertyValue("cursor")==="pointer"&&d.type==="click")return!0;var A=g.tagName.toLowerCase();switch(A){case"html":return!1;case"form":return d.type==="submit";case"input":case"select":case"textarea":return d.type==="change"||d.type==="click";default:return S?d.type==="click":d.type==="click"&&(cl.indexOf(A)>-1||g.getAttribute("contenteditable")==="true")}}(s,t,this.config)){for(var a,o,l=[s],h=s;h.parentNode&&!ti(h,"body");)pp(h.parentNode)?(l.push(h.parentNode.host),h=h.parentNode.host):(l.push(h.parentNode),h=h.parentNode);var c,u=[],f={},p=!1;if(Ee(l,function(g){var d=la(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=d&&ji(c)&&c),Se(ga(g).split(" "),"ph-no-capture")&&(p=!0),u.push(i._getPropertiesFromElement(g,e.config.mask_all_element_attributes,e.config.mask_all_text));var y=i._getAugmentPropertiesFromElement(g);Xe(f,y)}),e.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?u[0].$el_text=dp(s):u[0].$el_text=ya(s)),c&&(u[0].attr__href=c),p)return!1;var m=Xe(this._getDefaultProperties(t.type),{$elements:u},(a=u[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(o=u[0])===null||o===void 0?void 0:o.$el_text}:{},this._getCustomProperties(l),f);return e.capture(n,m),!0}},_navigate:function(t){window.location.href=t},_addDomEventHandlers:function(t){var e=this,r=function(i){i=i||window.event,e._captureEvent(i,t)};Dn(document,"submit",r,!1,!0),Dn(document,"change",r,!1,!0),Dn(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(t){var e;typeof t.__autocapture!="boolean"&&(this.config=t.__autocapture),(e=this.config)!==null&&e!==void 0&&e.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(r){return new RegExp(r)})),this.rageclicks=new Vg(t.config.rageclick)},afterDecideResponse:function(t,e){var r=e.config.token;this._initializedTokens.indexOf(r)>-1?fe.log('autocapture already initialized for token "'+r+'"'):(e.persistence&&e.persistence.register(Y({},fp,!!t.autocapture_opt_out)),this._isDisabledServerSide=!!t.autocapture_opt_out,this._setIsAutocaptureEnabled(e),this._initializedTokens.push(r),t&&t.config&&t.config.enable_collect_everything&&this._isAutocaptureEnabled?(t.custom_properties&&(this._customProperties=t.custom_properties),this._addDomEventHandlers(e)):e.__autocapture=!1)},enabledForProject:function(t,e,r){if(!t)return!0;e=Ct(e)?10:e,r=Ct(r)?10:r;for(var i=0,n=0;n<t.length;n++)i+=t.charCodeAt(n);return i%e<r},isBrowserSupported:function(){return Vp(document.querySelectorAll)}};(function(t){for(var e in t)typeof t[e]=="function"&&(t[e]=t[e].bind(t))})(wr),function(t){for(var e in t)typeof t[e]=="function"&&(t[e]=jp(t[e]))}(wr);var pl="$active_feature_flags",ia="$override_feature_flags",yp="$feature_flag_payloads",vp=function(t){var e,r={},i=or(function(o){for(var l=Object.keys(o),h=l.length,c=new Array(h);h--;)c[h]=[l[h],o[l[h]]];return c}(t||{}));try{for(i.s();!(e=i.n()).done;){var n=ar(e.value,2),s=n[0],a=n[1];a&&(r[s]=a)}}catch(o){i.e(o)}finally{i.f()}return r},zg=function(){function t(e){De(this,t),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Fe(t,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Hi),r=this.instance.get_property(ia);if(!r)return e||{};for(var i=Xe({},e),n=Object.keys(r),s=0;s<n.length;s++)r[n[s]]===!1?delete i[n[s]]:i[n[s]]=r[n[s]];return this._override_warning||(console.warn("[PostHog] Overriding feature flags!",{enabledFlags:e,overriddenFlags:r,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(yp)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;this.setReloadingPaused(!0);var r=this.instance.config.token,i=this.instance.get_property(Gi),n=this.instance.get_property(_r),s=Bl(JSON.stringify({token:r,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:i,group_properties:n,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.config.api_host+"/decide/?v=3",{data:s},{method:"POST"},this.instance._prepare_callback(function(a){e.$anon_distinct_id=void 0,e.receivedFeatureFlags(a),e.setReloadingPaused(!1),e._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var i,n=this.getFlagVariants()[e],s="".concat(n),a=this.instance.get_property(ba)||{};return(r.send_event||!("send_event"in r))&&(!(e in a)||!a[e].includes(s))&&(Array.isArray(a[e])?a[e].push(s):a[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(Y({},ba,a)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}console.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,r);console.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(r){return r!==e})}},{key:"receivedFeatureFlags",value:function(e){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads();(function(n,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=n.featureFlags,h=n.featureFlagPayloads;if(l)if(Array.isArray(l)){var c,u={};if(l)for(var f=0;f<l.length;f++)u[l[f]]=!0;s&&s.register((Y(c={},pl,l),Y(c,Hi,u),c))}else{var p,m=l,g=h;n.errorsWhileComputingFlags&&(m=ie(ie({},a),m),g=ie(ie({},o),g)),s&&s.register((Y(p={},pl,Object.keys(vp(m))),Y(p,Hi,m||{}),Y(p,yp,g||{}),p))}})(e,this.instance.persistence,r,i),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return fe.unintializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(ia);else if(Array.isArray(e)){for(var r={},i=0;i<e.length;i++)r[e[i]]=!0;this.instance.persistence.register(Y({},ia,r))}else this.instance.persistence.register(Y({},ia,e))}},{key:"onFeatureFlags",value:function(e){var r=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var i=this._prepareFeatureFlagsForCallbacks(),n=i.flags,s=i.flagVariants;e(n,s)}return function(){return r.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){var i,n,s=Y({},"$feature_enrollment/".concat(e),r);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:r,$set:s}),this.setPersonPropertiesForFlags(s,!1);var a=ie(ie({},this.getFlagVariants()),{},Y({},e,r));(i=this.instance.persistence)===null||i===void 0||i.register((Y(n={},pl,Object.keys(vp(a))),Y(n,Hi,a),n)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(kl);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/early_access_features/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.earlyAccessFeatures;return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},kl,o)),e(o)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),r=this.getFlagVariants();return{flags:e.filter(function(i){return r[i]}),flagVariants:Object.keys(r).filter(function(i){return r[i]}).reduce(function(i,n){return i[n]=r[n],i},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var e=this._prepareFeatureFlagsForCallbacks(),r=e.flags,i=e.flagVariants;this.featureFlagEventHandlers.forEach(function(n){return n(r,i)})}},{key:"setPersonPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Gi)||{};this.instance.register(Y({},Gi,ie(ie({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Gi)}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(_r)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(n){i[n]=ie(ie({},i[n]),e[n]),delete e[n]}),this.instance.register(Y({},_r,ie(ie({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var r=this.instance.get_property(_r)||{};this.instance.register(Y({},_r,ie(ie({},r),{},Y({},e,{}))))}else this.instance.unregister(_r)}}]),t}(),jg=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,sr={is_supported:function(){return!0},error:function(t){fe.error("cookieStore error: "+t)},get:function(t){try{for(var e=t+"=",r=document.cookie.split(";").filter(function(s){return s.length}),i=0;i<r.length;i++){for(var n=r[i];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null},parse:function(t){var e;try{e=JSON.parse(sr.get(t))||{}}catch{}return e},set:function(t,e,r,i,n){try{var s="",a="",o="";if(i){var l=document.location.hostname.match(jg),h=l?l[0]:"";s=h?"; domain=."+h:""}if(r){var c=new Date;c.setTime(c.getTime()+24*r*60*60*1e3),a="; expires="+c.toUTCString()}n&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+a+"; SameSite=Lax; path=/"+s+o;return document.cookie=u,u}catch{return}},remove:function(t,e){try{sr.set(t,"",-1,e)}catch{return}}},dl=null,Oe={is_supported:function(){if(dl!==null)return dl;var t=!0;if(typeof window<"u")try{var e="__mplssupport__";Oe.set(e,"xyz"),Oe.get(e)!=='"xyz"'&&(t=!1),Oe.remove(e)}catch{t=!1}else t=!1;return t||fe.error("localStorage unsupported; falling back to cookie store"),dl=t,t},error:function(t){fe.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){Oe.error(e)}return null},parse:function(t){try{return JSON.parse(Oe.get(t))||{}}catch{}return null},set:function(t,e){try{window.localStorage.setItem(t,JSON.stringify(e))}catch(r){Oe.error(r)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){Oe.error(e)}}},Hg=["distinct_id",va],Tl=ie(ie({},Oe),{},{parse:function(t){try{var e={};try{e=sr.parse(t)||{}}catch{}var r=Xe(e,JSON.parse(Oe.get(t)||"{}"));return Oe.set(t,r),r}catch{}return null},set:function(t,e,r,i,n){try{Oe.set(t,e);var s={};Hg.forEach(function(a){e[a]&&(s[a]=e[a])}),Object.keys(s).length&&sr.set(t,s,r,i,n)}catch(a){Oe.error(a)}},remove:function(t,e){try{window.localStorage.removeItem(t),sr.remove(t,e)}catch(r){Oe.error(r)}}}),na={},Gg={is_supported:function(){return!0},error:function(t){fe.error("memoryStorage error: "+t)},get:function(t){return na[t]||null},parse:function(t){return na[t]||null},set:function(t,e){na[t]=e},remove:function(t){delete na[t]}},Xr=null,Ue={is_supported:function(){if(Xr!==null)return Xr;if(Xr=!0,typeof window<"u")try{var t="__support__";Ue.set(t,"xyz"),Ue.get(t)!=='"xyz"'&&(Xr=!1),Ue.remove(t)}catch{Xr=!1}else Xr=!1;return Xr},error:function(t){Tt.DEBUG&&fe.error("sessionStorage error: ",t)},get:function(t){try{return window.sessionStorage.getItem(t)}catch(e){Ue.error(e)}return null},parse:function(t){try{return JSON.parse(Ue.get(t))||null}catch{}return null},set:function(t,e){try{window.sessionStorage.setItem(t,JSON.stringify(e))}catch(r){Ue.error(r)}},remove:function(t){try{window.sessionStorage.removeItem(t)}catch(e){Ue.error(e)}}},qg=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],bp=function(){function t(e){De(this,t);var r="";e.token&&(r=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=e.custom_campaign_params||[],e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+r+"_posthog",qg.indexOf(e.persistence.toLowerCase())===-1&&(fe.critical("Unknown persistence type "+e.persistence+"; falling back to cookie"),e.persistence="cookie");var i=e.persistence.toLowerCase();i==="localstorage"&&Oe.is_supported()?this.storage=Oe:i==="localstorage+cookie"&&Tl.is_supported()?this.storage=Tl:i==="sessionstorage"&&Ue.is_supported()?this.storage=Ue:this.storage=i==="memory"?Gg:sr,this.user_state="anonymous",this.load(),this.update_config(e),this.save()}return Fe(t,[{key:"properties",value:function(){var e={};return Ee(this.props,function(r,i){if(i===Hi&&xr(r)==="object")for(var n=Object.keys(r),s=0;s<n.length;s++)e["$feature/".concat(n[s])]=r[n[s]];else o=i,l=!1,((a=Ng)===null?l:lp&&a.indexOf===lp?a.indexOf(o)!=-1:(Ee(a,function(h){if(l||(l=h===o))return Ll}),l))||(e[i]=r);var a,o,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Xe({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,r,i){var n=this;if(xl(e)){r===void 0&&(r="None"),this.expire_days=i===void 0?this.default_expiry:i;var s=!1;if(Ee(e,function(a,o){n.props.hasOwnProperty(o)&&n.props[o]!==r||(n.props[o]=a,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,r){var i=this;if(xl(e)){this.expire_days=r===void 0?this.default_expiry:r;var n=!1;if(Ee(e,function(s,a){e.hasOwnProperty(a)&&i.props[a]!==s&&(i.props[a]=s,n=!0)}),n)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(Ge.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(Ge.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||Ge.referrer(),$referring_domain:this.props.$referring_domain||Ge.referringDomain()})}},{key:"get_referrer_info",value:function(){return Sl({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return Ee(this.props,function(r,i){i in e||(e[i]=r)}),e}},{key:"update_config",value:function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,r){var i=this.props[Mn]||{};i[e]=r,this.props[Mn]=i,this.save()}},{key:"remove_event_timer",value:function(e){var r=(this.props[Mn]||{})[e];return Ct(r)||(delete this.props[Mn][e],this.save()),r}},{key:"get_user_state",value:function(){return this.props[Al]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[Al]=e,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Cl]||{}}},{key:"set_quota_limits",value:function(e){this.props[Cl]=e,this.save()}}]),t}(),Ug="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",_p=2,Wg=4,Wp=3,Zg=6,Yg=0,Jg=5e6,Xg="rrweb/console@1",Gt,Kg=Fe(function t(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};De(this,t),Y(this,"bucketSize",100),Y(this,"refillRate",10),Y(this,"mutationBuckets",{}),Y(this,"loggedTracker",{}),Y(this,"refillBuckets",function(){Object.keys(n.mutationBuckets).forEach(function(a){n.mutationBuckets[a]=n.mutationBuckets[a]+n.refillRate,n.mutationBuckets[a]>=n.bucketSize&&delete n.mutationBuckets[a]})}),Y(this,"getNodeOrRelevantParent",function(a){var o=n.rrweb.mirror.getNode(a);if(o?.nodeName!=="svg"&&o instanceof Element){var l=o.closest("svg");if(l)return[n.rrweb.mirror.getId(l),l]}return[a,o]}),Y(this,"numberOfChanges",function(a){var o,l,h,c,u,f,p,m;return((o=(l=a.removes)===null||l===void 0?void 0:l.length)!==null&&o!==void 0?o:0)+((h=(c=a.attributes)===null||c===void 0?void 0:c.length)!==null&&h!==void 0?h:0)+((u=(f=a.texts)===null||f===void 0?void 0:f.length)!==null&&u!==void 0?u:0)+((p=(m=a.adds)===null||m===void 0?void 0:m.length)!==null&&p!==void 0?p:0)}),Y(this,"throttleMutations",function(a){if(a.type!==Wp||a.data.source!==Yg)return a;var o=a.data,l=n.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(function(c){var u,f,p,m=ar(n.getNodeOrRelevantParent(c.id),2),g=m[0],d=m[1];return n.mutationBuckets[g]===0?!1:(n.mutationBuckets[g]=(u=n.mutationBuckets[g])!==null&&u!==void 0?u:n.bucketSize,n.mutationBuckets[g]=Math.max(n.mutationBuckets[g]-1,0),n.mutationBuckets[g]===0&&(n.loggedTracker[g]||(n.loggedTracker[g]=!0,(f=(p=n.options).onBlockedNode)===null||f===void 0||f.call(p,g,d))),c)}));var h=n.numberOfChanges(o);return h!==0||l===h?a:void 0}),this.rrweb=e,this.options=s,this.refillRate=(r=this.options.refillRate)!==null&&r!==void 0?r:this.refillRate,this.bucketSize=(i=this.options.bucketSize)!==null&&i!==void 0?i:this.bucketSize,setInterval(function(){n.refillBuckets()},1e3)}),Zp=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}(Zp||{}),Qg="/s/";(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(Gt||(Gt={}));var e0=[Gt.MouseMove,Gt.MouseInteraction,Gt.Scroll,Gt.ViewportResize,Gt.Input,Gt.TouchMove,Gt.MediaInteraction,Gt.Drag],t0=function(){function t(e){var r=this;De(this,t),Y(this,"lastActivityTimestamp",Date.now()),Y(this,"isIdle",!1),this.instance=e,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=Qg,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){r._flushBuffer()})}return Fe(t,[{key:"getSessionManager",value:function(){if(this.instance.sessionManager)return this.instance.sessionManager;fe.error("Session recording started without valid sessionManager")}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var e=!!this.instance.get_property(El),r=!this.instance.config.disable_session_recording;return e&&r}},{key:"isConsoleLogCaptureEnabled",value:function(){var e=!!this.instance.get_property(mp),r=this.instance.config.enable_recording_console_log;return r??e}},{key:"getRecordingVersion",value:function(){var e,r=this.instance.get_property(gp);return((e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recorderVersion)||r||"v1"}},{key:"afterDecideResponse",value:function(e){var r,i,n,s,a,o;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((Y(a={},El,!!e.sessionRecording),Y(a,mp,(n=e.sessionRecording)===null||n===void 0?void 0:n.consoleLogRecordingEnabled),Y(a,gp,(s=e.sessionRecording)===null||s===void 0?void 0:s.recorderVersion),a)),(r=e.sessionRecording)!==null&&r!==void 0&&r.endpoint&&(this.endpoint=(o=e.sessionRecording)===null||o===void 0?void 0:o.endpoint),(i=e.sessionRecording)!==null&&i!==void 0&&i.recorderVersion&&(this.recorderVersion=e.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"log",value:function(e){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:i,trace:[],payload:[JSON.stringify(e)]}},timestamp:zp()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var e=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(r){return e._captureSnapshotBuffered(r)})),this._startCapture()}},{key:"_startCapture",value:function(){var e=this,r=this.getSessionManager();if(r&&Object.assign!==void 0&&!this.captureStarted&&!this.instance.config.disable_session_recording){this.captureStarted=!0,r.checkAndGetSessionAndWindowId();var i=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?ma(this.instance.config.api_host+"/static/".concat(i,"?v=").concat(Tt.LIB_VERSION),function(n){if(n)return fe.error("Could not load ".concat(i),n);e._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(e){var r;return e.type===Wp&&e0.indexOf((r=e.data)===null||r===void 0?void 0:r.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(e){var r=this.getSessionManager();if(r){var i=this._isInteractiveEvent(e);if(i||this.isIdle||e.timestamp-this.lastActivityTimestamp>3e5&&(this.isIdle=!0),i&&(this.lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var n=r.checkAndGetSessionAndWindowId(!i,e.timestamp),s=n.windowId,a=n.sessionId;[_p,Wg].indexOf(e.type)!==-1||this.windowId===s&&this.sessionId===a||this._tryTakeFullSnapshot(),this.windowId=s,this.sessionId=a}}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this.captureStarted)return!1;try{var e;return(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot(),!0}catch(r){return fe.error("Error taking full snapshot.",r),!1}}},{key:"_onScriptLoaded",value:function(){var e,r=this,i={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var n=this.instance.config.session_recording,s=0,a=Object.entries(n||{});s<a.length;s++){var o=ar(a[s],2),l=o[0],h=o[1];l in i&&(i[l]=h)}this.rrwebRecord?(this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new Kg(this.rrwebRecord,{onBlockedNode:function(c,u){var f="Too many mutations on node '".concat(c,"'. Rate limiting. This could be due to SVG animations or something similar");fe.log(f,{node:u}),r.log("[PostHog Recorder] "+f,"warn")}}),this.stopRrweb=this.rrwebRecord(ie({emit:function(c){r.onRRwebEmit(c)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled()?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},i)),this.instance._addCaptureHook(function(c){try{if(c==="$pageview"){var u,f=r._maskUrl(window.location.href);if(!f)return;(u=r.rrwebRecord)===null||u===void 0||u.addCustomEvent("$pageview",{href:f})}}catch(p){fe.error("Could not add $pageview to rrweb session",p)}}),this.lastActivityTimestamp=Date.now(),this.isIdle=!1):fe.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(e){if(e&&xr(e)==="object"){if(e.type===Zp.Meta){var r=this._maskUrl(e.data.href);if(!r)return;e.data.href=r}var i=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(i){var n=function(l){var h=JSON.stringify(l);if(h.length>Jg){var c,u=or(h.matchAll(/data:([\w/\-.]+);(\w+),([^)"]*)/gim));try{for(u.s();!(c=u.n()).done;){var f=c.value;h=f[1].toLocaleLowerCase().slice(0,6)==="image/"?h.replace(f[0],Ug):h.replace(f[0],"")}}catch(p){u.e(p)}finally{u.f()}}return{event:JSON.parse(h),size:h.length}}(function(l){var h=l;if(h&&xr(h)==="object"&&h.type===Zg&&xr(h.data)==="object"&&h.data.plugin===Xg){h.data.payload.payload.length>10&&(h.data.payload.payload=h.data.payload.payload.slice(0,10),h.data.payload.payload.push("...[truncated]"));for(var c=[],u=0;u<h.data.payload.payload.length;u++)h.data.payload.payload[u]&&h.data.payload.payload[u].length>2e3?c.push(h.data.payload.payload[u].slice(0,2e3)+"...[truncated]"):c.push(h.data.payload.payload[u]);return h.data.payload.payload=c,l}return l}(i)),s=n.event,a=n.size;if(this._updateWindowAndSessionIds(s),!this.isIdle){var o={$snapshot_bytes:a,$snapshot_data:s,$session_id:this.sessionId,$window_id:this.windowId};this.emit?this._captureSnapshotBuffered(o):this.snapshots.push(o)}}}}},{key:"_maskUrl",value:function(e){var r=this.instance.config.session_recording;if(r.maskNetworkRequestFn){var i,n={url:e};return(i=n=r.maskNetworkRequestFn(n))===null||i===void 0?void 0:i.url}return e}},{key:"_flushBuffer",value:function(){return this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0),this.buffer&&this.buffer.data.length!==0&&this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.buffer=void 0,{size:0,data:[],sessionId:this.sessionId,windowId:this.windowId}}},{key:"_captureSnapshotBuffered",value:function(e){var r,i=this,n=2+(((r=this.buffer)===null||r===void 0?void 0:r.data.length)||0);(!this.buffer||this.buffer.size+e.$snapshot_bytes+n>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){i._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===_p}})}}]),t}(),Ht={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},r0=["first-input","navigation","paint","resource"],i0=["/s/","/e/"],n0=function(){function t(e){De(this,t),Y(this,"_forceAllowLocalhost",!1),this.instance=e}return Fe(t,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e,r,i=this;if(!this.observer)if(((e=window)===null||e===void 0||(r=e.PerformanceObserver)===null||r===void 0?void 0:r.supportedEntryTypes)!==void 0)if(!Mg.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(s){s.getEntries().forEach(function(a){i._capturePerformanceEvent(a)})});var n=PerformanceObserver.supportedEntryTypes.filter(function(s){return r0.includes(s)});n.forEach(function(s){var a;(a=i.observer)===null||a===void 0||a.observe({type:s,buffered:!0})})}catch(s){console.error("PostHog failed to start performance observer",s),this.stopObserving()}else fe.log("PostHog Peformance observer not started because we are on localhost.");else fe.log("PostHog Performance observer not started because PerformanceObserver is not supported by this browser.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,r;return(e=(r=this.instance.config.capture_performance)!==null&&r!==void 0?r:this.remoteEnabled)!==null&&e!==void 0&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.indexOf(this.instance.config.api_host)===0){var r=e.name.replace(this.instance.config.api_host,"");if(i0.find(function(p){return r.indexOf(p)===0}))return}var i={url:e.name},n=this.instance.config.session_recording;if(n.maskNetworkRequestFn&&(i=n.maskNetworkRequestFn(i)),i){var s=e.toJSON();s.name=i.url;var a={},o=Math.floor(Date.now()-performance.now());for(var l in a[Ht.timeOrigin]=o,a[Ht.timestamp]=Math.floor(o+e.startTime),Ht)s[l]!==void 0&&(a[Ht[l]]=s[l]);if(this.capturePerformanceEvent(a),s0(e)){var h,c=or(e.serverTiming||[]);try{for(c.s();!(h=c.n()).done;){var u,f=h.value;this.capturePerformanceEvent((Y(u={},Ht.timeOrigin,o),Y(u,Ht.timestamp,Math.floor(o+e.startTime)),Y(u,Ht.name,f.name),Y(u,Ht.duration,f.duration),Y(u,Ht.entryType,"serverTiming"),u))}}catch(p){c.e(p)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(e){var r,i=e[Ht.timestamp];(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:e},timestamp:i})}}]),t}(),s0=function(t){return t.entryType==="navigation"||t.entryType==="resource"},a0=function(){function t(e){De(this,t),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Fe(t,[{key:"call",value:function(){var e=this,r=Bl(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Gi),group_properties:this.instance.get_property(_r),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0}));this.instance._send_request("".concat(this.instance.config.api_host,"/decide/?v=3"),{data:r,verbose:!0},{method:"POST"},function(i){return e.parseDecideResponse(i)})}},{key:"parseDecideResponse",value:function(e){var r,i,n,s,a=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),e?.status!==0){if(!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){a.parseDecideResponse(e)},500);if(this.instance.toolbar.afterDecideResponse(e),(r=this.instance.sessionRecording)===null||r===void 0||r.afterDecideResponse(e),wr.afterDecideResponse(e,this.instance),(i=this.instance.webPerformance)===null||i===void 0||i.afterDecideResponse(e),(n=this.instance.exceptionAutocapture)===null||n===void 0||n.afterDecideResponse(e),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.featureFlags.receivedFeatureFlags(e),this.instance.compression={},e.supportedCompression&&!this.instance.config.disable_compression){var o,l={},h=or(e.supportedCompression);try{for(h.s();!(o=h.n()).done;)l[o.value]=!0}catch(g){h.e(g)}finally{h.f()}this.instance.compression=l}var c=(s=window)===null||s===void 0?void 0:s.extendPostHogWithSurveys;if(e.surveys&&!c&&ma(this.instance.config.api_host+"/static/surveys.js",function(g){if(g)return console.error("Could not load surveys script",g);window.extendPostHogWithSurveys(a.instance)}),e.siteApps)if(this.instance.config.opt_in_site_apps){var u,f=this.instance.config.api_host,p=or(e.siteApps);try{var m=function(){var g=u.value,d=g.id,y=g.url,v=[f,f[f.length-1]==="/"&&y[0]==="/"?y.substring(1):y].join("");window["__$$ph_site_app_".concat(d)]=a.instance,ma(v,function(b){b&&console.error("Error while initializing PostHog app with config id ".concat(d),b)})};for(p.s();!(u=p.n()).done;)m()}catch(g){p.e(g)}finally{p.f()}}else e.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),t}(),o0=["https://app.posthog.com","https://eu.posthog.com"],l0=["source"],h0=function(){function t(e){De(this,t),this.instance=e}return Fe(t,[{key:"afterDecideResponse",value:function(e){var r=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&r.toolbarVersion&&r.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(ie({},r))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!r){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}r=window.localStorage}var n,s=cp(e.hash,"__posthog")||cp(e.hash,"state"),a=s?JSON.parse(decodeURIComponent(s)):null;return a&&a.action==="ph_authorize"?((n=a).source="url",n&&Object.keys(n).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState("",document.title,e.pathname+e.search):e.hash="")):((n=JSON.parse(r.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token)&&(this.loadToolbar(n),!0)}catch{return!1}}},{key:"loadToolbar",value:function(e){var r=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var i=this.instance.config.api_host,n=3e5,s=Math.floor(Date.now()/n)*n,a="".concat(i).concat(i.endsWith("/")?"":"/","static/toolbar.js?t=").concat(s),o=!o0.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=ie(ie({token:this.instance.config.token},e),{},{apiURL:i},o?{instrument:!1}:{});l.source;var h=Cg(l,l0);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(h)),ma(a,function(c){c?fe.error("Failed to load toolbar",c):(window.ph_load_toolbar||window.ph_load_editor)(l,r.instance)}),Dn(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,r.loadToolbar(l)}),!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(e,r,i)}}]),t}(),c0="__ph_opt_in_out_";function u0(t,e){Jp(!0,t,e)}function p0(t,e){Jp(!1,t,e)}function d0(t,e){return Yp(t,e)==="1"}function wp(t,e){return!!function(r){if(r&&r.respectDnt){var i=r&&r.window||q,n=i.navigator||{},s=!1;return Ee([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],function(a){Se([!0,1,"1","yes"],a)&&(s=!0)}),s}return!1}(e)||Yp(t,e)==="0"}function f0(t,e){Vl(e=e||{}).remove(Nl(t,e),!!e.crossSubdomainCookie)}function Vl(t){return(t=t||{}).persistenceType==="localStorage"?Oe:t.persistenceType==="localStorage+cookie"?Tl:sr}function Nl(t,e){return((e=e||{}).persistencePrefix||c0)+t}function Yp(t,e){return Vl(e).get(Nl(t,e))}function Jp(t,e,r){Np(e)&&e.length?(Vl(r=r||{}).set(Nl(e,r),t?1:0,Fg(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&t&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):console.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}var Xp=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;De(this,t),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=e}return Fe(t,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),t}(),m0=function(t){$p(r,Xp);var e=Rp(r);function r(i){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return De(this,r),(n=e.call(this,s)).handlePollRequest=i,n}return Fe(r,[{key:"enqueue",value:function(i,n,s){this._event_queue.push({url:i,data:n,options:s}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var i=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(i._event_queue.length>0){var n=i.formatQueue(),s=function(o){var l=n[o],h=l.url,c=l.data,u=l.options;Ee(c,function(f,p){c[p].offset=Math.abs(c[p].timestamp-i.getTime()),delete c[p].timestamp}),i.handlePollRequest(h,c,u)};for(var a in n)s(a);i._event_queue.length=0,i._empty_queue_count=0}else i._empty_queue_count++;i._empty_queue_count>4&&(i.isPolling=!1,i._empty_queue_count=0),i.isPolling&&i.poll()},this._pollInterval)}},{key:"unload",value:function(){var i=this;clearTimeout(this._poller);var n=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var s=Object.values(n);[].concat(bl(s.filter(function(a){return a.url.indexOf("/e")===0})),bl(s.filter(function(a){return a.url.indexOf("/e")!==0}))).map(function(a){var o=a.url,l=a.data,h=a.options;i.handlePollRequest(o,l,ie(ie({},h),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var i={};return Ee(this._event_queue,function(n){var s=n.url,a=n.data,o=n.options,l=(o?o._batchKey:null)||s;i[l]===void 0&&(i[l]={data:[],url:s,options:o}),o&&i[l].options&&i[l].options._metrics&&!i[l].options._metrics.rrweb_full_snapshot&&(i[l].options._metrics.rrweb_full_snapshot=o._metrics.rrweb_full_snapshot),i[l].data.push(a)}),i}}]),r}(),vt=Uint8Array,rt=Uint16Array,qi=Uint32Array,zl=new vt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jl=new vt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),xp=new vt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kp=function(t,e){for(var r=new rt(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new qi(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},Qp=Kp(zl,2),g0=Qp[0],Il=Qp[1];g0[28]=258,Il[258]=28;for(Ml=Kp(jl,0)[1],_a=new rt(32768),Pe=0;Pe<32768;++Pe)vr=(43690&Pe)>>>1|(21845&Pe)<<1,vr=(61680&(vr=(52428&vr)>>>2|(13107&vr)<<2))>>>4|(3855&vr)<<4,_a[Pe]=((65280&vr)>>>8|(255&vr)<<8)>>>1;var vr,Ml,_a,Pe,Fn=function(t,e,r){for(var i=t.length,n=0,s=new rt(e);n<i;++n)++s[t[n]-1];var a,o=new rt(e);for(n=0;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new rt(1<<e);var l=15-e;for(n=0;n<i;++n)if(t[n])for(var h=n<<4|t[n],c=e-t[n],u=o[t[n]-1]++<<c,f=u|(1<<c)-1;u<=f;++u)a[_a[u]>>>l]=h}else for(a=new rt(i),n=0;n<i;++n)a[n]=_a[o[t[n]-1]++]>>>15-t[n];return a},ri=new vt(288);for(Pe=0;Pe<144;++Pe)ri[Pe]=8;for(Pe=144;Pe<256;++Pe)ri[Pe]=9;for(Pe=256;Pe<280;++Pe)ri[Pe]=7;for(Pe=280;Pe<288;++Pe)ri[Pe]=8;var wa=new vt(32);for(Pe=0;Pe<32;++Pe)wa[Pe]=5;var Qr,y0=Fn(ri,9,0),v0=Fn(wa,5,0),ed=function(t){return(t/8>>0)+(7&t&&1)},td=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t instanceof rt?rt:t instanceof qi?qi:vt)(r-e);return i.set(t.subarray(e,r)),i},rr=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Tn=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},fl=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new vt(0),0];if(n==1){var a=new vt(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new rt(f+1),m=b0(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new vt(p),m]},b0=function t(e,r,i){return e.s==-1?Math.max(t(e.l,r,i+1),t(e.r,r,i+1)):r[e.s]=i},Sp=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new rt(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},In=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},ca=function(t,e,r){var i=r.length,n=ed(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Ep=function(t,e,r,i,n,s,a,o,l,h,c){rr(e,c++,r),++n[256];for(var u=fl(n,15),f=u[0],p=u[1],m=fl(s,15),g=m[0],d=m[1],y=Sp(f),v=y[0],b=y[1],_=Sp(g),x=_[0],T=_[1],S=new rt(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=fl(S,7),E=M[0],I=M[1],P=19;P>4&&!E[xp[P-1]];--P);var A,k,F,O,D=h+5<<3,C=In(n,ri)+In(s,wa)+a,$=In(n,f)+In(s,g)+a+14+3*P+In(S,E)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return ca(e,c,t.subarray(l,l+h));if(rr(e,c,1+($<C)),c+=2,$<C){A=Fn(f,p,0),k=f,F=Fn(g,d,0),O=g;var R=Fn(E,I,0);for(rr(e,c,b-257),rr(e,c+5,T-1),rr(e,c+10,P-4),c+=14,w=0;w<P;++w)rr(e,c+3*w,E[xp[w]]);c+=3*P;for(var G=[v,x],U=0;U<2;++U){var Z=G[U];for(w=0;w<Z.length;++w){var j=31&Z[w];rr(e,c,R[j]),c+=E[j],j>15&&(rr(e,c,Z[w]>>>5&127),c+=Z[w]>>>12)}}}else A=y0,k=ri,F=v0,O=wa;for(w=0;w<o;++w)if(i[w]>255){j=i[w]>>>18&31,Tn(e,c,A[j+257]),c+=k[j+257],j>7&&(rr(e,c,i[w]>>>23&31),c+=zl[j]);var ee=31&i[w];Tn(e,c,F[ee]),c+=O[ee],ee>3&&(Tn(e,c,i[w]>>>5&8191),c+=jl[ee])}else Tn(e,c,A[i[w]]),c+=k[i[w]];return Tn(e,c,A[256]),c+k[256]},_0=new qi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),w0=new vt(0),x0=function(){for(var t=new qi(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),S0=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=x0[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},E0=function(t,e,r,i,n){return function(s,a,o,l,h,c){var u=s.length,f=new vt(l+u+5*(1+Math.floor(u/7e3))+h),p=f.subarray(l,f.length-h),m=0;if(!a||u<8)for(var g=0;g<=u;g+=65535){var d=g+65535;d<u?m=ca(p,m,s.subarray(g,d)):(p[g]=c,m=ca(p,m,s.subarray(g,u)))}else{for(var y=_0[a-1],v=y>>>13,b=8191&y,_=(1<<o)-1,x=new rt(32768),T=new rt(_+1),S=Math.ceil(o/3),w=2*S,M=function(it){return(s[it]^s[it+1]<<S^s[it+2]<<w)&_},E=new qi(25e3),I=new rt(288),P=new rt(32),A=0,k=0,F=(g=0,0),O=0,D=0;g<u;++g){var C=M(g),$=32767&g,R=T[C];if(x[$]=R,T[C]=$,O<=g){var G=u-g;if((A>7e3||F>24576)&&G>423){m=Ep(s,p,0,E,I,P,k,F,D,g-D,m),F=A=k=0,D=g;for(var U=0;U<286;++U)I[U]=0;for(U=0;U<30;++U)P[U]=0}var Z=2,j=0,ee=b,ne=$-R&32767;if(G>2&&C==M(g-ne))for(var te=Math.min(v,G)-1,K=Math.min(32767,g),be=Math.min(258,G);ne<=K&&--ee&&$!=R;){if(s[g+Z]==s[g+Z-ne]){for(var he=0;he<be&&s[g+he]==s[g+he-ne];++he);if(he>Z){if(Z=he,j=ne,he>te)break;var Ae=Math.min(ne,he-2),_e=0;for(U=0;U<Ae;++U){var W=g-ne+U+32768&32767,He=W-x[W]+32768&32767;He>_e&&(_e=He,R=W)}}}ne+=($=R)-(R=x[$])+32768&32767}if(j){E[F++]=268435456|Il[Z]<<18|Ml[j];var _t=31&Il[Z],wt=31&Ml[j];k+=zl[_t]+jl[wt],++I[257+_t],++P[wt],O=g+Z,++A}else E[F++]=s[g],++I[s[g]]}}m=Ep(s,p,c,E,I,P,k,F,D,g-D,m),c||(m=ca(p,m,w0))}return td(f,0,l+ed(m)+h)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},Dl=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},k0=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Dl(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},P0=function(t){return 10+(t.filename&&t.filename.length+1||0)};function A0(t,e){e===void 0&&(e={});var r=S0(),i=t.length;r.p(t);var n=E0(t,e,P0(e),8),s=n.length;return k0(n,e),Dl(n,s-8,r.d()),Dl(n,s-4,i),n}function C0(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var i=new vt(t.length+(t.length>>>1)),n=0,s=function(h){i[n++]=h},a=0;a<r;++a){if(n+5>i.length){var o=new vt(n+8+(r-a<<1));o.set(i),i=o}var l=t.charCodeAt(a);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++a))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return td(i,0,n)}(function(t){t.GZipJS="gzip-js",t.Base64="base64"})(Qr||(Qr={}));var T0=function(t,e,r){var i=e||{};i.ip=r.ip?1:0,i._=new Date().getTime().toString(),i.ver=Tt.LIB_VERSION;var n=t.split("?");if(n.length>1){var s,a=or(n[1].split("&"));try{for(a.s();!(s=a.n()).done;){var o=s.value.split("=")[0];i[o]&&delete i[o]}}catch(h){a.e(h)}finally{a.f()}}var l=t.indexOf("?")>-1?"&":"?";return t+l+function(h){var c,u,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",p=[];return Ee(h,function(m,g){c=encodeURIComponent(m.toString()),u=encodeURIComponent(g),p[p.length]=u+"="+c}),p.join(f)}(i)},Hl=function t(e,r){if(r.blob&&e.buffer)return new Blob([e.buffer],{type:"text/plain"});if(r.sendBeacon||r.blob){var i=t(e,{method:"POST"});return new Blob([i],{type:"application/x-www-form-urlencoded"})}if(r.method!=="POST")return null;var n,s;return n=Array.isArray(e)||(s=e,Object.prototype.toString.call(s)==="[object Uint8Array]")?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),"compression"in e&&e.compression&&(n+="&compression="+e.compression),n},rd=function(t){var e=t.url,r=t.data,i=t.headers,n=t.options,s=t.callback,a=t.retriesPerformedSoFar,o=t.retryQueue,l=t.onXHRError,h=t.timeout,c=h===void 0?6e4:h,u=t.onResponse,f=new XMLHttpRequest;f.open(n.method||"GET",e,!0);var p=Hl(r,n);Ee(i,function(m,g){f.setRequestHeader(g,m)}),n.method!=="POST"||n.blob||f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.timeout=c,f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState===4)if(u?.(f),f.status===200){if(s){var m;try{m=JSON.parse(f.responseText)}catch(g){return void fe.error(g)}s(m)}}else typeof l=="function"&&l(f),(f.status<400||f.status>500)&&o.enqueue({url:e,data:r,options:n,headers:i,retriesPerformedSoFar:(a||0)+1,callback:s}),s?.({status:0})},f.send(p)},I0=18e5,M0=function(t){$p(r,Xp);var e=Rp(r);function r(i,n){var s;return De(this,r),(s=e.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=i,s.rateLimiter=n,typeof window<"u"&&"onLine"in window.navigator&&(s.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){s._handleWeAreNowOnline()}),window.addEventListener("offline",function(){s.areWeOnline=!1})),s}return Fe(r,[{key:"enqueue",value:function(i){var n=i.retriesPerformedSoFar||0;if(!(n>=10)){var s=function(o){var l=3e3*Math.pow(2,o),h=l/2,c=Math.min(I0,l),u=(Math.random()-.5)*(c-h);return Math.ceil(c+u)}(n),a=new Date(Date.now()+s);this.queue.push({retryAt:a,requestData:i}),console.warn("Enqueued failed request for retry in ".concat(s)),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var i=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){i.areWeOnline&&i.queue.length>0&&i.flush(),i.poll()},this._pollInterval)}},{key:"flush",value:function(){var i=new Date(Date.now()),n=this.queue.filter(function(l){return l.retryAt<i});if(n.length>0){this.queue=this.queue.filter(function(l){return l.retryAt>=i});var s,a=or(n);try{for(a.s();!(s=a.n()).done;){var o=s.value.requestData;this._executeXhrRequest(o)}}catch(l){a.e(l)}finally{a.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var i,n=or(this.queue);try{for(n.s();!(i=n.n()).done;){var s=i.value.requestData,a=s.url,o=s.data,l=s.options;if(this.rateLimiter.isRateLimited(l._batchKey))Tt.DEBUG&&console.warn("[PostHog RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(a,Hl(o,ie(ie({},l),{},{sendBeacon:!0})))}catch(h){Tt.DEBUG&&console.error(h)}}}catch(h){n.e(h)}finally{n.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(i){var n=i.url,s=i.data,a=i.options,o=i.headers,l=i.callback,h=i.retriesPerformedSoFar;this.rateLimiter.isRateLimited(a._batchKey)||rd({url:n,data:s||{},options:a||{},headers:o||{},retriesPerformedSoFar:h||0,callback:l,retryQueue:this,onXHRError:this.onXHRError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),r}();Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t});var kp="0123456789abcdef",D0=function(){function t(e){if(De(this,t),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return Fe(t,[{key:"toString",value:function(){for(var e="",r=0;r<this.bytes.length;r++)e=e+kp.charAt(this.bytes[r]>>>4)+kp.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}},{key:"clone",value:function(){return new t(this.bytes.slice(0))}},{key:"equals",value:function(e){return this.compareTo(e)===0}},{key:"compareTo",value:function(e){for(var r=0;r<16;r++){var i=this.bytes[r]-e.bytes[r];if(i!==0)return Math.sign(i)}return 0}}],[{key:"fromFieldsV7",value:function(e,r,i,n){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||e<0||r<0||i<0||n<0||e>0xffffffffffff||r>4095||i>1073741823||n>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|r>>>8,s[7]=r,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=n>>>24,s[13]=n>>>16,s[14]=n>>>8,s[15]=n,new t(s)}}]),t}(),F0=function(){function t(){De(this,t),Y(this,"timestamp",0),Y(this,"counter",0),Y(this,"random",new O0)}return Fe(t,[{key:"generate",value:function(){var e=this.generateOrAbort();if(e!==void 0)return e;this.timestamp=0;var r=this.generateOrAbort();if(r===void 0)throw new Error("Could not generate UUID after timestamp reset");return r}},{key:"generateOrAbort",value:function(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return D0.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),t}(),id=function(t){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};typeof crypto<"u"&&crypto.getRandomValues&&(id=function(t){return crypto.getRandomValues(t)});var Pp,O0=function(){function t(){De(this,t),Y(this,"buffer",new Uint32Array(8)),Y(this,"cursor",1/0)}return Fe(t,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(id(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),t}(),ei=function(){return $0().toString()},$0=function(){return(Pp||(Pp=new F0)).generate()},sa=1800,Ap=60,R0=864e5,L0=function(){function t(e,r){De(this,t),Y(this,"_sessionIdChangedHandlers",[]),this.config=e,this.persistence=r,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var i=e.persistence_name||e.token,n=e.session_idle_timeout_seconds||sa;if(typeof n!="number"?(console.warn("[PostHog] session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),n=sa):n>sa?console.warn("[PostHog] session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):n<Ap&&console.warn("[PostHog] session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."),this._sessionTimeoutMs=1e3*Math.min(Math.max(n,Ap),sa),this._window_id_storage_key="ph_"+i+"_window_id",this._primary_window_exists_storage_key="ph_"+i+"_primary_window_exists",this._canUseSessionStorage()){var s=Ue.parse(this._window_id_storage_key),a=Ue.parse(this._primary_window_exists_storage_key);s&&!a?this._windowId=s:Ue.remove(this._window_id_storage_key),Ue.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Fe(t,[{key:"onSessionId",value:function(e){var r=this;return this._sessionIdChangedHandlers===void 0&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){r._sessionIdChangedHandlers=r._sessionIdChangedHandlers.filter(function(i){return i!==e})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ue.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&Ue.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ue.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,r,i){e===this._sessionId&&r===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=r,this._sessionId=e,this.persistence.register(Y({},va,[r,e,i])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[va];return Array.isArray(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;window.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&Ue.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),i=ar(this._getSessionId(),3),n=i[0],s=i[1],a=i[2],o=this._getWindowId(),l=a&&a>0&&Math.abs(r-a)>R0,h=!1;!s||!e&&Math.abs(r-n)>this._sessionTimeoutMs||l?(s=ei(),o=ei(),a=r,h=!0):o||(o=ei(),h=!0);var c=n===0||!e||l?r:n,u=a===0?new Date().getTime():a;return this._setWindowId(o),this._setSessionId(s,c,u),h&&this._sessionIdChangedHandlers.forEach(function(f){return f(s,o)}),{sessionId:s,windowId:o,sessionStartTimestamp:u}}}]),t}(),B0=Fe(function t(e,r,i,n){De(this,t),this.name="posthog-js",this.setupOnce=function(s){s(function(a){var o,l,h,c,u;if(a.level!=="error"||!e.__loaded)return a;a.tags||(a.tags={});var f=e.config.ui_host||e.config.api_host;a.tags["PostHog Person URL"]=f+"/person/"+e.get_distinct_id(),e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=((o=a.exception)===null||o===void 0?void 0:o.values)||[],m={$exception_message:(l=p[0])===null||l===void 0?void 0:l.value,$exception_type:(h=p[0])===null||h===void 0?void 0:h.type,$exception_personURL:f+"/person/"+e.get_distinct_id(),$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:(c=p[0])===null||c===void 0?void 0:c.value,$sentry_exception_type:(u=p[0])===null||u===void 0?void 0:u.type,$sentry_tags:a.tags};return r&&i&&(m.$sentry_url=(n||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+a.event_id),e.capture("$exception",m),a})}}),V0=function(t){Promise&&Promise.resolve||console.warn("This browser does not have Promise support, and can not use the segment integration");var e=function(r,i){r.event.userId||r.event.anonymousId===t.get_distinct_id()||t.reset(),r.event.userId&&r.event.userId!==t.get_distinct_id()&&(t.register({distinct_id:r.event.userId}),t.reloadFeatureFlags());var n=t._calculate_event_properties(i,r.event.properties);return r.event.properties=Object.assign({},n,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(r){return e(r,r.event.event)},page:function(r){return e(r,"$pageview")},identify:function(r){return e(r,"$identify")},screen:function(r){return e(r,"$screen")}}},N0=function(){function t(){var e=this;De(this,t),Y(this,"_hasSeenPageView",!1),Y(this,"_updateScrollData",function(){var r,i,n,s;e._pageViewData||(e._pageViewData=e._createPageViewData());var a=e._pageViewData,o=e._scrollY(),l=e._scrollHeight(),h=e._contentY(),c=e._contentHeight();a.lastScrollY=o,a.maxScrollY=Math.max(o,(r=a.maxScrollY)!==null&&r!==void 0?r:0),a.maxScrollHeight=Math.max(l,(i=a.maxScrollHeight)!==null&&i!==void 0?i:0),a.lastContentY=h,a.maxContentY=Math.max(h,(n=a.maxContentY)!==null&&n!==void 0?n:0),a.maxContentHeight=Math.max(c,(s=a.maxContentHeight)!==null&&s!==void 0?s:0)})}return Fe(t,[{key:"_createPageViewData",value:function(){return{pathname:q.location.pathname}}},{key:"doPageView",value:function(){var e,r;return this._hasSeenPageView?(r=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,r=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),ie({$prev_pageview_pathname:(e=r)===null||e===void 0?void 0:e.pathname},this._calculatePrevPageScrollProperties(r))}},{key:"doPageLeave",value:function(){var e=this._pageViewData;return ie({$prev_pageview_pathname:e?.pathname},this._calculatePrevPageScrollProperties(e))}},{key:"_calculatePrevPageScrollProperties",value:function(e){if(!e||e.maxScrollHeight==null||e.lastScrollY==null||e.maxScrollY==null||e.maxContentHeight==null||e.lastContentY==null||e.maxContentY==null)return{};var r=e.maxScrollHeight,i=e.lastScrollY,n=e.maxScrollY,s=e.maxContentHeight,a=e.lastContentY,o=e.maxContentY;return r=Math.ceil(r),i=Math.ceil(i),n=Math.ceil(n),s=Math.ceil(s),a=Math.ceil(a),o=Math.ceil(o),{$prev_pageview_last_scroll:i,$prev_pageview_last_scroll_percentage:r<=1?1:aa(i/r,0,1),$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:r<=1?1:aa(n/r,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:s<=1?1:aa(a/s,0,1),$prev_pageview_max_content:o,$prev_pageview_max_content_percentage:s<=1?1:aa(o/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){q.addEventListener("scroll",this._updateScrollData),q.addEventListener("scrollend",this._updateScrollData),q.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){q.removeEventListener("scroll",this._updateScrollData),q.removeEventListener("scrollend",this._updateScrollData),q.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,q.document.documentElement.scrollHeight-q.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return q.scrollY||q.pageYOffset||q.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return q.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var e=q.document.documentElement.clientHeight||0;return this._scrollY()+e}}]),t}();function aa(t,e,r){return Math.max(e,Math.min(t,r))}function Cp(t){return typeof Event<"u"&&nd(t,Event)}function nd(t,e){try{return t instanceof e}catch{return!1}}function Tp(t){return t===null||xr(t)!=="object"&&typeof t!="function"}function ua(t,e){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}function ml(t){return ua(t,"DOMError")}var Ip=/\(error: (.*)\)/,Mp=50,pa="?";function gl(t,e,r,i){var n={filename:t,function:e,in_app:!0};return r!==void 0&&(n.lineno=r),i!==void 0&&(n.colno=i),n}var z0=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,j0=/\((\S*)(?::(\d+))(?::(\d+))\)/,H0=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,G0=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,q0=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,U0=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=e.sort(function(n,s){return n[0]-s[0]}).map(function(n){return n[1]});return function(n){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=[],o=n.split(`
407
- `),l=s;l<o.length;l++){var h=o[l];if(!(h.length>1024)){var c=Ip.test(h)?h.replace(Ip,"$1"):h;if(!c.match(/\S*Error: /)){var u,f=or(i);try{for(f.s();!(u=f.n()).done;){var p=(0,u.value)(c);if(p){a.push(p);break}}}catch(m){f.e(m)}finally{f.f()}if(a.length>=Mp)break}}}return function(m){if(!m.length)return[];var g=m.slice(0,Mp);return g.reverse(),g.map(function(d){return ie(ie({},d),{},{filename:d.filename||g[g.length-1].filename,function:d.function||"?"})})}(a)}}.apply(void 0,[[30,function(t){var e=z0.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){var r=j0.exec(e[2]);r&&(e[2]=r[1],e[3]=r[2],e[4]=r[3])}var i=ar(Dp(e[1]||pa,e[2]),2),n=i[0];return gl(i[1],n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,function(t){var e=H0.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var r=G0.exec(e[3]);r&&(e[1]=e[1]||"eval",e[3]=r[1],e[4]=r[2],e[5]="")}var i=e[3],n=e[1]||pa,s=ar(Dp(n,i),2);return n=s[0],gl(i=s[1],n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,function(t){var e=q0.exec(t);return e?gl(e[2],e[1]||pa,+e[3],e[4]?+e[4]:void 0):void 0}]]),Dp=function(t,e){var r=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return r||i?[t.indexOf("@")!==-1?t.split("@")[0]:pa,r?"safari-extension:".concat(e):"safari-web-extension:".concat(e)]:[t,e]},W0=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Z0=/Minified React error #\d+;/i;function Y0(t){var e=t.stacktrace||t.stack||"",r=function(i){if(i){if(typeof i.framesToPop=="number")return i.framesToPop;if(Z0.test(i.message))return 1}return 0}(t);try{return U0(e,r)}catch{}return[]}function yl(t){var e=Y0(t);return{$exception_type:t.name,$exception_message:t.message,$exception_stack_trace_raw:JSON.stringify(e)}}function J0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:40,r=Object.keys(t);if(r.sort(),!r.length)return"[object has no keys]";for(var i=r.length;i>0;i--){var n=r.slice(0,i).join(", ");if(!(n.length>e))return i===r.length||n.length<=e?n:"".concat(n.slice(0,e),"...")}return""}function Fp(t){var e=ar(t,5),r=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o={};if(a===void 0&&typeof r=="string"){var l="Error",h=r,c=r.match(W0);c&&(l=c[1],h=c[2]),o={$exception_type:l,$exception_message:h}}var u=a||r;if(ml(u)||function(g){return ua(g,"DOMException")}(u)){var f=u;if(function(g){return"stack"in g}(u))o=yl(u);else{var p=f.name||(ml(f)?"DOMError":"DOMException"),m=f.message?"".concat(p,": ").concat(f.message):p;o=function(g){return{$exception_type:"Error",$exception_message:g}}(m),o.$exception_type=ml(f)?"DOMError":"DOMException",o.$exception_message=o.$exception_message||m}"code"in f&&(o.$exception_DOMException_code="".concat(f.code))}else(function(g){return ua(g,"ErrorEvent")})(u)&&u.error?o=yl(u.error):function(g){switch(Object.prototype.toString.call(g)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return nd(g,Error)}}(u)?o=yl(u):function(g){return ua(g,"Object")}(u)||Cp(u)?(o=function(g){return{$exception_type:Cp(g)?g.constructor.name:"Error",$exception_message:"Non-Error ".concat("exception"," captured with keys: ",J0(g))}}(u),o.$exception_is_synthetic=!0):(o.$exception_type=o.$exception_type||"Error",o.$exception_message=o.$exception_message||u,o.$exception_is_synthetic=!0);return ie(ie(ie(ie({},o),{},{$exception_type:o.$exception_type||"UnknownErrorType",$exception_message:o.$exception_message||""},i?{$exception_source:i}:{}),n?{$exception_lineno:n}:{}),s?{$exception_colno:s}:{})}var On,Gl,qe,X0=function(){function t(e){De(this,t),Y(this,"originalOnErrorHandler",void 0),Y(this,"originalOnUnhandledRejectionHandler",void 0),Y(this,"errorsToIgnore",[]),this.instance=e}return Fe(t,[{key:"debugLog",value:function(){if(this.instance.config.debug){for(var e,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];(e=console).log.apply(e,["PostHog.js [PostHog.ExceptionObserver]"].concat(i))}}},{key:"startCapturing",value:function(){var e;if(this.isEnabled()&&((e=q.onerror)===null||e===void 0||!e.__POSTHOG_INSTRUMENTED__))try{this.originalOnErrorHandler=q.onerror,q.onerror=function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return this.captureException(i),!!this.originalOnErrorHandler&&this.originalOnErrorHandler.apply(this,i)}.bind(this),q.onerror.__POSTHOG_INSTRUMENTED__=!0,this.originalOnUnhandledRejectionHandler=q.onunhandledrejection,q.onunhandledrejection=function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];var s=function(a){var o=ar(a,1)[0],l=o;try{"reason"in o?l=o.reason:"detail"in o&&"reason"in o.detail&&(l=o.detail.reason)}catch{}var h={};return(h=Tp(l)?{$exception_message:"Non-Error promise rejection captured with value: ".concat(String(l))}:Fp([l])).$exception_handled=!1,ie(ie({},h),{},{$exception_type:h.$exception_type="UnhandledRejection",$exception_message:h.$exception_message=h.$exception_message||o.reason||String(l)})}(i);return this.sendExceptionEvent(s),!this.originalOnUnhandledRejectionHandler||this.originalOnUnhandledRejectionHandler.apply(q,i)}.bind(this),q.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0}catch(r){console.error("PostHog failed to start exception autocapture",r),this.stopCapturing()}}},{key:"stopCapturing",value:function(){var e,r;this.originalOnErrorHandler!==void 0&&(q.onerror=this.originalOnErrorHandler,this.originalOnErrorHandler=null),(e=q.onerror)===null||e===void 0||delete e.__POSTHOG_INSTRUMENTED__,this.originalOnUnhandledRejectionHandler!==void 0&&(q.onunhandledrejection=this.originalOnUnhandledRejectionHandler,this.originalOnUnhandledRejectionHandler=null),(r=q.onunhandledrejection)===null||r===void 0||delete r.__POSTHOG_INSTRUMENTED__}},{key:"isCapturing",value:function(){var e;return!((e=q.onerror)===null||e===void 0||!e.__POSTHOG_INSTRUMENTED__)}},{key:"isEnabled",value:function(){var e;return(e=this.remoteEnabled)!==null&&e!==void 0&&e}},{key:"afterDecideResponse",value:function(e){var r=e.autocaptureExceptions;if(this.remoteEnabled=!!r||!1,!Tp(r)&&"errors_to_ignore"in r&&Array.isArray(r.errors_to_ignore)){var i=r.errors_to_ignore;this.errorsToIgnore=i.map(function(n){return new RegExp(n)})}this.isEnabled()?(this.startCapturing(),this.debugLog("Remote config for exception autocapture is enabled, starting",r)):this.debugLog("Remote config for exception autocapture is disabled, not starting",r)}},{key:"captureException",value:function(e,r){var i=Fp(e);if(this.errorsToIgnore.some(function(a){return a.test(i.$exception_message||"")}))this.debugLog("Ignoring exception based on remote config",i);else{var n=ie(ie({},r),i),s=this.instance.config.ui_host||this.instance.config.api_host;i.$exception_personURL=s+"/person/"+this.instance.get_distinct_id(),this.sendExceptionEvent(n)}}},{key:"sendExceptionEvent",value:function(e){this.instance.capture("$exception",e,{transport:"XHR",method:"POST",endpoint:"/e/",_noTruncate:!0,_batchKey:"exceptionEvent"})}}]),t}(),K0=function(){function t(e){De(this,t),this.instance=e}return Fe(t,[{key:"getSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(Pl);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/surveys/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.surveys;return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},Pl,o)),e(o)})}},{key:"getActiveMatchingSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(n){var s=n.filter(function(a){return!(!a.start_date||a.end_date)}).filter(function(a){var o,l;if(!a.conditions)return!0;var h=(o=a.conditions)===null||o===void 0||!o.url||window.location.href.indexOf(a.conditions.url)>-1,c=(l=a.conditions)===null||l===void 0||!l.selector||document.querySelector(a.conditions.selector);return h&&c}).filter(function(a){if(!a.linked_flag_key&&!a.targeting_flag_key)return!0;var o=!a.linked_flag_key||r.instance.featureFlags.isFeatureEnabled(a.linked_flag_key),l=!a.targeting_flag_key||r.instance.featureFlags.isFeatureEnabled(a.targeting_flag_key);return o&&l});return e(s)},i)}}]),t}(),Q0=6e4,ey=function(){function t(){var e=this;De(this,t),Y(this,"limits",{}),Y(this,"checkForLimiting",function(r){try{(JSON.parse(r.responseText).quota_limited||[]).forEach(function(i){fe.log("[PostHog RateLimiter] ".concat(i||"events"," is quota limited.")),e.limits[i]=new Date().getTime()+Q0})}catch(i){return void fe.error(i)}})}return Fe(t,[{key:"isRateLimited",value:function(e){var r=this.limits[e||"events"]||!1;return r!==!1&&new Date().getTime()<r}}]),t}();(function(t){t[t.INIT_MODULE=0]="INIT_MODULE",t[t.INIT_SNIPPET=1]="INIT_SNIPPET"})(On||(On={}));var Fl=function(){},oa={},lt="posthog",da=q.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,sd=!da&&Lt.indexOf("MSIE")===-1&&Lt.indexOf("Mozilla")===-1,Op=function(){var t,e,r;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(Me==null||(t=Me.location)===null||t===void 0||(e=t.hostname)===null||e===void 0?void 0:e.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Fl,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(q==null||(r=q.location)===null||r===void 0?void 0:r.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(i){var n="Bad HTTP status: "+i.status+" "+i.statusText;console.error(n)},get_device_id:function(i){return i},_onCapture:Fl,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},Ol=function(t,e,r,i){var n,s=r!==lt&&qe?r?qe[r]:void 0:qe,a={initComplete:!1,syncCode:!1},o=function(l){return function(h){a[l]||(a[l]=!0,a.initComplete&&a.syncCode&&i?.(h))}};if(s&&Gl===On.INIT_MODULE)n=s;else{if(s&&!ir(s))return void console.error("You have already initialized "+r);n=new ql}return n._init(t,e,r,o("initComplete")),n.toolbar.maybeLoadToolbar(),n.sessionRecording=new t0(n),n.sessionRecording.startRecordingIfEnabled(),n.webPerformance=new n0(n),n.webPerformance.startObservingIfEnabled(),n.config.__preview_measure_pageview_stats&&n.pageViewManager.startMeasuringScrollPosition(),n.exceptionAutocapture=new X0(n),n.__autocapture=n.config.autocapture,wr._setIsAutocaptureEnabled(n),wr._isAutocaptureEnabled&&(n.__autocapture=n.config.autocapture,wr.enabledForProject(n.config.token,100,100)?wr.isBrowserSupported()?wr.init(n):(n.__autocapture=!1,fe.log("Disabling Automatic Event Collection because this browser is not supported")):(n.__autocapture=!1,fe.log("Not in active bucket: disabling Automatic Event Collection."))),Tt.DEBUG=Tt.DEBUG||n.config.debug,s!==void 0&&ir(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),o("syncCode")(n),n},ql=function(){function t(){var e=this;De(this,t),this.config=Op(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=B0,this.segmentIntegration=function(){return V0(e)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.featureFlags=new zg(this),this.toolbar=new h0(this),this.pageViewManager=new N0,this.surveys=new K0(this),this.rateLimiter=new ey,this.people={set:function(r,i,n){var s=typeof r=="string"?Y({},r,i):r;e.setPersonProperties(s),n?.({})},set_once:function(r,i,n){var s=typeof r=="string"?Y({},r,i):r;e.setPersonProperties(void 0,s),n?.({})}}}return Fe(t,[{key:"init",value:function(e,r,i){if(Ct(i))console.error("You must name your new library: init(token, config, name)");else{if(i!==lt){var n=Ol(e,r,i,function(s){qe[i]=s,s._loaded()});return qe[i]=n,n}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var l,h={segmentRegister:!1,syncCode:!1},c=function(_){return function(){h[_]||(h[_]=!0,h.segmentRegister&&h.syncCode&&o?.(n))}};if(this.set_config(Xe({},Op(),s,{name:a,token:e,callback_fn:(a===lt?a:lt+"."+a)+"._jsc"})),this._jsc=function(){},(q!=null&&(r=q.rrweb)!==null&&r!==void 0&&r.record||q!=null&&q.rrwebRecord)&&(this.__loaded_recorder_version=q==null||(l=q.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new bp(this.config),this._requestQueue=new m0(this._handle_queued_event.bind(this)),this._retryQueue=new M0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new L0(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new bp(ie(ie({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),((i=s.bootstrap)===null||i===void 0?void 0:i.distinctID)!==void 0){var u,f,p=this.config.get_device_id(ei()),m=(u=s.bootstrap)!==null&&u!==void 0&&u.isIdentifiedID?p:s.bootstrap.distinctID;this.persistence.set_user_state((f=s.bootstrap)!==null&&f!==void 0&&f.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:m})}if(this._hasBootstrappedFeatureFlags()){var g,d,y=Object.keys(((g=s.bootstrap)===null||g===void 0?void 0:g.featureFlags)||{}).filter(function(_){var x,T;return!((x=s.bootstrap)===null||x===void 0||(T=x.featureFlags)===null||T===void 0||!T[_])}).reduce(function(_,x){var T,S;return _[x]=((T=s.bootstrap)===null||T===void 0||(S=T.featureFlags)===null||S===void 0?void 0:S[x])||!1,_},{}),v=Object.keys(((d=s.bootstrap)===null||d===void 0?void 0:d.featureFlagPayloads)||{}).filter(function(_){return y[_]}).reduce(function(_,x){var T,S,w,M;return(T=s.bootstrap)!==null&&T!==void 0&&(S=T.featureFlagPayloads)!==null&&S!==void 0&&S[x]&&(_[x]=(w=s.bootstrap)===null||w===void 0||(M=w.featureFlagPayloads)===null||M===void 0?void 0:M[x]),_},{});this.featureFlags.receivedFeatureFlags({featureFlags:y,featureFlagPayloads:v})}if(!this.get_distinct_id()){var b=this.config.get_device_id(ei());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_user_state("anonymous")}q.addEventListener&&q.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_loaded",value:function(){var e=this.config.advanced_disable_decide;e||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(r){console.error("`loaded` function failed",r)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:Me.title},{send_instantly:!0}),e||(new a0(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)===null||e===void 0||e.poll())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||nr(this.__request_queue,function(r){e._send_request.apply(e,bl(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,r){if(Ct(e))return null;if(da)return function(a){e(a,r)};var i=this._jsc,n=""+Math.floor(1e8*Math.random()),s=this.config.callback_fn+"["+n+"]";return i[n]=function(a){delete i[n],e(a,r)},s}},{key:"_handle_unload",value:function(){var e,r;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(r=this._retryQueue)===null||r===void 0||r.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,r,i){var n=JSON.stringify(r);this.__compress_and_send_json_request(e,n,i||oa,Fl)}},{key:"__compress_and_send_json_request",value:function(e,r,i,n){var s=function(h,c,u){return h===Qr.GZipJS?[A0(C0(c),{mtime:0}),ie(ie({},u),{},{blob:!0,urlQueryArgs:{compression:Qr.GZipJS}})]:[{data:Bl(c)},u]}(this.compression[Qr.GZipJS]?Qr.GZipJS:Qr.Base64,r,i),a=ar(s,2),o=a[0],l=a[1];this._send_request(e,o,l,n)}},{key:"_send_request",value:function(e,r,i,n){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(i._batchKey))if(sd)this.__request_queue.push([e,r,i,n]);else{var s={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};i=Xe(s,i||{}),da||(i.method="GET");var a="sendBeacon"in q.navigator&&i.transport==="sendBeacon";if(e=T0(e,i.urlQueryArgs||{},{ip:this.config.ip}),a)try{q.navigator.sendBeacon(e,Hl(r,ie(ie({},i),{},{sendBeacon:!0})))}catch{}else if(da)try{rd({url:e,data:r,headers:this.config.xhr_headers,options:i,callback:n,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.config.on_xhr_error,onResponse:this.rateLimiter.checkForLimiting})}catch(c){console.error(c)}else{var o,l=Me.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=e;var h=Me.getElementsByTagName("script")[0];(o=h.parentNode)===null||o===void 0||o.insertBefore(l,h)}}}},{key:"_execute_array",value:function(e){var r,i=this,n=[],s=[],a=[];nr(e,function(l){l&&(r=l[0],ir(r)?a.push(l):typeof l=="function"?l.call(i):ir(l)&&r==="alias"?n.push(l):ir(l)&&r.indexOf("capture")!==-1&&typeof i[r]=="function"?a.push(l):s.push(l))});var o=function(l,h){nr(l,function(c){if(ir(c[0])){var u=h;Ee(c,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},h)};o(n,this),o(s,this),o(a,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,r;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((r=this.config.bootstrap)===null||r===void 0?void 0:r.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"captureException",value:function(e,r){var i;(i=this.exceptionAutocapture)===null||i===void 0||i.captureException([e.name,void 0,void 0,void 0,e],r)}},{key:"capture",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oa;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return fe.unintializedWarning("posthog.capture");if(!function(h,c){var u=!1;try{var f=h.config.token,p=h.config.respect_dnt,m=h.config.opt_out_capturing_persistence_type,g=h.config.opt_out_capturing_cookie_prefix||void 0,d=h.config.window;f&&(u=wp(f,{respectDnt:p,persistenceType:m,persistencePrefix:g,window:d}))}catch(y){c||console.error("Unexpected error when checking capturing opt-out status: "+y)}return u}(this,!1)){var n=(i=i||oa).transport;if(n&&(i.transport=n),Ct(e)||typeof e!="string")console.error("No event name provided to posthog.capture");else if(!Bg(Lt,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:ei(),event:e,properties:this._calculate_event_properties(e,r||{})};e==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=$g(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date,this.config.debug&&fe.log("PostHog.js send",s);var a=JSON.stringify(s),o=this.config.api_host+(i.endpoint||"/e/"),l=i!==oa;return!this.config.request_batching||l&&!i._batchKey||i.send_instantly?this.__compress_and_send_json_request(o,a,i):this._requestQueue.enqueue(o,s,i),this._invokeCaptureHooks(e,s),s}}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,r){this.config._onCapture(e,r),Ee(this.__captureHooks,function(i){return i(e)})}},{key:"_calculate_event_properties",value:function(e,r){if(!this.persistence||!this.sessionPersistence)return r;var i=this.persistence.remove_event_timer(e),n=ie({},r);if(n.token=this.config.token,e==="$snapshot"){var s=ie(ie({},this.persistence.properties()),this.sessionPersistence.properties());return n.distinct_id=s.distinct_id,n}var a=Ge.properties();if(this.sessionManager){var o=this.sessionManager.checkAndGetSessionAndWindowId(),l=o.sessionId,h=o.windowId;n.$session_id=l,n.$window_id=h}if(this.config.__preview_measure_pageview_stats){var c={};e==="$pageview"?c=this.pageViewManager.doPageView():e==="$pageleave"&&(c=this.pageViewManager.doPageLeave()),n=Xe(n,c)}if(e==="$pageview"&&(n.title=Me.title),e==="$performance_event"){var u=this.persistence.properties();return n.distinct_id=u.distinct_id,n.$current_url=a.$current_url,n}if(i!==void 0){var f=new Date().getTime()-i;n.$duration=parseFloat((f/1e3).toFixed(3))}n=Xe({},Ge.properties(),this.persistence.properties(),this.sessionPersistence.properties(),n);var p=this.config.property_blacklist;ir(p)?Ee(p,function(g){delete n[g]}):console.error("Invalid value for property_blacklist config: "+p);var m=this.config.sanitize_properties;return m&&(n=m(n,e)),n}},{key:"register",value:function(e,r){var i;(i=this.persistence)===null||i===void 0||i.register(e,r)}},{key:"register_once",value:function(e,r,i){var n;(n=this.persistence)===null||n===void 0||n.register_once(e,r,i)}},{key:"register_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.register(e)}},{key:"unregister",value:function(e){var r;(r=this.persistence)===null||r===void 0||r.unregister(e)}},{key:"unregister_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.unregister(e)}},{key:"_register_single",value:function(e,r){this.register(Y({},e,r))}},{key:"getFeatureFlag",value:function(e,r){return this.featureFlags.getFeatureFlag(e,r)}},{key:"getFeatureFlagPayload",value:function(e){var r=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(r)}catch{return r}}},{key:"isFeatureEnabled",value:function(e,r){return this.featureFlags.isFeatureEnabled(e,r)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,r)}},{key:"getEarlyAccessFeatures",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,r)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var r,i;return(r=(i=this.sessionManager)===null||i===void 0?void 0:i.onSessionId(e))!==null&&r!==void 0?r:function(){}}},{key:"getSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,r)}},{key:"getActiveMatchingSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,r)}},{key:"identify",value:function(e,r,i){if(!this.__loaded||!this.persistence)return fe.unintializedWarning("posthog.identify");if(e){var n=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=n;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==n&&e!==this.get_property(ha)&&(this.unregister(ha),this.register({distinct_id:e}));var a=this.persistence.get_user_state()==="anonymous";e!==n&&a?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(r||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:n},{$set:r||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(n)):(r||i)&&this.setPersonProperties(r,i),e!==n&&(this.reloadFeatureFlags(),this.unregister(ba))}else console.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,r){(e||r)&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:r||{}}))}},{key:"group",value:function(e,r,i){if(e&&r){var n=this.getGroups();n[e]!==r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:ie(ie({},n),{},Y({},e,r))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:i}),this.setGroupPropertiesForFlags(Y({},e,i))),n[e]===r||i||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(e,r)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(e,r)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){var r,i,n,s;if(!this.__loaded)return fe.unintializedWarning("posthog.reset");var a=this.get_property("$device_id");(r=this.persistence)===null||r===void 0||r.clear(),(i=this.sessionPersistence)===null||i===void 0||i.clear(),(n=this.persistence)===null||n===void 0||n.set_user_state("anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var o=this.config.get_device_id(ei());this.register_once({distinct_id:o,$device_id:e?o:a},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var e,r;return(e=(r=this.sessionManager)===null||r===void 0?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var r=this.config.ui_host||this.config.api_host,i=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=i.sessionId,s=i.sessionStartTimestamp,a=r+"/replay/"+n;if(e!=null&&e.withTimestamp&&s){var o,l=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!s)return a;var h=Math.max(Math.floor((new Date().getTime()-s)/1e3)-l,0);a+="?t=".concat(h)}return a}},{key:"alias",value:function(e,r){return e===this.get_property(Up)?(fe.critical("Attempting to create alias for existing People user - aborting."),-2):(Ct(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(ha,e),this.capture("$create_alias",{alias:e,distinct_id:r})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var r,i,n=ie({},this.config);xl(e)&&(Xe(this.config,e),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(r=this.persistence)===null||r===void 0||r.update_config(this.config),(i=this.sessionPersistence)===null||i===void 0||i.update_config(this.config),Oe.is_supported()&&Oe.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Tt.DEBUG=!0),this.sessionRecording&&e.disable_session_recording!==void 0&&n.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!((e=this.sessionRecording)===null||e===void 0||!e.started())}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_property",value:function(e){var r;return(r=this.persistence)===null||r===void 0?void 0:r.props[e]}},{key:"getSessionProperty",value:function(e){var r;return(r=this.sessionPersistence)===null||r===void 0?void 0:r.props[e]}},{key:"toString",value:function(){var e,r=(e=this.config.name)!==null&&e!==void 0?e:lt;return r!==lt&&(r=lt+"."+r),r}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&Oe.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.config.opt_out_capturing_by_default&&!sr.get("ph_optout")||(sr.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(e){var r,i,n,s,a;if(e&&e.clear_persistence)n=!0;else{if(!e||!e.enable_persistence)return;n=!1}this.config.disable_persistence||((r=this.persistence)===null||r===void 0?void 0:r.disabled)===n||(s=this.persistence)===null||s===void 0||s.set_disabled(n),this.config.disable_persistence||((i=this.sessionPersistence)===null||i===void 0?void 0:i.disabled)===n||(a=this.sessionPersistence)===null||a===void 0||a.set_disabled(n)}},{key:"_gdpr_call_func",value:function(e,r){return r=Xe({capture:this.capture.bind(this),persistence_type:this.config.opt_out_capturing_persistence_type,cookie_prefix:this.config.opt_out_capturing_cookie_prefix,cookie_expiration:this.config.cookie_expiration,cross_subdomain_cookie:this.config.cross_subdomain_cookie,secure_cookie:this.config.secure_cookie},r||{}),Oe.is_supported()||r.persistence_type!=="localStorage"||(r.persistence_type="cookie"),e(this.config.token,{capture:r.capture,captureEventName:r.capture_event_name,captureProperties:r.capture_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieExpiration:r.cookie_expiration,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=Xe({enable_persistence:!0},e||{}),this._gdpr_call_func(u0,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var r=Xe({clear_persistence:!0},e||{});this._gdpr_call_func(p0,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(d0,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(wp,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var r=Xe({enable_persistence:!0},e??{});this._gdpr_call_func(f0,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(e){e===!1?(q.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(q.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),t}();(function(t,e){for(var r=0;r<e.length;r++)t.prototype[e[r]]=jp(t.prototype[e[r]])})(ql,["identify"]);var br={},ty=function(){qe.init=function(t,e,r){if(r)return qe[r]||(qe[r]=br[r]=Ol(t||"",e||{},r,function(n){qe[r]=br[r]=n,n._loaded()})),qe[r];var i=qe;return br[lt]?i=br[lt]:t&&(i=Ol(t,e||{},lt,function(n){br[lt]=n,n._loaded()}),br[lt]=i),qe=i,Gl===On.INIT_SNIPPET&&(q[lt]=qe),Ee(br,function(n,s){s!==lt&&(qe[s]=n)}),i}},ry=function(){function t(){t.done||(t.done=!0,sd=!1,Ee(br,function(e){e._dom_loaded()}))}Me.addEventListener&&(Me.readyState==="complete"?t():Me.addEventListener("DOMContentLoaded",t,!1)),Dn(q,"load",t,!0)},ad=(Gl=On.INIT_MODULE,qe=new ql,ty(),qe.init(),ry(),qe);var od=ad.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://ph-eu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!0,disable_session_recording:!0},"MolinShopAI");function bt(t,e){if(!od)throw new Error("Failed to initialize PostHog");od.capture(t,e)}var Ui,Sa,It,We,Ea,ld,ka,hd,Pa,cd,Aa,ud,Ca,pd,Ta,dd,Ia,fd,xa=class extends Ve(Ce){constructor(){super();se(this,Ui);se(this,Ea);se(this,ka);se(this,Pa);se(this,Aa);se(this,Ca);se(this,Ta);se(this,Ia);se(this,It,new ta(this,{url:(r,{resume:i}={})=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("resume",i?"1":""),n.searchParams.set("conversationId",r),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r),bt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket onError"})},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&bt("ShopAssistant: user received bot message (streaming started)",{widgetId:this.widgetId,message:r})},onUpdateMessage:r=>{},onMessageDone:r=>{let i={...N(this,It)?.messages.find(n=>n.id===r.message?.id)};Object.assign(i,r.message),i.role==="assistant"&&bt("ShopAssistant: user received bot message (streaming ended)",{widgetId:this.widgetId,text:i.content??"",message:i,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION})},onMessageError:r=>{console.error("ws message error",r),r.message&&N(this,We)&&alert(r.message),bt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket ERROR message type: "+r.message})},persistConversationState:(r,i)=>{let n={conversationId:r,messages:i};localStorage.setItem(N(this,Ui,Sa),JSON.stringify(n))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(N(this,Ui,Sa))||"{}");return!(typeof r.conversationId=="string"&&r.conversationId)||!(Array.isArray(r.messages)&&r.messages.every(i=>typeof i=="object"&&i))?void 0:{conversationId:r.conversationId,messages:r.messages}}catch(r){console.error(r)}},onReset:()=>{localStorage.removeItem(N(this,Ui,Sa))}}));se(this,We,!1);this.widgetId="",this.config}render(){console.assert(this.widgetId,"widget id is required"),console.assert(this.config,"config is required");let r=Object.entries(this.config.bubble.position).filter(([s,a])=>a).map(([s,a])=>`${s}-[${a}]`).reduce((s,a)=>(s[a]=!0,s),{}),i={bottom:"72px"},n=Object.entries(this.config.bubble.position).filter(([s,a])=>a).map(([s,a])=>`sm:${s}-[calc(${[i[s],a].filter(o=>!!o).join("+")})]`).reduce((s,a)=>(s[a]=!0,s),{});return me`
408
- <mw-bubble class="${ip(r)} fixed z-50" @click=${ue(this,Pa,cd)} ?dialog-shown="${N(this,We)}"></mw-bubble>
412
+ `)).length,n=0;n<i;n++){var a=t.charCodeAt(n),o=null;a<128?r++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),o!==null&&(r>e&&(s+=t.substring(e,r)),s+=o,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},Lg=["ahrefsbot","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","hubspot","linkedinbot","mj12bot","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","twitterbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"],Bg=function(t,e){return Lg.concat(e).some(function(r){return t.includes?t.includes(r):t.indexOf(r)!==-1})},hp=function(t,e){var r=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),i=new RegExp("[\\?&]"+r+"=([^&#]*)").exec(t);if(i===null||i&&typeof i[1]!="string"&&i[1].length)return"";var n=i[1];try{n=decodeURIComponent(n)}catch{me.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},cp=function(t,e){var r=t.match(new RegExp(e+"=([^&]*)"));return r?r[1]:null},Dn=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,r,i,n,s){if(e)if(e.addEventListener&&!n)e.addEventListener(r,i,!!s);else{var a="on"+r,o=e[a];e[a]=function(l,h,c){return function(u){if(u=u||t(window.event)){var f,p=!0;Vp(c)&&(f=c(u));var m=h.call(l,u);return f!==!1&&m!==!1||(p=!1),p}}}(e,i,o)}else me.error("No valid element provided to register_event")}}();function ma(t,e){var r=function(){var i=Me.createElement("script");i.type="text/javascript",i.src=t,i.onload=function(a){return e(void 0,a)},i.onerror=function(a){return e(a)};var n,s=Me.querySelectorAll("body > script");s.length>0?(n=s[0].parentNode)===null||n===void 0||n.insertBefore(i,s[0]):Me.body.appendChild(i)};Me.body?r():Me.addEventListener("DOMContentLoaded",r)}var Ge={campaignParams:function(t){var e=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(t||[]),r={};return Ee(e,function(i){var n=hp(Me.URL,i);n.length&&(r[i]=n)}),r},searchEngine:function(){var t=Me.referrer;return t?t.search("https?://(.*)google.([^/?]*)")===0?"google":t.search("https?://(.*)bing.com")===0?"bing":t.search("https?://(.*)yahoo.com")===0?"yahoo":t.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var t=Ge.searchEngine(),e=t!="yahoo"?"q":"p",r={};if(t!==null){r.$search_engine=t;var i=hp(Me.referrer,e);i.length&&(r.ph_keyword=i)}return r},browser:function(t,e,r){return e=e||"",r||Se(t," OPR/")?Se(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":Se(t,"IEMobile")||Se(t,"WPDesktop")?"Internet Explorer Mobile":Se(t,"SamsungBrowser/")?"Samsung Internet":Se(t,"Edge")||Se(t,"Edg/")?"Microsoft Edge":Se(t,"FBIOS")?"Facebook Mobile":Se(t,"Chrome")?"Chrome":Se(t,"CriOS")?"Chrome iOS":Se(t,"UCWEB")||Se(t,"UCBrowser")?"UC Browser":Se(t,"FxiOS")?"Firefox iOS":Se(e,"Apple")?Se(t,"Mobile")?"Mobile Safari":"Safari":Se(t,"Android")?"Android Mobile":Se(t,"Konqueror")?"Konqueror":Se(t,"Firefox")?"Firefox":Se(t,"MSIE")||Se(t,"Trident/")?"Internet Explorer":Se(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,r){var i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[Ge.browser(t,e,r)];if(i===void 0)return null;var n=t.match(i);return n?parseFloat(n[n.length-2]):null},browserLanguage:function(){return Kr.language||Kr.userLanguage},os:function(t){if(/Windows/i.test(t)){if(/Phone/.test(t)||/WPDesktop/.test(t))return{os_name:"Windows Phone",os_version:""};var e=/Windows NT ([0-9.]+)/i.exec(t);return e&&e[1]?{os_name:"Windows",os_version:e[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(t)){var r=/OS (\d+)_(\d+)_?(\d+)?/i.exec(t);return r&&r[1]?{os_name:"iOS",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(t)){var i=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(t);return i&&i[1]?{os_name:"Android",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(t))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(t)){var n=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(t);return n&&n[1]?{os_name:"Mac OS X",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(t)?{os_name:"Linux",os_version:""}:/CrOS/.test(t)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)&&!/Mobile/.test(t)?"Android Tablet":/Android/.test(t)?"Android":""},deviceType:function(t){var e=this.device(t);return e==="iPad"||e==="Android Tablet"?"Tablet":e?"Mobile":"Desktop"},referrer:function(){return Me.referrer||"$direct"},referringDomain:function(){if(!Me.referrer)return"$direct";var t=Me.createElement("a");return t.href=Me.referrer,t.host},properties:function(){var t=Ge.os(Lt),e=t.os_name,r=t.os_version;return Xe(Sl({$os:e,$os_version:r,$browser:Ge.browser(Lt,Kr.vendor,q.opera),$device:Ge.device(Lt),$device_type:Ge.deviceType(Lt)}),{$current_url:q?.location.href,$host:q?.location.host,$pathname:q?.location.pathname,$browser_version:Ge.browserVersion(Lt,Kr.vendor,q.opera),$browser_language:Ge.browserLanguage(),$screen_height:q?.screen.height,$screen_width:q?.screen.width,$viewport_height:q?.innerHeight,$viewport_width:q?.innerWidth,$lib:"web",$lib_version:Tt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:zp()/1e3})},people_properties:function(){var t=Ge.os(Lt),e=t.os_name,r=t.os_version;return Xe(Sl({$os:e,$os_version:r,$browser:Ge.browser(Lt,Kr.vendor,q.opera)}),{$browser_version:Ge.browserVersion(Lt,Kr.vendor,q.opera)})}};function ga(t){switch(xr(t.className)){case"string":return t.className;case"object":return("baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";default:return""}}function ya(t){var e="";return la(t)&&!Gp(t)&&t.childNodes&&t.childNodes.length&&Ee(t.childNodes,function(r){Hp(r)&&r.textContent&&(e+=wl(r.textContent).split(/(\s+)/).filter(ji).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),wl(e)}function up(t){return!!t&&t.nodeType===1}function ti(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function Hp(t){return!!t&&t.nodeType===3}function pp(t){return!!t&&t.nodeType===11}var cl=["a","button","form","input","select","textarea","label"];function la(t){for(var e=t;e.parentNode&&!ti(e,"body");e=e.parentNode){var r=ga(e).split(" ");if(Se(r,"ph-sensitive")||Se(r,"ph-no-capture"))return!1}if(Se(ga(t).split(" "),"ph-include"))return!0;var i=t.type||"";if(typeof i=="string")switch(i.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";return!(typeof n=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))}function Gp(t){return!!(ti(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||ti(t,"select")||ti(t,"textarea")||t.getAttribute("contenteditable")==="true")}function ji(t){return!(t===null||Ct(t)||typeof t=="string"&&(t=wl(t),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((t||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(t)))}function dp(t){var e=ya(t);return ji(e="".concat(e," ").concat(qp(t)).trim())?e:""}function qp(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Ee(t.childNodes,function(r){var i;if(r&&((i=r.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var n=ya(r);e="".concat(e," ").concat(n).trim(),r.childNodes&&r.childNodes.length&&(e="".concat(e," ").concat(qp(r)).trim())}catch(s){console.error(s)}}),e}var Vg=function(){function t(e){De(this,t),this.clicks=[],this.enabled=e}return Fe(t,[{key:"isRageClick",value:function(e,r,i){if(!this.enabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(e-n.x)+Math.abs(r-n.y)<30&&i-n.timestamp<1e3){if(this.clicks.push({x:e,y:r,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:r,timestamp:i}];return!1}}]),t}(),Up="$people_distinct_id",ha="__alias",Mn="__timers",fp="$autocapture_disabled_server_side",El="$session_recording_enabled_server_side",mp="$console_log_recording_enabled_server_side",gp="$session_recording_recorder_version_server_side",va="$sesid",Hi="$enabled_feature_flags",kl="$early_access_features",Gi="$stored_person_properties",_r="$stored_group_properties",Pl="$surveys",ba="$flag_call_reported",Al="$user_state",Cl="$posthog_quota_limited",Ng=[Up,ha,"__cmpns",Mn,El,va,Hi,Al,Cl,kl,_r,Gi,Pl,ba];function ul(t,e){return e.length>t?e.slice(0,t)+"...":e}var wr={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(t){var e,r=this._isDisabledServerSide===null?!((e=t.persistence)===null||e===void 0||!e.props[fp]):this._isDisabledServerSide,i=!!t.config.autocapture;this._isAutocaptureEnabled=i&&!r},_previousElementSibling:function(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!up(e));return e},_getAugmentPropertiesFromElement:function(t){if(!la(t))return{};var e={};return Ee(t.attributes,function(r){if(r.name.indexOf("data-ph-capture-attribute")===0){var i=r.name.replace("data-ph-capture-attribute-",""),n=r.value;i&&n&&ji(n)&&(e[i]=n)}}),e},_getPropertiesFromElement:function(t,e,r){var i,n=t.tagName.toLowerCase(),s={tag_name:n};cl.indexOf(n)>-1&&!r&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=ul(1024,dp(t)):s.$el_text=ul(1024,ya(t)));var a=ga(t);a.length>0&&(s.classes=a.split(" ").filter(function(u){return u!==""}));var o=(i=this.config)===null||i===void 0?void 0:i.element_attribute_ignorelist;Ee(t.attributes,function(u){var f;Gp(t)&&["name","id","class"].indexOf(u.name)===-1||o!=null&&o.includes(u.name)||!e&&ji(u.value)&&(typeof(f=u.name)!="string"||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")&&(s["attr__"+u.name]=ul(1024,u.value))});for(var l=1,h=1,c=t;c=this._previousElementSibling(c);)l++,c.tagName===t.tagName&&h++;return s.nth_child=l,s.nth_of_type=h,s},_getDefaultProperties:function(t){return{$event_type:t,$ce_version:1}},_extractCustomPropertyValue:function(t){var e=[];return Ee(document.querySelectorAll(t.css_selector),function(r){var i;["input","select"].indexOf(r.tagName.toLowerCase())>-1?i=r.value:r.textContent&&(i=r.textContent),ji(i)&&e.push(i)}),e.join(", ")},_getCustomProperties:function(t){var e=this,r={};return Ee(this._customProperties,function(i){Ee(i.event_selectors,function(n){Ee(document.querySelectorAll(n),function(s){Se(t,s)&&la(s)&&(r[i.name]=e._extractCustomPropertyValue(i))})})}),r},_getEventTarget:function(t){return t.target===void 0?t.srcElement||null:(e=t.target)!==null&&e!==void 0&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e},_captureEvent:function(t,e){var r,i=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",s=this._getEventTarget(t);if(Hp(s)&&(s=s.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this._captureEvent(t,e,"$rageclick"),s&&function(g,d){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!g||ti(g,"html")||!up(g))return!1;if(y!=null&&y.url_allowlist){var v=window.location.href,b=y.url_allowlist;if(b&&!b.some(function(k){return v.match(k)}))return!1}if(y!=null&&y.dom_event_allowlist){var _=y.dom_event_allowlist;if(_&&!_.some(function(k){return d.type===k}))return!1}if(y!=null&&y.element_allowlist){var x=y.element_allowlist;if(x&&!x.some(function(k){return g.tagName.toLowerCase()===k}))return!1}if(y!=null&&y.css_selector_allowlist){var T=y.css_selector_allowlist;if(T&&!T.some(function(k){return g.matches(k)}))return!1}for(var S=!1,w=[g],M=!0,E=g;E.parentNode&&!ti(E,"body");)if(pp(E.parentNode))w.push(E.parentNode.host),E=E.parentNode.host;else{if(!(M=E.parentNode||!1))break;if(cl.indexOf(M.tagName.toLowerCase())>-1)S=!0;else{var I=window.getComputedStyle(M);I&&I.getPropertyValue("cursor")==="pointer"&&(S=!0)}w.push(M),E=M}var P=window.getComputedStyle(g);if(P&&P.getPropertyValue("cursor")==="pointer"&&d.type==="click")return!0;var A=g.tagName.toLowerCase();switch(A){case"html":return!1;case"form":return d.type==="submit";case"input":case"select":case"textarea":return d.type==="change"||d.type==="click";default:return S?d.type==="click":d.type==="click"&&(cl.indexOf(A)>-1||g.getAttribute("contenteditable")==="true")}}(s,t,this.config)){for(var a,o,l=[s],h=s;h.parentNode&&!ti(h,"body");)pp(h.parentNode)?(l.push(h.parentNode.host),h=h.parentNode.host):(l.push(h.parentNode),h=h.parentNode);var c,u=[],f={},p=!1;if(Ee(l,function(g){var d=la(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=d&&ji(c)&&c),Se(ga(g).split(" "),"ph-no-capture")&&(p=!0),u.push(i._getPropertiesFromElement(g,e.config.mask_all_element_attributes,e.config.mask_all_text));var y=i._getAugmentPropertiesFromElement(g);Xe(f,y)}),e.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?u[0].$el_text=dp(s):u[0].$el_text=ya(s)),c&&(u[0].attr__href=c),p)return!1;var m=Xe(this._getDefaultProperties(t.type),{$elements:u},(a=u[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(o=u[0])===null||o===void 0?void 0:o.$el_text}:{},this._getCustomProperties(l),f);return e.capture(n,m),!0}},_navigate:function(t){window.location.href=t},_addDomEventHandlers:function(t){var e=this,r=function(i){i=i||window.event,e._captureEvent(i,t)};Dn(document,"submit",r,!1,!0),Dn(document,"change",r,!1,!0),Dn(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(t){var e;typeof t.__autocapture!="boolean"&&(this.config=t.__autocapture),(e=this.config)!==null&&e!==void 0&&e.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(r){return new RegExp(r)})),this.rageclicks=new Vg(t.config.rageclick)},afterDecideResponse:function(t,e){var r=e.config.token;this._initializedTokens.indexOf(r)>-1?me.log('autocapture already initialized for token "'+r+'"'):(e.persistence&&e.persistence.register(Y({},fp,!!t.autocapture_opt_out)),this._isDisabledServerSide=!!t.autocapture_opt_out,this._setIsAutocaptureEnabled(e),this._initializedTokens.push(r),t&&t.config&&t.config.enable_collect_everything&&this._isAutocaptureEnabled?(t.custom_properties&&(this._customProperties=t.custom_properties),this._addDomEventHandlers(e)):e.__autocapture=!1)},enabledForProject:function(t,e,r){if(!t)return!0;e=Ct(e)?10:e,r=Ct(r)?10:r;for(var i=0,n=0;n<t.length;n++)i+=t.charCodeAt(n);return i%e<r},isBrowserSupported:function(){return Vp(document.querySelectorAll)}};(function(t){for(var e in t)typeof t[e]=="function"&&(t[e]=t[e].bind(t))})(wr),function(t){for(var e in t)typeof t[e]=="function"&&(t[e]=jp(t[e]))}(wr);var pl="$active_feature_flags",ia="$override_feature_flags",yp="$feature_flag_payloads",vp=function(t){var e,r={},i=or(function(o){for(var l=Object.keys(o),h=l.length,c=new Array(h);h--;)c[h]=[l[h],o[l[h]]];return c}(t||{}));try{for(i.s();!(e=i.n()).done;){var n=ar(e.value,2),s=n[0],a=n[1];a&&(r[s]=a)}}catch(o){i.e(o)}finally{i.f()}return r},zg=function(){function t(e){De(this,t),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Fe(t,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Hi),r=this.instance.get_property(ia);if(!r)return e||{};for(var i=Xe({},e),n=Object.keys(r),s=0;s<n.length;s++)r[n[s]]===!1?delete i[n[s]]:i[n[s]]=r[n[s]];return this._override_warning||(console.warn("[PostHog] Overriding feature flags!",{enabledFlags:e,overriddenFlags:r,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(yp)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;this.setReloadingPaused(!0);var r=this.instance.config.token,i=this.instance.get_property(Gi),n=this.instance.get_property(_r),s=Bl(JSON.stringify({token:r,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:i,group_properties:n,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.config.api_host+"/decide/?v=3",{data:s},{method:"POST"},this.instance._prepare_callback(function(a){e.$anon_distinct_id=void 0,e.receivedFeatureFlags(a),e.setReloadingPaused(!1),e._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var i,n=this.getFlagVariants()[e],s="".concat(n),a=this.instance.get_property(ba)||{};return(r.send_event||!("send_event"in r))&&(!(e in a)||!a[e].includes(s))&&(Array.isArray(a[e])?a[e].push(s):a[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(Y({},ba,a)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}console.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,r);console.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(r){return r!==e})}},{key:"receivedFeatureFlags",value:function(e){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads();(function(n,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=n.featureFlags,h=n.featureFlagPayloads;if(l)if(Array.isArray(l)){var c,u={};if(l)for(var f=0;f<l.length;f++)u[l[f]]=!0;s&&s.register((Y(c={},pl,l),Y(c,Hi,u),c))}else{var p,m=l,g=h;n.errorsWhileComputingFlags&&(m=ie(ie({},a),m),g=ie(ie({},o),g)),s&&s.register((Y(p={},pl,Object.keys(vp(m))),Y(p,Hi,m||{}),Y(p,yp,g||{}),p))}})(e,this.instance.persistence,r,i),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return me.unintializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(ia);else if(Array.isArray(e)){for(var r={},i=0;i<e.length;i++)r[e[i]]=!0;this.instance.persistence.register(Y({},ia,r))}else this.instance.persistence.register(Y({},ia,e))}},{key:"onFeatureFlags",value:function(e){var r=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var i=this._prepareFeatureFlagsForCallbacks(),n=i.flags,s=i.flagVariants;e(n,s)}return function(){return r.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){var i,n,s=Y({},"$feature_enrollment/".concat(e),r);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:r,$set:s}),this.setPersonPropertiesForFlags(s,!1);var a=ie(ie({},this.getFlagVariants()),{},Y({},e,r));(i=this.instance.persistence)===null||i===void 0||i.register((Y(n={},pl,Object.keys(vp(a))),Y(n,Hi,a),n)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(kl);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/early_access_features/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.earlyAccessFeatures;return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},kl,o)),e(o)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),r=this.getFlagVariants();return{flags:e.filter(function(i){return r[i]}),flagVariants:Object.keys(r).filter(function(i){return r[i]}).reduce(function(i,n){return i[n]=r[n],i},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var e=this._prepareFeatureFlagsForCallbacks(),r=e.flags,i=e.flagVariants;this.featureFlagEventHandlers.forEach(function(n){return n(r,i)})}},{key:"setPersonPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Gi)||{};this.instance.register(Y({},Gi,ie(ie({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Gi)}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(_r)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(n){i[n]=ie(ie({},i[n]),e[n]),delete e[n]}),this.instance.register(Y({},_r,ie(ie({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var r=this.instance.get_property(_r)||{};this.instance.register(Y({},_r,ie(ie({},r),{},Y({},e,{}))))}else this.instance.unregister(_r)}}]),t}(),jg=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,sr={is_supported:function(){return!0},error:function(t){me.error("cookieStore error: "+t)},get:function(t){try{for(var e=t+"=",r=document.cookie.split(";").filter(function(s){return s.length}),i=0;i<r.length;i++){for(var n=r[i];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null},parse:function(t){var e;try{e=JSON.parse(sr.get(t))||{}}catch{}return e},set:function(t,e,r,i,n){try{var s="",a="",o="";if(i){var l=document.location.hostname.match(jg),h=l?l[0]:"";s=h?"; domain=."+h:""}if(r){var c=new Date;c.setTime(c.getTime()+24*r*60*60*1e3),a="; expires="+c.toUTCString()}n&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+a+"; SameSite=Lax; path=/"+s+o;return document.cookie=u,u}catch{return}},remove:function(t,e){try{sr.set(t,"",-1,e)}catch{return}}},dl=null,Oe={is_supported:function(){if(dl!==null)return dl;var t=!0;if(typeof window<"u")try{var e="__mplssupport__";Oe.set(e,"xyz"),Oe.get(e)!=='"xyz"'&&(t=!1),Oe.remove(e)}catch{t=!1}else t=!1;return t||me.error("localStorage unsupported; falling back to cookie store"),dl=t,t},error:function(t){me.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){Oe.error(e)}return null},parse:function(t){try{return JSON.parse(Oe.get(t))||{}}catch{}return null},set:function(t,e){try{window.localStorage.setItem(t,JSON.stringify(e))}catch(r){Oe.error(r)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){Oe.error(e)}}},Hg=["distinct_id",va],Tl=ie(ie({},Oe),{},{parse:function(t){try{var e={};try{e=sr.parse(t)||{}}catch{}var r=Xe(e,JSON.parse(Oe.get(t)||"{}"));return Oe.set(t,r),r}catch{}return null},set:function(t,e,r,i,n){try{Oe.set(t,e);var s={};Hg.forEach(function(a){e[a]&&(s[a]=e[a])}),Object.keys(s).length&&sr.set(t,s,r,i,n)}catch(a){Oe.error(a)}},remove:function(t,e){try{window.localStorage.removeItem(t),sr.remove(t,e)}catch(r){Oe.error(r)}}}),na={},Gg={is_supported:function(){return!0},error:function(t){me.error("memoryStorage error: "+t)},get:function(t){return na[t]||null},parse:function(t){return na[t]||null},set:function(t,e){na[t]=e},remove:function(t){delete na[t]}},Xr=null,Ue={is_supported:function(){if(Xr!==null)return Xr;if(Xr=!0,typeof window<"u")try{var t="__support__";Ue.set(t,"xyz"),Ue.get(t)!=='"xyz"'&&(Xr=!1),Ue.remove(t)}catch{Xr=!1}else Xr=!1;return Xr},error:function(t){Tt.DEBUG&&me.error("sessionStorage error: ",t)},get:function(t){try{return window.sessionStorage.getItem(t)}catch(e){Ue.error(e)}return null},parse:function(t){try{return JSON.parse(Ue.get(t))||null}catch{}return null},set:function(t,e){try{window.sessionStorage.setItem(t,JSON.stringify(e))}catch(r){Ue.error(r)}},remove:function(t){try{window.sessionStorage.removeItem(t)}catch(e){Ue.error(e)}}},qg=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],bp=function(){function t(e){De(this,t);var r="";e.token&&(r=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=e.custom_campaign_params||[],e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+r+"_posthog",qg.indexOf(e.persistence.toLowerCase())===-1&&(me.critical("Unknown persistence type "+e.persistence+"; falling back to cookie"),e.persistence="cookie");var i=e.persistence.toLowerCase();i==="localstorage"&&Oe.is_supported()?this.storage=Oe:i==="localstorage+cookie"&&Tl.is_supported()?this.storage=Tl:i==="sessionstorage"&&Ue.is_supported()?this.storage=Ue:this.storage=i==="memory"?Gg:sr,this.user_state="anonymous",this.load(),this.update_config(e),this.save()}return Fe(t,[{key:"properties",value:function(){var e={};return Ee(this.props,function(r,i){if(i===Hi&&xr(r)==="object")for(var n=Object.keys(r),s=0;s<n.length;s++)e["$feature/".concat(n[s])]=r[n[s]];else o=i,l=!1,((a=Ng)===null?l:lp&&a.indexOf===lp?a.indexOf(o)!=-1:(Ee(a,function(h){if(l||(l=h===o))return Ll}),l))||(e[i]=r);var a,o,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Xe({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,r,i){var n=this;if(xl(e)){r===void 0&&(r="None"),this.expire_days=i===void 0?this.default_expiry:i;var s=!1;if(Ee(e,function(a,o){n.props.hasOwnProperty(o)&&n.props[o]!==r||(n.props[o]=a,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,r){var i=this;if(xl(e)){this.expire_days=r===void 0?this.default_expiry:r;var n=!1;if(Ee(e,function(s,a){e.hasOwnProperty(a)&&i.props[a]!==s&&(i.props[a]=s,n=!0)}),n)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(Ge.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(Ge.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||Ge.referrer(),$referring_domain:this.props.$referring_domain||Ge.referringDomain()})}},{key:"get_referrer_info",value:function(){return Sl({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return Ee(this.props,function(r,i){i in e||(e[i]=r)}),e}},{key:"update_config",value:function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,r){var i=this.props[Mn]||{};i[e]=r,this.props[Mn]=i,this.save()}},{key:"remove_event_timer",value:function(e){var r=(this.props[Mn]||{})[e];return Ct(r)||(delete this.props[Mn][e],this.save()),r}},{key:"get_user_state",value:function(){return this.props[Al]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[Al]=e,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Cl]||{}}},{key:"set_quota_limits",value:function(e){this.props[Cl]=e,this.save()}}]),t}(),Ug="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",_p=2,Wg=4,Wp=3,Zg=6,Yg=0,Jg=5e6,Xg="rrweb/console@1",Gt,Kg=Fe(function t(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};De(this,t),Y(this,"bucketSize",100),Y(this,"refillRate",10),Y(this,"mutationBuckets",{}),Y(this,"loggedTracker",{}),Y(this,"refillBuckets",function(){Object.keys(n.mutationBuckets).forEach(function(a){n.mutationBuckets[a]=n.mutationBuckets[a]+n.refillRate,n.mutationBuckets[a]>=n.bucketSize&&delete n.mutationBuckets[a]})}),Y(this,"getNodeOrRelevantParent",function(a){var o=n.rrweb.mirror.getNode(a);if(o?.nodeName!=="svg"&&o instanceof Element){var l=o.closest("svg");if(l)return[n.rrweb.mirror.getId(l),l]}return[a,o]}),Y(this,"numberOfChanges",function(a){var o,l,h,c,u,f,p,m;return((o=(l=a.removes)===null||l===void 0?void 0:l.length)!==null&&o!==void 0?o:0)+((h=(c=a.attributes)===null||c===void 0?void 0:c.length)!==null&&h!==void 0?h:0)+((u=(f=a.texts)===null||f===void 0?void 0:f.length)!==null&&u!==void 0?u:0)+((p=(m=a.adds)===null||m===void 0?void 0:m.length)!==null&&p!==void 0?p:0)}),Y(this,"throttleMutations",function(a){if(a.type!==Wp||a.data.source!==Yg)return a;var o=a.data,l=n.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(function(c){var u,f,p,m=ar(n.getNodeOrRelevantParent(c.id),2),g=m[0],d=m[1];return n.mutationBuckets[g]===0?!1:(n.mutationBuckets[g]=(u=n.mutationBuckets[g])!==null&&u!==void 0?u:n.bucketSize,n.mutationBuckets[g]=Math.max(n.mutationBuckets[g]-1,0),n.mutationBuckets[g]===0&&(n.loggedTracker[g]||(n.loggedTracker[g]=!0,(f=(p=n.options).onBlockedNode)===null||f===void 0||f.call(p,g,d))),c)}));var h=n.numberOfChanges(o);return h!==0||l===h?a:void 0}),this.rrweb=e,this.options=s,this.refillRate=(r=this.options.refillRate)!==null&&r!==void 0?r:this.refillRate,this.bucketSize=(i=this.options.bucketSize)!==null&&i!==void 0?i:this.bucketSize,setInterval(function(){n.refillBuckets()},1e3)}),Zp=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}(Zp||{}),Qg="/s/";(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(Gt||(Gt={}));var e0=[Gt.MouseMove,Gt.MouseInteraction,Gt.Scroll,Gt.ViewportResize,Gt.Input,Gt.TouchMove,Gt.MediaInteraction,Gt.Drag],t0=function(){function t(e){var r=this;De(this,t),Y(this,"lastActivityTimestamp",Date.now()),Y(this,"isIdle",!1),this.instance=e,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=Qg,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){r._flushBuffer()})}return Fe(t,[{key:"getSessionManager",value:function(){if(this.instance.sessionManager)return this.instance.sessionManager;me.error("Session recording started without valid sessionManager")}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var e=!!this.instance.get_property(El),r=!this.instance.config.disable_session_recording;return e&&r}},{key:"isConsoleLogCaptureEnabled",value:function(){var e=!!this.instance.get_property(mp),r=this.instance.config.enable_recording_console_log;return r??e}},{key:"getRecordingVersion",value:function(){var e,r=this.instance.get_property(gp);return((e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recorderVersion)||r||"v1"}},{key:"afterDecideResponse",value:function(e){var r,i,n,s,a,o;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((Y(a={},El,!!e.sessionRecording),Y(a,mp,(n=e.sessionRecording)===null||n===void 0?void 0:n.consoleLogRecordingEnabled),Y(a,gp,(s=e.sessionRecording)===null||s===void 0?void 0:s.recorderVersion),a)),(r=e.sessionRecording)!==null&&r!==void 0&&r.endpoint&&(this.endpoint=(o=e.sessionRecording)===null||o===void 0?void 0:o.endpoint),(i=e.sessionRecording)!==null&&i!==void 0&&i.recorderVersion&&(this.recorderVersion=e.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"log",value:function(e){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:i,trace:[],payload:[JSON.stringify(e)]}},timestamp:zp()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var e=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(r){return e._captureSnapshotBuffered(r)})),this._startCapture()}},{key:"_startCapture",value:function(){var e=this,r=this.getSessionManager();if(r&&Object.assign!==void 0&&!this.captureStarted&&!this.instance.config.disable_session_recording){this.captureStarted=!0,r.checkAndGetSessionAndWindowId();var i=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?ma(this.instance.config.api_host+"/static/".concat(i,"?v=").concat(Tt.LIB_VERSION),function(n){if(n)return me.error("Could not load ".concat(i),n);e._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(e){var r;return e.type===Wp&&e0.indexOf((r=e.data)===null||r===void 0?void 0:r.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(e){var r=this.getSessionManager();if(r){var i=this._isInteractiveEvent(e);if(i||this.isIdle||e.timestamp-this.lastActivityTimestamp>3e5&&(this.isIdle=!0),i&&(this.lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var n=r.checkAndGetSessionAndWindowId(!i,e.timestamp),s=n.windowId,a=n.sessionId;[_p,Wg].indexOf(e.type)!==-1||this.windowId===s&&this.sessionId===a||this._tryTakeFullSnapshot(),this.windowId=s,this.sessionId=a}}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this.captureStarted)return!1;try{var e;return(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot(),!0}catch(r){return me.error("Error taking full snapshot.",r),!1}}},{key:"_onScriptLoaded",value:function(){var e,r=this,i={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var n=this.instance.config.session_recording,s=0,a=Object.entries(n||{});s<a.length;s++){var o=ar(a[s],2),l=o[0],h=o[1];l in i&&(i[l]=h)}this.rrwebRecord?(this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new Kg(this.rrwebRecord,{onBlockedNode:function(c,u){var f="Too many mutations on node '".concat(c,"'. Rate limiting. This could be due to SVG animations or something similar");me.log(f,{node:u}),r.log("[PostHog Recorder] "+f,"warn")}}),this.stopRrweb=this.rrwebRecord(ie({emit:function(c){r.onRRwebEmit(c)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled()?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},i)),this.instance._addCaptureHook(function(c){try{if(c==="$pageview"){var u,f=r._maskUrl(window.location.href);if(!f)return;(u=r.rrwebRecord)===null||u===void 0||u.addCustomEvent("$pageview",{href:f})}}catch(p){me.error("Could not add $pageview to rrweb session",p)}}),this.lastActivityTimestamp=Date.now(),this.isIdle=!1):me.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(e){if(e&&xr(e)==="object"){if(e.type===Zp.Meta){var r=this._maskUrl(e.data.href);if(!r)return;e.data.href=r}var i=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(i){var n=function(l){var h=JSON.stringify(l);if(h.length>Jg){var c,u=or(h.matchAll(/data:([\w/\-.]+);(\w+),([^)"]*)/gim));try{for(u.s();!(c=u.n()).done;){var f=c.value;h=f[1].toLocaleLowerCase().slice(0,6)==="image/"?h.replace(f[0],Ug):h.replace(f[0],"")}}catch(p){u.e(p)}finally{u.f()}}return{event:JSON.parse(h),size:h.length}}(function(l){var h=l;if(h&&xr(h)==="object"&&h.type===Zg&&xr(h.data)==="object"&&h.data.plugin===Xg){h.data.payload.payload.length>10&&(h.data.payload.payload=h.data.payload.payload.slice(0,10),h.data.payload.payload.push("...[truncated]"));for(var c=[],u=0;u<h.data.payload.payload.length;u++)h.data.payload.payload[u]&&h.data.payload.payload[u].length>2e3?c.push(h.data.payload.payload[u].slice(0,2e3)+"...[truncated]"):c.push(h.data.payload.payload[u]);return h.data.payload.payload=c,l}return l}(i)),s=n.event,a=n.size;if(this._updateWindowAndSessionIds(s),!this.isIdle){var o={$snapshot_bytes:a,$snapshot_data:s,$session_id:this.sessionId,$window_id:this.windowId};this.emit?this._captureSnapshotBuffered(o):this.snapshots.push(o)}}}}},{key:"_maskUrl",value:function(e){var r=this.instance.config.session_recording;if(r.maskNetworkRequestFn){var i,n={url:e};return(i=n=r.maskNetworkRequestFn(n))===null||i===void 0?void 0:i.url}return e}},{key:"_flushBuffer",value:function(){return this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0),this.buffer&&this.buffer.data.length!==0&&this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.buffer=void 0,{size:0,data:[],sessionId:this.sessionId,windowId:this.windowId}}},{key:"_captureSnapshotBuffered",value:function(e){var r,i=this,n=2+(((r=this.buffer)===null||r===void 0?void 0:r.data.length)||0);(!this.buffer||this.buffer.size+e.$snapshot_bytes+n>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){i._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===_p}})}}]),t}(),Ht={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},r0=["first-input","navigation","paint","resource"],i0=["/s/","/e/"],n0=function(){function t(e){De(this,t),Y(this,"_forceAllowLocalhost",!1),this.instance=e}return Fe(t,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e,r,i=this;if(!this.observer)if(((e=window)===null||e===void 0||(r=e.PerformanceObserver)===null||r===void 0?void 0:r.supportedEntryTypes)!==void 0)if(!Mg.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(s){s.getEntries().forEach(function(a){i._capturePerformanceEvent(a)})});var n=PerformanceObserver.supportedEntryTypes.filter(function(s){return r0.includes(s)});n.forEach(function(s){var a;(a=i.observer)===null||a===void 0||a.observe({type:s,buffered:!0})})}catch(s){console.error("PostHog failed to start performance observer",s),this.stopObserving()}else me.log("PostHog Peformance observer not started because we are on localhost.");else me.log("PostHog Performance observer not started because PerformanceObserver is not supported by this browser.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,r;return(e=(r=this.instance.config.capture_performance)!==null&&r!==void 0?r:this.remoteEnabled)!==null&&e!==void 0&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.indexOf(this.instance.config.api_host)===0){var r=e.name.replace(this.instance.config.api_host,"");if(i0.find(function(p){return r.indexOf(p)===0}))return}var i={url:e.name},n=this.instance.config.session_recording;if(n.maskNetworkRequestFn&&(i=n.maskNetworkRequestFn(i)),i){var s=e.toJSON();s.name=i.url;var a={},o=Math.floor(Date.now()-performance.now());for(var l in a[Ht.timeOrigin]=o,a[Ht.timestamp]=Math.floor(o+e.startTime),Ht)s[l]!==void 0&&(a[Ht[l]]=s[l]);if(this.capturePerformanceEvent(a),s0(e)){var h,c=or(e.serverTiming||[]);try{for(c.s();!(h=c.n()).done;){var u,f=h.value;this.capturePerformanceEvent((Y(u={},Ht.timeOrigin,o),Y(u,Ht.timestamp,Math.floor(o+e.startTime)),Y(u,Ht.name,f.name),Y(u,Ht.duration,f.duration),Y(u,Ht.entryType,"serverTiming"),u))}}catch(p){c.e(p)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(e){var r,i=e[Ht.timestamp];(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:e},timestamp:i})}}]),t}(),s0=function(t){return t.entryType==="navigation"||t.entryType==="resource"},a0=function(){function t(e){De(this,t),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Fe(t,[{key:"call",value:function(){var e=this,r=Bl(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Gi),group_properties:this.instance.get_property(_r),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0}));this.instance._send_request("".concat(this.instance.config.api_host,"/decide/?v=3"),{data:r,verbose:!0},{method:"POST"},function(i){return e.parseDecideResponse(i)})}},{key:"parseDecideResponse",value:function(e){var r,i,n,s,a=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),e?.status!==0){if(!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){a.parseDecideResponse(e)},500);if(this.instance.toolbar.afterDecideResponse(e),(r=this.instance.sessionRecording)===null||r===void 0||r.afterDecideResponse(e),wr.afterDecideResponse(e,this.instance),(i=this.instance.webPerformance)===null||i===void 0||i.afterDecideResponse(e),(n=this.instance.exceptionAutocapture)===null||n===void 0||n.afterDecideResponse(e),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.featureFlags.receivedFeatureFlags(e),this.instance.compression={},e.supportedCompression&&!this.instance.config.disable_compression){var o,l={},h=or(e.supportedCompression);try{for(h.s();!(o=h.n()).done;)l[o.value]=!0}catch(g){h.e(g)}finally{h.f()}this.instance.compression=l}var c=(s=window)===null||s===void 0?void 0:s.extendPostHogWithSurveys;if(e.surveys&&!c&&ma(this.instance.config.api_host+"/static/surveys.js",function(g){if(g)return console.error("Could not load surveys script",g);window.extendPostHogWithSurveys(a.instance)}),e.siteApps)if(this.instance.config.opt_in_site_apps){var u,f=this.instance.config.api_host,p=or(e.siteApps);try{var m=function(){var g=u.value,d=g.id,y=g.url,v=[f,f[f.length-1]==="/"&&y[0]==="/"?y.substring(1):y].join("");window["__$$ph_site_app_".concat(d)]=a.instance,ma(v,function(b){b&&console.error("Error while initializing PostHog app with config id ".concat(d),b)})};for(p.s();!(u=p.n()).done;)m()}catch(g){p.e(g)}finally{p.f()}}else e.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),t}(),o0=["https://app.posthog.com","https://eu.posthog.com"],l0=["source"],h0=function(){function t(e){De(this,t),this.instance=e}return Fe(t,[{key:"afterDecideResponse",value:function(e){var r=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&r.toolbarVersion&&r.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(ie({},r))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!r){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}r=window.localStorage}var n,s=cp(e.hash,"__posthog")||cp(e.hash,"state"),a=s?JSON.parse(decodeURIComponent(s)):null;return a&&a.action==="ph_authorize"?((n=a).source="url",n&&Object.keys(n).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState("",document.title,e.pathname+e.search):e.hash="")):((n=JSON.parse(r.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token)&&(this.loadToolbar(n),!0)}catch{return!1}}},{key:"loadToolbar",value:function(e){var r=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var i=this.instance.config.api_host,n=3e5,s=Math.floor(Date.now()/n)*n,a="".concat(i).concat(i.endsWith("/")?"":"/","static/toolbar.js?t=").concat(s),o=!o0.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=ie(ie({token:this.instance.config.token},e),{},{apiURL:i},o?{instrument:!1}:{});l.source;var h=Cg(l,l0);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(h)),ma(a,function(c){c?me.error("Failed to load toolbar",c):(window.ph_load_toolbar||window.ph_load_editor)(l,r.instance)}),Dn(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,r.loadToolbar(l)}),!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(e,r,i)}}]),t}(),c0="__ph_opt_in_out_";function u0(t,e){Jp(!0,t,e)}function p0(t,e){Jp(!1,t,e)}function d0(t,e){return Yp(t,e)==="1"}function wp(t,e){return!!function(r){if(r&&r.respectDnt){var i=r&&r.window||q,n=i.navigator||{},s=!1;return Ee([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],function(a){Se([!0,1,"1","yes"],a)&&(s=!0)}),s}return!1}(e)||Yp(t,e)==="0"}function f0(t,e){Vl(e=e||{}).remove(Nl(t,e),!!e.crossSubdomainCookie)}function Vl(t){return(t=t||{}).persistenceType==="localStorage"?Oe:t.persistenceType==="localStorage+cookie"?Tl:sr}function Nl(t,e){return((e=e||{}).persistencePrefix||c0)+t}function Yp(t,e){return Vl(e).get(Nl(t,e))}function Jp(t,e,r){Np(e)&&e.length?(Vl(r=r||{}).set(Nl(e,r),t?1:0,Fg(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&t&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):console.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}var Xp=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;De(this,t),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=e}return Fe(t,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),t}(),m0=function(t){$p(r,Xp);var e=Rp(r);function r(i){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return De(this,r),(n=e.call(this,s)).handlePollRequest=i,n}return Fe(r,[{key:"enqueue",value:function(i,n,s){this._event_queue.push({url:i,data:n,options:s}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var i=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(i._event_queue.length>0){var n=i.formatQueue(),s=function(o){var l=n[o],h=l.url,c=l.data,u=l.options;Ee(c,function(f,p){c[p].offset=Math.abs(c[p].timestamp-i.getTime()),delete c[p].timestamp}),i.handlePollRequest(h,c,u)};for(var a in n)s(a);i._event_queue.length=0,i._empty_queue_count=0}else i._empty_queue_count++;i._empty_queue_count>4&&(i.isPolling=!1,i._empty_queue_count=0),i.isPolling&&i.poll()},this._pollInterval)}},{key:"unload",value:function(){var i=this;clearTimeout(this._poller);var n=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var s=Object.values(n);[].concat(bl(s.filter(function(a){return a.url.indexOf("/e")===0})),bl(s.filter(function(a){return a.url.indexOf("/e")!==0}))).map(function(a){var o=a.url,l=a.data,h=a.options;i.handlePollRequest(o,l,ie(ie({},h),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var i={};return Ee(this._event_queue,function(n){var s=n.url,a=n.data,o=n.options,l=(o?o._batchKey:null)||s;i[l]===void 0&&(i[l]={data:[],url:s,options:o}),o&&i[l].options&&i[l].options._metrics&&!i[l].options._metrics.rrweb_full_snapshot&&(i[l].options._metrics.rrweb_full_snapshot=o._metrics.rrweb_full_snapshot),i[l].data.push(a)}),i}}]),r}(),vt=Uint8Array,rt=Uint16Array,qi=Uint32Array,zl=new vt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jl=new vt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),xp=new vt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kp=function(t,e){for(var r=new rt(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new qi(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},Qp=Kp(zl,2),g0=Qp[0],Il=Qp[1];g0[28]=258,Il[258]=28;for(Ml=Kp(jl,0)[1],_a=new rt(32768),Pe=0;Pe<32768;++Pe)vr=(43690&Pe)>>>1|(21845&Pe)<<1,vr=(61680&(vr=(52428&vr)>>>2|(13107&vr)<<2))>>>4|(3855&vr)<<4,_a[Pe]=((65280&vr)>>>8|(255&vr)<<8)>>>1;var vr,Ml,_a,Pe,Fn=function(t,e,r){for(var i=t.length,n=0,s=new rt(e);n<i;++n)++s[t[n]-1];var a,o=new rt(e);for(n=0;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new rt(1<<e);var l=15-e;for(n=0;n<i;++n)if(t[n])for(var h=n<<4|t[n],c=e-t[n],u=o[t[n]-1]++<<c,f=u|(1<<c)-1;u<=f;++u)a[_a[u]>>>l]=h}else for(a=new rt(i),n=0;n<i;++n)a[n]=_a[o[t[n]-1]++]>>>15-t[n];return a},ri=new vt(288);for(Pe=0;Pe<144;++Pe)ri[Pe]=8;for(Pe=144;Pe<256;++Pe)ri[Pe]=9;for(Pe=256;Pe<280;++Pe)ri[Pe]=7;for(Pe=280;Pe<288;++Pe)ri[Pe]=8;var wa=new vt(32);for(Pe=0;Pe<32;++Pe)wa[Pe]=5;var Qr,y0=Fn(ri,9,0),v0=Fn(wa,5,0),ed=function(t){return(t/8>>0)+(7&t&&1)},td=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t instanceof rt?rt:t instanceof qi?qi:vt)(r-e);return i.set(t.subarray(e,r)),i},rr=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Tn=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},fl=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new vt(0),0];if(n==1){var a=new vt(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new rt(f+1),m=b0(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new vt(p),m]},b0=function t(e,r,i){return e.s==-1?Math.max(t(e.l,r,i+1),t(e.r,r,i+1)):r[e.s]=i},Sp=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new rt(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},In=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},ca=function(t,e,r){var i=r.length,n=ed(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Ep=function(t,e,r,i,n,s,a,o,l,h,c){rr(e,c++,r),++n[256];for(var u=fl(n,15),f=u[0],p=u[1],m=fl(s,15),g=m[0],d=m[1],y=Sp(f),v=y[0],b=y[1],_=Sp(g),x=_[0],T=_[1],S=new rt(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=fl(S,7),E=M[0],I=M[1],P=19;P>4&&!E[xp[P-1]];--P);var A,k,F,O,D=h+5<<3,C=In(n,ri)+In(s,wa)+a,$=In(n,f)+In(s,g)+a+14+3*P+In(S,E)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return ca(e,c,t.subarray(l,l+h));if(rr(e,c,1+($<C)),c+=2,$<C){A=Fn(f,p,0),k=f,F=Fn(g,d,0),O=g;var R=Fn(E,I,0);for(rr(e,c,b-257),rr(e,c+5,T-1),rr(e,c+10,P-4),c+=14,w=0;w<P;++w)rr(e,c+3*w,E[xp[w]]);c+=3*P;for(var G=[v,x],U=0;U<2;++U){var Z=G[U];for(w=0;w<Z.length;++w){var j=31&Z[w];rr(e,c,R[j]),c+=E[j],j>15&&(rr(e,c,Z[w]>>>5&127),c+=Z[w]>>>12)}}}else A=y0,k=ri,F=v0,O=wa;for(w=0;w<o;++w)if(i[w]>255){j=i[w]>>>18&31,Tn(e,c,A[j+257]),c+=k[j+257],j>7&&(rr(e,c,i[w]>>>23&31),c+=zl[j]);var ee=31&i[w];Tn(e,c,F[ee]),c+=O[ee],ee>3&&(Tn(e,c,i[w]>>>5&8191),c+=jl[ee])}else Tn(e,c,A[i[w]]),c+=k[i[w]];return Tn(e,c,A[256]),c+k[256]},_0=new qi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),w0=new vt(0),x0=function(){for(var t=new qi(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),S0=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=x0[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},E0=function(t,e,r,i,n){return function(s,a,o,l,h,c){var u=s.length,f=new vt(l+u+5*(1+Math.floor(u/7e3))+h),p=f.subarray(l,f.length-h),m=0;if(!a||u<8)for(var g=0;g<=u;g+=65535){var d=g+65535;d<u?m=ca(p,m,s.subarray(g,d)):(p[g]=c,m=ca(p,m,s.subarray(g,u)))}else{for(var y=_0[a-1],v=y>>>13,b=8191&y,_=(1<<o)-1,x=new rt(32768),T=new rt(_+1),S=Math.ceil(o/3),w=2*S,M=function(it){return(s[it]^s[it+1]<<S^s[it+2]<<w)&_},E=new qi(25e3),I=new rt(288),P=new rt(32),A=0,k=0,F=(g=0,0),O=0,D=0;g<u;++g){var C=M(g),$=32767&g,R=T[C];if(x[$]=R,T[C]=$,O<=g){var G=u-g;if((A>7e3||F>24576)&&G>423){m=Ep(s,p,0,E,I,P,k,F,D,g-D,m),F=A=k=0,D=g;for(var U=0;U<286;++U)I[U]=0;for(U=0;U<30;++U)P[U]=0}var Z=2,j=0,ee=b,ne=$-R&32767;if(G>2&&C==M(g-ne))for(var te=Math.min(v,G)-1,K=Math.min(32767,g),be=Math.min(258,G);ne<=K&&--ee&&$!=R;){if(s[g+Z]==s[g+Z-ne]){for(var he=0;he<be&&s[g+he]==s[g+he-ne];++he);if(he>Z){if(Z=he,j=ne,he>te)break;var Ae=Math.min(ne,he-2),_e=0;for(U=0;U<Ae;++U){var W=g-ne+U+32768&32767,He=W-x[W]+32768&32767;He>_e&&(_e=He,R=W)}}}ne+=($=R)-(R=x[$])+32768&32767}if(j){E[F++]=268435456|Il[Z]<<18|Ml[j];var _t=31&Il[Z],wt=31&Ml[j];k+=zl[_t]+jl[wt],++I[257+_t],++P[wt],O=g+Z,++A}else E[F++]=s[g],++I[s[g]]}}m=Ep(s,p,c,E,I,P,k,F,D,g-D,m),c||(m=ca(p,m,w0))}return td(f,0,l+ed(m)+h)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},Dl=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},k0=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Dl(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},P0=function(t){return 10+(t.filename&&t.filename.length+1||0)};function A0(t,e){e===void 0&&(e={});var r=S0(),i=t.length;r.p(t);var n=E0(t,e,P0(e),8),s=n.length;return k0(n,e),Dl(n,s-8,r.d()),Dl(n,s-4,i),n}function C0(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var i=new vt(t.length+(t.length>>>1)),n=0,s=function(h){i[n++]=h},a=0;a<r;++a){if(n+5>i.length){var o=new vt(n+8+(r-a<<1));o.set(i),i=o}var l=t.charCodeAt(a);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++a))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return td(i,0,n)}(function(t){t.GZipJS="gzip-js",t.Base64="base64"})(Qr||(Qr={}));var T0=function(t,e,r){var i=e||{};i.ip=r.ip?1:0,i._=new Date().getTime().toString(),i.ver=Tt.LIB_VERSION;var n=t.split("?");if(n.length>1){var s,a=or(n[1].split("&"));try{for(a.s();!(s=a.n()).done;){var o=s.value.split("=")[0];i[o]&&delete i[o]}}catch(h){a.e(h)}finally{a.f()}}var l=t.indexOf("?")>-1?"&":"?";return t+l+function(h){var c,u,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",p=[];return Ee(h,function(m,g){c=encodeURIComponent(m.toString()),u=encodeURIComponent(g),p[p.length]=u+"="+c}),p.join(f)}(i)},Hl=function t(e,r){if(r.blob&&e.buffer)return new Blob([e.buffer],{type:"text/plain"});if(r.sendBeacon||r.blob){var i=t(e,{method:"POST"});return new Blob([i],{type:"application/x-www-form-urlencoded"})}if(r.method!=="POST")return null;var n,s;return n=Array.isArray(e)||(s=e,Object.prototype.toString.call(s)==="[object Uint8Array]")?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),"compression"in e&&e.compression&&(n+="&compression="+e.compression),n},rd=function(t){var e=t.url,r=t.data,i=t.headers,n=t.options,s=t.callback,a=t.retriesPerformedSoFar,o=t.retryQueue,l=t.onXHRError,h=t.timeout,c=h===void 0?6e4:h,u=t.onResponse,f=new XMLHttpRequest;f.open(n.method||"GET",e,!0);var p=Hl(r,n);Ee(i,function(m,g){f.setRequestHeader(g,m)}),n.method!=="POST"||n.blob||f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.timeout=c,f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState===4)if(u?.(f),f.status===200){if(s){var m;try{m=JSON.parse(f.responseText)}catch(g){return void me.error(g)}s(m)}}else typeof l=="function"&&l(f),(f.status<400||f.status>500)&&o.enqueue({url:e,data:r,options:n,headers:i,retriesPerformedSoFar:(a||0)+1,callback:s}),s?.({status:0})},f.send(p)},I0=18e5,M0=function(t){$p(r,Xp);var e=Rp(r);function r(i,n){var s;return De(this,r),(s=e.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=i,s.rateLimiter=n,typeof window<"u"&&"onLine"in window.navigator&&(s.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){s._handleWeAreNowOnline()}),window.addEventListener("offline",function(){s.areWeOnline=!1})),s}return Fe(r,[{key:"enqueue",value:function(i){var n=i.retriesPerformedSoFar||0;if(!(n>=10)){var s=function(o){var l=3e3*Math.pow(2,o),h=l/2,c=Math.min(I0,l),u=(Math.random()-.5)*(c-h);return Math.ceil(c+u)}(n),a=new Date(Date.now()+s);this.queue.push({retryAt:a,requestData:i}),console.warn("Enqueued failed request for retry in ".concat(s)),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var i=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){i.areWeOnline&&i.queue.length>0&&i.flush(),i.poll()},this._pollInterval)}},{key:"flush",value:function(){var i=new Date(Date.now()),n=this.queue.filter(function(l){return l.retryAt<i});if(n.length>0){this.queue=this.queue.filter(function(l){return l.retryAt>=i});var s,a=or(n);try{for(a.s();!(s=a.n()).done;){var o=s.value.requestData;this._executeXhrRequest(o)}}catch(l){a.e(l)}finally{a.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var i,n=or(this.queue);try{for(n.s();!(i=n.n()).done;){var s=i.value.requestData,a=s.url,o=s.data,l=s.options;if(this.rateLimiter.isRateLimited(l._batchKey))Tt.DEBUG&&console.warn("[PostHog RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(a,Hl(o,ie(ie({},l),{},{sendBeacon:!0})))}catch(h){Tt.DEBUG&&console.error(h)}}}catch(h){n.e(h)}finally{n.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(i){var n=i.url,s=i.data,a=i.options,o=i.headers,l=i.callback,h=i.retriesPerformedSoFar;this.rateLimiter.isRateLimited(a._batchKey)||rd({url:n,data:s||{},options:a||{},headers:o||{},retriesPerformedSoFar:h||0,callback:l,retryQueue:this,onXHRError:this.onXHRError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),r}();Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t});var kp="0123456789abcdef",D0=function(){function t(e){if(De(this,t),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return Fe(t,[{key:"toString",value:function(){for(var e="",r=0;r<this.bytes.length;r++)e=e+kp.charAt(this.bytes[r]>>>4)+kp.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}},{key:"clone",value:function(){return new t(this.bytes.slice(0))}},{key:"equals",value:function(e){return this.compareTo(e)===0}},{key:"compareTo",value:function(e){for(var r=0;r<16;r++){var i=this.bytes[r]-e.bytes[r];if(i!==0)return Math.sign(i)}return 0}}],[{key:"fromFieldsV7",value:function(e,r,i,n){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||e<0||r<0||i<0||n<0||e>0xffffffffffff||r>4095||i>1073741823||n>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|r>>>8,s[7]=r,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=n>>>24,s[13]=n>>>16,s[14]=n>>>8,s[15]=n,new t(s)}}]),t}(),F0=function(){function t(){De(this,t),Y(this,"timestamp",0),Y(this,"counter",0),Y(this,"random",new O0)}return Fe(t,[{key:"generate",value:function(){var e=this.generateOrAbort();if(e!==void 0)return e;this.timestamp=0;var r=this.generateOrAbort();if(r===void 0)throw new Error("Could not generate UUID after timestamp reset");return r}},{key:"generateOrAbort",value:function(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return D0.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),t}(),id=function(t){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};typeof crypto<"u"&&crypto.getRandomValues&&(id=function(t){return crypto.getRandomValues(t)});var Pp,O0=function(){function t(){De(this,t),Y(this,"buffer",new Uint32Array(8)),Y(this,"cursor",1/0)}return Fe(t,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(id(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),t}(),ei=function(){return $0().toString()},$0=function(){return(Pp||(Pp=new F0)).generate()},sa=1800,Ap=60,R0=864e5,L0=function(){function t(e,r){De(this,t),Y(this,"_sessionIdChangedHandlers",[]),this.config=e,this.persistence=r,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var i=e.persistence_name||e.token,n=e.session_idle_timeout_seconds||sa;if(typeof n!="number"?(console.warn("[PostHog] session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),n=sa):n>sa?console.warn("[PostHog] session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):n<Ap&&console.warn("[PostHog] session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."),this._sessionTimeoutMs=1e3*Math.min(Math.max(n,Ap),sa),this._window_id_storage_key="ph_"+i+"_window_id",this._primary_window_exists_storage_key="ph_"+i+"_primary_window_exists",this._canUseSessionStorage()){var s=Ue.parse(this._window_id_storage_key),a=Ue.parse(this._primary_window_exists_storage_key);s&&!a?this._windowId=s:Ue.remove(this._window_id_storage_key),Ue.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Fe(t,[{key:"onSessionId",value:function(e){var r=this;return this._sessionIdChangedHandlers===void 0&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){r._sessionIdChangedHandlers=r._sessionIdChangedHandlers.filter(function(i){return i!==e})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ue.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&Ue.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ue.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,r,i){e===this._sessionId&&r===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=r,this._sessionId=e,this.persistence.register(Y({},va,[r,e,i])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[va];return Array.isArray(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;window.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&Ue.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),i=ar(this._getSessionId(),3),n=i[0],s=i[1],a=i[2],o=this._getWindowId(),l=a&&a>0&&Math.abs(r-a)>R0,h=!1;!s||!e&&Math.abs(r-n)>this._sessionTimeoutMs||l?(s=ei(),o=ei(),a=r,h=!0):o||(o=ei(),h=!0);var c=n===0||!e||l?r:n,u=a===0?new Date().getTime():a;return this._setWindowId(o),this._setSessionId(s,c,u),h&&this._sessionIdChangedHandlers.forEach(function(f){return f(s,o)}),{sessionId:s,windowId:o,sessionStartTimestamp:u}}}]),t}(),B0=Fe(function t(e,r,i,n){De(this,t),this.name="posthog-js",this.setupOnce=function(s){s(function(a){var o,l,h,c,u;if(a.level!=="error"||!e.__loaded)return a;a.tags||(a.tags={});var f=e.config.ui_host||e.config.api_host;a.tags["PostHog Person URL"]=f+"/person/"+e.get_distinct_id(),e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=((o=a.exception)===null||o===void 0?void 0:o.values)||[],m={$exception_message:(l=p[0])===null||l===void 0?void 0:l.value,$exception_type:(h=p[0])===null||h===void 0?void 0:h.type,$exception_personURL:f+"/person/"+e.get_distinct_id(),$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:(c=p[0])===null||c===void 0?void 0:c.value,$sentry_exception_type:(u=p[0])===null||u===void 0?void 0:u.type,$sentry_tags:a.tags};return r&&i&&(m.$sentry_url=(n||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+a.event_id),e.capture("$exception",m),a})}}),V0=function(t){Promise&&Promise.resolve||console.warn("This browser does not have Promise support, and can not use the segment integration");var e=function(r,i){r.event.userId||r.event.anonymousId===t.get_distinct_id()||t.reset(),r.event.userId&&r.event.userId!==t.get_distinct_id()&&(t.register({distinct_id:r.event.userId}),t.reloadFeatureFlags());var n=t._calculate_event_properties(i,r.event.properties);return r.event.properties=Object.assign({},n,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(r){return e(r,r.event.event)},page:function(r){return e(r,"$pageview")},identify:function(r){return e(r,"$identify")},screen:function(r){return e(r,"$screen")}}},N0=function(){function t(){var e=this;De(this,t),Y(this,"_hasSeenPageView",!1),Y(this,"_updateScrollData",function(){var r,i,n,s;e._pageViewData||(e._pageViewData=e._createPageViewData());var a=e._pageViewData,o=e._scrollY(),l=e._scrollHeight(),h=e._contentY(),c=e._contentHeight();a.lastScrollY=o,a.maxScrollY=Math.max(o,(r=a.maxScrollY)!==null&&r!==void 0?r:0),a.maxScrollHeight=Math.max(l,(i=a.maxScrollHeight)!==null&&i!==void 0?i:0),a.lastContentY=h,a.maxContentY=Math.max(h,(n=a.maxContentY)!==null&&n!==void 0?n:0),a.maxContentHeight=Math.max(c,(s=a.maxContentHeight)!==null&&s!==void 0?s:0)})}return Fe(t,[{key:"_createPageViewData",value:function(){return{pathname:q.location.pathname}}},{key:"doPageView",value:function(){var e,r;return this._hasSeenPageView?(r=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,r=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),ie({$prev_pageview_pathname:(e=r)===null||e===void 0?void 0:e.pathname},this._calculatePrevPageScrollProperties(r))}},{key:"doPageLeave",value:function(){var e=this._pageViewData;return ie({$prev_pageview_pathname:e?.pathname},this._calculatePrevPageScrollProperties(e))}},{key:"_calculatePrevPageScrollProperties",value:function(e){if(!e||e.maxScrollHeight==null||e.lastScrollY==null||e.maxScrollY==null||e.maxContentHeight==null||e.lastContentY==null||e.maxContentY==null)return{};var r=e.maxScrollHeight,i=e.lastScrollY,n=e.maxScrollY,s=e.maxContentHeight,a=e.lastContentY,o=e.maxContentY;return r=Math.ceil(r),i=Math.ceil(i),n=Math.ceil(n),s=Math.ceil(s),a=Math.ceil(a),o=Math.ceil(o),{$prev_pageview_last_scroll:i,$prev_pageview_last_scroll_percentage:r<=1?1:aa(i/r,0,1),$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:r<=1?1:aa(n/r,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:s<=1?1:aa(a/s,0,1),$prev_pageview_max_content:o,$prev_pageview_max_content_percentage:s<=1?1:aa(o/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){q.addEventListener("scroll",this._updateScrollData),q.addEventListener("scrollend",this._updateScrollData),q.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){q.removeEventListener("scroll",this._updateScrollData),q.removeEventListener("scrollend",this._updateScrollData),q.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,q.document.documentElement.scrollHeight-q.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return q.scrollY||q.pageYOffset||q.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return q.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var e=q.document.documentElement.clientHeight||0;return this._scrollY()+e}}]),t}();function aa(t,e,r){return Math.max(e,Math.min(t,r))}function Cp(t){return typeof Event<"u"&&nd(t,Event)}function nd(t,e){try{return t instanceof e}catch{return!1}}function Tp(t){return t===null||xr(t)!=="object"&&typeof t!="function"}function ua(t,e){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}function ml(t){return ua(t,"DOMError")}var Ip=/\(error: (.*)\)/,Mp=50,pa="?";function gl(t,e,r,i){var n={filename:t,function:e,in_app:!0};return r!==void 0&&(n.lineno=r),i!==void 0&&(n.colno=i),n}var z0=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,j0=/\((\S*)(?::(\d+))(?::(\d+))\)/,H0=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,G0=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,q0=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,U0=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=e.sort(function(n,s){return n[0]-s[0]}).map(function(n){return n[1]});return function(n){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=[],o=n.split(`
413
+ `),l=s;l<o.length;l++){var h=o[l];if(!(h.length>1024)){var c=Ip.test(h)?h.replace(Ip,"$1"):h;if(!c.match(/\S*Error: /)){var u,f=or(i);try{for(f.s();!(u=f.n()).done;){var p=(0,u.value)(c);if(p){a.push(p);break}}}catch(m){f.e(m)}finally{f.f()}if(a.length>=Mp)break}}}return function(m){if(!m.length)return[];var g=m.slice(0,Mp);return g.reverse(),g.map(function(d){return ie(ie({},d),{},{filename:d.filename||g[g.length-1].filename,function:d.function||"?"})})}(a)}}.apply(void 0,[[30,function(t){var e=z0.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){var r=j0.exec(e[2]);r&&(e[2]=r[1],e[3]=r[2],e[4]=r[3])}var i=ar(Dp(e[1]||pa,e[2]),2),n=i[0];return gl(i[1],n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,function(t){var e=H0.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var r=G0.exec(e[3]);r&&(e[1]=e[1]||"eval",e[3]=r[1],e[4]=r[2],e[5]="")}var i=e[3],n=e[1]||pa,s=ar(Dp(n,i),2);return n=s[0],gl(i=s[1],n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,function(t){var e=q0.exec(t);return e?gl(e[2],e[1]||pa,+e[3],e[4]?+e[4]:void 0):void 0}]]),Dp=function(t,e){var r=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return r||i?[t.indexOf("@")!==-1?t.split("@")[0]:pa,r?"safari-extension:".concat(e):"safari-web-extension:".concat(e)]:[t,e]},W0=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Z0=/Minified React error #\d+;/i;function Y0(t){var e=t.stacktrace||t.stack||"",r=function(i){if(i){if(typeof i.framesToPop=="number")return i.framesToPop;if(Z0.test(i.message))return 1}return 0}(t);try{return U0(e,r)}catch{}return[]}function yl(t){var e=Y0(t);return{$exception_type:t.name,$exception_message:t.message,$exception_stack_trace_raw:JSON.stringify(e)}}function J0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:40,r=Object.keys(t);if(r.sort(),!r.length)return"[object has no keys]";for(var i=r.length;i>0;i--){var n=r.slice(0,i).join(", ");if(!(n.length>e))return i===r.length||n.length<=e?n:"".concat(n.slice(0,e),"...")}return""}function Fp(t){var e=ar(t,5),r=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o={};if(a===void 0&&typeof r=="string"){var l="Error",h=r,c=r.match(W0);c&&(l=c[1],h=c[2]),o={$exception_type:l,$exception_message:h}}var u=a||r;if(ml(u)||function(g){return ua(g,"DOMException")}(u)){var f=u;if(function(g){return"stack"in g}(u))o=yl(u);else{var p=f.name||(ml(f)?"DOMError":"DOMException"),m=f.message?"".concat(p,": ").concat(f.message):p;o=function(g){return{$exception_type:"Error",$exception_message:g}}(m),o.$exception_type=ml(f)?"DOMError":"DOMException",o.$exception_message=o.$exception_message||m}"code"in f&&(o.$exception_DOMException_code="".concat(f.code))}else(function(g){return ua(g,"ErrorEvent")})(u)&&u.error?o=yl(u.error):function(g){switch(Object.prototype.toString.call(g)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return nd(g,Error)}}(u)?o=yl(u):function(g){return ua(g,"Object")}(u)||Cp(u)?(o=function(g){return{$exception_type:Cp(g)?g.constructor.name:"Error",$exception_message:"Non-Error ".concat("exception"," captured with keys: ",J0(g))}}(u),o.$exception_is_synthetic=!0):(o.$exception_type=o.$exception_type||"Error",o.$exception_message=o.$exception_message||u,o.$exception_is_synthetic=!0);return ie(ie(ie(ie({},o),{},{$exception_type:o.$exception_type||"UnknownErrorType",$exception_message:o.$exception_message||""},i?{$exception_source:i}:{}),n?{$exception_lineno:n}:{}),s?{$exception_colno:s}:{})}var On,Gl,qe,X0=function(){function t(e){De(this,t),Y(this,"originalOnErrorHandler",void 0),Y(this,"originalOnUnhandledRejectionHandler",void 0),Y(this,"errorsToIgnore",[]),this.instance=e}return Fe(t,[{key:"debugLog",value:function(){if(this.instance.config.debug){for(var e,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];(e=console).log.apply(e,["PostHog.js [PostHog.ExceptionObserver]"].concat(i))}}},{key:"startCapturing",value:function(){var e;if(this.isEnabled()&&((e=q.onerror)===null||e===void 0||!e.__POSTHOG_INSTRUMENTED__))try{this.originalOnErrorHandler=q.onerror,q.onerror=function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return this.captureException(i),!!this.originalOnErrorHandler&&this.originalOnErrorHandler.apply(this,i)}.bind(this),q.onerror.__POSTHOG_INSTRUMENTED__=!0,this.originalOnUnhandledRejectionHandler=q.onunhandledrejection,q.onunhandledrejection=function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];var s=function(a){var o=ar(a,1)[0],l=o;try{"reason"in o?l=o.reason:"detail"in o&&"reason"in o.detail&&(l=o.detail.reason)}catch{}var h={};return(h=Tp(l)?{$exception_message:"Non-Error promise rejection captured with value: ".concat(String(l))}:Fp([l])).$exception_handled=!1,ie(ie({},h),{},{$exception_type:h.$exception_type="UnhandledRejection",$exception_message:h.$exception_message=h.$exception_message||o.reason||String(l)})}(i);return this.sendExceptionEvent(s),!this.originalOnUnhandledRejectionHandler||this.originalOnUnhandledRejectionHandler.apply(q,i)}.bind(this),q.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0}catch(r){console.error("PostHog failed to start exception autocapture",r),this.stopCapturing()}}},{key:"stopCapturing",value:function(){var e,r;this.originalOnErrorHandler!==void 0&&(q.onerror=this.originalOnErrorHandler,this.originalOnErrorHandler=null),(e=q.onerror)===null||e===void 0||delete e.__POSTHOG_INSTRUMENTED__,this.originalOnUnhandledRejectionHandler!==void 0&&(q.onunhandledrejection=this.originalOnUnhandledRejectionHandler,this.originalOnUnhandledRejectionHandler=null),(r=q.onunhandledrejection)===null||r===void 0||delete r.__POSTHOG_INSTRUMENTED__}},{key:"isCapturing",value:function(){var e;return!((e=q.onerror)===null||e===void 0||!e.__POSTHOG_INSTRUMENTED__)}},{key:"isEnabled",value:function(){var e;return(e=this.remoteEnabled)!==null&&e!==void 0&&e}},{key:"afterDecideResponse",value:function(e){var r=e.autocaptureExceptions;if(this.remoteEnabled=!!r||!1,!Tp(r)&&"errors_to_ignore"in r&&Array.isArray(r.errors_to_ignore)){var i=r.errors_to_ignore;this.errorsToIgnore=i.map(function(n){return new RegExp(n)})}this.isEnabled()?(this.startCapturing(),this.debugLog("Remote config for exception autocapture is enabled, starting",r)):this.debugLog("Remote config for exception autocapture is disabled, not starting",r)}},{key:"captureException",value:function(e,r){var i=Fp(e);if(this.errorsToIgnore.some(function(a){return a.test(i.$exception_message||"")}))this.debugLog("Ignoring exception based on remote config",i);else{var n=ie(ie({},r),i),s=this.instance.config.ui_host||this.instance.config.api_host;i.$exception_personURL=s+"/person/"+this.instance.get_distinct_id(),this.sendExceptionEvent(n)}}},{key:"sendExceptionEvent",value:function(e){this.instance.capture("$exception",e,{transport:"XHR",method:"POST",endpoint:"/e/",_noTruncate:!0,_batchKey:"exceptionEvent"})}}]),t}(),K0=function(){function t(e){De(this,t),this.instance=e}return Fe(t,[{key:"getSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(Pl);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/surveys/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.surveys;return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},Pl,o)),e(o)})}},{key:"getActiveMatchingSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(n){var s=n.filter(function(a){return!(!a.start_date||a.end_date)}).filter(function(a){var o,l;if(!a.conditions)return!0;var h=(o=a.conditions)===null||o===void 0||!o.url||window.location.href.indexOf(a.conditions.url)>-1,c=(l=a.conditions)===null||l===void 0||!l.selector||document.querySelector(a.conditions.selector);return h&&c}).filter(function(a){if(!a.linked_flag_key&&!a.targeting_flag_key)return!0;var o=!a.linked_flag_key||r.instance.featureFlags.isFeatureEnabled(a.linked_flag_key),l=!a.targeting_flag_key||r.instance.featureFlags.isFeatureEnabled(a.targeting_flag_key);return o&&l});return e(s)},i)}}]),t}(),Q0=6e4,ey=function(){function t(){var e=this;De(this,t),Y(this,"limits",{}),Y(this,"checkForLimiting",function(r){try{(JSON.parse(r.responseText).quota_limited||[]).forEach(function(i){me.log("[PostHog RateLimiter] ".concat(i||"events"," is quota limited.")),e.limits[i]=new Date().getTime()+Q0})}catch(i){return void me.error(i)}})}return Fe(t,[{key:"isRateLimited",value:function(e){var r=this.limits[e||"events"]||!1;return r!==!1&&new Date().getTime()<r}}]),t}();(function(t){t[t.INIT_MODULE=0]="INIT_MODULE",t[t.INIT_SNIPPET=1]="INIT_SNIPPET"})(On||(On={}));var Fl=function(){},oa={},lt="posthog",da=q.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,sd=!da&&Lt.indexOf("MSIE")===-1&&Lt.indexOf("Mozilla")===-1,Op=function(){var t,e,r;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(Me==null||(t=Me.location)===null||t===void 0||(e=t.hostname)===null||e===void 0?void 0:e.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Fl,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(q==null||(r=q.location)===null||r===void 0?void 0:r.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(i){var n="Bad HTTP status: "+i.status+" "+i.statusText;console.error(n)},get_device_id:function(i){return i},_onCapture:Fl,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},Ol=function(t,e,r,i){var n,s=r!==lt&&qe?r?qe[r]:void 0:qe,a={initComplete:!1,syncCode:!1},o=function(l){return function(h){a[l]||(a[l]=!0,a.initComplete&&a.syncCode&&i?.(h))}};if(s&&Gl===On.INIT_MODULE)n=s;else{if(s&&!ir(s))return void console.error("You have already initialized "+r);n=new ql}return n._init(t,e,r,o("initComplete")),n.toolbar.maybeLoadToolbar(),n.sessionRecording=new t0(n),n.sessionRecording.startRecordingIfEnabled(),n.webPerformance=new n0(n),n.webPerformance.startObservingIfEnabled(),n.config.__preview_measure_pageview_stats&&n.pageViewManager.startMeasuringScrollPosition(),n.exceptionAutocapture=new X0(n),n.__autocapture=n.config.autocapture,wr._setIsAutocaptureEnabled(n),wr._isAutocaptureEnabled&&(n.__autocapture=n.config.autocapture,wr.enabledForProject(n.config.token,100,100)?wr.isBrowserSupported()?wr.init(n):(n.__autocapture=!1,me.log("Disabling Automatic Event Collection because this browser is not supported")):(n.__autocapture=!1,me.log("Not in active bucket: disabling Automatic Event Collection."))),Tt.DEBUG=Tt.DEBUG||n.config.debug,s!==void 0&&ir(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),o("syncCode")(n),n},ql=function(){function t(){var e=this;De(this,t),this.config=Op(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=B0,this.segmentIntegration=function(){return V0(e)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.featureFlags=new zg(this),this.toolbar=new h0(this),this.pageViewManager=new N0,this.surveys=new K0(this),this.rateLimiter=new ey,this.people={set:function(r,i,n){var s=typeof r=="string"?Y({},r,i):r;e.setPersonProperties(s),n?.({})},set_once:function(r,i,n){var s=typeof r=="string"?Y({},r,i):r;e.setPersonProperties(void 0,s),n?.({})}}}return Fe(t,[{key:"init",value:function(e,r,i){if(Ct(i))console.error("You must name your new library: init(token, config, name)");else{if(i!==lt){var n=Ol(e,r,i,function(s){qe[i]=s,s._loaded()});return qe[i]=n,n}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var l,h={segmentRegister:!1,syncCode:!1},c=function(_){return function(){h[_]||(h[_]=!0,h.segmentRegister&&h.syncCode&&o?.(n))}};if(this.set_config(Xe({},Op(),s,{name:a,token:e,callback_fn:(a===lt?a:lt+"."+a)+"._jsc"})),this._jsc=function(){},(q!=null&&(r=q.rrweb)!==null&&r!==void 0&&r.record||q!=null&&q.rrwebRecord)&&(this.__loaded_recorder_version=q==null||(l=q.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new bp(this.config),this._requestQueue=new m0(this._handle_queued_event.bind(this)),this._retryQueue=new M0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new L0(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new bp(ie(ie({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),((i=s.bootstrap)===null||i===void 0?void 0:i.distinctID)!==void 0){var u,f,p=this.config.get_device_id(ei()),m=(u=s.bootstrap)!==null&&u!==void 0&&u.isIdentifiedID?p:s.bootstrap.distinctID;this.persistence.set_user_state((f=s.bootstrap)!==null&&f!==void 0&&f.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:m})}if(this._hasBootstrappedFeatureFlags()){var g,d,y=Object.keys(((g=s.bootstrap)===null||g===void 0?void 0:g.featureFlags)||{}).filter(function(_){var x,T;return!((x=s.bootstrap)===null||x===void 0||(T=x.featureFlags)===null||T===void 0||!T[_])}).reduce(function(_,x){var T,S;return _[x]=((T=s.bootstrap)===null||T===void 0||(S=T.featureFlags)===null||S===void 0?void 0:S[x])||!1,_},{}),v=Object.keys(((d=s.bootstrap)===null||d===void 0?void 0:d.featureFlagPayloads)||{}).filter(function(_){return y[_]}).reduce(function(_,x){var T,S,w,M;return(T=s.bootstrap)!==null&&T!==void 0&&(S=T.featureFlagPayloads)!==null&&S!==void 0&&S[x]&&(_[x]=(w=s.bootstrap)===null||w===void 0||(M=w.featureFlagPayloads)===null||M===void 0?void 0:M[x]),_},{});this.featureFlags.receivedFeatureFlags({featureFlags:y,featureFlagPayloads:v})}if(!this.get_distinct_id()){var b=this.config.get_device_id(ei());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_user_state("anonymous")}q.addEventListener&&q.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_loaded",value:function(){var e=this.config.advanced_disable_decide;e||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(r){console.error("`loaded` function failed",r)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:Me.title},{send_instantly:!0}),e||(new a0(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)===null||e===void 0||e.poll())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||nr(this.__request_queue,function(r){e._send_request.apply(e,bl(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,r){if(Ct(e))return null;if(da)return function(a){e(a,r)};var i=this._jsc,n=""+Math.floor(1e8*Math.random()),s=this.config.callback_fn+"["+n+"]";return i[n]=function(a){delete i[n],e(a,r)},s}},{key:"_handle_unload",value:function(){var e,r;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(r=this._retryQueue)===null||r===void 0||r.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,r,i){var n=JSON.stringify(r);this.__compress_and_send_json_request(e,n,i||oa,Fl)}},{key:"__compress_and_send_json_request",value:function(e,r,i,n){var s=function(h,c,u){return h===Qr.GZipJS?[A0(C0(c),{mtime:0}),ie(ie({},u),{},{blob:!0,urlQueryArgs:{compression:Qr.GZipJS}})]:[{data:Bl(c)},u]}(this.compression[Qr.GZipJS]?Qr.GZipJS:Qr.Base64,r,i),a=ar(s,2),o=a[0],l=a[1];this._send_request(e,o,l,n)}},{key:"_send_request",value:function(e,r,i,n){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(i._batchKey))if(sd)this.__request_queue.push([e,r,i,n]);else{var s={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};i=Xe(s,i||{}),da||(i.method="GET");var a="sendBeacon"in q.navigator&&i.transport==="sendBeacon";if(e=T0(e,i.urlQueryArgs||{},{ip:this.config.ip}),a)try{q.navigator.sendBeacon(e,Hl(r,ie(ie({},i),{},{sendBeacon:!0})))}catch{}else if(da)try{rd({url:e,data:r,headers:this.config.xhr_headers,options:i,callback:n,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.config.on_xhr_error,onResponse:this.rateLimiter.checkForLimiting})}catch(c){console.error(c)}else{var o,l=Me.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=e;var h=Me.getElementsByTagName("script")[0];(o=h.parentNode)===null||o===void 0||o.insertBefore(l,h)}}}},{key:"_execute_array",value:function(e){var r,i=this,n=[],s=[],a=[];nr(e,function(l){l&&(r=l[0],ir(r)?a.push(l):typeof l=="function"?l.call(i):ir(l)&&r==="alias"?n.push(l):ir(l)&&r.indexOf("capture")!==-1&&typeof i[r]=="function"?a.push(l):s.push(l))});var o=function(l,h){nr(l,function(c){if(ir(c[0])){var u=h;Ee(c,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},h)};o(n,this),o(s,this),o(a,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,r;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((r=this.config.bootstrap)===null||r===void 0?void 0:r.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"captureException",value:function(e,r){var i;(i=this.exceptionAutocapture)===null||i===void 0||i.captureException([e.name,void 0,void 0,void 0,e],r)}},{key:"capture",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oa;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return me.unintializedWarning("posthog.capture");if(!function(h,c){var u=!1;try{var f=h.config.token,p=h.config.respect_dnt,m=h.config.opt_out_capturing_persistence_type,g=h.config.opt_out_capturing_cookie_prefix||void 0,d=h.config.window;f&&(u=wp(f,{respectDnt:p,persistenceType:m,persistencePrefix:g,window:d}))}catch(y){c||console.error("Unexpected error when checking capturing opt-out status: "+y)}return u}(this,!1)){var n=(i=i||oa).transport;if(n&&(i.transport=n),Ct(e)||typeof e!="string")console.error("No event name provided to posthog.capture");else if(!Bg(Lt,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:ei(),event:e,properties:this._calculate_event_properties(e,r||{})};e==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=$g(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date,this.config.debug&&me.log("PostHog.js send",s);var a=JSON.stringify(s),o=this.config.api_host+(i.endpoint||"/e/"),l=i!==oa;return!this.config.request_batching||l&&!i._batchKey||i.send_instantly?this.__compress_and_send_json_request(o,a,i):this._requestQueue.enqueue(o,s,i),this._invokeCaptureHooks(e,s),s}}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,r){this.config._onCapture(e,r),Ee(this.__captureHooks,function(i){return i(e)})}},{key:"_calculate_event_properties",value:function(e,r){if(!this.persistence||!this.sessionPersistence)return r;var i=this.persistence.remove_event_timer(e),n=ie({},r);if(n.token=this.config.token,e==="$snapshot"){var s=ie(ie({},this.persistence.properties()),this.sessionPersistence.properties());return n.distinct_id=s.distinct_id,n}var a=Ge.properties();if(this.sessionManager){var o=this.sessionManager.checkAndGetSessionAndWindowId(),l=o.sessionId,h=o.windowId;n.$session_id=l,n.$window_id=h}if(this.config.__preview_measure_pageview_stats){var c={};e==="$pageview"?c=this.pageViewManager.doPageView():e==="$pageleave"&&(c=this.pageViewManager.doPageLeave()),n=Xe(n,c)}if(e==="$pageview"&&(n.title=Me.title),e==="$performance_event"){var u=this.persistence.properties();return n.distinct_id=u.distinct_id,n.$current_url=a.$current_url,n}if(i!==void 0){var f=new Date().getTime()-i;n.$duration=parseFloat((f/1e3).toFixed(3))}n=Xe({},Ge.properties(),this.persistence.properties(),this.sessionPersistence.properties(),n);var p=this.config.property_blacklist;ir(p)?Ee(p,function(g){delete n[g]}):console.error("Invalid value for property_blacklist config: "+p);var m=this.config.sanitize_properties;return m&&(n=m(n,e)),n}},{key:"register",value:function(e,r){var i;(i=this.persistence)===null||i===void 0||i.register(e,r)}},{key:"register_once",value:function(e,r,i){var n;(n=this.persistence)===null||n===void 0||n.register_once(e,r,i)}},{key:"register_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.register(e)}},{key:"unregister",value:function(e){var r;(r=this.persistence)===null||r===void 0||r.unregister(e)}},{key:"unregister_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.unregister(e)}},{key:"_register_single",value:function(e,r){this.register(Y({},e,r))}},{key:"getFeatureFlag",value:function(e,r){return this.featureFlags.getFeatureFlag(e,r)}},{key:"getFeatureFlagPayload",value:function(e){var r=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(r)}catch{return r}}},{key:"isFeatureEnabled",value:function(e,r){return this.featureFlags.isFeatureEnabled(e,r)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,r)}},{key:"getEarlyAccessFeatures",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,r)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var r,i;return(r=(i=this.sessionManager)===null||i===void 0?void 0:i.onSessionId(e))!==null&&r!==void 0?r:function(){}}},{key:"getSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,r)}},{key:"getActiveMatchingSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,r)}},{key:"identify",value:function(e,r,i){if(!this.__loaded||!this.persistence)return me.unintializedWarning("posthog.identify");if(e){var n=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=n;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==n&&e!==this.get_property(ha)&&(this.unregister(ha),this.register({distinct_id:e}));var a=this.persistence.get_user_state()==="anonymous";e!==n&&a?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(r||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:n},{$set:r||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(n)):(r||i)&&this.setPersonProperties(r,i),e!==n&&(this.reloadFeatureFlags(),this.unregister(ba))}else console.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,r){(e||r)&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:r||{}}))}},{key:"group",value:function(e,r,i){if(e&&r){var n=this.getGroups();n[e]!==r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:ie(ie({},n),{},Y({},e,r))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:i}),this.setGroupPropertiesForFlags(Y({},e,i))),n[e]===r||i||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(e,r)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(e,r)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){var r,i,n,s;if(!this.__loaded)return me.unintializedWarning("posthog.reset");var a=this.get_property("$device_id");(r=this.persistence)===null||r===void 0||r.clear(),(i=this.sessionPersistence)===null||i===void 0||i.clear(),(n=this.persistence)===null||n===void 0||n.set_user_state("anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var o=this.config.get_device_id(ei());this.register_once({distinct_id:o,$device_id:e?o:a},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var e,r;return(e=(r=this.sessionManager)===null||r===void 0?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var r=this.config.ui_host||this.config.api_host,i=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=i.sessionId,s=i.sessionStartTimestamp,a=r+"/replay/"+n;if(e!=null&&e.withTimestamp&&s){var o,l=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!s)return a;var h=Math.max(Math.floor((new Date().getTime()-s)/1e3)-l,0);a+="?t=".concat(h)}return a}},{key:"alias",value:function(e,r){return e===this.get_property(Up)?(me.critical("Attempting to create alias for existing People user - aborting."),-2):(Ct(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(ha,e),this.capture("$create_alias",{alias:e,distinct_id:r})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var r,i,n=ie({},this.config);xl(e)&&(Xe(this.config,e),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(r=this.persistence)===null||r===void 0||r.update_config(this.config),(i=this.sessionPersistence)===null||i===void 0||i.update_config(this.config),Oe.is_supported()&&Oe.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Tt.DEBUG=!0),this.sessionRecording&&e.disable_session_recording!==void 0&&n.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!((e=this.sessionRecording)===null||e===void 0||!e.started())}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_property",value:function(e){var r;return(r=this.persistence)===null||r===void 0?void 0:r.props[e]}},{key:"getSessionProperty",value:function(e){var r;return(r=this.sessionPersistence)===null||r===void 0?void 0:r.props[e]}},{key:"toString",value:function(){var e,r=(e=this.config.name)!==null&&e!==void 0?e:lt;return r!==lt&&(r=lt+"."+r),r}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&Oe.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.config.opt_out_capturing_by_default&&!sr.get("ph_optout")||(sr.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(e){var r,i,n,s,a;if(e&&e.clear_persistence)n=!0;else{if(!e||!e.enable_persistence)return;n=!1}this.config.disable_persistence||((r=this.persistence)===null||r===void 0?void 0:r.disabled)===n||(s=this.persistence)===null||s===void 0||s.set_disabled(n),this.config.disable_persistence||((i=this.sessionPersistence)===null||i===void 0?void 0:i.disabled)===n||(a=this.sessionPersistence)===null||a===void 0||a.set_disabled(n)}},{key:"_gdpr_call_func",value:function(e,r){return r=Xe({capture:this.capture.bind(this),persistence_type:this.config.opt_out_capturing_persistence_type,cookie_prefix:this.config.opt_out_capturing_cookie_prefix,cookie_expiration:this.config.cookie_expiration,cross_subdomain_cookie:this.config.cross_subdomain_cookie,secure_cookie:this.config.secure_cookie},r||{}),Oe.is_supported()||r.persistence_type!=="localStorage"||(r.persistence_type="cookie"),e(this.config.token,{capture:r.capture,captureEventName:r.capture_event_name,captureProperties:r.capture_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieExpiration:r.cookie_expiration,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=Xe({enable_persistence:!0},e||{}),this._gdpr_call_func(u0,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var r=Xe({clear_persistence:!0},e||{});this._gdpr_call_func(p0,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(d0,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(wp,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var r=Xe({enable_persistence:!0},e??{});this._gdpr_call_func(f0,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(e){e===!1?(q.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(q.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),t}();(function(t,e){for(var r=0;r<e.length;r++)t.prototype[e[r]]=jp(t.prototype[e[r]])})(ql,["identify"]);var br={},ty=function(){qe.init=function(t,e,r){if(r)return qe[r]||(qe[r]=br[r]=Ol(t||"",e||{},r,function(n){qe[r]=br[r]=n,n._loaded()})),qe[r];var i=qe;return br[lt]?i=br[lt]:t&&(i=Ol(t,e||{},lt,function(n){br[lt]=n,n._loaded()}),br[lt]=i),qe=i,Gl===On.INIT_SNIPPET&&(q[lt]=qe),Ee(br,function(n,s){s!==lt&&(qe[s]=n)}),i}},ry=function(){function t(){t.done||(t.done=!0,sd=!1,Ee(br,function(e){e._dom_loaded()}))}Me.addEventListener&&(Me.readyState==="complete"?t():Me.addEventListener("DOMContentLoaded",t,!1)),Dn(q,"load",t,!0)},ad=(Gl=On.INIT_MODULE,qe=new ql,ty(),qe.init(),ry(),qe);var od=ad.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://ph-eu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!0,disable_session_recording:!0},"MolinShopAI");function bt(t,e){if(!od)throw new Error("Failed to initialize PostHog");od.capture(t,e)}var Ui,Sa,It,We,Ea,ld,ka,hd,Pa,cd,Aa,ud,Ca,pd,Ta,dd,Ia,fd,xa=class extends Ve(Ce){constructor(){super();se(this,Ui);se(this,Ea);se(this,ka);se(this,Pa);se(this,Aa);se(this,Ca);se(this,Ta);se(this,Ia);se(this,It,new ta(this,{url:(r,{resume:i}={})=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("resume",i?"1":""),n.searchParams.set("conversationId",r),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r),bt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket onError"})},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&bt("ShopAssistant: user received bot message (streaming started)",{widgetId:this.widgetId,message:r})},onUpdateMessage:r=>{},onMessageDone:r=>{let i={...N(this,It)?.messages.find(n=>n.id===r.message?.id)};Object.assign(i,r.message),i.role==="assistant"&&bt("ShopAssistant: user received bot message (streaming ended)",{widgetId:this.widgetId,text:i.content??"",message:i,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION})},onMessageError:r=>{console.error("ws message error",r),r.message&&N(this,We)&&alert(r.message),bt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket ERROR message type: "+r.message})},persistConversationState:(r,i)=>{let n={conversationId:r,messages:i};localStorage.setItem(N(this,Ui,Sa),JSON.stringify(n))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(N(this,Ui,Sa))||"{}");return!(typeof r.conversationId=="string"&&r.conversationId)||!(Array.isArray(r.messages)&&r.messages.every(i=>typeof i=="object"&&i))?void 0:{conversationId:r.conversationId,messages:r.messages}}catch(r){console.error(r)}},onReset:()=>{localStorage.removeItem(N(this,Ui,Sa))}}));se(this,We,!1);this.widgetId="",this.config}render(){console.assert(this.widgetId,"widget id is required"),console.assert(this.config,"config is required");let r=Object.entries(this.config.bubble.position).filter(([s,a])=>a).map(([s,a])=>`${s}-[${a}]`).reduce((s,a)=>(s[a]=!0,s),{}),i={bottom:"72px"},n=Object.entries(this.config.bubble.position).filter(([s,a])=>a).map(([s,a])=>`sm:${s}-[calc(${[i[s],a].filter(o=>!!o).join("+")})]`).reduce((s,a)=>(s[a]=!0,s),{});return pe`
414
+ <mw-bubble class="${ip(r)} fixed z-50" @click=${ue(this,Pa,cd)} ?dialog-shown="${N(this,We)}" bubble-image-url="${this.config.bubble?.imageUrl||""}"></mw-bubble>
409
415
 
410
416
  <div id="dialog" class="${N(this,We)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${Object.keys(n).join(" ")} fixed bottom-0 left-0 right-0 top-0 z-[99999999] overflow-hidden bg-white font-sans text-[16px] leading-normal text-gray-800 subpixel-antialiased shadow-2xl transition-all sm:left-auto sm:top-auto sm:h-4/5 sm:max-h-[800px] sm:w-5/6 sm:max-w-[420px] sm:rounded-2xl">
411
417
  <div class="mx-auto flex h-full w-full max-w-4xl flex-col">
@@ -415,10 +421,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
415
421
  <div class="flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto bg-[#FDFDFD] pt-4">
416
422
  <!-- this is the 2nd (inner) div that will natively scroll to bottom -->
417
423
  <div class="">
418
- ${tn(N(this,It)?.messages??[],s=>s.id,s=>me`
424
+ ${tn(N(this,It)?.messages??[],s=>s.id,s=>pe`
419
425
  <mw-chat-message class="mx-4 mb-4 block" .config="${this.config}" side="${s.role}" @click="${ue(this,Ea,ld)}">
420
426
  <div class="prose break-words text-inherit">
421
- ${s.content==="\xB7 \xB7 \xB7"?me`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.content_html?Vi(s.content_html):me`<p>${s.content}</p>`}
427
+ ${s.content==="\xB7 \xB7 \xB7"?pe`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.content_html?Vi(s.content_html):pe`<p>${s.content}</p>`}
422
428
  </div>
423
429
  </mw-chat-message>
424
430
  `)}