@superbright/indexeddb-orm 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/analytics/MixpanelProvider.d.ts +1 -1
- package/dist/index.cjs +23 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1167 -1172
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("zod"),lh=require("dexie"),fh=require("react/jsx-runtime"),Kt=require("react");var Vi=typeof document<"u"?document.currentScript:null;class Xu extends Error{constructor(r,i){super(r),this.detail=i,this.name="SchemaMismatchError"}}class Zu extends Error{constructor(r,i){super(r),this.detail=i,this.name="OpenDBError"}}const kr=1,Tt=m.z.object({uuid:m.z.string().uuid(),createdAt:m.z.string().datetime().optional()}),Qu=m.z.object({isFavorite:m.z.boolean().optional(),viewedDate:m.z.string().optional()}),ec=Qu,Hn=m.z.union([m.z.string(),m.z.number(),m.z.boolean(),m.z.record(m.z.unknown())]),hh=m.z.union([Hn,m.z.array(Hn)]),Dr=m.z.object({availability:hh.nullable().optional(),bedrooms:m.z.union([m.z.array(Hn),m.z.null()]).optional(),cost:m.z.number().nullable().optional(),highlights:m.z.array(Hn).optional()}),vs=m.z.object({limit:m.z.number().default(10),page:m.z.number().default(1),availability:m.z.array(m.z.string()).optional(),bedrooms:m.z.array(m.z.number()).optional(),cost:m.z.number().nullable().optional(),highlights:m.z.array(m.z.string()).optional()}),gs=m.z.enum(["all","bestFit","closestMatch","favorites","loading"]),ms=m.z.enum(["relevance","newest","cost_low_to_high","cost_high_to_low"]),ph=m.z.object({data:m.z.record(ec),filters:Dr,tempFilters:Dr,apiFilters:vs,resultsMode:gs,propertySlug:m.z.string().nullable(),resolvedQuestionnaireValues:m.z.record(m.z.array(m.z.string())),sortBy:ms}),nr=m.z.object({id:m.z.union([m.z.number().int(),m.z.string()]).optional(),title:m.z.string(),slug:m.z.string().nullable().optional(),bedrooms:m.z.coerce.number().nullable().optional(),bathrooms:m.z.coerce.number().nullable().optional(),cost:m.z.coerce.number().nullable().optional(),totalSqFt:m.z.coerce.number().nullable().optional(),propertyId:m.z.union([m.z.number().int(),m.z.string()]).optional(),isAvailable:m.z.boolean().optional(),createdAt:m.z.string().datetime().optional(),updatedAt:m.z.string().datetime().optional(),availability:m.z.string().datetime().nullable().optional(),unitSetAvailableOn:m.z.string().datetime().nullable().optional(),floorPlanId:m.z.union([m.z.number().int(),m.z.string()]).nullable().optional(),property:m.z.unknown().optional(),amenities:m.z.array(m.z.unknown()).optional(),highlights:m.z.array(m.z.unknown()).optional(),floorPlan:m.z.unknown().nullable().optional(),renderedStyle:m.z.array(m.z.unknown()).optional(),video:m.z.unknown().nullable().optional(),videoThumbnail:m.z.unknown().nullable().optional(),embedGif:m.z.unknown().nullable().optional(),userId:m.z.union([m.z.number().int(),m.z.string()]).optional(),user:m.z.unknown().optional(),status:m.z.string().optional(),externalId:m.z.string().nullable().optional(),unitRenderedStyles:m.z.array(m.z.unknown()).optional()}),er=m.z.object({id:m.z.union([m.z.number().int(),m.z.string()]),createdAt:m.z.string().datetime(),updatedAt:m.z.string().datetime(),title:m.z.string(),slug:m.z.string().nullable().optional(),description:m.z.string(),contactName:m.z.string().nullable().optional(),contactEmail:m.z.string().optional(),contactPhone:m.z.string().nullable().optional(),notificationEmail:m.z.string().nullable().optional(),logo:m.z.unknown().nullable().optional(),leadMedia:m.z.unknown().nullable().optional(),overviewImages:m.z.array(m.z.unknown()).optional(),amenityImages:m.z.array(m.z.unknown()).optional(),street:m.z.string().optional(),city:m.z.string().optional(),state:m.z.string().nullable().optional(),ingestionFileName:m.z.string().nullable().optional(),zip:m.z.string().optional(),country:m.z.string().optional(),units:m.z.array(nr).optional(),amenities:m.z.array(m.z.unknown()).optional(),highlights:m.z.array(m.z.unknown()).optional(),externalServices:m.z.array(m.z.unknown()).optional(),userId:m.z.union([m.z.number().int(),m.z.string()]).optional(),user:m.z.unknown().optional(),status:m.z.string().optional(),floorPlans:m.z.array(m.z.unknown()).optional()}),dh=m.z.object({id:m.z.union([m.z.number().int(),m.z.string()]).optional(),email:m.z.string().email().optional(),firstName:m.z.string().optional(),lastName:m.z.string().optional(),password:m.z.string().optional(),salt:m.z.string().optional(),role:m.z.string().optional(),Property:m.z.array(er).optional(),Unit:m.z.array(nr).optional(),floorPlans:m.z.array(m.z.unknown()).optional(),createdAt:m.z.string().datetime().optional(),updatedAt:m.z.string().datetime().optional()}),tc=m.z.object({unitId:m.z.string(),viewedDate:m.z.string()}),rc=m.z.object({timezone:m.z.string().optional(),favouriteUnits:m.z.array(m.z.coerce.string()).optional(),preferences:m.z.record(m.z.unknown()).optional()}),Qr=m.z.object({id:m.z.coerce.string(),slug:m.z.string(),favoritedUnits:m.z.array(m.z.string()),tourContactedOn:m.z.string().nullable(),viewedUnits:m.z.array(tc),questionnaireResults:m.z.unknown().nullable().optional(),tourContactData:rc.nullable().optional(),data:er.optional()}),Nn=m.z.object({data:m.z.record(Qr),propertySlug:m.z.string().nullable(),propertyId:m.z.string().nullable(),hasPreviouslySearched:m.z.array(m.z.string())}),vh=m.z.object({id:m.z.number().int(),userId:m.z.number().int(),unitId:m.z.number().int(),createdAt:m.z.string().datetime()}),Yn=m.z.object({unitIds:m.z.array(m.z.string()),updatedAt:m.z.string().datetime()}),Ln=m.z.object({properties:m.z.record(Qr),currentPropertyId:m.z.string().nullable(),currentPropertySlug:m.z.string().nullable(),hasPreviouslySearched:m.z.array(m.z.string()),unitResults:m.z.array(nr),filters:Dr,tempFilters:Dr,apiFilters:vs,resultsMode:gs,resolvedQuestionnaireValues:m.z.record(m.z.array(m.z.string())),sortBy:ms});class yo extends lh{constructor(r="inresi-orm"){super(r),this.version(kr).stores({users:"uuid",kv:"key"}),this.users=this.table("users"),this.kv=this.table("kv")}}let _o="strict",Fn;function nc(e){e.mode&&(_o=e.mode),Fn=e.onIssue}function at(e,r,i){const t=e.safeParse(r);if(t.success)return t.data;const n=t.error.flatten();if(Fn==null||Fn(i,n),_o==="strict")throw new Xu(`ORM schema mismatch in ${i}`,n);return _o==="warn"&&console.warn(`ORM schema mismatch in ${i}`,n),null}const gh={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Wi="manifest",mh=m.z.object({schemaVersion:m.z.number().int()});let ut=null,wr=null;const ba=Symbol("validationInstalled");function Gi(e,r){const i=e;if(i[ba])return;if(i[ba]=!0,((o,s,a)=>{o.hook("creating",(u,c)=>{const l=at(s,c,`${a}.creating`);if(!l)throw new Error(`Rejected invalid ${a} on create`);return l}),o.hook("updating",(u,c,l)=>{const f={...l,...u};return at(s,f,`${a}.updating`)?u:{}})})(e.users,Tt,"users"),(r==null?void 0:r.validateReads)??!0){const o=(r==null?void 0:r.dropInvalidOnRead)??!0;((a,u,c)=>{a.hook("reading",l=>{const f=at(u,l,`${c}.reading`);return f||(o?void 0:l)})})(e.users,Tt,"users")}}function yh(){try{if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Vi&&Vi.tagName.toUpperCase()==="SCRIPT"&&Vi.src||new URL("index.cjs",document.baseURI).href}<"u"&&gh)return!1}catch{}try{if(typeof process<"u"&&process.env)return process.env.NODE_ENV!=="production"}catch{}return!1}async function ze(e={}){if(ut)return ut;if(wr)return wr;const r=e.dbName??"inresi-orm";return wr=(async()=>{var i,t,n,o;try{const s=yh()?"warn":"strict";nc({mode:((i=e.validation)==null?void 0:i.mode)??s,onIssue:(t=e.validation)==null?void 0:t.onIssue});const a=new yo(r);a.on("versionchange",()=>{var f;try{a.close()}finally{(f=e.onReset)==null||f.call(e,"versionchange")}}),a.on("blocked",()=>{var f;(f=e.onReset)==null||f.call(e,"blocked")}),await a.open();const u=await a.kv.get(Wi),c=(u==null?void 0:u.value)??null;if(!c)return await a.transaction("rw",a.kv,async()=>{await a.kv.put({key:Wi,value:{schemaVersion:kr}})}),Gi(a,e.validation),ut=a,a;const l=mh.safeParse(c);if(!l.success||l.data.schemaVersion!==kr){await a.delete();const f=new yo(r);return f.on("versionchange",()=>{var p;try{f.close()}finally{(p=e.onReset)==null||p.call(e,"versionchange")}}),f.on("blocked",()=>{var p;(p=e.onReset)==null||p.call(e,"blocked")}),await f.open(),await f.kv.put({key:Wi,value:{schemaVersion:kr}}),Gi(f,e.validation),(n=e.onReset)==null||n.call(e,"incompatible"),ut=f,f}return Gi(a,e.validation),ut=a,a}catch(s){throw(o=e.onError)==null||o.call(e,s),new Zu("Failed to open IndexedDB",s)}finally{wr=null}})(),wr}async function _h(e){const r=e??"inresi-orm";if(ut)try{await ut.close()}catch{}await new yo(r).delete(),ut=null}const un="user",ic=()=>{var e;return typeof((e=globalThis.crypto)==null?void 0:e.randomUUID)=="function"?globalThis.crypto.randomUUID():(()=>{var t,n;const r=((n=(t=globalThis.crypto)==null?void 0:t.getRandomValues)==null?void 0:n.call(t,new Uint8Array(16)))??Uint8Array.from({length:16},()=>Math.random()*256|0);r[6]=r[6]&15|64,r[8]=r[8]&63|128;const i=[...r].map(o=>o.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`})()},ji=e=>{var r,i;return((r=e==null?void 0:e.value)==null?void 0:r.useruuid)??((i=e==null?void 0:e.value)==null?void 0:i.uuid)};async function Si(e=ic){const r=await ze(),i=ji(await r.kv.get(un));if(i){const t=await r.users.get(i);if(t)return Tt.parse(t)}try{return await r.transaction("rw",r.kv,r.users,async()=>{const t=ji(await r.kv.get(un));if(t){const s=await r.users.get(t);if(s)return Tt.parse(s)}const n=e();await r.kv.add({key:un,value:{useruuid:n}});const o=Tt.parse({uuid:n,createdAt:new Date().toISOString()});return await r.users.add(o),o})}catch(t){if((t==null?void 0:t.name)==="ConstraintError"){const n=ji(await r.kv.get(un));if(n){const o=await r.users.get(n);if(o)return Tt.parse(o)}}throw t}}const oc=async e=>(await Si(e)).uuid;async function sc(){const e=await ze(),r={};for(const i of e.tables)r[i.name]=await i.toArray();return r}async function bh(e="inresi-orm-export.json"){if(typeof window>"u"||typeof document>"u")throw new Error("exportJSON can only run in a browser.");const r=await sc(),i=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.download=e,document.body.appendChild(t),t.click(),t.remove(),URL.revokeObjectURL(t.href)}async function ys(e){const i=await(await ze()).kv.get(e);return(i==null?void 0:i.value)??null}async function _s(e,r){await(await ze()).kv.put({key:e,value:r})}async function wh(e){await(await ze()).kv.delete(e)}function Sh(e){const r=new Map,i=(e==null?void 0:e.prefix)??"",t=n=>`${i}${n}`;return{async getItem(n){try{const s=await(await ze()).kv.get(t(n));return s?JSON.stringify(s.value):null}catch(o){if(e!=null&&e.fallbackToMemory)return r.get(t(n))??null;throw o}},async setItem(n,o){try{await(await ze()).kv.put({key:t(n),value:JSON.parse(o)})}catch(s){if(e!=null&&e.fallbackToMemory){r.set(t(n),o);return}throw s}},async removeItem(n){try{await(await ze()).kv.delete(t(n))}catch(o){if(e!=null&&e.fallbackToMemory){r.delete(t(n));return}throw o}}}}const ac=(e,r)=>`favorites:${e}:${r}`;async function Ci(e){const r=await ze(),{uuid:i}=await Si(),t=ac(i,String(e)),n=await r.kv.get(t),o=n?Yn.safeParse(n.value):null;return o!=null&&o.success?o.data.unitIds:[]}async function bs(e,r,i){const t=await ze(),{uuid:n}=await Si(),o=ac(n,String(e));return t.transaction("rw",t.kv,async()=>{const s=await t.kv.get(o),a=s&&Yn.safeParse(s.value).success?s.value:{unitIds:[],updatedAt:new Date().toISOString()},u=new Set(a.unitIds);i?u.add(r):u.delete(r);const c={unitIds:[...u],updatedAt:new Date().toISOString()},l=Yn.parse(c);return await t.kv.put({key:o,value:l}),l.unitIds})}async function uc(e,r){const t=!(await Ci(e)).includes(r);return bs(e,r,t)}async function cc(e,r){return(await Ci(e)).includes(r)}const Hi={data:{},propertySlug:null,propertyId:null,hasPreviouslySearched:[]};class lc{async getState(){const r=await ys("property");if(!r)return Hi;const i={...r,propertyId:r.propertyId==null?null:String(r.propertyId),propertySlug:r.propertySlug??null,hasPreviouslySearched:Array.isArray(r.hasPreviouslySearched)?r.hasPreviouslySearched.map(String):[]},t=Nn.safeParse(i);if(t.success)return t.data;const n=Object.entries(i.data??{}).reduce((a,[u,c])=>{const l=Qr.safeParse(c);return l.success&&(a[u]=l.data),a},{}),o={...Hi,...i,data:n},s=Nn.safeParse(o);return s.success?s.data:Hi}async setState(r){const i=await this.getState(),t=r(i),n=Nn.parse(t);await _s("property",n)}async setHasPreviouslySearched(r){await this.setState(i=>({...i,hasPreviouslySearched:Array.from(new Set([...i.hasPreviouslySearched,r]))}))}async setTourContactedOn(){await this.setState(r=>{const i=r.propertyId;if(!i)return r;const t=r.data[i];return t?{...r,data:{...r.data,[i]:{...t,tourContactedOn:new Date().toISOString()}}}:r})}async getTourContactedOn(){var t;const r=await this.getState(),i=r.propertyId;return i?((t=r.data[i])==null?void 0:t.tourContactedOn)??null:null}async setQuestionnaireResults(r){await this.setState(i=>{const t=i.propertyId;if(!t)return i;const n=i.data[t];return n?{...i,data:{...i.data,[t]:{...n,questionnaireResults:r}}}:i})}async setTourContactData(r){await this.setState(i=>{const t=i.propertyId;if(!t)return i;const n=i.data[t];return n?{...i,data:{...i.data,[t]:{...n,tourContactData:r}}}:i})}async toggleFavorite(r){await this.setState(i=>{const t=i.propertyId;if(!t)return i;const n=i.data[t];if(!n)return i;const s=n.favoritedUnits.includes(r)?n.favoritedUnits.filter(a=>a!==r):[...n.favoritedUnits,r];return{...i,data:{...i.data,[t]:{...n,favoritedUnits:s}}}})}async markUnitAsViewed(r,i){const t=new Date,n=`${String(t.getMonth()+1).padStart(2,"0")}/${String(t.getDate()).padStart(2,"0")}`;await this.setState(o=>{const s=o.propertyId;if(!s)return o;const a=o.data[s];if(!a)return o;const u=[...a.viewedUnits.filter(c=>c.unitId!==r),{unitId:r,viewedDate:n}];return{...o,data:{...o.data,[s]:{...a,viewedUnits:u}}}}),typeof window<"u"&&window.open(`//${i}`,"_blank")}async getUnitState(r){var n;const i=await this.getState(),t=i.propertyId?i.data[i.propertyId]:null;return{isFavorite:(t==null?void 0:t.favoritedUnits.includes(r))??!1,viewedDate:((n=t==null?void 0:t.viewedUnits.find(o=>o.unitId===r))==null?void 0:n.viewedDate)??""}}async getPropertyData(r){const i=await this.getState(),t=r==null?i.propertyId:String(r);return t?i.data[t]??null:null}async getCurrentProperty(){const r=await this.getState();return r.propertyId?r.data[r.propertyId]??null:null}async getFullState(){return this.getState()}async initializeProperty(r,i){const t=String(r);await this.setState(n=>n.data[t]?{...n,propertyId:t,propertySlug:i}:{...n,propertyId:t,propertySlug:i,data:{...n.data,[t]:{id:t,slug:i,favoritedUnits:[],tourContactedOn:null,viewedUnits:[],questionnaireResults:null,tourContactData:null}}})}}const Ch=new lc,fc=oc();var E;if(typeof window>"u"){var wa={hostname:""};E={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:wa,referrer:""},screen:{width:0,height:0},location:wa,addEventListener:function(){},removeEventListener:function(){}}}else E=window;function Sa(e,r){(r==null||r>e.length)&&(r=e.length);for(var i=0,t=new Array(r);i<r;i++)t[i]=e[i];return t}function Ca(e,r,i,t,n,o,s){try{var a=e[o](s),u=a.value}catch(c){i(c);return}a.done?r(u):Promise.resolve(u).then(t,n)}function ws(e){return function(){var r=this,i=arguments;return new Promise(function(t,n){var o=e.apply(r,i);function s(u){Ca(o,t,n,s,a,"next",u)}function a(u){Ca(o,t,n,s,a,"throw",u)}s(void 0)})}}function Un(e,r,i){return hc()?Un=Reflect.construct:Un=function(n,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(n,a),c=new u;return s&&Lr(c,s.prototype),c},Un.apply(null,arguments)}function Ih(e,r){for(var i=0;i<r.length;i++){var t=r[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function be(e,r,i){return r&&Ih(e.prototype,r),e}function Y(){return Y=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},Y.apply(this,arguments)}function bo(e){return bo=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},bo(e)}function Ce(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Lr(e,r)}function F(e,r){return r!=null&&typeof Symbol<"u"&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](e):e instanceof r}function Eh(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Nr(e,r){if(e==null)return{};var i={},t=Object.keys(e),n,o;for(o=0;o<t.length;o++)n=t[o],!(r.indexOf(n)>=0)&&(i[n]=e[n]);return i}function Lr(e,r){return Lr=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},Lr(e,r)}function q(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function kh(e,r){if(e){if(typeof e=="string")return Sa(e,r);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Sa(e,r)}}function Kn(e){var r=typeof Map=="function"?new Map:void 0;return Kn=function(t){if(t===null||!Eh(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return Un(t,arguments,bo(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Lr(n,t)},Kn(e)}function hc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hc=function(){return!!e})()}function O(e,r){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=kh(e))||r){i&&(e=i);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fr(e,r){var i,t,n,o,s={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,t&&(n=c[0]&2?t.return:c[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,c[1])).done)return n;switch(t=0,n&&(c=[c[0]&2,n.value]),c[0]){case 0:case 1:n=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,t=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(c[0]===6||c[0]===2)){s=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){s.label=c[1];break}if(c[0]===6&&s.label<n[1]){s.label=n[1],n=c;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(c);break}n[2]&&s.ops.pop(),s.trys.pop();continue}c=r.call(e,s)}catch(l){c=[6,l],t=0}finally{i=n=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function pc(e){var r=typeof Symbol=="function"&&Symbol.iterator,i=r&&e[r],t=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}var Oh=Object.defineProperty,xh=function(e,r,i){return r in e?Oh(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i},k=function(e,r,i){return xh(e,(typeof r>"u"?"undefined":q(r))!=="symbol"?r+"":r,i)},Ia,Rh=Object.defineProperty,Ah=function(e,r,i){return r in e?Rh(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i},Ea=function(e,r,i){return Ah(e,(typeof r>"u"?"undefined":q(r))!=="symbol"?r+"":r,i)},me=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(me||{}),ka={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Oa={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cn={},Mh=function(){return!!globalThis.Zone};function Ss(e){if(cn[e])return cn[e];var r=globalThis[e],i=r.prototype,t=e in ka?ka[e]:void 0,n=!!(t&&t.every(function(l){var f,p;return!!((p=(f=Object.getOwnPropertyDescriptor(i,l))==null?void 0:f.get)!=null&&p.toString().includes("[native code]"))})),o=e in Oa?Oa[e]:void 0,s=!!(o&&o.every(function(l){var f;return typeof i[l]=="function"&&((f=i[l])==null?void 0:f.toString().includes("[native code]"))}));if(n&&s&&!Mh())return cn[e]=r.prototype,r.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return r.prototype;var c=u[e].prototype;return document.body.removeChild(a),c?cn[e]=c:i}catch{return i}}var Yi={};function vt(e,r,i){var t,n=e+"."+String(i);if(Yi[n])return Yi[n].call(r);var o=Ss(e),s=(t=Object.getOwnPropertyDescriptor(o,i))==null?void 0:t.get;return s?(Yi[n]=s,s.call(r)):r[i]}var Ki={};function dc(e,r,i){var t=e+"."+String(i);if(Ki[t])return Ki[t].bind(r);var n=Ss(e),o=n[i];return typeof o!="function"?r[i]:(Ki[t]=o,o.bind(r))}function Th(e){return vt("Node",e,"childNodes")}function Ph(e){return vt("Node",e,"parentNode")}function Dh(e){return vt("Node",e,"parentElement")}function Nh(e){return vt("Node",e,"textContent")}function Lh(e,r){return dc("Node",e,"contains")(r)}function Fh(e){return dc("Node",e,"getRootNode")()}function Uh(e){return!e||!("host"in e)?null:vt("ShadowRoot",e,"host")}function $h(e){return e.styleSheets}function zh(e){return!e||!("shadowRoot"in e)?null:vt("Element",e,"shadowRoot")}function Bh(e,r){return vt("Element",e,"querySelector")(r)}function qh(e,r){return vt("Element",e,"querySelectorAll")(r)}function Vh(){return Ss("MutationObserver").constructor}function Wh(e,r,i){try{if(!(r in e))return function(){};var t=e[r],n=i(t);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:t}})),e[r]=n,function(){e[r]=t}}catch{return function(){}}}var Se={childNodes:Th,parentNode:Ph,parentElement:Dh,textContent:Nh,contains:Lh,getRootNode:Fh,host:Uh,styleSheets:$h,shadowRoot:zh,querySelector:Bh,querySelectorAll:qh,mutationObserver:Vh,patch:Wh};function vc(e){return e.nodeType===e.ELEMENT_NODE}function Or(e){var r=e&&"host"in e&&"mode"in e&&Se.host(e)||null;return!!(r&&"shadowRoot"in r&&Se.shadowRoot(r)===e)}function xr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Gh(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function jh(e){var r=e.cssText;if(r.split('"').length<3)return r;var i=["@import","url("+JSON.stringify(e.href)+")"];return e.layerName===""?i.push("layer"):e.layerName&&i.push("layer("+e.layerName+")"),e.supportsText&&i.push("supports("+e.supportsText+")"),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}function wo(e){try{var r=e.rules||e.cssRules;if(!r)return null;var i=e.href;!i&&e.ownerNode&&e.ownerNode.ownerDocument&&(i=e.ownerNode.ownerDocument.location.href);var t=Array.from(r,function(n){return gc(n,i)}).join("");return Gh(t)}catch{return null}}function gc(e,r){if(Yh(e)){var i;try{i=wo(e.styleSheet)||jh(e)}catch{i=e.cssText}return e.styleSheet.href?Zn(i,e.styleSheet.href):i}else{var t=e.cssText;return Kh(e)&&e.selectorText.includes(":")&&(t=Hh(t)),r?Zn(t,r):t}}function Hh(e){var r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(r,"$1\\$2")}function Yh(e){return"styleSheet"in e}function Kh(e){return"selectorText"in e}var mc=function(){function e(){Ea(this,"idNodeMap",new Map),Ea(this,"nodeMetaMap",new WeakMap)}var r=e.prototype;return r.getId=function(t){var n;if(!t)return-1;var o=(n=this.getMeta(t))==null?void 0:n.id;return o??-1},r.getNode=function(t){return this.idNodeMap.get(t)||null},r.getIds=function(){return Array.from(this.idNodeMap.keys())},r.getMeta=function(t){return this.nodeMetaMap.get(t)||null},r.removeNodeFromMap=function(t){var n=this,o=this.getId(t);this.idNodeMap.delete(o),t.childNodes&&t.childNodes.forEach(function(s){return n.removeNodeFromMap(s)})},r.has=function(t){return this.idNodeMap.has(t)},r.hasNode=function(t){return this.nodeMetaMap.has(t)},r.add=function(t,n){var o=n.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,n)},r.replace=function(t,n){var o=this.getNode(t);if(o){var s=this.nodeMetaMap.get(o);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)},r.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Jh(){return new mc}function Jn(e){var r=e.element,i=e.maskInputOptions,t=e.tagName,n=e.type,o=e.value,s=e.maskInputFn,a=o||"",u=n&&Dt(n);return(i[t.toLowerCase()]||u&&i[u])&&(s?a=s(a,r):a="*".repeat(a.length)),a}function Dt(e){return e.toLowerCase()}var xa="__rrweb_original__";function Xh(e){var r=e.getContext("2d");if(!r)return!0;for(var i=50,t=0;t<e.width;t+=i)for(var n=0;n<e.height;n+=i){var o=r.getImageData,s=xa in o?o[xa]:o,a=new Uint32Array(s.call(r,t,n,Math.min(i,e.width-t),Math.min(i,e.height-n)).data.buffer);if(a.some(function(u){return u!==0}))return!1}return!0}function Xn(e){var r=e.type;return e.hasAttribute("data-rr-is-password")?"password":r?Dt(r):null}function yc(e,r){var i;try{i=new URL(e,r??window.location.href)}catch{return null}var t=/\.([0-9a-z]+)(?:$)/i,n=i.pathname.match(t),o;return(o=n==null?void 0:n[1])!=null?o:null}function Zh(e){var r="";return e.indexOf("//")>-1?r=e.split("/").slice(0,3).join("/"):r=e.split("/")[0],r=r.split("?")[0],r}var Qh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ep=/^(?:[a-z+]+:)?\/\//i,tp=/^www\..*/i,rp=/^(data:)([^,]*),(.*)/i;function Zn(e,r){return(e||"").replace(Qh,function(i,t,n,o,s,a){var u=n||s||a,c=t||o||"";if(!u)return i;if(ep.test(u)||tp.test(u)||rp.test(u))return"url("+c+u+c+")";if(u[0]==="/")return"url("+c+(Zh(r)+u)+c+")";var l=r.split("/"),f=u.split("/");l.pop();for(var p=O(f),g;!(g=p()).done;){var d=g.value;d!=="."&&(d===".."?l.pop():l.push(d))}return"url("+c+l.join("/")+c+")"})}function ln(e,r){return r===void 0&&(r=!1),r?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function np(e,r,i){i===void 0&&(i=!1);var t=Array.from(r.childNodes),n=[],o=0;if(t.length>1&&e&&typeof e=="string"){for(var s=ln(e,i),a=s.length/e.length,u=1;u<t.length;u++)if(t[u].textContent&&typeof t[u].textContent=="string"){for(var c=ln(t[u].textContent,i),l=100,f=3;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){var p=c.substring(0,f),g=s.split(p),d=-1;if(g.length===2)d=g[0].length;else if(g.length>2&&g[0]===""&&t[u-1].textContent!=="")d=s.indexOf(p,1);else if(g.length===1){if(p=p.substring(0,p.length-1),g=s.split(p),g.length<=1)return n.push(e),n;f=l+1}else f===c.length-1&&(d=s.indexOf(p));if(g.length>=2&&f>l){var _=t[u-1].textContent;if(_&&typeof _=="string"){var v=ln(_).length;d=s.indexOf(p,v)}d===-1&&(d=g[0].length)}if(d!==-1){for(var y=Math.floor(d/a);y>0&&y<e.length;){if(o+=1,o>50*t.length)return n.push(e),n;var b=ln(e.substring(0,y),i);if(b.length===d){n.push(e.substring(0,y)),e=e.substring(y),s=s.substring(d);break}else b.length<d?y+=Math.max(1,Math.floor((d-b.length)/a)):y-=Math.max(1,Math.floor((b.length-d)*a))}break}}}}return n.push(e),n}function ip(e,r){return np(e,r).join("/* rr_split */")}var op=1,sp=new RegExp("[^a-z0-9-_:]"),Ur=-2;function _c(){return op++}function ap(e){if(F(e,HTMLFormElement))return"form";var r=Dt(e.tagName);return sp.test(r)?"div":r}var jt,Ra,up=/^[^ \t\n\r\u000c]+/,cp=/^[, \t\n\r\u000c]+/;function lp(e,r){if(r.trim()==="")return r;var i=0;function t(c){var l,f=c.exec(r.substring(i));return f?(l=f[0],i+=l.length,l):""}for(var n=[];t(cp),!(i>=r.length);){var o=t(up);if(o.slice(-1)===",")o=Jt(e,o.substring(0,o.length-1)),n.push(o);else{var s="";o=Jt(e,o);for(var a=!1;;){var u=r.charAt(i);if(u===""){n.push((o+s).trim());break}else if(a)u===")"&&(a=!1);else if(u===","){i+=1,n.push((o+s).trim());break}else u==="("&&(a=!0);s+=u,i+=1}}}return n.join(", ")}var Aa=new WeakMap;function Jt(e,r){return!r||r.trim()===""?r:Cs(e,r)}function fp(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Cs(e,r){var i=Aa.get(e);if(i||(i=e.createElement("a"),Aa.set(e,i)),!r)r="";else if(r.startsWith("blob:")||r.startsWith("data:"))return r;return i.setAttribute("href",r),i.href}function bc(e,r,i,t){return t&&(i==="src"||i==="href"&&!(r==="use"&&t[0]==="#")||i==="xlink:href"&&t[0]!=="#"||i==="background"&&(r==="table"||r==="td"||r==="th")?Jt(e,t):i==="srcset"?lp(e,t):i==="style"?Zn(t,Cs(e)):r==="object"&&i==="data"?Jt(e,t):t)}function wc(e,r,i){return(e==="video"||e==="audio")&&r==="autoplay"}function hp(e,r,i){try{if(typeof r=="string"){if(e.classList.contains(r))return!0}else for(var t=e.classList.length;t--;){var n=e.classList[t];if(r.test(n))return!0}if(i)return e.matches(i)}catch{}return!1}function Qn(e,r,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return i?Qn(Se.parentNode(e),r,i):!1;for(var t=e.classList.length;t--;){var n=e.classList[t];if(r.test(n))return!0}return i?Qn(Se.parentNode(e),r,i):!1}function Sc(e,r,i,t){var n;if(vc(e)){if(n=e,!Se.childNodes(n).length)return!1}else{if(Se.parentElement(e)===null)return!1;n=Se.parentElement(e)}try{if(typeof r=="string"){if(t){if(n.closest("."+r))return!0}else if(n.classList.contains(r))return!0}else if(Qn(n,r,t))return!0;if(i){if(t){if(n.closest(i))return!0}else if(n.matches(i))return!0}}catch{}return!1}function pp(e,r,i){var t=e.contentWindow;if(t){var n=!1,o;try{o=t.document.readyState}catch{return}if(o!=="complete"){var s=setTimeout(function(){n||(r(),n=!0)},i);e.addEventListener("load",function(){clearTimeout(s),n=!0,r()});return}var a="about:blank";if(t.location.href!==a||e.src===a||e.src==="")return setTimeout(r,0),e.addEventListener("load",r);e.addEventListener("load",r)}}function dp(e,r,i){var t=!1,n;try{n=e.sheet}catch{return}if(!n){var o=setTimeout(function(){t||(r(),t=!0)},i);e.addEventListener("load",function(){clearTimeout(o),t=!0,r()})}}function vp(e,r){var i=r.doc,t=r.mirror,n=r.blockClass,o=r.blockSelector,s=r.needsMask,a=r.inlineStylesheet,u=r.maskInputOptions,c=u===void 0?{}:u,l=r.maskTextFn,f=r.maskInputFn,p=r.dataURLOptions,g=p===void 0?{}:p,d=r.inlineImages,_=r.recordCanvas,v=r.keepIframeSrcFn,y=r.newlyAddedElement,b=y===void 0?!1:y,S=r.cssCaptured,C=S===void 0?!1:S,I=gp(i,t);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:me.Document,childNodes:[],compatMode:e.compatMode}:{type:me.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:me.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return yp(e,{doc:i,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:f,dataURLOptions:g,inlineImages:d,recordCanvas:_,keepIframeSrcFn:v,newlyAddedElement:b,rootId:I});case e.TEXT_NODE:return mp(e,{doc:i,needsMask:s,maskTextFn:l,rootId:I,cssCaptured:C});case e.CDATA_SECTION_NODE:return{type:me.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:me.Comment,textContent:Se.textContent(e)||"",rootId:I};default:return!1}}function gp(e,r){if(r.hasNode(e)){var i=r.getId(e);return i===1?void 0:i}}function mp(e,r){var i=r.needsMask,t=r.maskTextFn,n=r.rootId,o=r.cssCaptured,s=Se.parentNode(e),a=s&&s.tagName,u="",c=a==="STYLE"?!0:void 0,l=a==="SCRIPT"?!0:void 0;return l?u="SCRIPT_PLACEHOLDER":o||(u=Se.textContent(e),c&&u&&(u=Zn(u,Cs(r.doc)))),!c&&!l&&u&&i&&(u=t?t(u,Se.parentElement(e)):u.replace(/[\S]/g,"*")),{type:me.Text,textContent:u||"",rootId:n}}function yp(e,r){for(var i=r.doc,t=r.blockClass,n=r.blockSelector,o=r.inlineStylesheet,s=r.maskInputOptions,a=s===void 0?{}:s,u=r.maskInputFn,c=r.dataURLOptions,l=c===void 0?{}:c,f=r.inlineImages,p=r.recordCanvas,g=r.keepIframeSrcFn,d=r.newlyAddedElement,_=d===void 0?!1:d,v=r.rootId,y=hp(e,t,n),b=ap(e),S={},C=e.attributes.length,I=0;I<C;I++){var x=e.attributes[I];wc(b,x.name,x.value)||(S[x.name]=bc(i,b,Dt(x.name),x.value))}if(b==="link"&&o){var M=Array.from(i.styleSheets).find(function(Pe){return Pe.href===e.href}),R=null;M&&(R=wo(M)),R&&(delete S.rel,delete S.href,S._cssText=R)}if(b==="style"&&e.sheet){var P=wo(e.sheet);P&&(e.childNodes.length>1&&(P=ip(P,e)),S._cssText=P)}if(b==="input"||b==="textarea"||b==="select"){var H=e.value,T=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&H?S.value=Jn({element:e,type:Xn(e),tagName:b,value:H,maskInputOptions:a,maskInputFn:u}):T&&(S.checked=T)}if(b==="option"&&(e.selected&&!a.select?S.selected=!0:delete S.selected),b==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),b==="canvas"&&p){if(e.__context==="2d")Xh(e)||(S.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){var $=e.toDataURL(l.type,l.quality),X=i.createElement("canvas");X.width=e.width,X.height=e.height;var xe=X.toDataURL(l.type,l.quality);$!==xe&&(S.rr_dataURL=$)}}if(b==="img"&&f){jt||(jt=i.createElement("canvas"),Ra=jt.getContext("2d"));var Z=e,Me=Z.currentSrc||Z.getAttribute("src")||"<unknown-src>",Ie=Z.crossOrigin,ce=function(){Z.removeEventListener("load",ce);try{jt.width=Z.naturalWidth,jt.height=Z.naturalHeight,Ra.drawImage(Z,0,0),S.rr_dataURL=jt.toDataURL(l.type,l.quality)}catch(Pe){if(Z.crossOrigin!=="anonymous"){Z.crossOrigin="anonymous",Z.complete&&Z.naturalWidth!==0?ce():Z.addEventListener("load",ce);return}else console.warn("Cannot inline img src="+Me+"! Error: "+Pe)}Z.crossOrigin==="anonymous"&&(Ie?S.crossOrigin=Ie:Z.removeAttribute("crossorigin"))};Z.complete&&Z.naturalWidth!==0?ce():Z.addEventListener("load",ce)}if(b==="audio"||b==="video"){var ye=S;ye.rr_mediaState=e.paused?"paused":"played",ye.rr_mediaCurrentTime=e.currentTime,ye.rr_mediaPlaybackRate=e.playbackRate,ye.rr_mediaMuted=e.muted,ye.rr_mediaLoop=e.loop,ye.rr_mediaVolume=e.volume}if(_||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),y){var Te=e.getBoundingClientRect(),Ct=Te.width,qe=Te.height;S={class:S.class,rr_width:""+Ct+"px",rr_height:""+qe+"px"}}b==="iframe"&&!g(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);var qt;try{customElements.get(b)&&(qt=!0)}catch{}return{type:me.Element,tagName:b,attributes:S,childNodes:[],isSVG:fp(e)||void 0,needBlock:y,rootId:v,isCustom:qt}}function re(e){return e==null?"":e.toLowerCase()}function _p(e,r){if(r.comment&&e.type===me.Comment)return!0;if(e.type===me.Element){if(r.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&yc(e.attributes.href)==="js"))return!0;if(r.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||re(e.attributes.name)==="application-name"||re(e.attributes.rel)==="icon"||re(e.attributes.rel)==="apple-touch-icon"||re(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(r.headMetaDescKeywords&&re(e.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(re(e.attributes.property).match(/^(og|twitter|fb):/)||re(e.attributes.name).match(/^(og|twitter):/)||re(e.attributes.name)==="pinterest"))return!0;if(r.headMetaRobots&&(re(e.attributes.name)==="robots"||re(e.attributes.name)==="googlebot"||re(e.attributes.name)==="bingbot"))return!0;if(r.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(r.headMetaAuthorship&&(re(e.attributes.name)==="author"||re(e.attributes.name)==="generator"||re(e.attributes.name)==="framework"||re(e.attributes.name)==="publisher"||re(e.attributes.name)==="progid"||re(e.attributes.property).match(/^article:/)||re(e.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&(re(e.attributes.name)==="google-site-verification"||re(e.attributes.name)==="yandex-verification"||re(e.attributes.name)==="csrf-token"||re(e.attributes.name)==="p:domain_verify"||re(e.attributes.name)==="verify-v1"||re(e.attributes.name)==="verification"||re(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Xt(e,r){var i=r.doc,t=r.mirror,n=r.blockClass,o=r.blockSelector,s=r.maskTextClass,a=r.maskTextSelector,u=r.skipChild,c=u===void 0?!1:u,l=r.inlineStylesheet,f=l===void 0?!0:l,p=r.maskInputOptions,g=p===void 0?{}:p,d=r.maskTextFn,_=r.maskInputFn,v=r.slimDOMOptions,y=r.dataURLOptions,b=y===void 0?{}:y,S=r.inlineImages,C=S===void 0?!1:S,I=r.recordCanvas,x=I===void 0?!1:I,M=r.onSerialize,R=r.onIframeLoad,P=r.iframeLoadTimeout,H=P===void 0?5e3:P,T=r.onStylesheetLoad,$=r.stylesheetLoadTimeout,X=$===void 0?5e3:$,xe=r.keepIframeSrcFn,Z=xe===void 0?function(){return!1}:xe,Me=r.newlyAddedElement,Ie=Me===void 0?!1:Me,ce=r.cssCaptured,ye=ce===void 0?!1:ce,Te=r.needsMask,Ct=r.preserveWhiteSpace,qe=Ct===void 0?!0:Ct;if(!Te){var qt=Te===void 0;Te=Sc(e,s,a,qt)}var Pe=vp(e,{doc:i,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,dataURLOptions:b,inlineImages:C,recordCanvas:x,keepIframeSrcFn:Z,newlyAddedElement:Ie,cssCaptured:ye});if(!Pe)return console.warn(e,"not serialized"),null;var It;t.hasNode(e)?It=t.getId(e):_p(Pe,v)||!qe&&Pe.type===me.Text&&!Pe.textContent.replace(/^\s+|\s+$/gm,"").length?It=Ur:It=_c();var J=Object.assign(Pe,{id:It});if(t.add(e,J),It===Ur)return null;M&&M(e);var Et=!c;if(J.type===me.Element){Et=Et&&!J.needBlock,delete J.needBlock;var kt=Se.shadowRoot(e);kt&&xr(kt)&&(J.isShadowHost=!0)}if((J.type===me.Document||J.type===me.Element)&&Et){v.headWhitespace&&J.type===me.Element&&J.tagName==="head"&&(qe=!1);var Vt={doc:i,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,slimDOMOptions:v,dataURLOptions:b,inlineImages:C,recordCanvas:x,preserveWhiteSpace:qe,onSerialize:M,onIframeLoad:R,iframeLoadTimeout:H,onStylesheetLoad:T,stylesheetLoadTimeout:X,keepIframeSrcFn:Z,cssCaptured:!1};if(!(J.type===me.Element&&J.tagName==="textarea"&&J.attributes.value!==void 0)){J.type===me.Element&&J.attributes._cssText!==void 0&&typeof J.attributes._cssText=="string"&&(Vt.cssCaptured=!0);for(var mr=O(Array.from(Se.childNodes(e))),yr;!(yr=mr()).done;){var zi=yr.value,sn=Xt(zi,Vt);sn&&J.childNodes.push(sn)}}var ot=null;if(vc(e)&&(ot=Se.shadowRoot(e)))for(var Ot=O(Array.from(Se.childNodes(ot))),Wt;!(Wt=Ot()).done;){var _r=Wt.value,Gt=Xt(_r,Vt);Gt&&(xr(ot)&&(Gt.isShadow=!0),J.childNodes.push(Gt))}}var xt=Se.parentNode(e);return xt&&Or(xt)&&xr(xt)&&(J.isShadow=!0),J.type===me.Element&&J.tagName==="iframe"&&pp(e,function(){var Ke=e.contentDocument;if(Ke&&R){var Rt=Xt(Ke,{doc:Ke,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,slimDOMOptions:v,dataURLOptions:b,inlineImages:C,recordCanvas:x,preserveWhiteSpace:qe,onSerialize:M,onIframeLoad:R,iframeLoadTimeout:H,onStylesheetLoad:T,stylesheetLoadTimeout:X,keepIframeSrcFn:Z});Rt&&R(e,Rt)}},H),J.type===me.Element&&J.tagName==="link"&&typeof J.attributes.rel=="string"&&(J.attributes.rel==="stylesheet"||J.attributes.rel==="preload"&&typeof J.attributes.href=="string"&&yc(J.attributes.href)==="css")&&dp(e,function(){if(T){var Ke=Xt(e,{doc:i,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,slimDOMOptions:v,dataURLOptions:b,inlineImages:C,recordCanvas:x,preserveWhiteSpace:qe,onSerialize:M,onIframeLoad:R,iframeLoadTimeout:H,onStylesheetLoad:T,stylesheetLoadTimeout:X,keepIframeSrcFn:Z});Ke&&T(e,Ke)}},X),J}function bp(e,r){var i=r||{},t=i.mirror,n=t===void 0?new mc:t,o=i.blockClass,s=o===void 0?"rr-block":o,a=i.blockSelector,u=a===void 0?null:a,c=i.maskTextClass,l=c===void 0?"rr-mask":c,f=i.maskTextSelector,p=f===void 0?null:f,g=i.inlineStylesheet,d=g===void 0?!0:g,_=i.inlineImages,v=_===void 0?!1:_,y=i.recordCanvas,b=y===void 0?!1:y,S=i.maskAllInputs,C=S===void 0?!1:S,I=i.maskTextFn,x=i.maskInputFn,M=i.slimDOM,R=M===void 0?!1:M,P=i.dataURLOptions,H=i.preserveWhiteSpace,T=i.onSerialize,$=i.onIframeLoad,X=i.iframeLoadTimeout,xe=i.onStylesheetLoad,Z=i.stylesheetLoadTimeout,Me=i.keepIframeSrcFn,Ie=Me===void 0?function(){return!1}:Me,ce=C===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:C===!1?{password:!0}:C,ye=R===!0||R==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:R==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:R===!1?{}:R;return Xt(e,{doc:e,mirror:n,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:ce,maskTextFn:I,maskInputFn:x,slimDOMOptions:ye,dataURLOptions:P,inlineImages:v,recordCanvas:b,preserveWhiteSpace:H,onSerialize:T,onIframeLoad:$,iframeLoadTimeout:X,onStylesheetLoad:xe,stylesheetLoadTimeout:Z,keepIframeSrcFn:Ie,newlyAddedElement:!1})}function wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Sp(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var i=function t(){return F(this,t)?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),i}var Is={exports:{}},ie=String,Cc=function(){return{isColorSupported:!1,reset:ie,bold:ie,dim:ie,italic:ie,underline:ie,inverse:ie,hidden:ie,strikethrough:ie,black:ie,red:ie,green:ie,yellow:ie,blue:ie,magenta:ie,cyan:ie,white:ie,gray:ie,bgBlack:ie,bgRed:ie,bgGreen:ie,bgYellow:ie,bgBlue:ie,bgMagenta:ie,bgCyan:ie,bgWhite:ie}};Is.exports=Cc();Is.exports.createColors=Cc;var Cp=Is.exports,Ip={},Ep=Object.freeze(Object.defineProperty({__proto__:null,default:Ip},Symbol.toStringTag,{value:"Module"})),he=Sp(Ep),Ma=Cp,Ta=he,So=function(e){Ce(r,e);function r(t,n,o,s,a,u){var c;return c=e.call(this,t)||this,c.name="CssSyntaxError",c.reason=t,a&&(c.file=a),s&&(c.source=s),u&&(c.plugin=u),typeof n<"u"&&typeof o<"u"&&(typeof n=="number"?(c.line=n,c.column=o):(c.line=n.line,c.column=n.column,c.endLine=o.line,c.endColumn=o.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,r),c}var i=r.prototype;return i.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},i.showSourceCode=function(n){var o=this;if(!this.source)return"";var s=this.source;n==null&&(n=Ma.isColorSupported),Ta&&n&&(s=Ta(s));var a=s.split(/\r?\n/),u=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length,f,p;if(n){var g=Ma.createColors(!0),d=g.bold,_=g.gray,v=g.red;f=function(y){return d(v(y))},p=function(y){return _(y)}}else f=p=function(y){return y};return a.slice(u,c).map(function(y,b){var S=u+1+b,C=" "+(" "+S).slice(-l)+" | ";if(S===o.line){var I=p(C.replace(/\d/g," "))+y.slice(0,o.column-1).replace(/[^\t]/g," ");return f(">")+p(C)+y+`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("zod"),ch=require("dexie"),lh=require("react/jsx-runtime"),jn=require("react");var Vi=typeof document<"u"?document.currentScript:null;class Ju extends Error{constructor(r,i){super(r),this.detail=i,this.name="SchemaMismatchError"}}class Xu extends Error{constructor(r,i){super(r),this.detail=i,this.name="OpenDBError"}}const Er=1,Tt=m.z.object({uuid:m.z.string().uuid(),createdAt:m.z.string().datetime().optional()}),Zu=m.z.object({isFavorite:m.z.boolean().optional(),viewedDate:m.z.string().optional()}),Qu=Zu,Hn=m.z.union([m.z.string(),m.z.number(),m.z.boolean(),m.z.record(m.z.unknown())]),fh=m.z.union([Hn,m.z.array(Hn)]),Pr=m.z.object({availability:fh.nullable().optional(),bedrooms:m.z.union([m.z.array(Hn),m.z.null()]).optional(),cost:m.z.number().nullable().optional(),highlights:m.z.array(Hn).optional()}),vs=m.z.object({limit:m.z.number().default(10),page:m.z.number().default(1),availability:m.z.array(m.z.string()).optional(),bedrooms:m.z.array(m.z.number()).optional(),cost:m.z.number().nullable().optional(),highlights:m.z.array(m.z.string()).optional()}),gs=m.z.enum(["all","bestFit","closestMatch","favorites","loading"]),ms=m.z.enum(["relevance","newest","cost_low_to_high","cost_high_to_low"]),hh=m.z.object({data:m.z.record(Qu),filters:Pr,tempFilters:Pr,apiFilters:vs,resultsMode:gs,propertySlug:m.z.string().nullable(),resolvedQuestionnaireValues:m.z.record(m.z.array(m.z.string())),sortBy:ms}),rr=m.z.object({id:m.z.union([m.z.number().int(),m.z.string()]).optional(),title:m.z.string(),slug:m.z.string().nullable().optional(),bedrooms:m.z.coerce.number().nullable().optional(),bathrooms:m.z.coerce.number().nullable().optional(),cost:m.z.coerce.number().nullable().optional(),totalSqFt:m.z.coerce.number().nullable().optional(),propertyId:m.z.union([m.z.number().int(),m.z.string()]).optional(),isAvailable:m.z.boolean().optional(),createdAt:m.z.string().datetime().optional(),updatedAt:m.z.string().datetime().optional(),availability:m.z.string().datetime().nullable().optional(),unitSetAvailableOn:m.z.string().datetime().nullable().optional(),floorPlanId:m.z.union([m.z.number().int(),m.z.string()]).nullable().optional(),property:m.z.unknown().optional(),amenities:m.z.array(m.z.unknown()).optional(),highlights:m.z.array(m.z.unknown()).optional(),floorPlan:m.z.unknown().nullable().optional(),renderedStyle:m.z.array(m.z.unknown()).optional(),video:m.z.unknown().nullable().optional(),videoThumbnail:m.z.unknown().nullable().optional(),embedGif:m.z.unknown().nullable().optional(),userId:m.z.union([m.z.number().int(),m.z.string()]).optional(),user:m.z.unknown().optional(),status:m.z.string().optional(),externalId:m.z.string().nullable().optional(),unitRenderedStyles:m.z.array(m.z.unknown()).optional()}),Qt=m.z.object({id:m.z.union([m.z.number().int(),m.z.string()]),createdAt:m.z.string().datetime(),updatedAt:m.z.string().datetime(),title:m.z.string(),slug:m.z.string().nullable().optional(),description:m.z.string(),contactName:m.z.string().nullable().optional(),contactEmail:m.z.string().optional(),contactPhone:m.z.string().nullable().optional(),notificationEmail:m.z.string().nullable().optional(),logo:m.z.unknown().nullable().optional(),leadMedia:m.z.unknown().nullable().optional(),overviewImages:m.z.array(m.z.unknown()).optional(),amenityImages:m.z.array(m.z.unknown()).optional(),street:m.z.string().optional(),city:m.z.string().optional(),state:m.z.string().nullable().optional(),ingestionFileName:m.z.string().nullable().optional(),zip:m.z.string().optional(),country:m.z.string().optional(),units:m.z.array(rr).optional(),amenities:m.z.array(m.z.unknown()).optional(),highlights:m.z.array(m.z.unknown()).optional(),externalServices:m.z.array(m.z.unknown()).optional(),userId:m.z.union([m.z.number().int(),m.z.string()]).optional(),user:m.z.unknown().optional(),status:m.z.string().optional(),floorPlans:m.z.array(m.z.unknown()).optional()}),ph=m.z.object({id:m.z.union([m.z.number().int(),m.z.string()]).optional(),email:m.z.string().email().optional(),firstName:m.z.string().optional(),lastName:m.z.string().optional(),password:m.z.string().optional(),salt:m.z.string().optional(),role:m.z.string().optional(),Property:m.z.array(Qt).optional(),Unit:m.z.array(rr).optional(),floorPlans:m.z.array(m.z.unknown()).optional(),createdAt:m.z.string().datetime().optional(),updatedAt:m.z.string().datetime().optional()}),ec=m.z.object({unitId:m.z.string(),viewedDate:m.z.string()}),tc=m.z.object({timezone:m.z.string().optional(),favouriteUnits:m.z.array(m.z.coerce.string()).optional(),preferences:m.z.record(m.z.unknown()).optional()}),Zr=m.z.object({id:m.z.coerce.string(),slug:m.z.string(),favoritedUnits:m.z.array(m.z.string()),tourContactedOn:m.z.string().nullable(),viewedUnits:m.z.array(ec),questionnaireResults:m.z.unknown().nullable().optional(),tourContactData:tc.nullable().optional(),data:Qt.optional()}),Dn=m.z.object({data:m.z.record(Zr),propertySlug:m.z.string().nullable(),propertyId:m.z.string().nullable(),hasPreviouslySearched:m.z.array(m.z.string())}),dh=m.z.object({id:m.z.number().int(),userId:m.z.number().int(),unitId:m.z.number().int(),createdAt:m.z.string().datetime()}),Yn=m.z.object({unitIds:m.z.array(m.z.string()),updatedAt:m.z.string().datetime()}),Nn=m.z.object({properties:m.z.record(Zr),currentPropertyId:m.z.string().nullable(),currentPropertySlug:m.z.string().nullable(),hasPreviouslySearched:m.z.array(m.z.string()),unitResults:m.z.array(rr),filters:Pr,tempFilters:Pr,apiFilters:vs,resultsMode:gs,resolvedQuestionnaireValues:m.z.record(m.z.array(m.z.string())),sortBy:ms});class yo extends ch{constructor(r="inresi-orm"){super(r),this.version(Er).stores({users:"uuid",kv:"key"}),this.users=this.table("users"),this.kv=this.table("kv")}}let _o="strict",Ln;function rc(e){e.mode&&(_o=e.mode),Ln=e.onIssue}function at(e,r,i){const t=e.safeParse(r);if(t.success)return t.data;const n=t.error.flatten();if(Ln==null||Ln(i,n),_o==="strict")throw new Ju(`ORM schema mismatch in ${i}`,n);return _o==="warn"&&console.warn(`ORM schema mismatch in ${i}`,n),null}const vh={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Wi="manifest",gh=m.z.object({schemaVersion:m.z.number().int()});let ut=null,br=null;const ba=Symbol("validationInstalled");function Gi(e,r){const i=e;if(i[ba])return;if(i[ba]=!0,((o,s,a)=>{o.hook("creating",(u,c)=>{const l=at(s,c,`${a}.creating`);if(!l)throw new Error(`Rejected invalid ${a} on create`);return l}),o.hook("updating",(u,c,l)=>{const f={...l,...u};return at(s,f,`${a}.updating`)?u:{}})})(e.users,Tt,"users"),(r==null?void 0:r.validateReads)??!0){const o=(r==null?void 0:r.dropInvalidOnRead)??!0;((a,u,c)=>{a.hook("reading",l=>{const f=at(u,l,`${c}.reading`);return f||(o?void 0:l)})})(e.users,Tt,"users")}}function mh(){try{if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Vi&&Vi.tagName.toUpperCase()==="SCRIPT"&&Vi.src||new URL("index.cjs",document.baseURI).href}<"u"&&vh)return!1}catch{}try{if(typeof process<"u"&&process.env)return process.env.NODE_ENV!=="production"}catch{}return!1}async function ze(e={}){if(ut)return ut;if(br)return br;const r=e.dbName??"inresi-orm";return br=(async()=>{var i,t,n,o;try{const s=mh()?"warn":"strict";rc({mode:((i=e.validation)==null?void 0:i.mode)??s,onIssue:(t=e.validation)==null?void 0:t.onIssue});const a=new yo(r);a.on("versionchange",()=>{var f;try{a.close()}finally{(f=e.onReset)==null||f.call(e,"versionchange")}}),a.on("blocked",()=>{var f;(f=e.onReset)==null||f.call(e,"blocked")}),await a.open();const u=await a.kv.get(Wi),c=(u==null?void 0:u.value)??null;if(!c)return await a.transaction("rw",a.kv,async()=>{await a.kv.put({key:Wi,value:{schemaVersion:Er}})}),Gi(a,e.validation),ut=a,a;const l=gh.safeParse(c);if(!l.success||l.data.schemaVersion!==Er){await a.delete();const f=new yo(r);return f.on("versionchange",()=>{var p;try{f.close()}finally{(p=e.onReset)==null||p.call(e,"versionchange")}}),f.on("blocked",()=>{var p;(p=e.onReset)==null||p.call(e,"blocked")}),await f.open(),await f.kv.put({key:Wi,value:{schemaVersion:Er}}),Gi(f,e.validation),(n=e.onReset)==null||n.call(e,"incompatible"),ut=f,f}return Gi(a,e.validation),ut=a,a}catch(s){throw(o=e.onError)==null||o.call(e,s),new Xu("Failed to open IndexedDB",s)}finally{br=null}})(),br}async function yh(e){const r=e??"inresi-orm";if(ut)try{await ut.close()}catch{}await new yo(r).delete(),ut=null}const an="user",nc=()=>{var e;return typeof((e=globalThis.crypto)==null?void 0:e.randomUUID)=="function"?globalThis.crypto.randomUUID():(()=>{var t,n;const r=((n=(t=globalThis.crypto)==null?void 0:t.getRandomValues)==null?void 0:n.call(t,new Uint8Array(16)))??Uint8Array.from({length:16},()=>Math.random()*256|0);r[6]=r[6]&15|64,r[8]=r[8]&63|128;const i=[...r].map(o=>o.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`})()},ji=e=>{var r,i;return((r=e==null?void 0:e.value)==null?void 0:r.useruuid)??((i=e==null?void 0:e.value)==null?void 0:i.uuid)};async function Si(e=nc){const r=await ze(),i=ji(await r.kv.get(an));if(i){const t=await r.users.get(i);if(t)return Tt.parse(t)}try{return await r.transaction("rw",r.kv,r.users,async()=>{const t=ji(await r.kv.get(an));if(t){const s=await r.users.get(t);if(s)return Tt.parse(s)}const n=e();await r.kv.add({key:an,value:{useruuid:n}});const o=Tt.parse({uuid:n,createdAt:new Date().toISOString()});return await r.users.add(o),o})}catch(t){if((t==null?void 0:t.name)==="ConstraintError"){const n=ji(await r.kv.get(an));if(n){const o=await r.users.get(n);if(o)return Tt.parse(o)}}throw t}}const ic=async e=>(await Si(e)).uuid;async function oc(){const e=await ze(),r={};for(const i of e.tables)r[i.name]=await i.toArray();return r}async function _h(e="inresi-orm-export.json"){if(typeof window>"u"||typeof document>"u")throw new Error("exportJSON can only run in a browser.");const r=await oc(),i=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.download=e,document.body.appendChild(t),t.click(),t.remove(),URL.revokeObjectURL(t.href)}async function ys(e){const i=await(await ze()).kv.get(e);return(i==null?void 0:i.value)??null}async function _s(e,r){await(await ze()).kv.put({key:e,value:r})}async function bh(e){await(await ze()).kv.delete(e)}function wh(e){const r=new Map,i=(e==null?void 0:e.prefix)??"",t=n=>`${i}${n}`;return{async getItem(n){try{const s=await(await ze()).kv.get(t(n));return s?JSON.stringify(s.value):null}catch(o){if(e!=null&&e.fallbackToMemory)return r.get(t(n))??null;throw o}},async setItem(n,o){try{await(await ze()).kv.put({key:t(n),value:JSON.parse(o)})}catch(s){if(e!=null&&e.fallbackToMemory){r.set(t(n),o);return}throw s}},async removeItem(n){try{await(await ze()).kv.delete(t(n))}catch(o){if(e!=null&&e.fallbackToMemory){r.delete(t(n));return}throw o}}}}const sc=(e,r)=>`favorites:${e}:${r}`;async function Ci(e){const r=await ze(),{uuid:i}=await Si(),t=sc(i,String(e)),n=await r.kv.get(t),o=n?Yn.safeParse(n.value):null;return o!=null&&o.success?o.data.unitIds:[]}async function bs(e,r,i){const t=await ze(),{uuid:n}=await Si(),o=sc(n,String(e));return t.transaction("rw",t.kv,async()=>{const s=await t.kv.get(o),a=s&&Yn.safeParse(s.value).success?s.value:{unitIds:[],updatedAt:new Date().toISOString()},u=new Set(a.unitIds);i?u.add(r):u.delete(r);const c={unitIds:[...u],updatedAt:new Date().toISOString()},l=Yn.parse(c);return await t.kv.put({key:o,value:l}),l.unitIds})}async function ac(e,r){const t=!(await Ci(e)).includes(r);return bs(e,r,t)}async function uc(e,r){return(await Ci(e)).includes(r)}const Hi={data:{},propertySlug:null,propertyId:null,hasPreviouslySearched:[]};class cc{async getState(){const r=await ys("property");if(!r)return Hi;const i={...r,propertyId:r.propertyId==null?null:String(r.propertyId),propertySlug:r.propertySlug??null,hasPreviouslySearched:Array.isArray(r.hasPreviouslySearched)?r.hasPreviouslySearched.map(String):[]},t=Dn.safeParse(i);if(t.success)return t.data;const n=Object.entries(i.data??{}).reduce((a,[u,c])=>{const l=Zr.safeParse(c);return l.success&&(a[u]=l.data),a},{}),o={...Hi,...i,data:n},s=Dn.safeParse(o);return s.success?s.data:Hi}async setState(r){const i=await this.getState(),t=r(i),n=Dn.parse(t);await _s("property",n)}async setHasPreviouslySearched(r){await this.setState(i=>({...i,hasPreviouslySearched:Array.from(new Set([...i.hasPreviouslySearched,r]))}))}async setTourContactedOn(){await this.setState(r=>{const i=r.propertyId;if(!i)return r;const t=r.data[i];return t?{...r,data:{...r.data,[i]:{...t,tourContactedOn:new Date().toISOString()}}}:r})}async getTourContactedOn(){var t;const r=await this.getState(),i=r.propertyId;return i?((t=r.data[i])==null?void 0:t.tourContactedOn)??null:null}async setQuestionnaireResults(r){await this.setState(i=>{const t=i.propertyId;if(!t)return i;const n=i.data[t];return n?{...i,data:{...i.data,[t]:{...n,questionnaireResults:r}}}:i})}async setTourContactData(r){await this.setState(i=>{const t=i.propertyId;if(!t)return i;const n=i.data[t];return n?{...i,data:{...i.data,[t]:{...n,tourContactData:r}}}:i})}async toggleFavorite(r){await this.setState(i=>{const t=i.propertyId;if(!t)return i;const n=i.data[t];if(!n)return i;const s=n.favoritedUnits.includes(r)?n.favoritedUnits.filter(a=>a!==r):[...n.favoritedUnits,r];return{...i,data:{...i.data,[t]:{...n,favoritedUnits:s}}}})}async markUnitAsViewed(r,i){const t=new Date,n=`${String(t.getMonth()+1).padStart(2,"0")}/${String(t.getDate()).padStart(2,"0")}`;await this.setState(o=>{const s=o.propertyId;if(!s)return o;const a=o.data[s];if(!a)return o;const u=[...a.viewedUnits.filter(c=>c.unitId!==r),{unitId:r,viewedDate:n}];return{...o,data:{...o.data,[s]:{...a,viewedUnits:u}}}}),typeof window<"u"&&window.open(`//${i}`,"_blank")}async getUnitState(r){var n;const i=await this.getState(),t=i.propertyId?i.data[i.propertyId]:null;return{isFavorite:(t==null?void 0:t.favoritedUnits.includes(r))??!1,viewedDate:((n=t==null?void 0:t.viewedUnits.find(o=>o.unitId===r))==null?void 0:n.viewedDate)??""}}async getPropertyData(r){const i=await this.getState(),t=r==null?i.propertyId:String(r);return t?i.data[t]??null:null}async getCurrentProperty(){const r=await this.getState();return r.propertyId?r.data[r.propertyId]??null:null}async getFullState(){return this.getState()}async initializeProperty(r,i){const t=String(r);await this.setState(n=>n.data[t]?{...n,propertyId:t,propertySlug:i}:{...n,propertyId:t,propertySlug:i,data:{...n.data,[t]:{id:t,slug:i,favoritedUnits:[],tourContactedOn:null,viewedUnits:[],questionnaireResults:null,tourContactData:null}}})}}const Sh=new cc,lc=ic();var E;if(typeof window>"u"){var wa={hostname:""};E={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:wa,referrer:""},screen:{width:0,height:0},location:wa,addEventListener:function(){},removeEventListener:function(){}}}else E=window;function Sa(e,r){(r==null||r>e.length)&&(r=e.length);for(var i=0,t=new Array(r);i<r;i++)t[i]=e[i];return t}function Ca(e,r,i,t,n,o,s){try{var a=e[o](s),u=a.value}catch(c){i(c);return}a.done?r(u):Promise.resolve(u).then(t,n)}function ws(e){return function(){var r=this,i=arguments;return new Promise(function(t,n){var o=e.apply(r,i);function s(u){Ca(o,t,n,s,a,"next",u)}function a(u){Ca(o,t,n,s,a,"throw",u)}s(void 0)})}}function Fn(e,r,i){return fc()?Fn=Reflect.construct:Fn=function(n,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(n,a),c=new u;return s&&Nr(c,s.prototype),c},Fn.apply(null,arguments)}function Ch(e,r){for(var i=0;i<r.length;i++){var t=r[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function be(e,r,i){return r&&Ch(e.prototype,r),e}function Y(){return Y=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},Y.apply(this,arguments)}function bo(e){return bo=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},bo(e)}function Ce(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Nr(e,r)}function F(e,r){return r!=null&&typeof Symbol<"u"&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](e):e instanceof r}function Ih(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Dr(e,r){if(e==null)return{};var i={},t=Object.keys(e),n,o;for(o=0;o<t.length;o++)n=t[o],!(r.indexOf(n)>=0)&&(i[n]=e[n]);return i}function Nr(e,r){return Nr=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},Nr(e,r)}function q(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}function Eh(e,r){if(e){if(typeof e=="string")return Sa(e,r);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Sa(e,r)}}function Kn(e){var r=typeof Map=="function"?new Map:void 0;return Kn=function(t){if(t===null||!Ih(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return Fn(t,arguments,bo(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Nr(n,t)},Kn(e)}function fc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fc=function(){return!!e})()}function O(e,r){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=Eh(e))||r){i&&(e=i);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Lr(e,r){var i,t,n,o,s={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,t&&(n=c[0]&2?t.return:c[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,c[1])).done)return n;switch(t=0,n&&(c=[c[0]&2,n.value]),c[0]){case 0:case 1:n=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,t=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(c[0]===6||c[0]===2)){s=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){s.label=c[1];break}if(c[0]===6&&s.label<n[1]){s.label=n[1],n=c;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(c);break}n[2]&&s.ops.pop(),s.trys.pop();continue}c=r.call(e,s)}catch(l){c=[6,l],t=0}finally{i=n=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function hc(e){var r=typeof Symbol=="function"&&Symbol.iterator,i=r&&e[r],t=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}var kh=Object.defineProperty,Oh=function(e,r,i){return r in e?kh(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i},k=function(e,r,i){return Oh(e,(typeof r>"u"?"undefined":q(r))!=="symbol"?r+"":r,i)},Ia,xh=Object.defineProperty,Rh=function(e,r,i){return r in e?xh(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i},Ea=function(e,r,i){return Rh(e,(typeof r>"u"?"undefined":q(r))!=="symbol"?r+"":r,i)},me=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(me||{}),ka={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Oa={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},un={},Ah=function(){return!!globalThis.Zone};function Ss(e){if(un[e])return un[e];var r=globalThis[e],i=r.prototype,t=e in ka?ka[e]:void 0,n=!!(t&&t.every(function(l){var f,p;return!!((p=(f=Object.getOwnPropertyDescriptor(i,l))==null?void 0:f.get)!=null&&p.toString().includes("[native code]"))})),o=e in Oa?Oa[e]:void 0,s=!!(o&&o.every(function(l){var f;return typeof i[l]=="function"&&((f=i[l])==null?void 0:f.toString().includes("[native code]"))}));if(n&&s&&!Ah())return un[e]=r.prototype,r.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return r.prototype;var c=u[e].prototype;return document.body.removeChild(a),c?un[e]=c:i}catch{return i}}var Yi={};function vt(e,r,i){var t,n=e+"."+String(i);if(Yi[n])return Yi[n].call(r);var o=Ss(e),s=(t=Object.getOwnPropertyDescriptor(o,i))==null?void 0:t.get;return s?(Yi[n]=s,s.call(r)):r[i]}var Ki={};function pc(e,r,i){var t=e+"."+String(i);if(Ki[t])return Ki[t].bind(r);var n=Ss(e),o=n[i];return typeof o!="function"?r[i]:(Ki[t]=o,o.bind(r))}function Mh(e){return vt("Node",e,"childNodes")}function Th(e){return vt("Node",e,"parentNode")}function Ph(e){return vt("Node",e,"parentElement")}function Dh(e){return vt("Node",e,"textContent")}function Nh(e,r){return pc("Node",e,"contains")(r)}function Lh(e){return pc("Node",e,"getRootNode")()}function Fh(e){return!e||!("host"in e)?null:vt("ShadowRoot",e,"host")}function Uh(e){return e.styleSheets}function $h(e){return!e||!("shadowRoot"in e)?null:vt("Element",e,"shadowRoot")}function zh(e,r){return vt("Element",e,"querySelector")(r)}function Bh(e,r){return vt("Element",e,"querySelectorAll")(r)}function qh(){return Ss("MutationObserver").constructor}function Vh(e,r,i){try{if(!(r in e))return function(){};var t=e[r],n=i(t);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:t}})),e[r]=n,function(){e[r]=t}}catch{return function(){}}}var Se={childNodes:Mh,parentNode:Th,parentElement:Ph,textContent:Dh,contains:Nh,getRootNode:Lh,host:Fh,styleSheets:Uh,shadowRoot:$h,querySelector:zh,querySelectorAll:Bh,mutationObserver:qh,patch:Vh};function dc(e){return e.nodeType===e.ELEMENT_NODE}function kr(e){var r=e&&"host"in e&&"mode"in e&&Se.host(e)||null;return!!(r&&"shadowRoot"in r&&Se.shadowRoot(r)===e)}function Or(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Wh(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Gh(e){var r=e.cssText;if(r.split('"').length<3)return r;var i=["@import","url("+JSON.stringify(e.href)+")"];return e.layerName===""?i.push("layer"):e.layerName&&i.push("layer("+e.layerName+")"),e.supportsText&&i.push("supports("+e.supportsText+")"),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}function wo(e){try{var r=e.rules||e.cssRules;if(!r)return null;var i=e.href;!i&&e.ownerNode&&e.ownerNode.ownerDocument&&(i=e.ownerNode.ownerDocument.location.href);var t=Array.from(r,function(n){return vc(n,i)}).join("");return Wh(t)}catch{return null}}function vc(e,r){if(Hh(e)){var i;try{i=wo(e.styleSheet)||Gh(e)}catch{i=e.cssText}return e.styleSheet.href?Zn(i,e.styleSheet.href):i}else{var t=e.cssText;return Yh(e)&&e.selectorText.includes(":")&&(t=jh(t)),r?Zn(t,r):t}}function jh(e){var r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(r,"$1\\$2")}function Hh(e){return"styleSheet"in e}function Yh(e){return"selectorText"in e}var gc=function(){function e(){Ea(this,"idNodeMap",new Map),Ea(this,"nodeMetaMap",new WeakMap)}var r=e.prototype;return r.getId=function(t){var n;if(!t)return-1;var o=(n=this.getMeta(t))==null?void 0:n.id;return o??-1},r.getNode=function(t){return this.idNodeMap.get(t)||null},r.getIds=function(){return Array.from(this.idNodeMap.keys())},r.getMeta=function(t){return this.nodeMetaMap.get(t)||null},r.removeNodeFromMap=function(t){var n=this,o=this.getId(t);this.idNodeMap.delete(o),t.childNodes&&t.childNodes.forEach(function(s){return n.removeNodeFromMap(s)})},r.has=function(t){return this.idNodeMap.has(t)},r.hasNode=function(t){return this.nodeMetaMap.has(t)},r.add=function(t,n){var o=n.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,n)},r.replace=function(t,n){var o=this.getNode(t);if(o){var s=this.nodeMetaMap.get(o);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)},r.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Kh(){return new gc}function Jn(e){var r=e.element,i=e.maskInputOptions,t=e.tagName,n=e.type,o=e.value,s=e.maskInputFn,a=o||"",u=n&&Dt(n);return(i[t.toLowerCase()]||u&&i[u])&&(s?a=s(a,r):a="*".repeat(a.length)),a}function Dt(e){return e.toLowerCase()}var xa="__rrweb_original__";function Jh(e){var r=e.getContext("2d");if(!r)return!0;for(var i=50,t=0;t<e.width;t+=i)for(var n=0;n<e.height;n+=i){var o=r.getImageData,s=xa in o?o[xa]:o,a=new Uint32Array(s.call(r,t,n,Math.min(i,e.width-t),Math.min(i,e.height-n)).data.buffer);if(a.some(function(u){return u!==0}))return!1}return!0}function Xn(e){var r=e.type;return e.hasAttribute("data-rr-is-password")?"password":r?Dt(r):null}function mc(e,r){var i;try{i=new URL(e,r??window.location.href)}catch{return null}var t=/\.([0-9a-z]+)(?:$)/i,n=i.pathname.match(t),o;return(o=n==null?void 0:n[1])!=null?o:null}function Xh(e){var r="";return e.indexOf("//")>-1?r=e.split("/").slice(0,3).join("/"):r=e.split("/")[0],r=r.split("?")[0],r}var Zh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Qh=/^(?:[a-z+]+:)?\/\//i,ep=/^www\..*/i,tp=/^(data:)([^,]*),(.*)/i;function Zn(e,r){return(e||"").replace(Zh,function(i,t,n,o,s,a){var u=n||s||a,c=t||o||"";if(!u)return i;if(Qh.test(u)||ep.test(u)||tp.test(u))return"url("+c+u+c+")";if(u[0]==="/")return"url("+c+(Xh(r)+u)+c+")";var l=r.split("/"),f=u.split("/");l.pop();for(var p=O(f),g;!(g=p()).done;){var d=g.value;d!=="."&&(d===".."?l.pop():l.push(d))}return"url("+c+l.join("/")+c+")"})}function cn(e,r){return r===void 0&&(r=!1),r?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function rp(e,r,i){i===void 0&&(i=!1);var t=Array.from(r.childNodes),n=[],o=0;if(t.length>1&&e&&typeof e=="string"){for(var s=cn(e,i),a=s.length/e.length,u=1;u<t.length;u++)if(t[u].textContent&&typeof t[u].textContent=="string"){for(var c=cn(t[u].textContent,i),l=100,f=3;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){var p=c.substring(0,f),g=s.split(p),d=-1;if(g.length===2)d=g[0].length;else if(g.length>2&&g[0]===""&&t[u-1].textContent!=="")d=s.indexOf(p,1);else if(g.length===1){if(p=p.substring(0,p.length-1),g=s.split(p),g.length<=1)return n.push(e),n;f=l+1}else f===c.length-1&&(d=s.indexOf(p));if(g.length>=2&&f>l){var _=t[u-1].textContent;if(_&&typeof _=="string"){var v=cn(_).length;d=s.indexOf(p,v)}d===-1&&(d=g[0].length)}if(d!==-1){for(var y=Math.floor(d/a);y>0&&y<e.length;){if(o+=1,o>50*t.length)return n.push(e),n;var b=cn(e.substring(0,y),i);if(b.length===d){n.push(e.substring(0,y)),e=e.substring(y),s=s.substring(d);break}else b.length<d?y+=Math.max(1,Math.floor((d-b.length)/a)):y-=Math.max(1,Math.floor((b.length-d)*a))}break}}}}return n.push(e),n}function np(e,r){return rp(e,r).join("/* rr_split */")}var ip=1,op=new RegExp("[^a-z0-9-_:]"),Fr=-2;function yc(){return ip++}function sp(e){if(F(e,HTMLFormElement))return"form";var r=Dt(e.tagName);return op.test(r)?"div":r}var jt,Ra,ap=/^[^ \t\n\r\u000c]+/,up=/^[, \t\n\r\u000c]+/;function cp(e,r){if(r.trim()==="")return r;var i=0;function t(c){var l,f=c.exec(r.substring(i));return f?(l=f[0],i+=l.length,l):""}for(var n=[];t(up),!(i>=r.length);){var o=t(ap);if(o.slice(-1)===",")o=Kt(e,o.substring(0,o.length-1)),n.push(o);else{var s="";o=Kt(e,o);for(var a=!1;;){var u=r.charAt(i);if(u===""){n.push((o+s).trim());break}else if(a)u===")"&&(a=!1);else if(u===","){i+=1,n.push((o+s).trim());break}else u==="("&&(a=!0);s+=u,i+=1}}}return n.join(", ")}var Aa=new WeakMap;function Kt(e,r){return!r||r.trim()===""?r:Cs(e,r)}function lp(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Cs(e,r){var i=Aa.get(e);if(i||(i=e.createElement("a"),Aa.set(e,i)),!r)r="";else if(r.startsWith("blob:")||r.startsWith("data:"))return r;return i.setAttribute("href",r),i.href}function _c(e,r,i,t){return t&&(i==="src"||i==="href"&&!(r==="use"&&t[0]==="#")||i==="xlink:href"&&t[0]!=="#"||i==="background"&&(r==="table"||r==="td"||r==="th")?Kt(e,t):i==="srcset"?cp(e,t):i==="style"?Zn(t,Cs(e)):r==="object"&&i==="data"?Kt(e,t):t)}function bc(e,r,i){return(e==="video"||e==="audio")&&r==="autoplay"}function fp(e,r,i){try{if(typeof r=="string"){if(e.classList.contains(r))return!0}else for(var t=e.classList.length;t--;){var n=e.classList[t];if(r.test(n))return!0}if(i)return e.matches(i)}catch{}return!1}function Qn(e,r,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return i?Qn(Se.parentNode(e),r,i):!1;for(var t=e.classList.length;t--;){var n=e.classList[t];if(r.test(n))return!0}return i?Qn(Se.parentNode(e),r,i):!1}function wc(e,r,i,t){var n;if(dc(e)){if(n=e,!Se.childNodes(n).length)return!1}else{if(Se.parentElement(e)===null)return!1;n=Se.parentElement(e)}try{if(typeof r=="string"){if(t){if(n.closest("."+r))return!0}else if(n.classList.contains(r))return!0}else if(Qn(n,r,t))return!0;if(i){if(t){if(n.closest(i))return!0}else if(n.matches(i))return!0}}catch{}return!1}function hp(e,r,i){var t=e.contentWindow;if(t){var n=!1,o;try{o=t.document.readyState}catch{return}if(o!=="complete"){var s=setTimeout(function(){n||(r(),n=!0)},i);e.addEventListener("load",function(){clearTimeout(s),n=!0,r()});return}var a="about:blank";if(t.location.href!==a||e.src===a||e.src==="")return setTimeout(r,0),e.addEventListener("load",r);e.addEventListener("load",r)}}function pp(e,r,i){var t=!1,n;try{n=e.sheet}catch{return}if(!n){var o=setTimeout(function(){t||(r(),t=!0)},i);e.addEventListener("load",function(){clearTimeout(o),t=!0,r()})}}function dp(e,r){var i=r.doc,t=r.mirror,n=r.blockClass,o=r.blockSelector,s=r.needsMask,a=r.inlineStylesheet,u=r.maskInputOptions,c=u===void 0?{}:u,l=r.maskTextFn,f=r.maskInputFn,p=r.dataURLOptions,g=p===void 0?{}:p,d=r.inlineImages,_=r.recordCanvas,v=r.keepIframeSrcFn,y=r.newlyAddedElement,b=y===void 0?!1:y,S=r.cssCaptured,C=S===void 0?!1:S,I=vp(i,t);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:me.Document,childNodes:[],compatMode:e.compatMode}:{type:me.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:me.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return mp(e,{doc:i,blockClass:n,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:f,dataURLOptions:g,inlineImages:d,recordCanvas:_,keepIframeSrcFn:v,newlyAddedElement:b,rootId:I});case e.TEXT_NODE:return gp(e,{doc:i,needsMask:s,maskTextFn:l,rootId:I,cssCaptured:C});case e.CDATA_SECTION_NODE:return{type:me.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:me.Comment,textContent:Se.textContent(e)||"",rootId:I};default:return!1}}function vp(e,r){if(r.hasNode(e)){var i=r.getId(e);return i===1?void 0:i}}function gp(e,r){var i=r.needsMask,t=r.maskTextFn,n=r.rootId,o=r.cssCaptured,s=Se.parentNode(e),a=s&&s.tagName,u="",c=a==="STYLE"?!0:void 0,l=a==="SCRIPT"?!0:void 0;return l?u="SCRIPT_PLACEHOLDER":o||(u=Se.textContent(e),c&&u&&(u=Zn(u,Cs(r.doc)))),!c&&!l&&u&&i&&(u=t?t(u,Se.parentElement(e)):u.replace(/[\S]/g,"*")),{type:me.Text,textContent:u||"",rootId:n}}function mp(e,r){for(var i=r.doc,t=r.blockClass,n=r.blockSelector,o=r.inlineStylesheet,s=r.maskInputOptions,a=s===void 0?{}:s,u=r.maskInputFn,c=r.dataURLOptions,l=c===void 0?{}:c,f=r.inlineImages,p=r.recordCanvas,g=r.keepIframeSrcFn,d=r.newlyAddedElement,_=d===void 0?!1:d,v=r.rootId,y=fp(e,t,n),b=sp(e),S={},C=e.attributes.length,I=0;I<C;I++){var x=e.attributes[I];bc(b,x.name,x.value)||(S[x.name]=_c(i,b,Dt(x.name),x.value))}if(b==="link"&&o){var M=Array.from(i.styleSheets).find(function(Pe){return Pe.href===e.href}),R=null;M&&(R=wo(M)),R&&(delete S.rel,delete S.href,S._cssText=R)}if(b==="style"&&e.sheet){var P=wo(e.sheet);P&&(e.childNodes.length>1&&(P=np(P,e)),S._cssText=P)}if(b==="input"||b==="textarea"||b==="select"){var H=e.value,T=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&H?S.value=Jn({element:e,type:Xn(e),tagName:b,value:H,maskInputOptions:a,maskInputFn:u}):T&&(S.checked=T)}if(b==="option"&&(e.selected&&!a.select?S.selected=!0:delete S.selected),b==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),b==="canvas"&&p){if(e.__context==="2d")Jh(e)||(S.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){var $=e.toDataURL(l.type,l.quality),X=i.createElement("canvas");X.width=e.width,X.height=e.height;var xe=X.toDataURL(l.type,l.quality);$!==xe&&(S.rr_dataURL=$)}}if(b==="img"&&f){jt||(jt=i.createElement("canvas"),Ra=jt.getContext("2d"));var Z=e,Me=Z.currentSrc||Z.getAttribute("src")||"<unknown-src>",Ie=Z.crossOrigin,ce=function(){Z.removeEventListener("load",ce);try{jt.width=Z.naturalWidth,jt.height=Z.naturalHeight,Ra.drawImage(Z,0,0),S.rr_dataURL=jt.toDataURL(l.type,l.quality)}catch(Pe){if(Z.crossOrigin!=="anonymous"){Z.crossOrigin="anonymous",Z.complete&&Z.naturalWidth!==0?ce():Z.addEventListener("load",ce);return}else console.warn("Cannot inline img src="+Me+"! Error: "+Pe)}Z.crossOrigin==="anonymous"&&(Ie?S.crossOrigin=Ie:Z.removeAttribute("crossorigin"))};Z.complete&&Z.naturalWidth!==0?ce():Z.addEventListener("load",ce)}if(b==="audio"||b==="video"){var ye=S;ye.rr_mediaState=e.paused?"paused":"played",ye.rr_mediaCurrentTime=e.currentTime,ye.rr_mediaPlaybackRate=e.playbackRate,ye.rr_mediaMuted=e.muted,ye.rr_mediaLoop=e.loop,ye.rr_mediaVolume=e.volume}if(_||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),y){var Te=e.getBoundingClientRect(),Ct=Te.width,qe=Te.height;S={class:S.class,rr_width:""+Ct+"px",rr_height:""+qe+"px"}}b==="iframe"&&!g(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);var qt;try{customElements.get(b)&&(qt=!0)}catch{}return{type:me.Element,tagName:b,attributes:S,childNodes:[],isSVG:lp(e)||void 0,needBlock:y,rootId:v,isCustom:qt}}function re(e){return e==null?"":e.toLowerCase()}function yp(e,r){if(r.comment&&e.type===me.Comment)return!0;if(e.type===me.Element){if(r.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&mc(e.attributes.href)==="js"))return!0;if(r.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||re(e.attributes.name)==="application-name"||re(e.attributes.rel)==="icon"||re(e.attributes.rel)==="apple-touch-icon"||re(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(r.headMetaDescKeywords&&re(e.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(re(e.attributes.property).match(/^(og|twitter|fb):/)||re(e.attributes.name).match(/^(og|twitter):/)||re(e.attributes.name)==="pinterest"))return!0;if(r.headMetaRobots&&(re(e.attributes.name)==="robots"||re(e.attributes.name)==="googlebot"||re(e.attributes.name)==="bingbot"))return!0;if(r.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(r.headMetaAuthorship&&(re(e.attributes.name)==="author"||re(e.attributes.name)==="generator"||re(e.attributes.name)==="framework"||re(e.attributes.name)==="publisher"||re(e.attributes.name)==="progid"||re(e.attributes.property).match(/^article:/)||re(e.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&(re(e.attributes.name)==="google-site-verification"||re(e.attributes.name)==="yandex-verification"||re(e.attributes.name)==="csrf-token"||re(e.attributes.name)==="p:domain_verify"||re(e.attributes.name)==="verify-v1"||re(e.attributes.name)==="verification"||re(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Jt(e,r){var i=r.doc,t=r.mirror,n=r.blockClass,o=r.blockSelector,s=r.maskTextClass,a=r.maskTextSelector,u=r.skipChild,c=u===void 0?!1:u,l=r.inlineStylesheet,f=l===void 0?!0:l,p=r.maskInputOptions,g=p===void 0?{}:p,d=r.maskTextFn,_=r.maskInputFn,v=r.slimDOMOptions,y=r.dataURLOptions,b=y===void 0?{}:y,S=r.inlineImages,C=S===void 0?!1:S,I=r.recordCanvas,x=I===void 0?!1:I,M=r.onSerialize,R=r.onIframeLoad,P=r.iframeLoadTimeout,H=P===void 0?5e3:P,T=r.onStylesheetLoad,$=r.stylesheetLoadTimeout,X=$===void 0?5e3:$,xe=r.keepIframeSrcFn,Z=xe===void 0?function(){return!1}:xe,Me=r.newlyAddedElement,Ie=Me===void 0?!1:Me,ce=r.cssCaptured,ye=ce===void 0?!1:ce,Te=r.needsMask,Ct=r.preserveWhiteSpace,qe=Ct===void 0?!0:Ct;if(!Te){var qt=Te===void 0;Te=wc(e,s,a,qt)}var Pe=dp(e,{doc:i,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,dataURLOptions:b,inlineImages:C,recordCanvas:x,keepIframeSrcFn:Z,newlyAddedElement:Ie,cssCaptured:ye});if(!Pe)return console.warn(e,"not serialized"),null;var It;t.hasNode(e)?It=t.getId(e):yp(Pe,v)||!qe&&Pe.type===me.Text&&!Pe.textContent.replace(/^\s+|\s+$/gm,"").length?It=Fr:It=yc();var J=Object.assign(Pe,{id:It});if(t.add(e,J),It===Fr)return null;M&&M(e);var Et=!c;if(J.type===me.Element){Et=Et&&!J.needBlock,delete J.needBlock;var kt=Se.shadowRoot(e);kt&&Or(kt)&&(J.isShadowHost=!0)}if((J.type===me.Document||J.type===me.Element)&&Et){v.headWhitespace&&J.type===me.Element&&J.tagName==="head"&&(qe=!1);var Vt={doc:i,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,slimDOMOptions:v,dataURLOptions:b,inlineImages:C,recordCanvas:x,preserveWhiteSpace:qe,onSerialize:M,onIframeLoad:R,iframeLoadTimeout:H,onStylesheetLoad:T,stylesheetLoadTimeout:X,keepIframeSrcFn:Z,cssCaptured:!1};if(!(J.type===me.Element&&J.tagName==="textarea"&&J.attributes.value!==void 0)){J.type===me.Element&&J.attributes._cssText!==void 0&&typeof J.attributes._cssText=="string"&&(Vt.cssCaptured=!0);for(var gr=O(Array.from(Se.childNodes(e))),mr;!(mr=gr()).done;){var zi=mr.value,on=Jt(zi,Vt);on&&J.childNodes.push(on)}}var ot=null;if(dc(e)&&(ot=Se.shadowRoot(e)))for(var Ot=O(Array.from(Se.childNodes(ot))),Wt;!(Wt=Ot()).done;){var yr=Wt.value,Gt=Jt(yr,Vt);Gt&&(Or(ot)&&(Gt.isShadow=!0),J.childNodes.push(Gt))}}var xt=Se.parentNode(e);return xt&&kr(xt)&&Or(xt)&&(J.isShadow=!0),J.type===me.Element&&J.tagName==="iframe"&&hp(e,function(){var Ke=e.contentDocument;if(Ke&&R){var Rt=Jt(Ke,{doc:Ke,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,slimDOMOptions:v,dataURLOptions:b,inlineImages:C,recordCanvas:x,preserveWhiteSpace:qe,onSerialize:M,onIframeLoad:R,iframeLoadTimeout:H,onStylesheetLoad:T,stylesheetLoadTimeout:X,keepIframeSrcFn:Z});Rt&&R(e,Rt)}},H),J.type===me.Element&&J.tagName==="link"&&typeof J.attributes.rel=="string"&&(J.attributes.rel==="stylesheet"||J.attributes.rel==="preload"&&typeof J.attributes.href=="string"&&mc(J.attributes.href)==="css")&&pp(e,function(){if(T){var Ke=Jt(e,{doc:i,mirror:t,blockClass:n,blockSelector:o,needsMask:Te,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:g,maskTextFn:d,maskInputFn:_,slimDOMOptions:v,dataURLOptions:b,inlineImages:C,recordCanvas:x,preserveWhiteSpace:qe,onSerialize:M,onIframeLoad:R,iframeLoadTimeout:H,onStylesheetLoad:T,stylesheetLoadTimeout:X,keepIframeSrcFn:Z});Ke&&T(e,Ke)}},X),J}function _p(e,r){var i=r||{},t=i.mirror,n=t===void 0?new gc:t,o=i.blockClass,s=o===void 0?"rr-block":o,a=i.blockSelector,u=a===void 0?null:a,c=i.maskTextClass,l=c===void 0?"rr-mask":c,f=i.maskTextSelector,p=f===void 0?null:f,g=i.inlineStylesheet,d=g===void 0?!0:g,_=i.inlineImages,v=_===void 0?!1:_,y=i.recordCanvas,b=y===void 0?!1:y,S=i.maskAllInputs,C=S===void 0?!1:S,I=i.maskTextFn,x=i.maskInputFn,M=i.slimDOM,R=M===void 0?!1:M,P=i.dataURLOptions,H=i.preserveWhiteSpace,T=i.onSerialize,$=i.onIframeLoad,X=i.iframeLoadTimeout,xe=i.onStylesheetLoad,Z=i.stylesheetLoadTimeout,Me=i.keepIframeSrcFn,Ie=Me===void 0?function(){return!1}:Me,ce=C===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:C===!1?{password:!0}:C,ye=R===!0||R==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:R==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:R===!1?{}:R;return Jt(e,{doc:e,mirror:n,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:ce,maskTextFn:I,maskInputFn:x,slimDOMOptions:ye,dataURLOptions:P,inlineImages:v,recordCanvas:b,preserveWhiteSpace:H,onSerialize:T,onIframeLoad:$,iframeLoadTimeout:X,onStylesheetLoad:xe,stylesheetLoadTimeout:Z,keepIframeSrcFn:Ie,newlyAddedElement:!1})}function bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wp(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var i=function t(){return F(this,t)?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),i}var Is={exports:{}},ie=String,Sc=function(){return{isColorSupported:!1,reset:ie,bold:ie,dim:ie,italic:ie,underline:ie,inverse:ie,hidden:ie,strikethrough:ie,black:ie,red:ie,green:ie,yellow:ie,blue:ie,magenta:ie,cyan:ie,white:ie,gray:ie,bgBlack:ie,bgRed:ie,bgGreen:ie,bgYellow:ie,bgBlue:ie,bgMagenta:ie,bgCyan:ie,bgWhite:ie}};Is.exports=Sc();Is.exports.createColors=Sc;var Sp=Is.exports,Cp={},Ip=Object.freeze(Object.defineProperty({__proto__:null,default:Cp},Symbol.toStringTag,{value:"Module"})),he=wp(Ip),Ma=Sp,Ta=he,So=function(e){Ce(r,e);function r(t,n,o,s,a,u){var c;return c=e.call(this,t)||this,c.name="CssSyntaxError",c.reason=t,a&&(c.file=a),s&&(c.source=s),u&&(c.plugin=u),typeof n<"u"&&typeof o<"u"&&(typeof n=="number"?(c.line=n,c.column=o):(c.line=n.line,c.column=n.column,c.endLine=o.line,c.endColumn=o.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,r),c}var i=r.prototype;return i.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},i.showSourceCode=function(n){var o=this;if(!this.source)return"";var s=this.source;n==null&&(n=Ma.isColorSupported),Ta&&n&&(s=Ta(s));var a=s.split(/\r?\n/),u=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length,f,p;if(n){var g=Ma.createColors(!0),d=g.bold,_=g.gray,v=g.red;f=function(y){return d(v(y))},p=function(y){return _(y)}}else f=p=function(y){return y};return a.slice(u,c).map(function(y,b){var S=u+1+b,C=" "+(" "+S).slice(-l)+" | ";if(S===o.line){var I=p(C.replace(/\d/g," "))+y.slice(0,o.column-1).replace(/[^\t]/g," ");return f(">")+p(C)+y+`
|
|
2
2
|
`+I+f("^")}return" "+p(C)+y}).join(`
|
|
3
3
|
`)},i.toString=function(){var n=this.showSourceCode();return n&&(n=`
|
|
4
4
|
|
|
@@ -8,25 +8,25 @@
|
|
|
8
8
|
`,beforeComment:`
|
|
9
9
|
`,beforeDecl:`
|
|
10
10
|
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
12
|
-
`)){var u=this.raw(t,null,"indent");if(u.length)for(var c=0;c<a;c++)o+=u}return o},r.block=function(t,n){var o=this.raw(t,"between","beforeOpen");this.builder(n+o+"{",t,"start");var s;t.nodes&&t.nodes.length?(this.body(t),s=this.raw(t,"after")):s=this.raw(t,"after","emptyBody"),s&&this.builder(s),this.builder("}",t,"end")},r.body=function(t){for(var n=t.nodes.length-1;n>0&&t.nodes[n].type==="comment";)n-=1;for(var o=this.raw(t,"semicolon"),s=0;s<t.nodes.length;s++){var a=t.nodes[s],u=this.raw(a,"before");u&&this.builder(u),this.stringify(a,n!==s||o)}},r.comment=function(t){var n=this.raw(t,"left","commentLeft"),o=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+o+"*/",t)},r.decl=function(t,n){var o=this.raw(t,"between","colon"),s=t.prop+o+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),n&&(s+=";"),this.builder(s,t)},r.document=function(t){this.body(t)},r.raw=function(t,n,o){var s;if(o||(o=n),n&&(s=t.raws[n],typeof s<"u"))return s;var a=t.parent;if(o==="before"&&(!a||a.type==="root"&&a.first===t||a&&a.type==="document"))return"";if(!a)return Pa[o];var u=t.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(t,o);var c="raw"+
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ep(e){return e[0].toUpperCase()+e.slice(1)}var Co=function(){function e(i){this.builder=i}var r=e.prototype;return r.atrule=function(t,n){var o="@"+t.name,s=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?o+=t.raws.afterName:s&&(o+=" "),t.nodes)this.block(t,o+s);else{var a=(t.raws.between||"")+(n?";":"");this.builder(o+s+a,t)}},r.beforeAfter=function(t,n){var o;t.type==="decl"?o=this.raw(t,null,"beforeDecl"):t.type==="comment"?o=this.raw(t,null,"beforeComment"):n==="before"?o=this.raw(t,null,"beforeRule"):o=this.raw(t,null,"beforeClose");for(var s=t.parent,a=0;s&&s.type!=="root";)a+=1,s=s.parent;if(o.includes(`
|
|
12
|
+
`)){var u=this.raw(t,null,"indent");if(u.length)for(var c=0;c<a;c++)o+=u}return o},r.block=function(t,n){var o=this.raw(t,"between","beforeOpen");this.builder(n+o+"{",t,"start");var s;t.nodes&&t.nodes.length?(this.body(t),s=this.raw(t,"after")):s=this.raw(t,"after","emptyBody"),s&&this.builder(s),this.builder("}",t,"end")},r.body=function(t){for(var n=t.nodes.length-1;n>0&&t.nodes[n].type==="comment";)n-=1;for(var o=this.raw(t,"semicolon"),s=0;s<t.nodes.length;s++){var a=t.nodes[s],u=this.raw(a,"before");u&&this.builder(u),this.stringify(a,n!==s||o)}},r.comment=function(t){var n=this.raw(t,"left","commentLeft"),o=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+o+"*/",t)},r.decl=function(t,n){var o=this.raw(t,"between","colon"),s=t.prop+o+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),n&&(s+=";"),this.builder(s,t)},r.document=function(t){this.body(t)},r.raw=function(t,n,o){var s;if(o||(o=n),n&&(s=t.raws[n],typeof s<"u"))return s;var a=t.parent;if(o==="before"&&(!a||a.type==="root"&&a.first===t||a&&a.type==="document"))return"";if(!a)return Pa[o];var u=t.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(t,o);var c="raw"+Ep(o);return this[c]?s=this[c](u,t):u.walk(function(l){if(s=l.raws[n],typeof s<"u")return!1}),typeof s>"u"&&(s=Pa[o]),u.rawCache[o]=s,s},r.rawBeforeClose=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return n=o.raws.after,n.includes(`
|
|
13
13
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n},r.rawBeforeComment=function(t,n){var o;return t.walkComments(function(s){if(typeof s.raws.before<"u")return o=s.raws.before,o.includes(`
|
|
14
14
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(n,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o},r.rawBeforeDecl=function(t,n){var o;return t.walkDecls(function(s){if(typeof s.raws.before<"u")return o=s.raws.before,o.includes(`
|
|
15
15
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(n,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o},r.rawBeforeOpen=function(t){var n;return t.walk(function(o){if(o.type!=="decl"&&(n=o.raws.between,typeof n<"u"))return!1}),n},r.rawBeforeRule=function(t){var n;return t.walk(function(o){if(o.nodes&&(o.parent!==t||t.first!==o)&&typeof o.raws.before<"u")return n=o.raws.before,n.includes(`
|
|
16
16
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n},r.rawColon=function(t){var n;return t.walkDecls(function(o){if(typeof o.raws.between<"u")return n=o.raws.between.replace(/[^\s:]/g,""),!1}),n},r.rawEmptyBody=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length===0&&(n=o.raws.after,typeof n<"u"))return!1}),n},r.rawIndent=function(t){if(t.raws.indent)return t.raws.indent;var n;return t.walk(function(o){var s=o.parent;if(s&&s!==t&&s.parent&&s.parent===t&&typeof o.raws.before<"u"){var a=o.raws.before.split(`
|
|
17
|
-
`);return n=a[a.length-1],n=n.replace(/\S/g,""),!1}}),n},r.rawSemicolon=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(n=o.raws.semicolon,typeof n<"u"))return!1}),n},r.rawValue=function(t,n){var o=t[n],s=t.raws[n];return s&&s.value===o?s.raw:o},r.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},r.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},r.stringify=function(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)},e}(),
|
|
18
|
-
`?(s=1,a+=1):s+=1;return{column:s,line:a}},r.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},r.rangeBy=function(t){var n={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){var s=this.toString(),a=s.indexOf(t.word);a!==-1&&(n=this.positionInside(a,s),o=this.positionInside(a+t.word.length,s))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?o={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?o=this.positionInside(t.endIndex):t.index&&(o=this.positionInside(t.index+1));return(o.line<n.line||o.line===n.line&&o.column<=n.column)&&(o={column:n.column+1,line:n.line}),{end:o,start:n}},r.raw=function(t,n){var o=new
|
|
19
|
-
`);o=new Array(s.length);for(var a=0,u=0,c=s.length;u<c;u++)o[u]=a,a+=s[u].length+1;this[Zi]=o}n=o[o.length-1];var l=0;if(t>=n)l=o.length-1;else for(var f=o.length-2,p;l<f;)if(p=l+(f-l>>1),t<o[p])f=p-1;else if(t>=o[p+1])l=p+1;else{l=p;break}return{col:t-o[l]+1,line:l+1}},r.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:Ao(this.map.consumer().sourceRoot||this.map.root||".",t)},r.origin=function(t,n,o,s){if(!this.map)return!1;var a=this.map.consumer(),u=a.originalPositionFor({column:n,line:t});if(!u.source)return!1;var c;typeof o=="number"&&(c=a.originalPositionFor({column:s,line:o}));var l;Ro(u.source)?l=
|
|
17
|
+
`);return n=a[a.length-1],n=n.replace(/\S/g,""),!1}}),n},r.rawSemicolon=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(n=o.raws.semicolon,typeof n<"u"))return!1}),n},r.rawValue=function(t,n){var o=t[n],s=t.raws[n];return s&&s.value===o?s.raw:o},r.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},r.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},r.stringify=function(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)},e}(),Cc=Co;Co.default=Co;var kp=Cc;function Io(e,r){var i=new kp(r);i.stringify(e)}var Ii=Io;Io.default=Io;var ln=gt.isClean,Op=gt.my,xp=Es,Rp=Cc,Ap=Ii;function Eo(e,r){var i=new e.constructor;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t!=="proxyCache"){var n=e[t],o=typeof n>"u"?"undefined":q(n);t==="parent"&&o==="object"?r&&(i[t]=r):t==="source"?i[t]=n:Array.isArray(n)?i[t]=n.map(function(s){return Eo(s,i)}):(o==="object"&&n!==null&&(n=Eo(n)),i[t]=n)}return i}var ko=function(){function e(i){i===void 0&&(i={}),this.raws={},this[ln]=!1,this[Op]=!0;for(var t in i)if(t==="nodes"){this.nodes=[];for(var n=O(i[t]),o;!(o=n()).done;){var s=o.value;typeof s.clone=="function"?this.append(s.clone()):this.append(s)}}else this[t]=i[t]}var r=e.prototype;return r.addToError=function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+n.input.from+":"+n.start.line+":"+n.start.column+"$&")}return t},r.after=function(t){return this.parent.insertAfter(this,t),this},r.assign=function(t){t===void 0&&(t={});for(var n in t)this[n]=t[n];return this},r.before=function(t){return this.parent.insertBefore(this,t),this},r.cleanRaws=function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between},r.clone=function(t){t===void 0&&(t={});var n=Eo(this);for(var o in t)n[o]=t[o];return n},r.cloneAfter=function(t){t===void 0&&(t={});var n=this.clone(t);return this.parent.insertAfter(this,n),n},r.cloneBefore=function(t){t===void 0&&(t={});var n=this.clone(t);return this.parent.insertBefore(this,n),n},r.error=function(t,n){if(n===void 0&&(n={}),this.source){var o=this.rangeBy(n),s=o.end,a=o.start;return this.source.input.error(t,{column:a.column,line:a.line},{column:s.column,line:s.line},n)}return new xp(t)},r.getProxyProcessor=function(){return{get:function(n,o){return o==="proxyOf"?n:o==="root"?function(){return n.root().toProxy()}:n[o]},set:function(n,o,s){return n[o]===s||(n[o]=s,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&n.markDirty()),!0}}},r.markDirty=function(){if(this[ln]){this[ln]=!1;for(var t=this;t=t.parent;)t[ln]=!1}},r.next=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}},r.positionBy=function(t,n){var o=this.source.start;if(t.index)o=this.positionInside(t.index,n);else if(t.word){n=this.toString();var s=n.indexOf(t.word);s!==-1&&(o=this.positionInside(s,n))}return o},r.positionInside=function(t,n){for(var o=n||this.toString(),s=this.source.start.column,a=this.source.start.line,u=0;u<t;u++)o[u]===`
|
|
18
|
+
`?(s=1,a+=1):s+=1;return{column:s,line:a}},r.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},r.rangeBy=function(t){var n={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){var s=this.toString(),a=s.indexOf(t.word);a!==-1&&(n=this.positionInside(a,s),o=this.positionInside(a+t.word.length,s))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?o={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?o=this.positionInside(t.endIndex):t.index&&(o=this.positionInside(t.index+1));return(o.line<n.line||o.line===n.line&&o.column<=n.column)&&(o={column:n.column+1,line:n.line}),{end:o,start:n}},r.raw=function(t,n){var o=new Rp;return o.raw(this,t,n)},r.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},r.replaceWith=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];if(this.parent){for(var s=this,a=!1,u=O(n),c;!(c=u()).done;){var l=c.value;l===this?a=!0:a?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l)}a||this.remove()}return this},r.root=function(){for(var t=this;t.parent&&t.parent.type!=="document";)t=t.parent;return t},r.toJSON=function(t,n){var o={},s=n==null;n=n||new Map;var a=0;for(var u in this)if(Object.prototype.hasOwnProperty.call(this,u)&&!(u==="parent"||u==="proxyCache")){var c=this[u];if(Array.isArray(c))o[u]=c.map(function(f){return(typeof f>"u"?"undefined":q(f))==="object"&&f.toJSON?f.toJSON(null,n):f});else if((typeof c>"u"?"undefined":q(c))==="object"&&c.toJSON)o[u]=c.toJSON(null,n);else if(u==="source"){var l=n.get(c.input);l==null&&(l=a,n.set(c.input,a),a++),o[u]={end:c.end,inputId:l,start:c.start}}else o[u]=c}return s&&(o.inputs=[].concat(n.keys()).map(function(f){return f.toJSON()})),o},r.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},r.toString=function(t){t===void 0&&(t=Ap),t.stringify&&(t=t.stringify);var n="";return t(this,function(o){n+=o}),n},r.warn=function(t,n,o){var s={node:this};for(var a in o)s[a]=o[a];return t.warn(n,s)},be(e,[{key:"proxyOf",get:function(){return this}}]),e}(),Ei=ko;ko.default=ko;var Mp=Ei,Oo=function(e){Ce(r,e);function r(i){var t;return i&&typeof i.value<"u"&&typeof i.value!="string"&&(i=Y({},i,{value:String(i.value)})),t=e.call(this,i)||this,t.type="decl",t}return be(r,[{key:"variable",get:function(){return this.prop.startsWith("--")||this.prop[0]==="$"}}]),r}(Mp),ki=Oo;Oo.default=Oo;var Tp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Pp=function(e){e===void 0&&(e=21);for(var r="",i=e;i--;)r+=Tp[Math.random()*64|0];return r},Dp={nanoid:Pp},Da=he.SourceMapConsumer,Na=he.SourceMapGenerator,Np=he.existsSync,Lp=he.readFileSync,Ji=he.dirname,Fp=he.join;function Up(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var xo=function(){function e(i,t){if(t.map!==!1){this.loadAnnotation(i),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ji(this.mapFile)),o&&(this.text=o)}}var r=e.prototype;return r.consumer=function(){return this.consumerCache||(this.consumerCache=new Da(this.text)),this.consumerCache},r.decodeInline=function(t){var n=/^data:application\/json;charset=utf-?8;base64,/,o=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,a=/^data:application\/json,/;if(s.test(t)||a.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||o.test(t))return Up(t.substr(RegExp.lastMatch.length));var u=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+u)},r.getAnnotationURL=function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},r.isMap=function(t){return(typeof t>"u"?"undefined":q(t))!=="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)},r.loadAnnotation=function(t){var n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(n){var o=t.lastIndexOf(n.pop()),s=t.indexOf("*/",o);o>-1&&s>-1&&(this.annotation=this.getAnnotationURL(t.substring(o,s)))}},r.loadFile=function(t){if(this.root=Ji(t),Np(t))return this.mapFile=t,Lp(t,"utf-8").toString().trim()},r.loadMap=function(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){var o=n(t);if(o){var s=this.loadFile(o);if(!s)throw new Error("Unable to load previous source map: "+o.toString());return s}}else{if(F(n,Da))return Na.fromSourceMap(n).toString();if(F(n,Na))return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var a=this.annotation;return t&&(a=Fp(Ji(t),a)),this.loadFile(a)}}},r.startWith=function(t,n){return t?t.substr(0,n.length)===n:!1},r.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),Ic=xo;xo.default=xo;var $p=he.SourceMapConsumer,zp=he.SourceMapGenerator,La=he.fileURLToPath,fn=he.pathToFileURL,Ro=he.isAbsolute,Ao=he.resolve,Bp=Dp.nanoid,Xi=he,Fa=Es,qp=Ic,Zi=Symbol("fromOffsetCache"),Vp=!!($p&&zp),Ua=!!(Ao&&Ro),ei=function(){function e(i,t){if(t===void 0&&(t={}),i===null||typeof i>"u"||(typeof i>"u"?"undefined":q(i))==="object"&&!i.toString)throw new Error("PostCSS received "+i+" instead of CSS string");if(this.css=i.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ua||/^\w+:\/\//.test(t.from)||Ro(t.from)?this.file=t.from:this.file=Ao(t.from)),Ua&&Vp){var n=new qp(this.css,t);if(n.text){this.map=n;var o=n.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+Bp(6)+">"),this.map&&(this.map.file=this.from)}var r=e.prototype;return r.error=function(t,n,o,s){s===void 0&&(s={});var a,u,c;if(n&&(typeof n>"u"?"undefined":q(n))==="object"){var l=n,f=o;if(typeof l.offset=="number"){var p=this.fromOffset(l.offset);n=p.line,o=p.col}else n=l.line,o=l.column;if(typeof f.offset=="number"){var g=this.fromOffset(f.offset);u=g.line,c=g.col}else u=f.line,c=f.column}else if(!o){var d=this.fromOffset(n);n=d.line,o=d.col}var _=this.origin(n,o,u,c);return _?a=new Fa(t,_.endLine===void 0?_.line:{column:_.column,line:_.line},_.endLine===void 0?_.column:{column:_.endColumn,line:_.endLine},_.source,_.file,s.plugin):a=new Fa(t,u===void 0?n:{column:o,line:n},u===void 0?o:{column:c,line:u},this.css,this.file,s.plugin),a.input={column:o,endColumn:c,endLine:u,line:n,source:this.css},this.file&&(fn&&(a.input.url=fn(this.file).toString()),a.input.file=this.file),a},r.fromOffset=function(t){var n,o;if(this[Zi])o=this[Zi];else{var s=this.css.split(`
|
|
19
|
+
`);o=new Array(s.length);for(var a=0,u=0,c=s.length;u<c;u++)o[u]=a,a+=s[u].length+1;this[Zi]=o}n=o[o.length-1];var l=0;if(t>=n)l=o.length-1;else for(var f=o.length-2,p;l<f;)if(p=l+(f-l>>1),t<o[p])f=p-1;else if(t>=o[p+1])l=p+1;else{l=p;break}return{col:t-o[l]+1,line:l+1}},r.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:Ao(this.map.consumer().sourceRoot||this.map.root||".",t)},r.origin=function(t,n,o,s){if(!this.map)return!1;var a=this.map.consumer(),u=a.originalPositionFor({column:n,line:t});if(!u.source)return!1;var c;typeof o=="number"&&(c=a.originalPositionFor({column:s,line:o}));var l;Ro(u.source)?l=fn(u.source):l=new URL(u.source,this.map.consumer().sourceRoot||fn(this.map.mapFile));var f={column:u.column,endColumn:c&&c.column,endLine:c&&c.line,line:u.line,url:l.toString()};if(l.protocol==="file:")if(La)f.file=La(l);else throw new Error("file: protocol is not available in this PostCSS build");var p=a.sourceContentFor(u.source);return p&&(f.source=p),f},r.toJSON=function(){for(var t={},n=0,o=["hasBOM","css","file","id"];n<o.length;n++){var s=o[n];this[s]!=null&&(t[s]=this[s])}return this.map&&(t.map=Y({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t},be(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),Oi=ei;ei.default=ei;Xi&&Xi.registerInput&&Xi.registerInput(ei);var Ec=he.SourceMapConsumer,Un=he.SourceMapGenerator,$n=he.dirname,kc=he.relative,Oc=he.resolve,xc=he.sep,$a=he.pathToFileURL,Wp=Oi,Gp=!!(Ec&&Un),jp=!!($n&&Oc&&kc&&xc),Hp=function(){function e(i,t,n,o){this.stringify=i,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var r=e.prototype;return r.addAnnotation=function(){var t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";var n=`
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
21
|
`)&&(n=`\r
|
|
22
|
-
`),this.css+=n+"/*# sourceMappingURL="+t+" */"},r.applyPrevMaps=function(){for(var t=O(this.previous()),n;!(n=t()).done;){var o=n.value,s=this.toUrl(this.path(o.file)),a=o.root
|
|
23
|
-
`),o=l.length-c):o+=l.length,f&&p!=="start"){var g=f.parent||{raws:{}},d=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!d||f!==g.last||g.raws.semicolon)&&(f.source&&f.source.end?(a.source=t.sourcePath(f),a.original.line=f.source.end.line,a.original.column=f.source.end.column-1,a.generated.line=n,a.generated.column=o-2,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=o-1,t.map.addMapping(a)))}})},r.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(t){return t.annotation}):!0},r.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(function(n){return n.inline}):!0},r.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},r.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(t){return t.withContent()}):!0},r.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},r.path=function(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;var n=this.memoizedPaths.get(t);if(n)return n;var o=this.opts.to?zn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(o=zn(xc(o,this.mapOpts.annotation)));var s=Oc(o,t);return this.memoizedPaths.set(t,s),s},r.previous=function(){var t=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(o){if(o.source&&o.source.input.map){var s=o.source.input.map;t.previousMaps.includes(s)||t.previousMaps.push(s)}});else{var n=new Gp(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps},r.setSourcesContent=function(){var t=this,n={};if(this.root)this.root.walk(function(s){if(s.source){var a=s.source.input.from;if(a&&!n[a]){n[a]=!0;var u=t.usesFileUrls?t.toFileUrl(a):t.toUrl(t.path(a));t.map.setSourceContent(u,s.source.input.css)}}});else if(this.css){var o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}},r.sourcePath=function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))},r.toBase64=function(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},r.toFileUrl=function(t){var n=this.memoizedFileURLs.get(t);if(n)return n;if($a){var o=$a(t).toString();return this.memoizedFileURLs.set(t,o),o}else throw new Error("`map.absolute` option is not available in this PostCSS build")},r.toUrl=function(t){var n=this.memoizedURLs.get(t);if(n)return n;Rc==="\\"&&(t=t.replace(/\\/g,"/"));var o=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,o),o},e}(),Ac=Yp,Kp=Ei,Mo=function(e){Ce(r,e);function r(i){var t;return t=e.call(this,i)||this,t.type="comment",t}return r}(Kp),xi=Mo;Mo.default=Mo;var Mc=gt.isClean,Tc=gt.my,Pc=ki,Dc=xi,Jp=Ei,Nc,ks,Os,Lc;function Fc(e){return e.map(function(r){return r.nodes&&(r.nodes=Fc(r.nodes)),delete r.source,r})}function Uc(e){if(e[Mc]=!1,e.proxyOf.nodes)for(var r=O(e.proxyOf.nodes),i;!(i=r()).done;){var t=i.value;Uc(t)}}var Qe=function(e){Ce(r,e);function r(){return e.apply(this,arguments)||this}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];for(var a=O(o),u;!(u=a()).done;)for(var c=u.value,l=this.normalize(c,this.last),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.push(g)}return this.markDirty(),this},i.cleanRaws=function(n){if(e.prototype.cleanRaws.call(this,n),this.nodes)for(var o=O(this.nodes),s;!(s=o()).done;){var a=s.value;a.cleanRaws(n)}},i.each=function(n){if(this.proxyOf.nodes){for(var o=this.getIterator(),s,a;this.indexes[o]<this.proxyOf.nodes.length&&(s=this.indexes[o],a=n(this.proxyOf.nodes[s],s),a!==!1);)this.indexes[o]+=1;return delete this.indexes[o],a}},i.every=function(n){return this.nodes.every(n)},i.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var n=this.lastEach;return this.indexes[n]=0,n},i.getProxyProcessor=function(){return{get:function(o,s){return s==="proxyOf"?o:o[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l;return(l=o)[s].apply(l,[].concat(u.map(function(f){return typeof f=="function"?function(p,g){return f(p.toProxy(),g)}:f})))}:s==="every"||s==="some"?function(a){return o[s](function(u){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];return a.apply(void 0,[].concat([u.toProxy()],l))})}:s==="root"?function(){return o.root().toProxy()}:s==="nodes"?o.nodes.map(function(a){return a.toProxy()}):s==="first"||s==="last"?o[s].toProxy():o[s]:o[s]},set:function(o,s,a){return o[s]===a||(o[s]=a,(s==="name"||s==="params"||s==="selector")&&o.markDirty()),!0}}},i.index=function(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))},i.insertAfter=function(n,o){var s=this.index(n),a=this.normalize(o,this.proxyOf.nodes[s]).reverse();s=this.index(n);for(var u=O(a),c;!(c=u()).done;){var l=c.value;this.proxyOf.nodes.splice(s+1,0,l)}var f;for(var p in this.indexes)f=this.indexes[p],s<f&&(this.indexes[p]=f+a.length);return this.markDirty(),this},i.insertBefore=function(n,o){var s=this.index(n),a=s===0?"prepend":!1,u=this.normalize(o,this.proxyOf.nodes[s],a).reverse();s=this.index(n);for(var c=O(u),l;!(l=c()).done;){var f=l.value;this.proxyOf.nodes.splice(s,0,f)}var p;for(var g in this.indexes)p=this.indexes[g],s<=p&&(this.indexes[g]=p+u.length);return this.markDirty(),this},i.normalize=function(n,o){var s=this;if(typeof n=="string")n=Fc(Nc(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(var a=O(n),u;!(u=a()).done;){var c=u.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(var l=O(n),f;!(f=l()).done;){var p=f.value;p.parent&&p.parent.removeChild(p,"ignore")}}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new Pc(n)]}else if(n.selector)n=[new ks(n)];else if(n.name)n=[new Os(n)];else if(n.text)n=[new Dc(n)];else throw new Error("Unknown node type in node creation");var g=n.map(function(d){return d[Tc]||r.rebuild(d),d=d.proxyOf,d.parent&&d.parent.removeChild(d),d[Mc]&&Uc(d),typeof d.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(d.raws.before=o.raws.before.replace(/\S/g,"")),d.parent=s.proxyOf,d});return g},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];o=o.reverse();for(var a=O(o),u;!(u=a()).done;){for(var c=u.value,l=this.normalize(c,this.first,"prepend").reverse(),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.unshift(g)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+l.length}return this.markDirty(),this},i.push=function(n){return n.parent=this,this.proxyOf.nodes.push(n),this},i.removeAll=function(){for(var n=O(this.proxyOf.nodes),o;!(o=n()).done;){var s=o.value;s.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},i.removeChild=function(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);var o;for(var s in this.indexes)o=this.indexes[s],o>=n&&(this.indexes[s]=o-1);return this.markDirty(),this},i.replaceValues=function(n,o,s){return s||(s=o,o={}),this.walkDecls(function(a){o.props&&!o.props.includes(a.prop)||o.fast&&!a.value.includes(o.fast)||(a.value=a.value.replace(n,s))}),this.markDirty(),this},i.some=function(n){return this.nodes.some(n)},i.walk=function(n){return this.each(function(o,s){var a;try{a=n(o,s)}catch(u){throw o.addToError(u)}return a!==!1&&o.walk&&(a=o.walk(n)),a})},i.walkAtRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="atrule"&&n.test(s.name))return o(s,a)}):this.walk(function(s,a){if(s.type==="atrule"&&s.name===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="atrule")return o(s,a)}))},i.walkComments=function(n){return this.walk(function(o,s){if(o.type==="comment")return n(o,s)})},i.walkDecls=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="decl"&&n.test(s.prop))return o(s,a)}):this.walk(function(s,a){if(s.type==="decl"&&s.prop===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="decl")return o(s,a)}))},i.walkRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="rule"&&n.test(s.selector))return o(s,a)}):this.walk(function(s,a){if(s.type==="rule"&&s.selector===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="rule")return o(s,a)}))},be(r,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(Jp);Qe.registerParse=function(e){Nc=e};Qe.registerRule=function(e){ks=e};Qe.registerAtRule=function(e){Os=e};Qe.registerRoot=function(e){Lc=e};var Ft=Qe;Qe.default=Qe;Qe.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,Os.prototype):e.type==="rule"?Object.setPrototypeOf(e,ks.prototype):e.type==="decl"?Object.setPrototypeOf(e,Pc.prototype):e.type==="comment"?Object.setPrototypeOf(e,Dc.prototype):e.type==="root"&&Object.setPrototypeOf(e,Lc.prototype),e[Tc]=!0,e.nodes&&e.nodes.forEach(function(r){Qe.rebuild(r)})};var Xp=Ft,$c,zc,$r=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,Y({type:"document"},t))||this,n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.toResult=function(n){n===void 0&&(n={});var o=new $c(new zc,this,n);return o.stringify()},r}(Xp);$r.registerLazyResult=function(e){$c=e};$r.registerProcessor=function(e){zc=e};var xs=$r;$r.default=$r;var za={},Bc=function(r){za[r]||(za[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},To=function(){function e(i,t){if(t===void 0&&(t={}),this.type="warning",this.text=i,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var o in t)this[o]=t[o]}var r=e.prototype;return r.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),qc=To;To.default=To;var Zp=qc,Po=function(){function e(i,t,n){this.processor=i,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var r=e.prototype;return r.toString=function(){return this.css},r.warn=function(t,n){n===void 0&&(n={}),n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var o=new Zp(t,n);return this.messages.push(o),o},r.warnings=function(){return this.messages.filter(function(t){return t.type==="warning"})},be(e,[{key:"content",get:function(){return this.css}}]),e}(),Rs=Po;Po.default=Po;var Qi=39,Ba=34,pn=92,qa=47,dn=10,Sr=32,vn=12,gn=9,mn=13,Qp=91,ed=93,td=40,rd=41,nd=123,id=125,od=59,sd=42,ad=58,ud=64,yn=/[\t\n\f\r "#'()/;[\\\]{}]/g,_n=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cd=/.[\r\n"'(/\\]/,Va=/[\da-f]/i,ld=function(r,i){i===void 0&&(i={});var t=r.css.valueOf(),n=i.ignoreErrors,o,s,a,u,c,l,f,p,g,d,_=t.length,v=0,y=[],b=[];function S(){return v}function C(R){throw r.error("Unclosed "+R,v)}function I(){return b.length===0&&v>=_}function x(R){if(b.length)return b.pop();if(!(v>=_)){var P=R?R.ignoreUnclosed:!1;switch(o=t.charCodeAt(v),o){case dn:case Sr:case gn:case mn:case vn:{s=v;do s+=1,o=t.charCodeAt(s);while(o===Sr||o===dn||o===gn||o===mn||o===vn);d=["space",t.slice(v,s)],v=s-1;break}case Qp:case ed:case nd:case id:case ad:case od:case rd:{var H=String.fromCharCode(o);d=[H,H,v];break}case td:{if(p=y.length?y.pop()[1]:"",g=t.charCodeAt(v+1),p==="url"&&g!==Qi&&g!==Ba&&g!==Sr&&g!==dn&&g!==gn&&g!==vn&&g!==mn){s=v;do{if(l=!1,s=t.indexOf(")",s+1),s===-1)if(n||P){s=v;break}else C("bracket");for(f=s;t.charCodeAt(f-1)===pn;)f-=1,l=!l}while(l);d=["brackets",t.slice(v,s+1),v,s],v=s}else s=t.indexOf(")",v+1),u=t.slice(v,s+1),s===-1||cd.test(u)?d=["(","(",v]:(d=["brackets",u,v,s],v=s);break}case Qi:case Ba:{a=o===Qi?"'":'"',s=v;do{if(l=!1,s=t.indexOf(a,s+1),s===-1)if(n||P){s=v+1;break}else C("string");for(f=s;t.charCodeAt(f-1)===pn;)f-=1,l=!l}while(l);d=["string",t.slice(v,s+1),v,s],v=s;break}case ud:{yn.lastIndex=v+1,yn.test(t),yn.lastIndex===0?s=t.length-1:s=yn.lastIndex-2,d=["at-word",t.slice(v,s+1),v,s],v=s;break}case pn:{for(s=v,c=!0;t.charCodeAt(s+1)===pn;)s+=1,c=!c;if(o=t.charCodeAt(s+1),c&&o!==qa&&o!==Sr&&o!==dn&&o!==gn&&o!==mn&&o!==vn&&(s+=1,Va.test(t.charAt(s)))){for(;Va.test(t.charAt(s+1));)s+=1;t.charCodeAt(s+1)===Sr&&(s+=1)}d=["word",t.slice(v,s+1),v,s],v=s;break}default:{o===qa&&t.charCodeAt(v+1)===sd?(s=t.indexOf("*/",v+2)+1,s===0&&(n||P?s=t.length:C("comment")),d=["comment",t.slice(v,s+1),v,s],v=s):(_n.lastIndex=v+1,_n.test(t),_n.lastIndex===0?s=t.length-1:s=_n.lastIndex-2,d=["word",t.slice(v,s+1),v,s],y.push(d),v=s);break}}return v++,d}}function M(R){b.push(R)}return{back:M,endOfFile:I,nextToken:x,position:S}},Vc=Ft,ti=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="atrule",n}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.append).call.apply(a,[].concat([this],o))},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.prepend).call.apply(a,[].concat([this],o))},r}(Vc),As=ti;ti.default=ti;Vc.registerAtRule(ti);var Wc=Ft,Gc,jc,ir=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="root",n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.normalize=function(n,o,s){var a=e.prototype.normalize.call(this,n);if(o){if(s==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(var u=O(a),c;!(c=u()).done;){var l=c.value;l.raws.before=o.raws.before}}return a},i.removeChild=function(n,o){var s=this.index(n);return!o&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),e.prototype.removeChild.call(this,n)},i.toResult=function(n){n===void 0&&(n={});var o=new Gc(new jc,this,n);return o.stringify()},r}(Wc);ir.registerLazyResult=function(e){Gc=e};ir.registerProcessor=function(e){jc=e};var en=ir;ir.default=ir;Wc.registerRoot(ir);var zr={comma:function(r){return zr.split(r,[","],!0)},space:function(r){var i=[" ",`
|
|
24
|
-
`," "];return
|
|
22
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"},r.applyPrevMaps=function(){for(var t=O(this.previous()),n;!(n=t()).done;){var o=n.value,s=this.toUrl(this.path(o.file)),a=o.root||$n(o.file),u=void 0;this.mapOpts.sourcesContent===!1?(u=new Ec(o.text),u.sourcesContent&&(u.sourcesContent=null)):u=o.consumer(),this.map.applySourceMap(u,s,this.toUrl(this.path(a)))}},r.clearAnnotation=function(){if(this.mapOpts.annotation!==!1)if(this.root)for(var t,n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},r.generate=function(){if(this.clearAnnotation(),jp&&Gp&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(n){t+=n}),[t]},r.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Un.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Un({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},r.generateString=function(){var t=this;this.css="",this.map=new Un({file:this.outputFile(),ignoreInvalidMapping:!0});var n=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},u,c;this.stringify(this.root,function(l,f,p){if(t.css+=l,f&&p!=="end"&&(a.generated.line=n,a.generated.column=o-1,f.source&&f.source.start?(a.source=t.sourcePath(f),a.original.line=f.source.start.line,a.original.column=f.source.start.column-1,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,t.map.addMapping(a))),u=l.match(/\n/g),u?(n+=u.length,c=l.lastIndexOf(`
|
|
23
|
+
`),o=l.length-c):o+=l.length,f&&p!=="start"){var g=f.parent||{raws:{}},d=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!d||f!==g.last||g.raws.semicolon)&&(f.source&&f.source.end?(a.source=t.sourcePath(f),a.original.line=f.source.end.line,a.original.column=f.source.end.column-1,a.generated.line=n,a.generated.column=o-2,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=o-1,t.map.addMapping(a)))}})},r.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(t){return t.annotation}):!0},r.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(function(n){return n.inline}):!0},r.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},r.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(t){return t.withContent()}):!0},r.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},r.path=function(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;var n=this.memoizedPaths.get(t);if(n)return n;var o=this.opts.to?$n(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(o=$n(Oc(o,this.mapOpts.annotation)));var s=kc(o,t);return this.memoizedPaths.set(t,s),s},r.previous=function(){var t=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(o){if(o.source&&o.source.input.map){var s=o.source.input.map;t.previousMaps.includes(s)||t.previousMaps.push(s)}});else{var n=new Wp(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps},r.setSourcesContent=function(){var t=this,n={};if(this.root)this.root.walk(function(s){if(s.source){var a=s.source.input.from;if(a&&!n[a]){n[a]=!0;var u=t.usesFileUrls?t.toFileUrl(a):t.toUrl(t.path(a));t.map.setSourceContent(u,s.source.input.css)}}});else if(this.css){var o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}},r.sourcePath=function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))},r.toBase64=function(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},r.toFileUrl=function(t){var n=this.memoizedFileURLs.get(t);if(n)return n;if($a){var o=$a(t).toString();return this.memoizedFileURLs.set(t,o),o}else throw new Error("`map.absolute` option is not available in this PostCSS build")},r.toUrl=function(t){var n=this.memoizedURLs.get(t);if(n)return n;xc==="\\"&&(t=t.replace(/\\/g,"/"));var o=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,o),o},e}(),Rc=Hp,Yp=Ei,Mo=function(e){Ce(r,e);function r(i){var t;return t=e.call(this,i)||this,t.type="comment",t}return r}(Yp),xi=Mo;Mo.default=Mo;var Ac=gt.isClean,Mc=gt.my,Tc=ki,Pc=xi,Kp=Ei,Dc,ks,Os,Nc;function Lc(e){return e.map(function(r){return r.nodes&&(r.nodes=Lc(r.nodes)),delete r.source,r})}function Fc(e){if(e[Ac]=!1,e.proxyOf.nodes)for(var r=O(e.proxyOf.nodes),i;!(i=r()).done;){var t=i.value;Fc(t)}}var Qe=function(e){Ce(r,e);function r(){return e.apply(this,arguments)||this}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];for(var a=O(o),u;!(u=a()).done;)for(var c=u.value,l=this.normalize(c,this.last),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.push(g)}return this.markDirty(),this},i.cleanRaws=function(n){if(e.prototype.cleanRaws.call(this,n),this.nodes)for(var o=O(this.nodes),s;!(s=o()).done;){var a=s.value;a.cleanRaws(n)}},i.each=function(n){if(this.proxyOf.nodes){for(var o=this.getIterator(),s,a;this.indexes[o]<this.proxyOf.nodes.length&&(s=this.indexes[o],a=n(this.proxyOf.nodes[s],s),a!==!1);)this.indexes[o]+=1;return delete this.indexes[o],a}},i.every=function(n){return this.nodes.every(n)},i.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var n=this.lastEach;return this.indexes[n]=0,n},i.getProxyProcessor=function(){return{get:function(o,s){return s==="proxyOf"?o:o[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l;return(l=o)[s].apply(l,[].concat(u.map(function(f){return typeof f=="function"?function(p,g){return f(p.toProxy(),g)}:f})))}:s==="every"||s==="some"?function(a){return o[s](function(u){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];return a.apply(void 0,[].concat([u.toProxy()],l))})}:s==="root"?function(){return o.root().toProxy()}:s==="nodes"?o.nodes.map(function(a){return a.toProxy()}):s==="first"||s==="last"?o[s].toProxy():o[s]:o[s]},set:function(o,s,a){return o[s]===a||(o[s]=a,(s==="name"||s==="params"||s==="selector")&&o.markDirty()),!0}}},i.index=function(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))},i.insertAfter=function(n,o){var s=this.index(n),a=this.normalize(o,this.proxyOf.nodes[s]).reverse();s=this.index(n);for(var u=O(a),c;!(c=u()).done;){var l=c.value;this.proxyOf.nodes.splice(s+1,0,l)}var f;for(var p in this.indexes)f=this.indexes[p],s<f&&(this.indexes[p]=f+a.length);return this.markDirty(),this},i.insertBefore=function(n,o){var s=this.index(n),a=s===0?"prepend":!1,u=this.normalize(o,this.proxyOf.nodes[s],a).reverse();s=this.index(n);for(var c=O(u),l;!(l=c()).done;){var f=l.value;this.proxyOf.nodes.splice(s,0,f)}var p;for(var g in this.indexes)p=this.indexes[g],s<=p&&(this.indexes[g]=p+u.length);return this.markDirty(),this},i.normalize=function(n,o){var s=this;if(typeof n=="string")n=Lc(Dc(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(var a=O(n),u;!(u=a()).done;){var c=u.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(var l=O(n),f;!(f=l()).done;){var p=f.value;p.parent&&p.parent.removeChild(p,"ignore")}}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new Tc(n)]}else if(n.selector)n=[new ks(n)];else if(n.name)n=[new Os(n)];else if(n.text)n=[new Pc(n)];else throw new Error("Unknown node type in node creation");var g=n.map(function(d){return d[Mc]||r.rebuild(d),d=d.proxyOf,d.parent&&d.parent.removeChild(d),d[Ac]&&Fc(d),typeof d.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(d.raws.before=o.raws.before.replace(/\S/g,"")),d.parent=s.proxyOf,d});return g},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];o=o.reverse();for(var a=O(o),u;!(u=a()).done;){for(var c=u.value,l=this.normalize(c,this.first,"prepend").reverse(),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.unshift(g)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+l.length}return this.markDirty(),this},i.push=function(n){return n.parent=this,this.proxyOf.nodes.push(n),this},i.removeAll=function(){for(var n=O(this.proxyOf.nodes),o;!(o=n()).done;){var s=o.value;s.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},i.removeChild=function(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);var o;for(var s in this.indexes)o=this.indexes[s],o>=n&&(this.indexes[s]=o-1);return this.markDirty(),this},i.replaceValues=function(n,o,s){return s||(s=o,o={}),this.walkDecls(function(a){o.props&&!o.props.includes(a.prop)||o.fast&&!a.value.includes(o.fast)||(a.value=a.value.replace(n,s))}),this.markDirty(),this},i.some=function(n){return this.nodes.some(n)},i.walk=function(n){return this.each(function(o,s){var a;try{a=n(o,s)}catch(u){throw o.addToError(u)}return a!==!1&&o.walk&&(a=o.walk(n)),a})},i.walkAtRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="atrule"&&n.test(s.name))return o(s,a)}):this.walk(function(s,a){if(s.type==="atrule"&&s.name===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="atrule")return o(s,a)}))},i.walkComments=function(n){return this.walk(function(o,s){if(o.type==="comment")return n(o,s)})},i.walkDecls=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="decl"&&n.test(s.prop))return o(s,a)}):this.walk(function(s,a){if(s.type==="decl"&&s.prop===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="decl")return o(s,a)}))},i.walkRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="rule"&&n.test(s.selector))return o(s,a)}):this.walk(function(s,a){if(s.type==="rule"&&s.selector===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="rule")return o(s,a)}))},be(r,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(Kp);Qe.registerParse=function(e){Dc=e};Qe.registerRule=function(e){ks=e};Qe.registerAtRule=function(e){Os=e};Qe.registerRoot=function(e){Nc=e};var Ft=Qe;Qe.default=Qe;Qe.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,Os.prototype):e.type==="rule"?Object.setPrototypeOf(e,ks.prototype):e.type==="decl"?Object.setPrototypeOf(e,Tc.prototype):e.type==="comment"?Object.setPrototypeOf(e,Pc.prototype):e.type==="root"&&Object.setPrototypeOf(e,Nc.prototype),e[Mc]=!0,e.nodes&&e.nodes.forEach(function(r){Qe.rebuild(r)})};var Jp=Ft,Uc,$c,Ur=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,Y({type:"document"},t))||this,n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.toResult=function(n){n===void 0&&(n={});var o=new Uc(new $c,this,n);return o.stringify()},r}(Jp);Ur.registerLazyResult=function(e){Uc=e};Ur.registerProcessor=function(e){$c=e};var xs=Ur;Ur.default=Ur;var za={},zc=function(r){za[r]||(za[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},To=function(){function e(i,t){if(t===void 0&&(t={}),this.type="warning",this.text=i,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var o in t)this[o]=t[o]}var r=e.prototype;return r.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),Bc=To;To.default=To;var Xp=Bc,Po=function(){function e(i,t,n){this.processor=i,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var r=e.prototype;return r.toString=function(){return this.css},r.warn=function(t,n){n===void 0&&(n={}),n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var o=new Xp(t,n);return this.messages.push(o),o},r.warnings=function(){return this.messages.filter(function(t){return t.type==="warning"})},be(e,[{key:"content",get:function(){return this.css}}]),e}(),Rs=Po;Po.default=Po;var Qi=39,Ba=34,hn=92,qa=47,pn=10,wr=32,dn=12,vn=9,gn=13,Zp=91,Qp=93,ed=40,td=41,rd=123,nd=125,id=59,od=42,sd=58,ad=64,mn=/[\t\n\f\r "#'()/;[\\\]{}]/g,yn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ud=/.[\r\n"'(/\\]/,Va=/[\da-f]/i,cd=function(r,i){i===void 0&&(i={});var t=r.css.valueOf(),n=i.ignoreErrors,o,s,a,u,c,l,f,p,g,d,_=t.length,v=0,y=[],b=[];function S(){return v}function C(R){throw r.error("Unclosed "+R,v)}function I(){return b.length===0&&v>=_}function x(R){if(b.length)return b.pop();if(!(v>=_)){var P=R?R.ignoreUnclosed:!1;switch(o=t.charCodeAt(v),o){case pn:case wr:case vn:case gn:case dn:{s=v;do s+=1,o=t.charCodeAt(s);while(o===wr||o===pn||o===vn||o===gn||o===dn);d=["space",t.slice(v,s)],v=s-1;break}case Zp:case Qp:case rd:case nd:case sd:case id:case td:{var H=String.fromCharCode(o);d=[H,H,v];break}case ed:{if(p=y.length?y.pop()[1]:"",g=t.charCodeAt(v+1),p==="url"&&g!==Qi&&g!==Ba&&g!==wr&&g!==pn&&g!==vn&&g!==dn&&g!==gn){s=v;do{if(l=!1,s=t.indexOf(")",s+1),s===-1)if(n||P){s=v;break}else C("bracket");for(f=s;t.charCodeAt(f-1)===hn;)f-=1,l=!l}while(l);d=["brackets",t.slice(v,s+1),v,s],v=s}else s=t.indexOf(")",v+1),u=t.slice(v,s+1),s===-1||ud.test(u)?d=["(","(",v]:(d=["brackets",u,v,s],v=s);break}case Qi:case Ba:{a=o===Qi?"'":'"',s=v;do{if(l=!1,s=t.indexOf(a,s+1),s===-1)if(n||P){s=v+1;break}else C("string");for(f=s;t.charCodeAt(f-1)===hn;)f-=1,l=!l}while(l);d=["string",t.slice(v,s+1),v,s],v=s;break}case ad:{mn.lastIndex=v+1,mn.test(t),mn.lastIndex===0?s=t.length-1:s=mn.lastIndex-2,d=["at-word",t.slice(v,s+1),v,s],v=s;break}case hn:{for(s=v,c=!0;t.charCodeAt(s+1)===hn;)s+=1,c=!c;if(o=t.charCodeAt(s+1),c&&o!==qa&&o!==wr&&o!==pn&&o!==vn&&o!==gn&&o!==dn&&(s+=1,Va.test(t.charAt(s)))){for(;Va.test(t.charAt(s+1));)s+=1;t.charCodeAt(s+1)===wr&&(s+=1)}d=["word",t.slice(v,s+1),v,s],v=s;break}default:{o===qa&&t.charCodeAt(v+1)===od?(s=t.indexOf("*/",v+2)+1,s===0&&(n||P?s=t.length:C("comment")),d=["comment",t.slice(v,s+1),v,s],v=s):(yn.lastIndex=v+1,yn.test(t),yn.lastIndex===0?s=t.length-1:s=yn.lastIndex-2,d=["word",t.slice(v,s+1),v,s],y.push(d),v=s);break}}return v++,d}}function M(R){b.push(R)}return{back:M,endOfFile:I,nextToken:x,position:S}},qc=Ft,ti=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="atrule",n}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.append).call.apply(a,[].concat([this],o))},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.prepend).call.apply(a,[].concat([this],o))},r}(qc),As=ti;ti.default=ti;qc.registerAtRule(ti);var Vc=Ft,Wc,Gc,nr=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="root",n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.normalize=function(n,o,s){var a=e.prototype.normalize.call(this,n);if(o){if(s==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(var u=O(a),c;!(c=u()).done;){var l=c.value;l.raws.before=o.raws.before}}return a},i.removeChild=function(n,o){var s=this.index(n);return!o&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),e.prototype.removeChild.call(this,n)},i.toResult=function(n){n===void 0&&(n={});var o=new Wc(new Gc,this,n);return o.stringify()},r}(Vc);nr.registerLazyResult=function(e){Wc=e};nr.registerProcessor=function(e){Gc=e};var Qr=nr;nr.default=nr;Vc.registerRoot(nr);var $r={comma:function(r){return $r.split(r,[","],!0)},space:function(r){var i=[" ",`
|
|
24
|
+
`," "];return $r.split(r,i)},split:function(r,i,t){for(var n=[],o="",s=!1,a=0,u=!1,c="",l=!1,f=O(r),p;!(p=f()).done;){var g=p.value;l?l=!1:g==="\\"?l=!0:u?g===c&&(u=!1):g==='"'||g==="'"?(u=!0,c=g):g==="("?a+=1:g===")"?a>0&&(a-=1):a===0&&i.includes(g)&&(s=!0),s?(o!==""&&n.push(o.trim()),o="",s=!1):o+=g}return(t||o!=="")&&n.push(o.trim()),n}},jc=$r;$r.default=$r;var Hc=Ft,ld=jc,ri=function(e){Ce(r,e);function r(i){var t;return t=e.call(this,i)||this,t.type="rule",t.nodes||(t.nodes=[]),t}return be(r,[{key:"selectors",get:function(){return ld.comma(this.selector)},set:function(t){var n=this.selector?this.selector.match(/,\s*/):null,o=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(o)}}]),r}(Hc),Ms=ri;ri.default=ri;Hc.registerRule(ri);var fd=ki,hd=cd,pd=xi,dd=As,vd=Qr,Wa=Ms,Ga={empty:!0,space:!0};function gd(e){for(var r=e.length-1;r>=0;r--){var i=e[r],t=i[3]||i[2];if(t)return t}}var md=function(){function e(i){this.input=i,this.root=new vd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}var r=e.prototype;return r.atrule=function(t){var n=new dd;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);for(var o,s,a,u=!1,c=!1,l=[],f=[];!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),o=t[0],o==="("||o==="["?f.push(o==="("?")":"]"):o==="{"&&f.length>0?f.push("}"):o===f[f.length-1]&&f.pop(),f.length===0)if(o===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){c=!0;break}else if(o==="}"){if(l.length>0){for(a=l.length-1,s=l[a];s&&s[0]==="space";)s=l[--a];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(t);break}else l.push(t);else l.push(t);if(this.tokenizer.endOfFile()){u=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(n.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(n,"params",l),u&&(t=l[l.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)},r.checkMissedSemicolon=function(t){var n=this.colon(t);if(n!==!1){for(var o=0,s,a=n-1;a>=0&&(s=t[a],!(s[0]!=="space"&&(o+=1,o===2)));a--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}},r.colon=function(t){for(var n=0,o,s,a,u=O(t.entries()),c;!(c=u()).done;){var l=c.value,f=l[0],p=l[1];if(o=p,s=o[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!a)this.doubleColon(o);else{if(a[0]==="word"&&a[1]==="progid")continue;return f}a=o}return!1},r.comment=function(t){var n=new pd;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;var o=t[1].slice(2,-2);if(/^\s*$/.test(o))n.text="",n.raws.left=o,n.raws.right="";else{var s=o.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}},r.createTokenizer=function(){this.tokenizer=hd(this.input)},r.decl=function(t,n){var o=new fd;this.init(o,t[0][2]);var s=t[t.length-1];for(s[0]===";"&&(this.semicolon=!0,t.pop()),o.source.end=this.getPosition(s[3]||s[2]||gd(t)),o.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),o.raws.before+=t.shift()[1];for(o.source.start=this.getPosition(t[0][2]),o.prop="";t.length;){var a=t[0][0];if(a===":"||a==="space"||a==="comment")break;o.prop+=t.shift()[1]}o.raws.between="";for(var u;t.length;)if(u=t.shift(),u[0]===":"){o.raws.between+=u[1];break}else u[0]==="word"&&/\w/.test(u[1])&&this.unknownWord([u]),o.raws.between+=u[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));for(var c=[],l;t.length&&(l=t[0][0],!(l!=="space"&&l!=="comment"));)c.push(t.shift());this.precheckMissedSemicolon(t);for(var f=t.length-1;f>=0;f--){if(u=t[f],u[1].toLowerCase()==="!important"){o.important=!0;var p=this.stringFrom(t,f);p=this.spacesFromEnd(t)+p,p!==" !important"&&(o.raws.important=p);break}else if(u[1].toLowerCase()==="important"){for(var g=t.slice(0),d="",_=f;_>0;_--){var v=g[_][0];if(d.trim().indexOf("!")===0&&v!=="space")break;d=g.pop()[1]+d}d.trim().indexOf("!")===0&&(o.important=!0,o.raws.important=d,t=g)}if(u[0]!=="space"&&u[0]!=="comment")break}var y=t.some(function(b){return b[0]!=="space"&&b[0]!=="comment"});y&&(o.raws.between+=c.map(function(b){return b[1]}).join(""),c=[]),this.raw(o,"value",c.concat(t),n),o.value.includes(":")&&!n&&this.checkMissedSemicolon(t)},r.doubleColon=function(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})},r.emptyRule=function(t){var n=new Wa;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n},r.end=function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)},r.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},r.freeSemicolon=function(t){if(this.spaces+=t[1],this.current.nodes){var n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}},r.getPosition=function(t){var n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}},r.init=function(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)},r.other=function(t){for(var n=!1,o=null,s=!1,a=null,u=[],c=t[1].startsWith("--"),l=[],f=t;f;){if(o=f[0],l.push(f),o==="("||o==="[")a||(a=f),u.push(o==="("?")":"]");else if(c&&s&&o==="{")a||(a=f),u.push("}");else if(u.length===0)if(o===";")if(s){this.decl(l,c);return}else break;else if(o==="{"){this.rule(l);return}else if(o==="}"){this.tokenizer.back(l.pop()),n=!0;break}else o===":"&&(s=!0);else o===u[u.length-1]&&(u.pop(),u.length===0&&(a=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),u.length>0&&this.unclosedBracket(a),n&&s){if(!c)for(;l.length&&(f=l[l.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,c)}else this.unknownWord(l)},r.parse=function(){for(var t;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()},r.precheckMissedSemicolon=function(){},r.raw=function(t,n,o,s){for(var a,u,c=o.length,l="",f=!0,p,g,d=0;d<c;d+=1)a=o[d],u=a[0],u==="space"&&d===c-1&&!s?f=!1:u==="comment"?(g=o[d-1]?o[d-1][0]:"empty",p=o[d+1]?o[d+1][0]:"empty",!Ga[g]&&!Ga[p]?l.slice(-1)===","?f=!1:l+=a[1]:f=!1):l+=a[1];if(!f){var _=o.reduce(function(v,y){return v+y[1]},"");t.raws[n]={raw:_,value:l}}t[n]=l},r.rule=function(t){t.pop();var n=new Wa;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n},r.spacesAndCommentsFromEnd=function(t){for(var n,o="";t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)o=t.pop()[1]+o;return o},r.spacesAndCommentsFromStart=function(t){for(var n,o="";t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)o+=t.shift()[1];return o},r.spacesFromEnd=function(t){for(var n,o="";t.length&&(n=t[t.length-1][0],n==="space");)o=t.pop()[1]+o;return o},r.stringFrom=function(t,n){for(var o="",s=n;s<t.length;s++)o+=t[s][1];return t.splice(n,t.length-n),o},r.unclosedBlock=function(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)},r.unclosedBracket=function(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})},r.unexpectedClose=function(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})},r.unknownWord=function(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})},r.unnamedAtrule=function(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})},e}(),yd=md,_d=Ft,bd=yd,wd=Oi;function ni(e,r){var i=new wd(e,r),t=new bd(i);try{t.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&r&&r.from&&(/\.scss$/i.test(r.from)?n.message+=`
|
|
25
25
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(r.from)?n.message+=`
|
|
26
26
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(r.from)&&(n.message+=`
|
|
27
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return t.root}var Ts=ni;ni.default=ni;bd.registerParse(ni);var Ve=gt.isClean,Cd=gt.my,Id=Ac,Ed=Ii,kd=Ft,Od=xs,xd=Bc,ja=Rs,Rd=Ts,Ad=en,Md={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Td={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Pd={Once:!0,postcssPlugin:!0,prepare:!0},or=0;function Cr(e){return(typeof e>"u"?"undefined":q(e))==="object"&&typeof e.then=="function"}function Kc(e){var r=!1,i=Md[e.type];return e.type==="decl"?r=e.prop.toLowerCase():e.type==="atrule"&&(r=e.name.toLowerCase()),r&&e.append?[i,i+"-"+r,or,i+"Exit",i+"Exit-"+r]:r?[i,i+"-"+r,i+"Exit",i+"Exit-"+r]:e.append?[i,or,i+"Exit"]:[i,i+"Exit"]}function Ha(e){var r;return e.type==="document"?r=["Document",or,"DocumentExit"]:e.type==="root"?r=["Root",or,"RootExit"]:r=Kc(e),{eventIndex:0,events:r,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Do(e){return e[Ve]=!1,e.nodes&&e.nodes.forEach(function(r){return Do(r)}),e}var No={},sr=function(){function e(i,t,n){var o=this;this.stringified=!1,this.processed=!1;var s;if((typeof t>"u"?"undefined":q(t))==="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Do(t);else if(F(t,e)||F(t,ja))s=Do(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var a=Rd;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{s=a(t,n)}catch(u){this.processed=!0,this.error=u}s&&!s[Cd]&&kd.rebuild(s)}this.result=new ja(i,s,n),this.helpers=Y({},No,{postcss:No,result:this.result}),this.plugins=this.processor.plugins.map(function(u){return(typeof u>"u"?"undefined":q(u))==="object"&&u.prepare?Y({},u,u.prepare(o.result)):u})}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},r.handleError=function(t,n){var o=this.result.lastPlugin;try{if(n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=o.postcssPlugin,t.setMessage();else if(o.postcssVersion&&process.env.NODE_ENV!=="production"){var s=o.postcssPlugin,a=o.postcssVersion,u=this.result.processor.version,c=a.split("."),l=u.split(".");(c[0]!==l[0]||parseInt(c[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+u+", but "+s+" uses "+a+". Perhaps this is the source of the error below.")}}catch(f){console&&console.error&&console.error(f)}return t},r.prepareVisitors=function(){var t=this;this.listeners={};for(var n=function(l,f,p){t.listeners[f]||(t.listeners[f]=[]),t.listeners[f].push([l,p])},o=O(this.plugins),s;!(s=o()).done;){var a=s.value;if((typeof a>"u"?"undefined":q(a))==="object")for(var u in a){if(!Td[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event "+u+" in "+a.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Pd[u])if(q(a[u])==="object")for(var c in a[u])c==="*"?n(a,u,a[u][c]):n(a,u+"-"+c.toLowerCase(),a[u][c]);else typeof a[u]=="function"&&n(a,u,a[u])}}this.hasListener=Object.keys(this.listeners).length>0},r.runAsync=function(){var t=this;return ws(function(){var n,o,s,a,u,c,l,f,p,g,d,_;return Fr(this,function(v){switch(v.label){case 0:t.plugin=0,n=0,v.label=1;case 1:if(!(n<t.plugins.length))return[3,6];if(o=t.plugins[n],s=t.runOnRoot(o),!Cr(s))return[3,5];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,s];case 3:return v.sent(),[3,5];case 4:throw a=v.sent(),t.handleError(a);case 5:return n++,[3,1];case 6:if(t.prepareVisitors(),!t.hasListener)return[3,18];u=t.result.root,v.label=7;case 7:if(u[Ve])return[3,14];u[Ve]=!0,c=[Ha(u)],v.label=8;case 8:if(!(c.length>0))return[3,13];if(l=t.visitTick(c),!Cr(l))return[3,12];v.label=9;case 9:return v.trys.push([9,11,,12]),[4,l];case 10:return v.sent(),[3,12];case 11:throw f=v.sent(),p=c[c.length-1].node,t.handleError(f,p);case 12:return[3,8];case 13:return[3,7];case 14:if(!t.listeners.OnceExit)return[3,18];g=function(){var y,b,S,C,I;return Fr(this,function(x){switch(x.label){case 0:y=_.value,b=y[0],S=y[1],t.result.lastPlugin=b,x.label=1;case 1:return x.trys.push([1,6,,7]),u.type!=="document"?[3,3]:(C=u.nodes.map(function(M){return S(M,t.helpers)}),[4,Promise.all(C)]);case 2:return x.sent(),[3,5];case 3:return[4,S(u,t.helpers)];case 4:x.sent(),x.label=5;case 5:return[3,7];case 6:throw I=x.sent(),t.handleError(I);case 7:return[2]}})},d=O(t.listeners.OnceExit),v.label=15;case 15:return(_=d()).done?[3,18]:[5,pc(g())];case 16:v.sent(),v.label=17;case 17:return[3,15];case 18:return t.processed=!0,[2,t.stringify()]}})})()},r.runOnRoot=function(t){var n=this;this.result.lastPlugin=t;try{if((typeof t>"u"?"undefined":q(t))==="object"&&t.Once){if(this.result.root.type==="document"){var o=this.result.root.nodes.map(function(s){return t.Once(s,n.helpers)});return Cr(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}},r.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,n=Ed;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);var o=new Id(n,this.result.root,this.result.opts),s=o.generate();return this.result.css=s[0],this.result.map=s[1],this.result},r.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t=O(this.plugins),n;!(n=t()).done;){var o=n.value,s=this.runOnRoot(o);if(Cr(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[Ve];)a[Ve]=!0,this.walkSync(a);if(this.listeners.OnceExit)if(a.type==="document")for(var u=O(a.nodes),c;!(c=u()).done;){var l=c.value;this.visitSync(this.listeners.OnceExit,l)}else this.visitSync(this.listeners.OnceExit,a)}return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||xd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this.css},r.visitSync=function(t,n){for(var o=O(t),s;!(s=o()).done;){var a=s.value,u=a[0],c=a[1];this.result.lastPlugin=u;var l=void 0;try{l=c(n,this.helpers)}catch(f){throw this.handleError(f,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Cr(l))throw this.getAsyncError()}},r.visitTick=function(t){var n=t[t.length-1],o=n.node,s=n.visitors;if(o.type!=="root"&&o.type!=="document"&&!o.parent){t.pop();return}if(s.length>0&&n.visitorIndex<s.length){var a=s[n.visitorIndex],u=a[0],c=a[1];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=u;try{return c(o.toProxy(),this.helpers)}catch(d){throw this.handleError(d,o)}}if(n.iterator!==0){for(var l=n.iterator,f;f=o.nodes[o.indexes[l]];)if(o.indexes[l]+=1,!f[Ve]){f[Ve]=!0,t.push(Ha(f));return}n.iterator=0,delete o.indexes[l]}for(var p=n.events;n.eventIndex<p.length;){var g=p[n.eventIndex];if(n.eventIndex+=1,g===or){o.nodes&&o.nodes.length&&(o[Ve]=!0,n.iterator=o.getIterator());return}else if(this.listeners[g]){n.visitors=this.listeners[g];return}}t.pop()},r.walkSync=function(t){var n=this;t[Ve]=!0;for(var o=Kc(t),s=O(o),a;!(a=s()).done;){var u=a.value;if(u===or)t.nodes&&t.each(function(l){l[Ve]||n.walkSync(l)});else{var c=this.listeners[u];if(c&&this.visitSync(c,t.toProxy()))return}}},r.warnings=function(){return this.sync().warnings()},be(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();sr.registerPostcss=function(e){No=e};var Jc=sr;sr.default=sr;Ad.registerLazyResult(sr);Od.registerLazyResult(sr);var Dd=Ac,Nd=Ii,Ld=Bc,Fd=Ts,Ud=Rs,Lo=function(){function e(i,t,n){t=t.toString(),this.stringified=!1,this._processor=i,this._css=t,this._opts=n,this._map=void 0;var o,s=Nd;this.result=new Ud(this._processor,o,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var u=new Dd(s,o,this._opts,t);if(u.isMap()){var c=u.generate(),l=c[0],f=c[1];l&&(this.result.css=l),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.sync=function(){if(this.error)throw this.error;return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Ld("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this._css},r.warnings=function(){return[]},be(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var t,n=Fd;try{t=n(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=t,t}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),$d=Lo;Lo.default=Lo;var zd=$d,Bd=Jc,qd=xs,Vd=en,Br=function(){function e(i){i===void 0&&(i=[]),this.version="8.4.38",this.plugins=this.normalize(i)}var r=e.prototype;return r.normalize=function(t){for(var n=[],o=O(t),s;!(s=o()).done;){var a=s.value;if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),(typeof a>"u"?"undefined":q(a))==="object"&&Array.isArray(a.plugins))n=n.concat(a.plugins);else if((typeof a>"u"?"undefined":q(a))==="object"&&a.postcssPlugin)n.push(a);else if(typeof a=="function")n.push(a);else if((typeof a>"u"?"undefined":q(a))==="object"&&(a.parse||a.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(a+" is not a PostCSS plugin")}return n},r.process=function(t,n){return n===void 0&&(n={}),!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new zd(this,t,n):new Bd(this,t,n)},r.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},e}(),Wd=Br;Br.default=Br;Vd.registerProcessor(Br);qd.registerProcessor(Br);var Gd=ki,jd=Ec,Hd=xi,Yd=As,Kd=Oi,Jd=en,Xd=Ms;function qr(e,r){if(Array.isArray(e))return e.map(function(f){return qr(f)});var i=e.inputs,t=Nr(e,["inputs"]);if(i){r=[];for(var n=O(i),o;!(o=n()).done;){var s=o.value,a=Y({},s,{__proto__:Kd.prototype});a.map&&(a.map=Y({},a.map,{__proto__:jd.prototype})),r.push(a)}}if(t.nodes&&(t.nodes=e.nodes.map(function(f){return qr(f,r)})),t.source){var u=t.source,c=u.inputId,l=Nr(u,["inputId"]);t.source=l,c!=null&&(t.source.input=r[c])}if(t.type==="root")return new Jd(t);if(t.type==="decl")return new Gd(t);if(t.type==="rule")return new Xd(t);if(t.type==="comment")return new Hd(t);if(t.type==="atrule")return new Yd(t);throw new Error("Unknown node type: "+e.type)}var Zd=qr;qr.default=qr;var Qd=Es,Xc=ki,ev=Jc,tv=Ft,Ps=Wd,rv=Ii,nv=Zd,Zc=xs,iv=qc,Qc=xi,el=As,ov=Rs,sv=Oi,av=Ts,uv=Hc,tl=Ms,rl=en,cv=Ei;function ee(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Ps(r)}ee.plugin=function(r,i){var t=!1;function n(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];console&&console.warn&&!t&&(t=!0,console.warn(r+`: postcss.plugin was deprecated. Migration guide:
|
|
27
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return t.root}var Ts=ni;ni.default=ni;_d.registerParse(ni);var Ve=gt.isClean,Sd=gt.my,Cd=Rc,Id=Ii,Ed=Ft,kd=xs,Od=zc,ja=Rs,xd=Ts,Rd=Qr,Ad={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Md={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Td={Once:!0,postcssPlugin:!0,prepare:!0},ir=0;function Sr(e){return(typeof e>"u"?"undefined":q(e))==="object"&&typeof e.then=="function"}function Yc(e){var r=!1,i=Ad[e.type];return e.type==="decl"?r=e.prop.toLowerCase():e.type==="atrule"&&(r=e.name.toLowerCase()),r&&e.append?[i,i+"-"+r,ir,i+"Exit",i+"Exit-"+r]:r?[i,i+"-"+r,i+"Exit",i+"Exit-"+r]:e.append?[i,ir,i+"Exit"]:[i,i+"Exit"]}function Ha(e){var r;return e.type==="document"?r=["Document",ir,"DocumentExit"]:e.type==="root"?r=["Root",ir,"RootExit"]:r=Yc(e),{eventIndex:0,events:r,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Do(e){return e[Ve]=!1,e.nodes&&e.nodes.forEach(function(r){return Do(r)}),e}var No={},or=function(){function e(i,t,n){var o=this;this.stringified=!1,this.processed=!1;var s;if((typeof t>"u"?"undefined":q(t))==="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Do(t);else if(F(t,e)||F(t,ja))s=Do(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var a=xd;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{s=a(t,n)}catch(u){this.processed=!0,this.error=u}s&&!s[Sd]&&Ed.rebuild(s)}this.result=new ja(i,s,n),this.helpers=Y({},No,{postcss:No,result:this.result}),this.plugins=this.processor.plugins.map(function(u){return(typeof u>"u"?"undefined":q(u))==="object"&&u.prepare?Y({},u,u.prepare(o.result)):u})}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},r.handleError=function(t,n){var o=this.result.lastPlugin;try{if(n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=o.postcssPlugin,t.setMessage();else if(o.postcssVersion&&process.env.NODE_ENV!=="production"){var s=o.postcssPlugin,a=o.postcssVersion,u=this.result.processor.version,c=a.split("."),l=u.split(".");(c[0]!==l[0]||parseInt(c[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+u+", but "+s+" uses "+a+". Perhaps this is the source of the error below.")}}catch(f){console&&console.error&&console.error(f)}return t},r.prepareVisitors=function(){var t=this;this.listeners={};for(var n=function(l,f,p){t.listeners[f]||(t.listeners[f]=[]),t.listeners[f].push([l,p])},o=O(this.plugins),s;!(s=o()).done;){var a=s.value;if((typeof a>"u"?"undefined":q(a))==="object")for(var u in a){if(!Md[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event "+u+" in "+a.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Td[u])if(q(a[u])==="object")for(var c in a[u])c==="*"?n(a,u,a[u][c]):n(a,u+"-"+c.toLowerCase(),a[u][c]);else typeof a[u]=="function"&&n(a,u,a[u])}}this.hasListener=Object.keys(this.listeners).length>0},r.runAsync=function(){var t=this;return ws(function(){var n,o,s,a,u,c,l,f,p,g,d,_;return Lr(this,function(v){switch(v.label){case 0:t.plugin=0,n=0,v.label=1;case 1:if(!(n<t.plugins.length))return[3,6];if(o=t.plugins[n],s=t.runOnRoot(o),!Sr(s))return[3,5];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,s];case 3:return v.sent(),[3,5];case 4:throw a=v.sent(),t.handleError(a);case 5:return n++,[3,1];case 6:if(t.prepareVisitors(),!t.hasListener)return[3,18];u=t.result.root,v.label=7;case 7:if(u[Ve])return[3,14];u[Ve]=!0,c=[Ha(u)],v.label=8;case 8:if(!(c.length>0))return[3,13];if(l=t.visitTick(c),!Sr(l))return[3,12];v.label=9;case 9:return v.trys.push([9,11,,12]),[4,l];case 10:return v.sent(),[3,12];case 11:throw f=v.sent(),p=c[c.length-1].node,t.handleError(f,p);case 12:return[3,8];case 13:return[3,7];case 14:if(!t.listeners.OnceExit)return[3,18];g=function(){var y,b,S,C,I;return Lr(this,function(x){switch(x.label){case 0:y=_.value,b=y[0],S=y[1],t.result.lastPlugin=b,x.label=1;case 1:return x.trys.push([1,6,,7]),u.type!=="document"?[3,3]:(C=u.nodes.map(function(M){return S(M,t.helpers)}),[4,Promise.all(C)]);case 2:return x.sent(),[3,5];case 3:return[4,S(u,t.helpers)];case 4:x.sent(),x.label=5;case 5:return[3,7];case 6:throw I=x.sent(),t.handleError(I);case 7:return[2]}})},d=O(t.listeners.OnceExit),v.label=15;case 15:return(_=d()).done?[3,18]:[5,hc(g())];case 16:v.sent(),v.label=17;case 17:return[3,15];case 18:return t.processed=!0,[2,t.stringify()]}})})()},r.runOnRoot=function(t){var n=this;this.result.lastPlugin=t;try{if((typeof t>"u"?"undefined":q(t))==="object"&&t.Once){if(this.result.root.type==="document"){var o=this.result.root.nodes.map(function(s){return t.Once(s,n.helpers)});return Sr(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}},r.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,n=Id;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);var o=new Cd(n,this.result.root,this.result.opts),s=o.generate();return this.result.css=s[0],this.result.map=s[1],this.result},r.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t=O(this.plugins),n;!(n=t()).done;){var o=n.value,s=this.runOnRoot(o);if(Sr(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[Ve];)a[Ve]=!0,this.walkSync(a);if(this.listeners.OnceExit)if(a.type==="document")for(var u=O(a.nodes),c;!(c=u()).done;){var l=c.value;this.visitSync(this.listeners.OnceExit,l)}else this.visitSync(this.listeners.OnceExit,a)}return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Od("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this.css},r.visitSync=function(t,n){for(var o=O(t),s;!(s=o()).done;){var a=s.value,u=a[0],c=a[1];this.result.lastPlugin=u;var l=void 0;try{l=c(n,this.helpers)}catch(f){throw this.handleError(f,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Sr(l))throw this.getAsyncError()}},r.visitTick=function(t){var n=t[t.length-1],o=n.node,s=n.visitors;if(o.type!=="root"&&o.type!=="document"&&!o.parent){t.pop();return}if(s.length>0&&n.visitorIndex<s.length){var a=s[n.visitorIndex],u=a[0],c=a[1];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=u;try{return c(o.toProxy(),this.helpers)}catch(d){throw this.handleError(d,o)}}if(n.iterator!==0){for(var l=n.iterator,f;f=o.nodes[o.indexes[l]];)if(o.indexes[l]+=1,!f[Ve]){f[Ve]=!0,t.push(Ha(f));return}n.iterator=0,delete o.indexes[l]}for(var p=n.events;n.eventIndex<p.length;){var g=p[n.eventIndex];if(n.eventIndex+=1,g===ir){o.nodes&&o.nodes.length&&(o[Ve]=!0,n.iterator=o.getIterator());return}else if(this.listeners[g]){n.visitors=this.listeners[g];return}}t.pop()},r.walkSync=function(t){var n=this;t[Ve]=!0;for(var o=Yc(t),s=O(o),a;!(a=s()).done;){var u=a.value;if(u===ir)t.nodes&&t.each(function(l){l[Ve]||n.walkSync(l)});else{var c=this.listeners[u];if(c&&this.visitSync(c,t.toProxy()))return}}},r.warnings=function(){return this.sync().warnings()},be(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();or.registerPostcss=function(e){No=e};var Kc=or;or.default=or;Rd.registerLazyResult(or);kd.registerLazyResult(or);var Pd=Rc,Dd=Ii,Nd=zc,Ld=Ts,Fd=Rs,Lo=function(){function e(i,t,n){t=t.toString(),this.stringified=!1,this._processor=i,this._css=t,this._opts=n,this._map=void 0;var o,s=Dd;this.result=new Fd(this._processor,o,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var u=new Pd(s,o,this._opts,t);if(u.isMap()){var c=u.generate(),l=c[0],f=c[1];l&&(this.result.css=l),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.sync=function(){if(this.error)throw this.error;return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Nd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this._css},r.warnings=function(){return[]},be(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var t,n=Ld;try{t=n(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=t,t}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),Ud=Lo;Lo.default=Lo;var $d=Ud,zd=Kc,Bd=xs,qd=Qr,zr=function(){function e(i){i===void 0&&(i=[]),this.version="8.4.38",this.plugins=this.normalize(i)}var r=e.prototype;return r.normalize=function(t){for(var n=[],o=O(t),s;!(s=o()).done;){var a=s.value;if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),(typeof a>"u"?"undefined":q(a))==="object"&&Array.isArray(a.plugins))n=n.concat(a.plugins);else if((typeof a>"u"?"undefined":q(a))==="object"&&a.postcssPlugin)n.push(a);else if(typeof a=="function")n.push(a);else if((typeof a>"u"?"undefined":q(a))==="object"&&(a.parse||a.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(a+" is not a PostCSS plugin")}return n},r.process=function(t,n){return n===void 0&&(n={}),!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new $d(this,t,n):new zd(this,t,n)},r.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},e}(),Vd=zr;zr.default=zr;qd.registerProcessor(zr);Bd.registerProcessor(zr);var Wd=ki,Gd=Ic,jd=xi,Hd=As,Yd=Oi,Kd=Qr,Jd=Ms;function Br(e,r){if(Array.isArray(e))return e.map(function(f){return Br(f)});var i=e.inputs,t=Dr(e,["inputs"]);if(i){r=[];for(var n=O(i),o;!(o=n()).done;){var s=o.value,a=Y({},s,{__proto__:Yd.prototype});a.map&&(a.map=Y({},a.map,{__proto__:Gd.prototype})),r.push(a)}}if(t.nodes&&(t.nodes=e.nodes.map(function(f){return Br(f,r)})),t.source){var u=t.source,c=u.inputId,l=Dr(u,["inputId"]);t.source=l,c!=null&&(t.source.input=r[c])}if(t.type==="root")return new Kd(t);if(t.type==="decl")return new Wd(t);if(t.type==="rule")return new Jd(t);if(t.type==="comment")return new jd(t);if(t.type==="atrule")return new Hd(t);throw new Error("Unknown node type: "+e.type)}var Xd=Br;Br.default=Br;var Zd=Es,Jc=ki,Qd=Kc,ev=Ft,Ps=Vd,tv=Ii,rv=Xd,Xc=xs,nv=Bc,Zc=xi,Qc=As,iv=Rs,ov=Oi,sv=Ts,av=jc,el=Ms,tl=Qr,uv=Ei;function ee(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Ps(r)}ee.plugin=function(r,i){var t=!1;function n(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];console&&console.warn&&!t&&(t=!0,console.warn(r+`: postcss.plugin was deprecated. Migration guide:
|
|
28
28
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(r+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
29
|
-
https://www.w3ctech.com/topic/2226`));var c=i.apply(void 0,[].concat(a));return c.postcssPlugin=r,c.postcssVersion=new Ps().version,c}var o;return Object.defineProperty(n,"postcss",{get:function(){return o||(o=n()),o}}),n.process=function(s,a,u){return ee([n(u)]).process(s,a)},n};ee.stringify=
|
|
29
|
+
https://www.w3ctech.com/topic/2226`));var c=i.apply(void 0,[].concat(a));return c.postcssPlugin=r,c.postcssVersion=new Ps().version,c}var o;return Object.defineProperty(n,"postcss",{get:function(){return o||(o=n()),o}}),n.process=function(s,a,u){return ee([n(u)]).process(s,a)},n};ee.stringify=tv;ee.parse=sv;ee.fromJSON=rv;ee.list=av;ee.comment=function(e){return new Zc(e)};ee.atRule=function(e){return new Qc(e)};ee.decl=function(e){return new Jc(e)};ee.rule=function(e){return new el(e)};ee.root=function(e){return new tl(e)};ee.document=function(e){return new Xc(e)};ee.CssSyntaxError=Zd;ee.Declaration=Jc;ee.Container=ev;ee.Processor=Ps;ee.Document=Xc;ee.Comment=Zc;ee.Warning=nv;ee.AtRule=Qc;ee.Result=iv;ee.Input=ov;ee.Rule=el;ee.Root=tl;ee.Node=uv;Qd.registerPostcss(ee);var cv=ee;ee.default=ee;var ae=bp(cv);ae.stringify;ae.fromJSON;ae.plugin;ae.parse;ae.list;ae.document;ae.comment;ae.atRule;ae.rule;ae.decl;ae.root;ae.CssSyntaxError;ae.Declaration;ae.Container;ae.Processor;ae.Document;ae.Comment;ae.Warning;ae.AtRule;ae.Result;ae.Input;ae.Rule;ae.Root;ae.Node;var lv=Object.defineProperty,fv=function(e,r,i){return r in e?lv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i},De=function(e,r,i){return fv(e,(typeof r>"u"?"undefined":q(r))!=="symbol"?r+"":r,i)};function hv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pv(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var i=function t(){return F(this,t)?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),i}var Ds={exports:{}},oe=String,rl=function(){return{isColorSupported:!1,reset:oe,bold:oe,dim:oe,italic:oe,underline:oe,inverse:oe,hidden:oe,strikethrough:oe,black:oe,red:oe,green:oe,yellow:oe,blue:oe,magenta:oe,cyan:oe,white:oe,gray:oe,bgBlack:oe,bgRed:oe,bgGreen:oe,bgYellow:oe,bgBlue:oe,bgMagenta:oe,bgCyan:oe,bgWhite:oe}};Ds.exports=rl();Ds.exports.createColors=rl;var dv=Ds.exports,vv={},gv=Object.freeze(Object.defineProperty({__proto__:null,default:vv},Symbol.toStringTag,{value:"Module"})),pe=pv(gv),Ya=dv,Ka=pe,Fo=function(e){Ce(r,e);function r(t,n,o,s,a,u){var c;return c=e.call(this,t)||this,c.name="CssSyntaxError",c.reason=t,a&&(c.file=a),s&&(c.source=s),u&&(c.plugin=u),typeof n<"u"&&typeof o<"u"&&(typeof n=="number"?(c.line=n,c.column=o):(c.line=n.line,c.column=n.column,c.endLine=o.line,c.endColumn=o.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,r),c}var i=r.prototype;return i.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},i.showSourceCode=function(n){var o=this;if(!this.source)return"";var s=this.source;n==null&&(n=Ya.isColorSupported),Ka&&n&&(s=Ka(s));var a=s.split(/\r?\n/),u=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length,f,p;if(n){var g=Ya.createColors(!0),d=g.bold,_=g.gray,v=g.red;f=function(y){return d(v(y))},p=function(y){return _(y)}}else f=p=function(y){return y};return a.slice(u,c).map(function(y,b){var S=u+1+b,C=" "+(" "+S).slice(-l)+" | ";if(S===o.line){var I=p(C.replace(/\d/g," "))+y.slice(0,o.column-1).replace(/[^\t]/g," ");return f(">")+p(C)+y+`
|
|
30
30
|
`+I+f("^")}return" "+p(C)+y}).join(`
|
|
31
31
|
`)},i.toString=function(){var n=this.showSourceCode();return n&&(n=`
|
|
32
32
|
|
|
@@ -36,31 +36,31 @@ https://www.w3ctech.com/topic/2226`));var c=i.apply(void 0,[].concat(a));return
|
|
|
36
36
|
`,beforeComment:`
|
|
37
37
|
`,beforeDecl:`
|
|
38
38
|
`,beforeOpen:" ",beforeRule:`
|
|
39
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
40
|
-
`)){var u=this.raw(t,null,"indent");if(u.length)for(var c=0;c<a;c++)o+=u}return o},r.block=function(t,n){var o=this.raw(t,"between","beforeOpen");this.builder(n+o+"{",t,"start");var s;t.nodes&&t.nodes.length?(this.body(t),s=this.raw(t,"after")):s=this.raw(t,"after","emptyBody"),s&&this.builder(s),this.builder("}",t,"end")},r.body=function(t){for(var n=t.nodes.length-1;n>0&&t.nodes[n].type==="comment";)n-=1;for(var o=this.raw(t,"semicolon"),s=0;s<t.nodes.length;s++){var a=t.nodes[s],u=this.raw(a,"before");u&&this.builder(u),this.stringify(a,n!==s||o)}},r.comment=function(t){var n=this.raw(t,"left","commentLeft"),o=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+o+"*/",t)},r.decl=function(t,n){var o=this.raw(t,"between","colon"),s=t.prop+o+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),n&&(s+=";"),this.builder(s,t)},r.document=function(t){this.body(t)},r.raw=function(t,n,o){var s;if(o||(o=n),n&&(s=t.raws[n],typeof s<"u"))return s;var a=t.parent;if(o==="before"&&(!a||a.type==="root"&&a.first===t||a&&a.type==="document"))return"";if(!a)return Ja[o];var u=t.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(t,o);var c="raw"+
|
|
39
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function mv(e){return e[0].toUpperCase()+e.slice(1)}var Uo=function(){function e(i){this.builder=i}var r=e.prototype;return r.atrule=function(t,n){var o="@"+t.name,s=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?o+=t.raws.afterName:s&&(o+=" "),t.nodes)this.block(t,o+s);else{var a=(t.raws.between||"")+(n?";":"");this.builder(o+s+a,t)}},r.beforeAfter=function(t,n){var o;t.type==="decl"?o=this.raw(t,null,"beforeDecl"):t.type==="comment"?o=this.raw(t,null,"beforeComment"):n==="before"?o=this.raw(t,null,"beforeRule"):o=this.raw(t,null,"beforeClose");for(var s=t.parent,a=0;s&&s.type!=="root";)a+=1,s=s.parent;if(o.includes(`
|
|
40
|
+
`)){var u=this.raw(t,null,"indent");if(u.length)for(var c=0;c<a;c++)o+=u}return o},r.block=function(t,n){var o=this.raw(t,"between","beforeOpen");this.builder(n+o+"{",t,"start");var s;t.nodes&&t.nodes.length?(this.body(t),s=this.raw(t,"after")):s=this.raw(t,"after","emptyBody"),s&&this.builder(s),this.builder("}",t,"end")},r.body=function(t){for(var n=t.nodes.length-1;n>0&&t.nodes[n].type==="comment";)n-=1;for(var o=this.raw(t,"semicolon"),s=0;s<t.nodes.length;s++){var a=t.nodes[s],u=this.raw(a,"before");u&&this.builder(u),this.stringify(a,n!==s||o)}},r.comment=function(t){var n=this.raw(t,"left","commentLeft"),o=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+o+"*/",t)},r.decl=function(t,n){var o=this.raw(t,"between","colon"),s=t.prop+o+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),n&&(s+=";"),this.builder(s,t)},r.document=function(t){this.body(t)},r.raw=function(t,n,o){var s;if(o||(o=n),n&&(s=t.raws[n],typeof s<"u"))return s;var a=t.parent;if(o==="before"&&(!a||a.type==="root"&&a.first===t||a&&a.type==="document"))return"";if(!a)return Ja[o];var u=t.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(t,o);var c="raw"+mv(o);return this[c]?s=this[c](u,t):u.walk(function(l){if(s=l.raws[n],typeof s<"u")return!1}),typeof s>"u"&&(s=Ja[o]),u.rawCache[o]=s,s},r.rawBeforeClose=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return n=o.raws.after,n.includes(`
|
|
41
41
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n},r.rawBeforeComment=function(t,n){var o;return t.walkComments(function(s){if(typeof s.raws.before<"u")return o=s.raws.before,o.includes(`
|
|
42
42
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(n,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o},r.rawBeforeDecl=function(t,n){var o;return t.walkDecls(function(s){if(typeof s.raws.before<"u")return o=s.raws.before,o.includes(`
|
|
43
43
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(n,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o},r.rawBeforeOpen=function(t){var n;return t.walk(function(o){if(o.type!=="decl"&&(n=o.raws.between,typeof n<"u"))return!1}),n},r.rawBeforeRule=function(t){var n;return t.walk(function(o){if(o.nodes&&(o.parent!==t||t.first!==o)&&typeof o.raws.before<"u")return n=o.raws.before,n.includes(`
|
|
44
44
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n},r.rawColon=function(t){var n;return t.walkDecls(function(o){if(typeof o.raws.between<"u")return n=o.raws.between.replace(/[^\s:]/g,""),!1}),n},r.rawEmptyBody=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length===0&&(n=o.raws.after,typeof n<"u"))return!1}),n},r.rawIndent=function(t){if(t.raws.indent)return t.raws.indent;var n;return t.walk(function(o){var s=o.parent;if(s&&s!==t&&s.parent&&s.parent===t&&typeof o.raws.before<"u"){var a=o.raws.before.split(`
|
|
45
|
-
`);return n=a[a.length-1],n=n.replace(/\S/g,""),!1}}),n},r.rawSemicolon=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(n=o.raws.semicolon,typeof n<"u"))return!1}),n},r.rawValue=function(t,n){var o=t[n],s=t.raws[n];return s&&s.value===o?s.raw:o},r.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},r.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},r.stringify=function(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)},e}(),
|
|
46
|
-
`?(s=1,a+=1):s+=1;return{column:s,line:a}},r.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},r.rangeBy=function(t){var n={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){var s=this.toString(),a=s.indexOf(t.word);a!==-1&&(n=this.positionInside(a,s),o=this.positionInside(a+t.word.length,s))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?o={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?o=this.positionInside(t.endIndex):t.index&&(o=this.positionInside(t.index+1));return(o.line<n.line||o.line===n.line&&o.column<=n.column)&&(o={column:n.column+1,line:n.line}),{end:o,start:n}},r.raw=function(t,n){var o=new
|
|
47
|
-
`);o=new Array(s.length);for(var a=0,u=0,c=s.length;u<c;u++)o[u]=a,a+=s[u].length+1;this[ro]=o}n=o[o.length-1];var l=0;if(t>=n)l=o.length-1;else for(var f=o.length-2,p;l<f;)if(p=l+(f-l>>1),t<o[p])f=p-1;else if(t>=o[p+1])l=p+1;else{l=p;break}return{col:t-o[l]+1,line:l+1}},r.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:Go(this.map.consumer().sourceRoot||this.map.root||".",t)},r.origin=function(t,n,o,s){if(!this.map)return!1;var a=this.map.consumer(),u=a.originalPositionFor({column:n,line:t});if(!u.source)return!1;var c;typeof o=="number"&&(c=a.originalPositionFor({column:s,line:o}));var l;Wo(u.source)?l=
|
|
45
|
+
`);return n=a[a.length-1],n=n.replace(/\S/g,""),!1}}),n},r.rawSemicolon=function(t){var n;return t.walk(function(o){if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(n=o.raws.semicolon,typeof n<"u"))return!1}),n},r.rawValue=function(t,n){var o=t[n],s=t.raws[n];return s&&s.value===o?s.raw:o},r.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},r.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},r.stringify=function(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)},e}(),nl=Uo;Uo.default=Uo;var yv=nl;function $o(e,r){var i=new yv(r);i.stringify(e)}var Ri=$o;$o.default=$o;var _n=mt.isClean,_v=mt.my,bv=Ns,wv=nl,Sv=Ri;function zo(e,r){var i=new e.constructor;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t!=="proxyCache"){var n=e[t],o=typeof n>"u"?"undefined":q(n);t==="parent"&&o==="object"?r&&(i[t]=r):t==="source"?i[t]=n:Array.isArray(n)?i[t]=n.map(function(s){return zo(s,i)}):(o==="object"&&n!==null&&(n=zo(n)),i[t]=n)}return i}var Bo=function(){function e(i){i===void 0&&(i={}),this.raws={},this[_n]=!1,this[_v]=!0;for(var t in i)if(t==="nodes"){this.nodes=[];for(var n=O(i[t]),o;!(o=n()).done;){var s=o.value;typeof s.clone=="function"?this.append(s.clone()):this.append(s)}}else this[t]=i[t]}var r=e.prototype;return r.addToError=function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+n.input.from+":"+n.start.line+":"+n.start.column+"$&")}return t},r.after=function(t){return this.parent.insertAfter(this,t),this},r.assign=function(t){t===void 0&&(t={});for(var n in t)this[n]=t[n];return this},r.before=function(t){return this.parent.insertBefore(this,t),this},r.cleanRaws=function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between},r.clone=function(t){t===void 0&&(t={});var n=zo(this);for(var o in t)n[o]=t[o];return n},r.cloneAfter=function(t){t===void 0&&(t={});var n=this.clone(t);return this.parent.insertAfter(this,n),n},r.cloneBefore=function(t){t===void 0&&(t={});var n=this.clone(t);return this.parent.insertBefore(this,n),n},r.error=function(t,n){if(n===void 0&&(n={}),this.source){var o=this.rangeBy(n),s=o.end,a=o.start;return this.source.input.error(t,{column:a.column,line:a.line},{column:s.column,line:s.line},n)}return new bv(t)},r.getProxyProcessor=function(){return{get:function(n,o){return o==="proxyOf"?n:o==="root"?function(){return n.root().toProxy()}:n[o]},set:function(n,o,s){return n[o]===s||(n[o]=s,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&n.markDirty()),!0}}},r.markDirty=function(){if(this[_n]){this[_n]=!1;for(var t=this;t=t.parent;)t[_n]=!1}},r.next=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}},r.positionBy=function(t,n){var o=this.source.start;if(t.index)o=this.positionInside(t.index,n);else if(t.word){n=this.toString();var s=n.indexOf(t.word);s!==-1&&(o=this.positionInside(s,n))}return o},r.positionInside=function(t,n){for(var o=n||this.toString(),s=this.source.start.column,a=this.source.start.line,u=0;u<t;u++)o[u]===`
|
|
46
|
+
`?(s=1,a+=1):s+=1;return{column:s,line:a}},r.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},r.rangeBy=function(t){var n={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){var s=this.toString(),a=s.indexOf(t.word);a!==-1&&(n=this.positionInside(a,s),o=this.positionInside(a+t.word.length,s))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?o={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?o=this.positionInside(t.endIndex):t.index&&(o=this.positionInside(t.index+1));return(o.line<n.line||o.line===n.line&&o.column<=n.column)&&(o={column:n.column+1,line:n.line}),{end:o,start:n}},r.raw=function(t,n){var o=new wv;return o.raw(this,t,n)},r.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},r.replaceWith=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];if(this.parent){for(var s=this,a=!1,u=O(n),c;!(c=u()).done;){var l=c.value;l===this?a=!0:a?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l)}a||this.remove()}return this},r.root=function(){for(var t=this;t.parent&&t.parent.type!=="document";)t=t.parent;return t},r.toJSON=function(t,n){var o={},s=n==null;n=n||new Map;var a=0;for(var u in this)if(Object.prototype.hasOwnProperty.call(this,u)&&!(u==="parent"||u==="proxyCache")){var c=this[u];if(Array.isArray(c))o[u]=c.map(function(f){return(typeof f>"u"?"undefined":q(f))==="object"&&f.toJSON?f.toJSON(null,n):f});else if((typeof c>"u"?"undefined":q(c))==="object"&&c.toJSON)o[u]=c.toJSON(null,n);else if(u==="source"){var l=n.get(c.input);l==null&&(l=a,n.set(c.input,a),a++),o[u]={end:c.end,inputId:l,start:c.start}}else o[u]=c}return s&&(o.inputs=[].concat(n.keys()).map(function(f){return f.toJSON()})),o},r.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},r.toString=function(t){t===void 0&&(t=Sv),t.stringify&&(t=t.stringify);var n="";return t(this,function(o){n+=o}),n},r.warn=function(t,n,o){var s={node:this};for(var a in o)s[a]=o[a];return t.warn(n,s)},be(e,[{key:"proxyOf",get:function(){return this}}]),e}(),Ai=Bo;Bo.default=Bo;var Cv=Ai,qo=function(e){Ce(r,e);function r(i){var t;return i&&typeof i.value<"u"&&typeof i.value!="string"&&(i=Y({},i,{value:String(i.value)})),t=e.call(this,i)||this,t.type="decl",t}return be(r,[{key:"variable",get:function(){return this.prop.startsWith("--")||this.prop[0]==="$"}}]),r}(Cv),Mi=qo;qo.default=qo;var Iv="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ev=function(e){e===void 0&&(e=21);for(var r="",i=e;i--;)r+=Iv[Math.random()*64|0];return r},kv={nanoid:Ev},Xa=pe.SourceMapConsumer,Za=pe.SourceMapGenerator,Ov=pe.existsSync,xv=pe.readFileSync,eo=pe.dirname,Rv=pe.join;function Av(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Vo=function(){function e(i,t){if(t.map!==!1){this.loadAnnotation(i),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=eo(this.mapFile)),o&&(this.text=o)}}var r=e.prototype;return r.consumer=function(){return this.consumerCache||(this.consumerCache=new Xa(this.text)),this.consumerCache},r.decodeInline=function(t){var n=/^data:application\/json;charset=utf-?8;base64,/,o=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,a=/^data:application\/json,/;if(s.test(t)||a.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||o.test(t))return Av(t.substr(RegExp.lastMatch.length));var u=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+u)},r.getAnnotationURL=function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},r.isMap=function(t){return(typeof t>"u"?"undefined":q(t))!=="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)},r.loadAnnotation=function(t){var n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(n){var o=t.lastIndexOf(n.pop()),s=t.indexOf("*/",o);o>-1&&s>-1&&(this.annotation=this.getAnnotationURL(t.substring(o,s)))}},r.loadFile=function(t){if(this.root=eo(t),Ov(t))return this.mapFile=t,xv(t,"utf-8").toString().trim()},r.loadMap=function(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){var o=n(t);if(o){var s=this.loadFile(o);if(!s)throw new Error("Unable to load previous source map: "+o.toString());return s}}else{if(F(n,Xa))return Za.fromSourceMap(n).toString();if(F(n,Za))return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var a=this.annotation;return t&&(a=Rv(eo(t),a)),this.loadFile(a)}}},r.startWith=function(t,n){return t?t.substr(0,n.length)===n:!1},r.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),il=Vo;Vo.default=Vo;var Mv=pe.SourceMapConsumer,Tv=pe.SourceMapGenerator,Qa=pe.fileURLToPath,bn=pe.pathToFileURL,Wo=pe.isAbsolute,Go=pe.resolve,Pv=kv.nanoid,to=pe,eu=Ns,Dv=il,ro=Symbol("fromOffsetCache"),Nv=!!(Mv&&Tv),tu=!!(Go&&Wo),ii=function(){function e(i,t){if(t===void 0&&(t={}),i===null||typeof i>"u"||(typeof i>"u"?"undefined":q(i))==="object"&&!i.toString)throw new Error("PostCSS received "+i+" instead of CSS string");if(this.css=i.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!tu||/^\w+:\/\//.test(t.from)||Wo(t.from)?this.file=t.from:this.file=Go(t.from)),tu&&Nv){var n=new Dv(this.css,t);if(n.text){this.map=n;var o=n.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+Pv(6)+">"),this.map&&(this.map.file=this.from)}var r=e.prototype;return r.error=function(t,n,o,s){s===void 0&&(s={});var a,u,c;if(n&&(typeof n>"u"?"undefined":q(n))==="object"){var l=n,f=o;if(typeof l.offset=="number"){var p=this.fromOffset(l.offset);n=p.line,o=p.col}else n=l.line,o=l.column;if(typeof f.offset=="number"){var g=this.fromOffset(f.offset);u=g.line,c=g.col}else u=f.line,c=f.column}else if(!o){var d=this.fromOffset(n);n=d.line,o=d.col}var _=this.origin(n,o,u,c);return _?a=new eu(t,_.endLine===void 0?_.line:{column:_.column,line:_.line},_.endLine===void 0?_.column:{column:_.endColumn,line:_.endLine},_.source,_.file,s.plugin):a=new eu(t,u===void 0?n:{column:o,line:n},u===void 0?o:{column:c,line:u},this.css,this.file,s.plugin),a.input={column:o,endColumn:c,endLine:u,line:n,source:this.css},this.file&&(bn&&(a.input.url=bn(this.file).toString()),a.input.file=this.file),a},r.fromOffset=function(t){var n,o;if(this[ro])o=this[ro];else{var s=this.css.split(`
|
|
47
|
+
`);o=new Array(s.length);for(var a=0,u=0,c=s.length;u<c;u++)o[u]=a,a+=s[u].length+1;this[ro]=o}n=o[o.length-1];var l=0;if(t>=n)l=o.length-1;else for(var f=o.length-2,p;l<f;)if(p=l+(f-l>>1),t<o[p])f=p-1;else if(t>=o[p+1])l=p+1;else{l=p;break}return{col:t-o[l]+1,line:l+1}},r.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:Go(this.map.consumer().sourceRoot||this.map.root||".",t)},r.origin=function(t,n,o,s){if(!this.map)return!1;var a=this.map.consumer(),u=a.originalPositionFor({column:n,line:t});if(!u.source)return!1;var c;typeof o=="number"&&(c=a.originalPositionFor({column:s,line:o}));var l;Wo(u.source)?l=bn(u.source):l=new URL(u.source,this.map.consumer().sourceRoot||bn(this.map.mapFile));var f={column:u.column,endColumn:c&&c.column,endLine:c&&c.line,line:u.line,url:l.toString()};if(l.protocol==="file:")if(Qa)f.file=Qa(l);else throw new Error("file: protocol is not available in this PostCSS build");var p=a.sourceContentFor(u.source);return p&&(f.source=p),f},r.toJSON=function(){for(var t={},n=0,o=["hasBOM","css","file","id"];n<o.length;n++){var s=o[n];this[s]!=null&&(t[s]=this[s])}return this.map&&(t.map=Y({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t},be(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),Ti=ii;ii.default=ii;to&&to.registerInput&&to.registerInput(ii);var ol=pe.SourceMapConsumer,zn=pe.SourceMapGenerator,Bn=pe.dirname,sl=pe.relative,al=pe.resolve,ul=pe.sep,ru=pe.pathToFileURL,Lv=Ti,Fv=!!(ol&&zn),Uv=!!(Bn&&al&&sl&&ul),$v=function(){function e(i,t,n,o){this.stringify=i,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var r=e.prototype;return r.addAnnotation=function(){var t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";var n=`
|
|
48
48
|
`;this.css.includes(`\r
|
|
49
49
|
`)&&(n=`\r
|
|
50
|
-
`),this.css+=n+"/*# sourceMappingURL="+t+" */"},r.applyPrevMaps=function(){for(var t=O(this.previous()),n;!(n=t()).done;){var o=n.value,s=this.toUrl(this.path(o.file)),a=o.root||
|
|
51
|
-
`),o=l.length-c):o+=l.length,f&&p!=="start"){var g=f.parent||{raws:{}},d=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!d||f!==g.last||g.raws.semicolon)&&(f.source&&f.source.end?(a.source=t.sourcePath(f),a.original.line=f.source.end.line,a.original.column=f.source.end.column-1,a.generated.line=n,a.generated.column=o-2,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=o-1,t.map.addMapping(a)))}})},r.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(t){return t.annotation}):!0},r.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(function(n){return n.inline}):!0},r.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},r.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(t){return t.withContent()}):!0},r.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},r.path=function(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;var n=this.memoizedPaths.get(t);if(n)return n;var o=this.opts.to?qn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(o=qn(ul(o,this.mapOpts.annotation)));var s=al(o,t);return this.memoizedPaths.set(t,s),s},r.previous=function(){var t=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(o){if(o.source&&o.source.input.map){var s=o.source.input.map;t.previousMaps.includes(s)||t.previousMaps.push(s)}});else{var n=new Fv(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps},r.setSourcesContent=function(){var t=this,n={};if(this.root)this.root.walk(function(s){if(s.source){var a=s.source.input.from;if(a&&!n[a]){n[a]=!0;var u=t.usesFileUrls?t.toFileUrl(a):t.toUrl(t.path(a));t.map.setSourceContent(u,s.source.input.css)}}});else if(this.css){var o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}},r.sourcePath=function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))},r.toBase64=function(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},r.toFileUrl=function(t){var n=this.memoizedFileURLs.get(t);if(n)return n;if(ru){var o=ru(t).toString();return this.memoizedFileURLs.set(t,o),o}else throw new Error("`map.absolute` option is not available in this PostCSS build")},r.toUrl=function(t){var n=this.memoizedURLs.get(t);if(n)return n;cl==="\\"&&(t=t.replace(/\\/g,"/"));var o=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,o),o},e}(),ll=zv,Bv=Ai,jo=function(e){Ce(r,e);function r(i){var t;return t=e.call(this,i)||this,t.type="comment",t}return r}(Bv),Pi=jo;jo.default=jo;var fl=mt.isClean,hl=mt.my,pl=Mi,dl=Pi,qv=Ai,vl,Ls,Fs,gl;function ml(e){return e.map(function(r){return r.nodes&&(r.nodes=ml(r.nodes)),delete r.source,r})}function yl(e){if(e[fl]=!1,e.proxyOf.nodes)for(var r=O(e.proxyOf.nodes),i;!(i=r()).done;){var t=i.value;yl(t)}}var et=function(e){Ce(r,e);function r(){return e.apply(this,arguments)||this}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];for(var a=O(o),u;!(u=a()).done;)for(var c=u.value,l=this.normalize(c,this.last),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.push(g)}return this.markDirty(),this},i.cleanRaws=function(n){if(e.prototype.cleanRaws.call(this,n),this.nodes)for(var o=O(this.nodes),s;!(s=o()).done;){var a=s.value;a.cleanRaws(n)}},i.each=function(n){if(this.proxyOf.nodes){for(var o=this.getIterator(),s,a;this.indexes[o]<this.proxyOf.nodes.length&&(s=this.indexes[o],a=n(this.proxyOf.nodes[s],s),a!==!1);)this.indexes[o]+=1;return delete this.indexes[o],a}},i.every=function(n){return this.nodes.every(n)},i.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var n=this.lastEach;return this.indexes[n]=0,n},i.getProxyProcessor=function(){return{get:function(o,s){return s==="proxyOf"?o:o[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l;return(l=o)[s].apply(l,[].concat(u.map(function(f){return typeof f=="function"?function(p,g){return f(p.toProxy(),g)}:f})))}:s==="every"||s==="some"?function(a){return o[s](function(u){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];return a.apply(void 0,[].concat([u.toProxy()],l))})}:s==="root"?function(){return o.root().toProxy()}:s==="nodes"?o.nodes.map(function(a){return a.toProxy()}):s==="first"||s==="last"?o[s].toProxy():o[s]:o[s]},set:function(o,s,a){return o[s]===a||(o[s]=a,(s==="name"||s==="params"||s==="selector")&&o.markDirty()),!0}}},i.index=function(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))},i.insertAfter=function(n,o){var s=this.index(n),a=this.normalize(o,this.proxyOf.nodes[s]).reverse();s=this.index(n);for(var u=O(a),c;!(c=u()).done;){var l=c.value;this.proxyOf.nodes.splice(s+1,0,l)}var f;for(var p in this.indexes)f=this.indexes[p],s<f&&(this.indexes[p]=f+a.length);return this.markDirty(),this},i.insertBefore=function(n,o){var s=this.index(n),a=s===0?"prepend":!1,u=this.normalize(o,this.proxyOf.nodes[s],a).reverse();s=this.index(n);for(var c=O(u),l;!(l=c()).done;){var f=l.value;this.proxyOf.nodes.splice(s,0,f)}var p;for(var g in this.indexes)p=this.indexes[g],s<=p&&(this.indexes[g]=p+u.length);return this.markDirty(),this},i.normalize=function(n,o){var s=this;if(typeof n=="string")n=ml(vl(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(var a=O(n),u;!(u=a()).done;){var c=u.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(var l=O(n),f;!(f=l()).done;){var p=f.value;p.parent&&p.parent.removeChild(p,"ignore")}}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new pl(n)]}else if(n.selector)n=[new Ls(n)];else if(n.name)n=[new Fs(n)];else if(n.text)n=[new dl(n)];else throw new Error("Unknown node type in node creation");var g=n.map(function(d){return d[hl]||r.rebuild(d),d=d.proxyOf,d.parent&&d.parent.removeChild(d),d[fl]&&yl(d),typeof d.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(d.raws.before=o.raws.before.replace(/\S/g,"")),d.parent=s.proxyOf,d});return g},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];o=o.reverse();for(var a=O(o),u;!(u=a()).done;){for(var c=u.value,l=this.normalize(c,this.first,"prepend").reverse(),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.unshift(g)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+l.length}return this.markDirty(),this},i.push=function(n){return n.parent=this,this.proxyOf.nodes.push(n),this},i.removeAll=function(){for(var n=O(this.proxyOf.nodes),o;!(o=n()).done;){var s=o.value;s.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},i.removeChild=function(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);var o;for(var s in this.indexes)o=this.indexes[s],o>=n&&(this.indexes[s]=o-1);return this.markDirty(),this},i.replaceValues=function(n,o,s){return s||(s=o,o={}),this.walkDecls(function(a){o.props&&!o.props.includes(a.prop)||o.fast&&!a.value.includes(o.fast)||(a.value=a.value.replace(n,s))}),this.markDirty(),this},i.some=function(n){return this.nodes.some(n)},i.walk=function(n){return this.each(function(o,s){var a;try{a=n(o,s)}catch(u){throw o.addToError(u)}return a!==!1&&o.walk&&(a=o.walk(n)),a})},i.walkAtRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="atrule"&&n.test(s.name))return o(s,a)}):this.walk(function(s,a){if(s.type==="atrule"&&s.name===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="atrule")return o(s,a)}))},i.walkComments=function(n){return this.walk(function(o,s){if(o.type==="comment")return n(o,s)})},i.walkDecls=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="decl"&&n.test(s.prop))return o(s,a)}):this.walk(function(s,a){if(s.type==="decl"&&s.prop===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="decl")return o(s,a)}))},i.walkRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="rule"&&n.test(s.selector))return o(s,a)}):this.walk(function(s,a){if(s.type==="rule"&&s.selector===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="rule")return o(s,a)}))},be(r,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(qv);et.registerParse=function(e){vl=e};et.registerRule=function(e){Ls=e};et.registerAtRule=function(e){Fs=e};et.registerRoot=function(e){gl=e};var Ut=et;et.default=et;et.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,Fs.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ls.prototype):e.type==="decl"?Object.setPrototypeOf(e,pl.prototype):e.type==="comment"?Object.setPrototypeOf(e,dl.prototype):e.type==="root"&&Object.setPrototypeOf(e,gl.prototype),e[hl]=!0,e.nodes&&e.nodes.forEach(function(r){et.rebuild(r)})};var Vv=Ut,_l,bl,Vr=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,Y({type:"document"},t))||this,n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.toResult=function(n){n===void 0&&(n={});var o=new _l(new bl,this,n);return o.stringify()},r}(Vv);Vr.registerLazyResult=function(e){_l=e};Vr.registerProcessor=function(e){bl=e};var Us=Vr;Vr.default=Vr;var nu={},wl=function(r){nu[r]||(nu[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Ho=function(){function e(i,t){if(t===void 0&&(t={}),this.type="warning",this.text=i,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var o in t)this[o]=t[o]}var r=e.prototype;return r.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),Sl=Ho;Ho.default=Ho;var Wv=Sl,Yo=function(){function e(i,t,n){this.processor=i,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var r=e.prototype;return r.toString=function(){return this.css},r.warn=function(t,n){n===void 0&&(n={}),n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var o=new Wv(t,n);return this.messages.push(o),o},r.warnings=function(){return this.messages.filter(function(t){return t.type==="warning"})},be(e,[{key:"content",get:function(){return this.css}}]),e}(),$s=Yo;Yo.default=Yo;var no=39,iu=34,Sn=92,ou=47,Cn=10,Ir=32,In=12,En=9,kn=13,Gv=91,jv=93,Hv=40,Yv=41,Kv=123,Jv=125,Xv=59,Zv=42,Qv=58,eg=64,On=/[\t\n\f\r "#'()/;[\\\]{}]/g,xn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tg=/.[\r\n"'(/\\]/,su=/[\da-f]/i,rg=function(r,i){i===void 0&&(i={});var t=r.css.valueOf(),n=i.ignoreErrors,o,s,a,u,c,l,f,p,g,d,_=t.length,v=0,y=[],b=[];function S(){return v}function C(R){throw r.error("Unclosed "+R,v)}function I(){return b.length===0&&v>=_}function x(R){if(b.length)return b.pop();if(!(v>=_)){var P=R?R.ignoreUnclosed:!1;switch(o=t.charCodeAt(v),o){case Cn:case Ir:case En:case kn:case In:{s=v;do s+=1,o=t.charCodeAt(s);while(o===Ir||o===Cn||o===En||o===kn||o===In);d=["space",t.slice(v,s)],v=s-1;break}case Gv:case jv:case Kv:case Jv:case Qv:case Xv:case Yv:{var H=String.fromCharCode(o);d=[H,H,v];break}case Hv:{if(p=y.length?y.pop()[1]:"",g=t.charCodeAt(v+1),p==="url"&&g!==no&&g!==iu&&g!==Ir&&g!==Cn&&g!==En&&g!==In&&g!==kn){s=v;do{if(l=!1,s=t.indexOf(")",s+1),s===-1)if(n||P){s=v;break}else C("bracket");for(f=s;t.charCodeAt(f-1)===Sn;)f-=1,l=!l}while(l);d=["brackets",t.slice(v,s+1),v,s],v=s}else s=t.indexOf(")",v+1),u=t.slice(v,s+1),s===-1||tg.test(u)?d=["(","(",v]:(d=["brackets",u,v,s],v=s);break}case no:case iu:{a=o===no?"'":'"',s=v;do{if(l=!1,s=t.indexOf(a,s+1),s===-1)if(n||P){s=v+1;break}else C("string");for(f=s;t.charCodeAt(f-1)===Sn;)f-=1,l=!l}while(l);d=["string",t.slice(v,s+1),v,s],v=s;break}case eg:{On.lastIndex=v+1,On.test(t),On.lastIndex===0?s=t.length-1:s=On.lastIndex-2,d=["at-word",t.slice(v,s+1),v,s],v=s;break}case Sn:{for(s=v,c=!0;t.charCodeAt(s+1)===Sn;)s+=1,c=!c;if(o=t.charCodeAt(s+1),c&&o!==ou&&o!==Ir&&o!==Cn&&o!==En&&o!==kn&&o!==In&&(s+=1,su.test(t.charAt(s)))){for(;su.test(t.charAt(s+1));)s+=1;t.charCodeAt(s+1)===Ir&&(s+=1)}d=["word",t.slice(v,s+1),v,s],v=s;break}default:{o===ou&&t.charCodeAt(v+1)===Zv?(s=t.indexOf("*/",v+2)+1,s===0&&(n||P?s=t.length:C("comment")),d=["comment",t.slice(v,s+1),v,s],v=s):(xn.lastIndex=v+1,xn.test(t),xn.lastIndex===0?s=t.length-1:s=xn.lastIndex-2,d=["word",t.slice(v,s+1),v,s],y.push(d),v=s);break}}return v++,d}}function M(R){b.push(R)}return{back:M,endOfFile:I,nextToken:x,position:S}},Cl=Ut,oi=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="atrule",n}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.append).call.apply(a,[].concat([this],o))},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.prepend).call.apply(a,[].concat([this],o))},r}(Cl),zs=oi;oi.default=oi;Cl.registerAtRule(oi);var Il=Ut,El,kl,ar=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="root",n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.normalize=function(n,o,s){var a=e.prototype.normalize.call(this,n);if(o){if(s==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(var u=O(a),c;!(c=u()).done;){var l=c.value;l.raws.before=o.raws.before}}return a},i.removeChild=function(n,o){var s=this.index(n);return!o&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),e.prototype.removeChild.call(this,n)},i.toResult=function(n){n===void 0&&(n={});var o=new El(new kl,this,n);return o.stringify()},r}(Il);ar.registerLazyResult=function(e){El=e};ar.registerProcessor=function(e){kl=e};var tn=ar;ar.default=ar;Il.registerRoot(ar);var Wr={comma:function(r){return Wr.split(r,[","],!0)},space:function(r){var i=[" ",`
|
|
52
|
-
`," "];return
|
|
50
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"},r.applyPrevMaps=function(){for(var t=O(this.previous()),n;!(n=t()).done;){var o=n.value,s=this.toUrl(this.path(o.file)),a=o.root||Bn(o.file),u=void 0;this.mapOpts.sourcesContent===!1?(u=new ol(o.text),u.sourcesContent&&(u.sourcesContent=null)):u=o.consumer(),this.map.applySourceMap(u,s,this.toUrl(this.path(a)))}},r.clearAnnotation=function(){if(this.mapOpts.annotation!==!1)if(this.root)for(var t,n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},r.generate=function(){if(this.clearAnnotation(),Uv&&Fv&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(n){t+=n}),[t]},r.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=zn.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new zn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},r.generateString=function(){var t=this;this.css="",this.map=new zn({file:this.outputFile(),ignoreInvalidMapping:!0});var n=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},u,c;this.stringify(this.root,function(l,f,p){if(t.css+=l,f&&p!=="end"&&(a.generated.line=n,a.generated.column=o-1,f.source&&f.source.start?(a.source=t.sourcePath(f),a.original.line=f.source.start.line,a.original.column=f.source.start.column-1,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,t.map.addMapping(a))),u=l.match(/\n/g),u?(n+=u.length,c=l.lastIndexOf(`
|
|
51
|
+
`),o=l.length-c):o+=l.length,f&&p!=="start"){var g=f.parent||{raws:{}},d=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!d||f!==g.last||g.raws.semicolon)&&(f.source&&f.source.end?(a.source=t.sourcePath(f),a.original.line=f.source.end.line,a.original.column=f.source.end.column-1,a.generated.line=n,a.generated.column=o-2,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=o-1,t.map.addMapping(a)))}})},r.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(t){return t.annotation}):!0},r.isInline=function(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;var t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(function(n){return n.inline}):!0},r.isMap=function(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0},r.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(t){return t.withContent()}):!0},r.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},r.path=function(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;var n=this.memoizedPaths.get(t);if(n)return n;var o=this.opts.to?Bn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(o=Bn(al(o,this.mapOpts.annotation)));var s=sl(o,t);return this.memoizedPaths.set(t,s),s},r.previous=function(){var t=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(o){if(o.source&&o.source.input.map){var s=o.source.input.map;t.previousMaps.includes(s)||t.previousMaps.push(s)}});else{var n=new Lv(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps},r.setSourcesContent=function(){var t=this,n={};if(this.root)this.root.walk(function(s){if(s.source){var a=s.source.input.from;if(a&&!n[a]){n[a]=!0;var u=t.usesFileUrls?t.toFileUrl(a):t.toUrl(t.path(a));t.map.setSourceContent(u,s.source.input.css)}}});else if(this.css){var o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}},r.sourcePath=function(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))},r.toBase64=function(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},r.toFileUrl=function(t){var n=this.memoizedFileURLs.get(t);if(n)return n;if(ru){var o=ru(t).toString();return this.memoizedFileURLs.set(t,o),o}else throw new Error("`map.absolute` option is not available in this PostCSS build")},r.toUrl=function(t){var n=this.memoizedURLs.get(t);if(n)return n;ul==="\\"&&(t=t.replace(/\\/g,"/"));var o=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,o),o},e}(),cl=$v,zv=Ai,jo=function(e){Ce(r,e);function r(i){var t;return t=e.call(this,i)||this,t.type="comment",t}return r}(zv),Pi=jo;jo.default=jo;var ll=mt.isClean,fl=mt.my,hl=Mi,pl=Pi,Bv=Ai,dl,Ls,Fs,vl;function gl(e){return e.map(function(r){return r.nodes&&(r.nodes=gl(r.nodes)),delete r.source,r})}function ml(e){if(e[ll]=!1,e.proxyOf.nodes)for(var r=O(e.proxyOf.nodes),i;!(i=r()).done;){var t=i.value;ml(t)}}var et=function(e){Ce(r,e);function r(){return e.apply(this,arguments)||this}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];for(var a=O(o),u;!(u=a()).done;)for(var c=u.value,l=this.normalize(c,this.last),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.push(g)}return this.markDirty(),this},i.cleanRaws=function(n){if(e.prototype.cleanRaws.call(this,n),this.nodes)for(var o=O(this.nodes),s;!(s=o()).done;){var a=s.value;a.cleanRaws(n)}},i.each=function(n){if(this.proxyOf.nodes){for(var o=this.getIterator(),s,a;this.indexes[o]<this.proxyOf.nodes.length&&(s=this.indexes[o],a=n(this.proxyOf.nodes[s],s),a!==!1);)this.indexes[o]+=1;return delete this.indexes[o],a}},i.every=function(n){return this.nodes.every(n)},i.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var n=this.lastEach;return this.indexes[n]=0,n},i.getProxyProcessor=function(){return{get:function(o,s){return s==="proxyOf"?o:o[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l;return(l=o)[s].apply(l,[].concat(u.map(function(f){return typeof f=="function"?function(p,g){return f(p.toProxy(),g)}:f})))}:s==="every"||s==="some"?function(a){return o[s](function(u){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];return a.apply(void 0,[].concat([u.toProxy()],l))})}:s==="root"?function(){return o.root().toProxy()}:s==="nodes"?o.nodes.map(function(a){return a.toProxy()}):s==="first"||s==="last"?o[s].toProxy():o[s]:o[s]},set:function(o,s,a){return o[s]===a||(o[s]=a,(s==="name"||s==="params"||s==="selector")&&o.markDirty()),!0}}},i.index=function(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))},i.insertAfter=function(n,o){var s=this.index(n),a=this.normalize(o,this.proxyOf.nodes[s]).reverse();s=this.index(n);for(var u=O(a),c;!(c=u()).done;){var l=c.value;this.proxyOf.nodes.splice(s+1,0,l)}var f;for(var p in this.indexes)f=this.indexes[p],s<f&&(this.indexes[p]=f+a.length);return this.markDirty(),this},i.insertBefore=function(n,o){var s=this.index(n),a=s===0?"prepend":!1,u=this.normalize(o,this.proxyOf.nodes[s],a).reverse();s=this.index(n);for(var c=O(u),l;!(l=c()).done;){var f=l.value;this.proxyOf.nodes.splice(s,0,f)}var p;for(var g in this.indexes)p=this.indexes[g],s<=p&&(this.indexes[g]=p+u.length);return this.markDirty(),this},i.normalize=function(n,o){var s=this;if(typeof n=="string")n=gl(dl(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(var a=O(n),u;!(u=a()).done;){var c=u.value;c.parent&&c.parent.removeChild(c,"ignore")}}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(var l=O(n),f;!(f=l()).done;){var p=f.value;p.parent&&p.parent.removeChild(p,"ignore")}}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new hl(n)]}else if(n.selector)n=[new Ls(n)];else if(n.name)n=[new Fs(n)];else if(n.text)n=[new pl(n)];else throw new Error("Unknown node type in node creation");var g=n.map(function(d){return d[fl]||r.rebuild(d),d=d.proxyOf,d.parent&&d.parent.removeChild(d),d[ll]&&ml(d),typeof d.raws.before>"u"&&o&&typeof o.raws.before<"u"&&(d.raws.before=o.raws.before.replace(/\S/g,"")),d.parent=s.proxyOf,d});return g},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];o=o.reverse();for(var a=O(o),u;!(u=a()).done;){for(var c=u.value,l=this.normalize(c,this.first,"prepend").reverse(),f=O(l),p;!(p=f()).done;){var g=p.value;this.proxyOf.nodes.unshift(g)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+l.length}return this.markDirty(),this},i.push=function(n){return n.parent=this,this.proxyOf.nodes.push(n),this},i.removeAll=function(){for(var n=O(this.proxyOf.nodes),o;!(o=n()).done;){var s=o.value;s.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},i.removeChild=function(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);var o;for(var s in this.indexes)o=this.indexes[s],o>=n&&(this.indexes[s]=o-1);return this.markDirty(),this},i.replaceValues=function(n,o,s){return s||(s=o,o={}),this.walkDecls(function(a){o.props&&!o.props.includes(a.prop)||o.fast&&!a.value.includes(o.fast)||(a.value=a.value.replace(n,s))}),this.markDirty(),this},i.some=function(n){return this.nodes.some(n)},i.walk=function(n){return this.each(function(o,s){var a;try{a=n(o,s)}catch(u){throw o.addToError(u)}return a!==!1&&o.walk&&(a=o.walk(n)),a})},i.walkAtRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="atrule"&&n.test(s.name))return o(s,a)}):this.walk(function(s,a){if(s.type==="atrule"&&s.name===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="atrule")return o(s,a)}))},i.walkComments=function(n){return this.walk(function(o,s){if(o.type==="comment")return n(o,s)})},i.walkDecls=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="decl"&&n.test(s.prop))return o(s,a)}):this.walk(function(s,a){if(s.type==="decl"&&s.prop===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="decl")return o(s,a)}))},i.walkRules=function(n,o){return o?F(n,RegExp)?this.walk(function(s,a){if(s.type==="rule"&&n.test(s.selector))return o(s,a)}):this.walk(function(s,a){if(s.type==="rule"&&s.selector===n)return o(s,a)}):(o=n,this.walk(function(s,a){if(s.type==="rule")return o(s,a)}))},be(r,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),r}(Bv);et.registerParse=function(e){dl=e};et.registerRule=function(e){Ls=e};et.registerAtRule=function(e){Fs=e};et.registerRoot=function(e){vl=e};var Ut=et;et.default=et;et.rebuild=function(e){e.type==="atrule"?Object.setPrototypeOf(e,Fs.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ls.prototype):e.type==="decl"?Object.setPrototypeOf(e,hl.prototype):e.type==="comment"?Object.setPrototypeOf(e,pl.prototype):e.type==="root"&&Object.setPrototypeOf(e,vl.prototype),e[fl]=!0,e.nodes&&e.nodes.forEach(function(r){et.rebuild(r)})};var qv=Ut,yl,_l,qr=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,Y({type:"document"},t))||this,n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.toResult=function(n){n===void 0&&(n={});var o=new yl(new _l,this,n);return o.stringify()},r}(qv);qr.registerLazyResult=function(e){yl=e};qr.registerProcessor=function(e){_l=e};var Us=qr;qr.default=qr;var nu={},bl=function(r){nu[r]||(nu[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Ho=function(){function e(i,t){if(t===void 0&&(t={}),this.type="warning",this.text=i,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var o in t)this[o]=t[o]}var r=e.prototype;return r.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),wl=Ho;Ho.default=Ho;var Vv=wl,Yo=function(){function e(i,t,n){this.processor=i,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var r=e.prototype;return r.toString=function(){return this.css},r.warn=function(t,n){n===void 0&&(n={}),n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var o=new Vv(t,n);return this.messages.push(o),o},r.warnings=function(){return this.messages.filter(function(t){return t.type==="warning"})},be(e,[{key:"content",get:function(){return this.css}}]),e}(),$s=Yo;Yo.default=Yo;var no=39,iu=34,wn=92,ou=47,Sn=10,Cr=32,Cn=12,In=9,En=13,Wv=91,Gv=93,jv=40,Hv=41,Yv=123,Kv=125,Jv=59,Xv=42,Zv=58,Qv=64,kn=/[\t\n\f\r "#'()/;[\\\]{}]/g,On=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,eg=/.[\r\n"'(/\\]/,su=/[\da-f]/i,tg=function(r,i){i===void 0&&(i={});var t=r.css.valueOf(),n=i.ignoreErrors,o,s,a,u,c,l,f,p,g,d,_=t.length,v=0,y=[],b=[];function S(){return v}function C(R){throw r.error("Unclosed "+R,v)}function I(){return b.length===0&&v>=_}function x(R){if(b.length)return b.pop();if(!(v>=_)){var P=R?R.ignoreUnclosed:!1;switch(o=t.charCodeAt(v),o){case Sn:case Cr:case In:case En:case Cn:{s=v;do s+=1,o=t.charCodeAt(s);while(o===Cr||o===Sn||o===In||o===En||o===Cn);d=["space",t.slice(v,s)],v=s-1;break}case Wv:case Gv:case Yv:case Kv:case Zv:case Jv:case Hv:{var H=String.fromCharCode(o);d=[H,H,v];break}case jv:{if(p=y.length?y.pop()[1]:"",g=t.charCodeAt(v+1),p==="url"&&g!==no&&g!==iu&&g!==Cr&&g!==Sn&&g!==In&&g!==Cn&&g!==En){s=v;do{if(l=!1,s=t.indexOf(")",s+1),s===-1)if(n||P){s=v;break}else C("bracket");for(f=s;t.charCodeAt(f-1)===wn;)f-=1,l=!l}while(l);d=["brackets",t.slice(v,s+1),v,s],v=s}else s=t.indexOf(")",v+1),u=t.slice(v,s+1),s===-1||eg.test(u)?d=["(","(",v]:(d=["brackets",u,v,s],v=s);break}case no:case iu:{a=o===no?"'":'"',s=v;do{if(l=!1,s=t.indexOf(a,s+1),s===-1)if(n||P){s=v+1;break}else C("string");for(f=s;t.charCodeAt(f-1)===wn;)f-=1,l=!l}while(l);d=["string",t.slice(v,s+1),v,s],v=s;break}case Qv:{kn.lastIndex=v+1,kn.test(t),kn.lastIndex===0?s=t.length-1:s=kn.lastIndex-2,d=["at-word",t.slice(v,s+1),v,s],v=s;break}case wn:{for(s=v,c=!0;t.charCodeAt(s+1)===wn;)s+=1,c=!c;if(o=t.charCodeAt(s+1),c&&o!==ou&&o!==Cr&&o!==Sn&&o!==In&&o!==En&&o!==Cn&&(s+=1,su.test(t.charAt(s)))){for(;su.test(t.charAt(s+1));)s+=1;t.charCodeAt(s+1)===Cr&&(s+=1)}d=["word",t.slice(v,s+1),v,s],v=s;break}default:{o===ou&&t.charCodeAt(v+1)===Xv?(s=t.indexOf("*/",v+2)+1,s===0&&(n||P?s=t.length:C("comment")),d=["comment",t.slice(v,s+1),v,s],v=s):(On.lastIndex=v+1,On.test(t),On.lastIndex===0?s=t.length-1:s=On.lastIndex-2,d=["word",t.slice(v,s+1),v,s],y.push(d),v=s);break}}return v++,d}}function M(R){b.push(R)}return{back:M,endOfFile:I,nextToken:x,position:S}},Sl=Ut,oi=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="atrule",n}var i=r.prototype;return i.append=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.append).call.apply(a,[].concat([this],o))},i.prepend=function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var a;return this.proxyOf.nodes||(this.nodes=[]),(a=e.prototype.prepend).call.apply(a,[].concat([this],o))},r}(Sl),zs=oi;oi.default=oi;Sl.registerAtRule(oi);var Cl=Ut,Il,El,sr=function(e){Ce(r,e);function r(t){var n;return n=e.call(this,t)||this,n.type="root",n.nodes||(n.nodes=[]),n}var i=r.prototype;return i.normalize=function(n,o,s){var a=e.prototype.normalize.call(this,n);if(o){if(s==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(var u=O(a),c;!(c=u()).done;){var l=c.value;l.raws.before=o.raws.before}}return a},i.removeChild=function(n,o){var s=this.index(n);return!o&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),e.prototype.removeChild.call(this,n)},i.toResult=function(n){n===void 0&&(n={});var o=new Il(new El,this,n);return o.stringify()},r}(Cl);sr.registerLazyResult=function(e){Il=e};sr.registerProcessor=function(e){El=e};var en=sr;sr.default=sr;Cl.registerRoot(sr);var Vr={comma:function(r){return Vr.split(r,[","],!0)},space:function(r){var i=[" ",`
|
|
52
|
+
`," "];return Vr.split(r,i)},split:function(r,i,t){for(var n=[],o="",s=!1,a=0,u=!1,c="",l=!1,f=O(r),p;!(p=f()).done;){var g=p.value;l?l=!1:g==="\\"?l=!0:u?g===c&&(u=!1):g==='"'||g==="'"?(u=!0,c=g):g==="("?a+=1:g===")"?a>0&&(a-=1):a===0&&i.includes(g)&&(s=!0),s?(o!==""&&n.push(o.trim()),o="",s=!1):o+=g}return(t||o!=="")&&n.push(o.trim()),n}},kl=Vr;Vr.default=Vr;var Ol=Ut,rg=kl,si=function(e){Ce(r,e);function r(i){var t;return t=e.call(this,i)||this,t.type="rule",t.nodes||(t.nodes=[]),t}return be(r,[{key:"selectors",get:function(){return rg.comma(this.selector)},set:function(t){var n=this.selector?this.selector.match(/,\s*/):null,o=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(o)}}]),r}(Ol),Bs=si;si.default=si;Ol.registerRule(si);var ng=Mi,ig=tg,og=Pi,sg=zs,ag=en,au=Bs,uu={empty:!0,space:!0};function ug(e){for(var r=e.length-1;r>=0;r--){var i=e[r],t=i[3]||i[2];if(t)return t}}var cg=function(){function e(i){this.input=i,this.root=new ag,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}var r=e.prototype;return r.atrule=function(t){var n=new sg;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);for(var o,s,a,u=!1,c=!1,l=[],f=[];!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),o=t[0],o==="("||o==="["?f.push(o==="("?")":"]"):o==="{"&&f.length>0?f.push("}"):o===f[f.length-1]&&f.pop(),f.length===0)if(o===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){c=!0;break}else if(o==="}"){if(l.length>0){for(a=l.length-1,s=l[a];s&&s[0]==="space";)s=l[--a];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(t);break}else l.push(t);else l.push(t);if(this.tokenizer.endOfFile()){u=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(n.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(n,"params",l),u&&(t=l[l.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)},r.checkMissedSemicolon=function(t){var n=this.colon(t);if(n!==!1){for(var o=0,s,a=n-1;a>=0&&(s=t[a],!(s[0]!=="space"&&(o+=1,o===2)));a--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}},r.colon=function(t){for(var n=0,o,s,a,u=O(t.entries()),c;!(c=u()).done;){var l=c.value,f=l[0],p=l[1];if(o=p,s=o[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!a)this.doubleColon(o);else{if(a[0]==="word"&&a[1]==="progid")continue;return f}a=o}return!1},r.comment=function(t){var n=new og;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;var o=t[1].slice(2,-2);if(/^\s*$/.test(o))n.text="",n.raws.left=o,n.raws.right="";else{var s=o.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}},r.createTokenizer=function(){this.tokenizer=ig(this.input)},r.decl=function(t,n){var o=new ng;this.init(o,t[0][2]);var s=t[t.length-1];for(s[0]===";"&&(this.semicolon=!0,t.pop()),o.source.end=this.getPosition(s[3]||s[2]||ug(t)),o.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),o.raws.before+=t.shift()[1];for(o.source.start=this.getPosition(t[0][2]),o.prop="";t.length;){var a=t[0][0];if(a===":"||a==="space"||a==="comment")break;o.prop+=t.shift()[1]}o.raws.between="";for(var u;t.length;)if(u=t.shift(),u[0]===":"){o.raws.between+=u[1];break}else u[0]==="word"&&/\w/.test(u[1])&&this.unknownWord([u]),o.raws.between+=u[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));for(var c=[],l;t.length&&(l=t[0][0],!(l!=="space"&&l!=="comment"));)c.push(t.shift());this.precheckMissedSemicolon(t);for(var f=t.length-1;f>=0;f--){if(u=t[f],u[1].toLowerCase()==="!important"){o.important=!0;var p=this.stringFrom(t,f);p=this.spacesFromEnd(t)+p,p!==" !important"&&(o.raws.important=p);break}else if(u[1].toLowerCase()==="important"){for(var g=t.slice(0),d="",_=f;_>0;_--){var v=g[_][0];if(d.trim().indexOf("!")===0&&v!=="space")break;d=g.pop()[1]+d}d.trim().indexOf("!")===0&&(o.important=!0,o.raws.important=d,t=g)}if(u[0]!=="space"&&u[0]!=="comment")break}var y=t.some(function(b){return b[0]!=="space"&&b[0]!=="comment"});y&&(o.raws.between+=c.map(function(b){return b[1]}).join(""),c=[]),this.raw(o,"value",c.concat(t),n),o.value.includes(":")&&!n&&this.checkMissedSemicolon(t)},r.doubleColon=function(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})},r.emptyRule=function(t){var n=new au;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n},r.end=function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)},r.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},r.freeSemicolon=function(t){if(this.spaces+=t[1],this.current.nodes){var n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}},r.getPosition=function(t){var n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}},r.init=function(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)},r.other=function(t){for(var n=!1,o=null,s=!1,a=null,u=[],c=t[1].startsWith("--"),l=[],f=t;f;){if(o=f[0],l.push(f),o==="("||o==="[")a||(a=f),u.push(o==="("?")":"]");else if(c&&s&&o==="{")a||(a=f),u.push("}");else if(u.length===0)if(o===";")if(s){this.decl(l,c);return}else break;else if(o==="{"){this.rule(l);return}else if(o==="}"){this.tokenizer.back(l.pop()),n=!0;break}else o===":"&&(s=!0);else o===u[u.length-1]&&(u.pop(),u.length===0&&(a=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),u.length>0&&this.unclosedBracket(a),n&&s){if(!c)for(;l.length&&(f=l[l.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,c)}else this.unknownWord(l)},r.parse=function(){for(var t;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()},r.precheckMissedSemicolon=function(){},r.raw=function(t,n,o,s){for(var a,u,c=o.length,l="",f=!0,p,g,d=0;d<c;d+=1)a=o[d],u=a[0],u==="space"&&d===c-1&&!s?f=!1:u==="comment"?(g=o[d-1]?o[d-1][0]:"empty",p=o[d+1]?o[d+1][0]:"empty",!uu[g]&&!uu[p]?l.slice(-1)===","?f=!1:l+=a[1]:f=!1):l+=a[1];if(!f){var _=o.reduce(function(v,y){return v+y[1]},"");t.raws[n]={raw:_,value:l}}t[n]=l},r.rule=function(t){t.pop();var n=new au;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n},r.spacesAndCommentsFromEnd=function(t){for(var n,o="";t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)o=t.pop()[1]+o;return o},r.spacesAndCommentsFromStart=function(t){for(var n,o="";t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)o+=t.shift()[1];return o},r.spacesFromEnd=function(t){for(var n,o="";t.length&&(n=t[t.length-1][0],n==="space");)o=t.pop()[1]+o;return o},r.stringFrom=function(t,n){for(var o="",s=n;s<t.length;s++)o+=t[s][1];return t.splice(n,t.length-n),o},r.unclosedBlock=function(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)},r.unclosedBracket=function(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})},r.unexpectedClose=function(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})},r.unknownWord=function(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})},r.unnamedAtrule=function(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})},e}(),lg=cg,fg=Ut,hg=lg,pg=Ti;function ai(e,r){var i=new pg(e,r),t=new hg(i);try{t.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&r&&r.from&&(/\.scss$/i.test(r.from)?n.message+=`
|
|
53
53
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(r.from)?n.message+=`
|
|
54
54
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(r.from)&&(n.message+=`
|
|
55
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return t.root}var qs=ai;ai.default=ai;hg.registerParse(ai);var We=mt.isClean,vg=mt.my,gg=ll,mg=Ri,yg=Ut,_g=Us,bg=wl,cu=$s,wg=qs,Sg=tn,Cg={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ig={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Eg={Once:!0,postcssPlugin:!0,prepare:!0},ur=0;function Er(e){return(typeof e>"u"?"undefined":q(e))==="object"&&typeof e.then=="function"}function Rl(e){var r=!1,i=Cg[e.type];return e.type==="decl"?r=e.prop.toLowerCase():e.type==="atrule"&&(r=e.name.toLowerCase()),r&&e.append?[i,i+"-"+r,ur,i+"Exit",i+"Exit-"+r]:r?[i,i+"-"+r,i+"Exit",i+"Exit-"+r]:e.append?[i,ur,i+"Exit"]:[i,i+"Exit"]}function lu(e){var r;return e.type==="document"?r=["Document",ur,"DocumentExit"]:e.type==="root"?r=["Root",ur,"RootExit"]:r=Rl(e),{eventIndex:0,events:r,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ko(e){return e[We]=!1,e.nodes&&e.nodes.forEach(function(r){return Ko(r)}),e}var Jo={},cr=function(){function e(i,t,n){var o=this;this.stringified=!1,this.processed=!1;var s;if((typeof t>"u"?"undefined":q(t))==="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Ko(t);else if(F(t,e)||F(t,cu))s=Ko(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var a=wg;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{s=a(t,n)}catch(u){this.processed=!0,this.error=u}s&&!s[vg]&&yg.rebuild(s)}this.result=new cu(i,s,n),this.helpers=Y({},Jo,{postcss:Jo,result:this.result}),this.plugins=this.processor.plugins.map(function(u){return(typeof u>"u"?"undefined":q(u))==="object"&&u.prepare?Y({},u,u.prepare(o.result)):u})}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},r.handleError=function(t,n){var o=this.result.lastPlugin;try{if(n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=o.postcssPlugin,t.setMessage();else if(o.postcssVersion&&process.env.NODE_ENV!=="production"){var s=o.postcssPlugin,a=o.postcssVersion,u=this.result.processor.version,c=a.split("."),l=u.split(".");(c[0]!==l[0]||parseInt(c[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+u+", but "+s+" uses "+a+". Perhaps this is the source of the error below.")}}catch(f){console&&console.error&&console.error(f)}return t},r.prepareVisitors=function(){var t=this;this.listeners={};for(var n=function(l,f,p){t.listeners[f]||(t.listeners[f]=[]),t.listeners[f].push([l,p])},o=O(this.plugins),s;!(s=o()).done;){var a=s.value;if((typeof a>"u"?"undefined":q(a))==="object")for(var u in a){if(!Ig[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event "+u+" in "+a.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Eg[u])if(q(a[u])==="object")for(var c in a[u])c==="*"?n(a,u,a[u][c]):n(a,u+"-"+c.toLowerCase(),a[u][c]);else typeof a[u]=="function"&&n(a,u,a[u])}}this.hasListener=Object.keys(this.listeners).length>0},r.runAsync=function(){var t=this;return ws(function(){var n,o,s,a,u,c,l,f,p,g,d,_;return Fr(this,function(v){switch(v.label){case 0:t.plugin=0,n=0,v.label=1;case 1:if(!(n<t.plugins.length))return[3,6];if(o=t.plugins[n],s=t.runOnRoot(o),!Er(s))return[3,5];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,s];case 3:return v.sent(),[3,5];case 4:throw a=v.sent(),t.handleError(a);case 5:return n++,[3,1];case 6:if(t.prepareVisitors(),!t.hasListener)return[3,18];u=t.result.root,v.label=7;case 7:if(u[We])return[3,14];u[We]=!0,c=[lu(u)],v.label=8;case 8:if(!(c.length>0))return[3,13];if(l=t.visitTick(c),!Er(l))return[3,12];v.label=9;case 9:return v.trys.push([9,11,,12]),[4,l];case 10:return v.sent(),[3,12];case 11:throw f=v.sent(),p=c[c.length-1].node,t.handleError(f,p);case 12:return[3,8];case 13:return[3,7];case 14:if(!t.listeners.OnceExit)return[3,18];g=function(){var y,b,S,C,I;return Fr(this,function(x){switch(x.label){case 0:y=_.value,b=y[0],S=y[1],t.result.lastPlugin=b,x.label=1;case 1:return x.trys.push([1,6,,7]),u.type!=="document"?[3,3]:(C=u.nodes.map(function(M){return S(M,t.helpers)}),[4,Promise.all(C)]);case 2:return x.sent(),[3,5];case 3:return[4,S(u,t.helpers)];case 4:x.sent(),x.label=5;case 5:return[3,7];case 6:throw I=x.sent(),t.handleError(I);case 7:return[2]}})},d=O(t.listeners.OnceExit),v.label=15;case 15:return(_=d()).done?[3,18]:[5,pc(g())];case 16:v.sent(),v.label=17;case 17:return[3,15];case 18:return t.processed=!0,[2,t.stringify()]}})})()},r.runOnRoot=function(t){var n=this;this.result.lastPlugin=t;try{if((typeof t>"u"?"undefined":q(t))==="object"&&t.Once){if(this.result.root.type==="document"){var o=this.result.root.nodes.map(function(s){return t.Once(s,n.helpers)});return Er(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}},r.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,n=mg;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);var o=new gg(n,this.result.root,this.result.opts),s=o.generate();return this.result.css=s[0],this.result.map=s[1],this.result},r.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t=O(this.plugins),n;!(n=t()).done;){var o=n.value,s=this.runOnRoot(o);if(Er(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[We];)a[We]=!0,this.walkSync(a);if(this.listeners.OnceExit)if(a.type==="document")for(var u=O(a.nodes),c;!(c=u()).done;){var l=c.value;this.visitSync(this.listeners.OnceExit,l)}else this.visitSync(this.listeners.OnceExit,a)}return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||bg("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this.css},r.visitSync=function(t,n){for(var o=O(t),s;!(s=o()).done;){var a=s.value,u=a[0],c=a[1];this.result.lastPlugin=u;var l=void 0;try{l=c(n,this.helpers)}catch(f){throw this.handleError(f,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Er(l))throw this.getAsyncError()}},r.visitTick=function(t){var n=t[t.length-1],o=n.node,s=n.visitors;if(o.type!=="root"&&o.type!=="document"&&!o.parent){t.pop();return}if(s.length>0&&n.visitorIndex<s.length){var a=s[n.visitorIndex],u=a[0],c=a[1];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=u;try{return c(o.toProxy(),this.helpers)}catch(d){throw this.handleError(d,o)}}if(n.iterator!==0){for(var l=n.iterator,f;f=o.nodes[o.indexes[l]];)if(o.indexes[l]+=1,!f[We]){f[We]=!0,t.push(lu(f));return}n.iterator=0,delete o.indexes[l]}for(var p=n.events;n.eventIndex<p.length;){var g=p[n.eventIndex];if(n.eventIndex+=1,g===ur){o.nodes&&o.nodes.length&&(o[We]=!0,n.iterator=o.getIterator());return}else if(this.listeners[g]){n.visitors=this.listeners[g];return}}t.pop()},r.walkSync=function(t){var n=this;t[We]=!0;for(var o=Rl(t),s=O(o),a;!(a=s()).done;){var u=a.value;if(u===ur)t.nodes&&t.each(function(l){l[We]||n.walkSync(l)});else{var c=this.listeners[u];if(c&&this.visitSync(c,t.toProxy()))return}}},r.warnings=function(){return this.sync().warnings()},be(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();cr.registerPostcss=function(e){Jo=e};var Al=cr;cr.default=cr;Sg.registerLazyResult(cr);_g.registerLazyResult(cr);var kg=ll,Og=Ri,xg=wl,Rg=qs,Ag=$s,Xo=function(){function e(i,t,n){t=t.toString(),this.stringified=!1,this._processor=i,this._css=t,this._opts=n,this._map=void 0;var o,s=Og;this.result=new Ag(this._processor,o,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var u=new kg(s,o,this._opts,t);if(u.isMap()){var c=u.generate(),l=c[0],f=c[1];l&&(this.result.css=l),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.sync=function(){if(this.error)throw this.error;return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this._opts||xg("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this._css},r.warnings=function(){return[]},be(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var t,n=Rg;try{t=n(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=t,t}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),Mg=Xo;Xo.default=Xo;var Tg=Mg,Pg=Al,Dg=Us,Ng=tn,Gr=function(){function e(i){i===void 0&&(i=[]),this.version="8.4.38",this.plugins=this.normalize(i)}var r=e.prototype;return r.normalize=function(t){for(var n=[],o=O(t),s;!(s=o()).done;){var a=s.value;if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),(typeof a>"u"?"undefined":q(a))==="object"&&Array.isArray(a.plugins))n=n.concat(a.plugins);else if((typeof a>"u"?"undefined":q(a))==="object"&&a.postcssPlugin)n.push(a);else if(typeof a=="function")n.push(a);else if((typeof a>"u"?"undefined":q(a))==="object"&&(a.parse||a.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(a+" is not a PostCSS plugin")}return n},r.process=function(t,n){return n===void 0&&(n={}),!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new Tg(this,t,n):new Pg(this,t,n)},r.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},e}(),Lg=Gr;Gr.default=Gr;Ng.registerProcessor(Gr);Dg.registerProcessor(Gr);var Fg=Mi,Ug=ol,$g=Pi,zg=zs,Bg=Ti,qg=tn,Vg=Bs;function jr(e,r){if(Array.isArray(e))return e.map(function(f){return jr(f)});var i=e.inputs,t=Nr(e,["inputs"]);if(i){r=[];for(var n=O(i),o;!(o=n()).done;){var s=o.value,a=Y({},s,{__proto__:Bg.prototype});a.map&&(a.map=Y({},a.map,{__proto__:Ug.prototype})),r.push(a)}}if(t.nodes&&(t.nodes=e.nodes.map(function(f){return jr(f,r)})),t.source){var u=t.source,c=u.inputId,l=Nr(u,["inputId"]);t.source=l,c!=null&&(t.source.input=r[c])}if(t.type==="root")return new qg(t);if(t.type==="decl")return new Fg(t);if(t.type==="rule")return new Vg(t);if(t.type==="comment")return new $g(t);if(t.type==="atrule")return new zg(t);throw new Error("Unknown node type: "+e.type)}var Wg=jr;jr.default=jr;var Gg=Ns,Ml=Mi,jg=Al,Hg=Ut,Vs=Lg,Yg=Ri,Kg=Wg,Tl=Us,Jg=Sl,Pl=Pi,Dl=zs,Xg=$s,Zg=Ti,Qg=qs,em=Ol,Nl=Bs,Ll=tn,tm=Ai;function te(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Vs(r)}te.plugin=function(r,i){var t=!1;function n(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];console&&console.warn&&!t&&(t=!0,console.warn(r+`: postcss.plugin was deprecated. Migration guide:
|
|
55
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return t.root}var qs=ai;ai.default=ai;fg.registerParse(ai);var We=mt.isClean,dg=mt.my,vg=cl,gg=Ri,mg=Ut,yg=Us,_g=bl,cu=$s,bg=qs,wg=en,Sg={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cg={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ig={Once:!0,postcssPlugin:!0,prepare:!0},ar=0;function Ir(e){return(typeof e>"u"?"undefined":q(e))==="object"&&typeof e.then=="function"}function xl(e){var r=!1,i=Sg[e.type];return e.type==="decl"?r=e.prop.toLowerCase():e.type==="atrule"&&(r=e.name.toLowerCase()),r&&e.append?[i,i+"-"+r,ar,i+"Exit",i+"Exit-"+r]:r?[i,i+"-"+r,i+"Exit",i+"Exit-"+r]:e.append?[i,ar,i+"Exit"]:[i,i+"Exit"]}function lu(e){var r;return e.type==="document"?r=["Document",ar,"DocumentExit"]:e.type==="root"?r=["Root",ar,"RootExit"]:r=xl(e),{eventIndex:0,events:r,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ko(e){return e[We]=!1,e.nodes&&e.nodes.forEach(function(r){return Ko(r)}),e}var Jo={},ur=function(){function e(i,t,n){var o=this;this.stringified=!1,this.processed=!1;var s;if((typeof t>"u"?"undefined":q(t))==="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Ko(t);else if(F(t,e)||F(t,cu))s=Ko(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var a=bg;n.syntax&&(a=n.syntax.parse),n.parser&&(a=n.parser),a.parse&&(a=a.parse);try{s=a(t,n)}catch(u){this.processed=!0,this.error=u}s&&!s[dg]&&mg.rebuild(s)}this.result=new cu(i,s,n),this.helpers=Y({},Jo,{postcss:Jo,result:this.result}),this.plugins=this.processor.plugins.map(function(u){return(typeof u>"u"?"undefined":q(u))==="object"&&u.prepare?Y({},u,u.prepare(o.result)):u})}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},r.handleError=function(t,n){var o=this.result.lastPlugin;try{if(n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=o.postcssPlugin,t.setMessage();else if(o.postcssVersion&&process.env.NODE_ENV!=="production"){var s=o.postcssPlugin,a=o.postcssVersion,u=this.result.processor.version,c=a.split("."),l=u.split(".");(c[0]!==l[0]||parseInt(c[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+u+", but "+s+" uses "+a+". Perhaps this is the source of the error below.")}}catch(f){console&&console.error&&console.error(f)}return t},r.prepareVisitors=function(){var t=this;this.listeners={};for(var n=function(l,f,p){t.listeners[f]||(t.listeners[f]=[]),t.listeners[f].push([l,p])},o=O(this.plugins),s;!(s=o()).done;){var a=s.value;if((typeof a>"u"?"undefined":q(a))==="object")for(var u in a){if(!Cg[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event "+u+" in "+a.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Ig[u])if(q(a[u])==="object")for(var c in a[u])c==="*"?n(a,u,a[u][c]):n(a,u+"-"+c.toLowerCase(),a[u][c]);else typeof a[u]=="function"&&n(a,u,a[u])}}this.hasListener=Object.keys(this.listeners).length>0},r.runAsync=function(){var t=this;return ws(function(){var n,o,s,a,u,c,l,f,p,g,d,_;return Lr(this,function(v){switch(v.label){case 0:t.plugin=0,n=0,v.label=1;case 1:if(!(n<t.plugins.length))return[3,6];if(o=t.plugins[n],s=t.runOnRoot(o),!Ir(s))return[3,5];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,s];case 3:return v.sent(),[3,5];case 4:throw a=v.sent(),t.handleError(a);case 5:return n++,[3,1];case 6:if(t.prepareVisitors(),!t.hasListener)return[3,18];u=t.result.root,v.label=7;case 7:if(u[We])return[3,14];u[We]=!0,c=[lu(u)],v.label=8;case 8:if(!(c.length>0))return[3,13];if(l=t.visitTick(c),!Ir(l))return[3,12];v.label=9;case 9:return v.trys.push([9,11,,12]),[4,l];case 10:return v.sent(),[3,12];case 11:throw f=v.sent(),p=c[c.length-1].node,t.handleError(f,p);case 12:return[3,8];case 13:return[3,7];case 14:if(!t.listeners.OnceExit)return[3,18];g=function(){var y,b,S,C,I;return Lr(this,function(x){switch(x.label){case 0:y=_.value,b=y[0],S=y[1],t.result.lastPlugin=b,x.label=1;case 1:return x.trys.push([1,6,,7]),u.type!=="document"?[3,3]:(C=u.nodes.map(function(M){return S(M,t.helpers)}),[4,Promise.all(C)]);case 2:return x.sent(),[3,5];case 3:return[4,S(u,t.helpers)];case 4:x.sent(),x.label=5;case 5:return[3,7];case 6:throw I=x.sent(),t.handleError(I);case 7:return[2]}})},d=O(t.listeners.OnceExit),v.label=15;case 15:return(_=d()).done?[3,18]:[5,hc(g())];case 16:v.sent(),v.label=17;case 17:return[3,15];case 18:return t.processed=!0,[2,t.stringify()]}})})()},r.runOnRoot=function(t){var n=this;this.result.lastPlugin=t;try{if((typeof t>"u"?"undefined":q(t))==="object"&&t.Once){if(this.result.root.type==="document"){var o=this.result.root.nodes.map(function(s){return t.Once(s,n.helpers)});return Ir(o[0])?Promise.all(o):o}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}},r.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,n=gg;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);var o=new vg(n,this.result.root,this.result.opts),s=o.generate();return this.result.css=s[0],this.result.map=s[1],this.result},r.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t=O(this.plugins),n;!(n=t()).done;){var o=n.value,s=this.runOnRoot(o);if(Ir(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[We];)a[We]=!0,this.walkSync(a);if(this.listeners.OnceExit)if(a.type==="document")for(var u=O(a.nodes),c;!(c=u()).done;){var l=c.value;this.visitSync(this.listeners.OnceExit,l)}else this.visitSync(this.listeners.OnceExit,a)}return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||_g("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this.css},r.visitSync=function(t,n){for(var o=O(t),s;!(s=o()).done;){var a=s.value,u=a[0],c=a[1];this.result.lastPlugin=u;var l=void 0;try{l=c(n,this.helpers)}catch(f){throw this.handleError(f,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Ir(l))throw this.getAsyncError()}},r.visitTick=function(t){var n=t[t.length-1],o=n.node,s=n.visitors;if(o.type!=="root"&&o.type!=="document"&&!o.parent){t.pop();return}if(s.length>0&&n.visitorIndex<s.length){var a=s[n.visitorIndex],u=a[0],c=a[1];n.visitorIndex+=1,n.visitorIndex===s.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=u;try{return c(o.toProxy(),this.helpers)}catch(d){throw this.handleError(d,o)}}if(n.iterator!==0){for(var l=n.iterator,f;f=o.nodes[o.indexes[l]];)if(o.indexes[l]+=1,!f[We]){f[We]=!0,t.push(lu(f));return}n.iterator=0,delete o.indexes[l]}for(var p=n.events;n.eventIndex<p.length;){var g=p[n.eventIndex];if(n.eventIndex+=1,g===ar){o.nodes&&o.nodes.length&&(o[We]=!0,n.iterator=o.getIterator());return}else if(this.listeners[g]){n.visitors=this.listeners[g];return}}t.pop()},r.walkSync=function(t){var n=this;t[We]=!0;for(var o=xl(t),s=O(o),a;!(a=s()).done;){var u=a.value;if(u===ar)t.nodes&&t.each(function(l){l[We]||n.walkSync(l)});else{var c=this.listeners[u];if(c&&this.visitSync(c,t.toProxy()))return}}},r.warnings=function(){return this.sync().warnings()},be(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();ur.registerPostcss=function(e){Jo=e};var Rl=ur;ur.default=ur;wg.registerLazyResult(ur);yg.registerLazyResult(ur);var Eg=cl,kg=Ri,Og=bl,xg=qs,Rg=$s,Xo=function(){function e(i,t,n){t=t.toString(),this.stringified=!1,this._processor=i,this._css=t,this._opts=n,this._map=void 0;var o,s=kg;this.result=new Rg(this._processor,o,this._opts),this.result.css=t;var a=this;Object.defineProperty(this.result,"root",{get:function(){return a.root}});var u=new Eg(s,o,this._opts,t);if(u.isMap()){var c=u.generate(),l=c[0],f=c[1];l&&(this.result.css=l),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.css}var r=e.prototype;return r.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},r.catch=function(t){return this.async().catch(t)},r.finally=function(t){return this.async().then(t,t)},r.sync=function(){if(this.error)throw this.error;return this.result},r.then=function(t,n){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Og("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,n)},r.toString=function(){return this._css},r.warnings=function(){return[]},be(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var t,n=xg;try{t=n(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=t,t}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),Ag=Xo;Xo.default=Xo;var Mg=Ag,Tg=Rl,Pg=Us,Dg=en,Wr=function(){function e(i){i===void 0&&(i=[]),this.version="8.4.38",this.plugins=this.normalize(i)}var r=e.prototype;return r.normalize=function(t){for(var n=[],o=O(t),s;!(s=o()).done;){var a=s.value;if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),(typeof a>"u"?"undefined":q(a))==="object"&&Array.isArray(a.plugins))n=n.concat(a.plugins);else if((typeof a>"u"?"undefined":q(a))==="object"&&a.postcssPlugin)n.push(a);else if(typeof a=="function")n.push(a);else if((typeof a>"u"?"undefined":q(a))==="object"&&(a.parse||a.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(a+" is not a PostCSS plugin")}return n},r.process=function(t,n){return n===void 0&&(n={}),!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new Mg(this,t,n):new Tg(this,t,n)},r.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},e}(),Ng=Wr;Wr.default=Wr;Dg.registerProcessor(Wr);Pg.registerProcessor(Wr);var Lg=Mi,Fg=il,Ug=Pi,$g=zs,zg=Ti,Bg=en,qg=Bs;function Gr(e,r){if(Array.isArray(e))return e.map(function(f){return Gr(f)});var i=e.inputs,t=Dr(e,["inputs"]);if(i){r=[];for(var n=O(i),o;!(o=n()).done;){var s=o.value,a=Y({},s,{__proto__:zg.prototype});a.map&&(a.map=Y({},a.map,{__proto__:Fg.prototype})),r.push(a)}}if(t.nodes&&(t.nodes=e.nodes.map(function(f){return Gr(f,r)})),t.source){var u=t.source,c=u.inputId,l=Dr(u,["inputId"]);t.source=l,c!=null&&(t.source.input=r[c])}if(t.type==="root")return new Bg(t);if(t.type==="decl")return new Lg(t);if(t.type==="rule")return new qg(t);if(t.type==="comment")return new Ug(t);if(t.type==="atrule")return new $g(t);throw new Error("Unknown node type: "+e.type)}var Vg=Gr;Gr.default=Gr;var Wg=Ns,Al=Mi,Gg=Rl,jg=Ut,Vs=Ng,Hg=Ri,Yg=Vg,Ml=Us,Kg=wl,Tl=Pi,Pl=zs,Jg=$s,Xg=Ti,Zg=qs,Qg=kl,Dl=Bs,Nl=en,em=Ai;function te(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Vs(r)}te.plugin=function(r,i){var t=!1;function n(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];console&&console.warn&&!t&&(t=!0,console.warn(r+`: postcss.plugin was deprecated. Migration guide:
|
|
56
56
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(r+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
57
|
-
https://www.w3ctech.com/topic/2226`));var c=i.apply(void 0,[].concat(a));return c.postcssPlugin=r,c.postcssVersion=new Vs().version,c}var o;return Object.defineProperty(n,"postcss",{get:function(){return o||(o=n()),o}}),n.process=function(s,a,u){return te([n(u)]).process(s,a)},n};te.stringify=
|
|
57
|
+
https://www.w3ctech.com/topic/2226`));var c=i.apply(void 0,[].concat(a));return c.postcssPlugin=r,c.postcssVersion=new Vs().version,c}var o;return Object.defineProperty(n,"postcss",{get:function(){return o||(o=n()),o}}),n.process=function(s,a,u){return te([n(u)]).process(s,a)},n};te.stringify=Hg;te.parse=Zg;te.fromJSON=Yg;te.list=Qg;te.comment=function(e){return new Tl(e)};te.atRule=function(e){return new Pl(e)};te.decl=function(e){return new Al(e)};te.rule=function(e){return new Dl(e)};te.root=function(e){return new Nl(e)};te.document=function(e){return new Ml(e)};te.CssSyntaxError=Wg;te.Declaration=Al;te.Container=jg;te.Processor=Vs;te.Document=Ml;te.Comment=Tl;te.Warning=Kg;te.AtRule=Pl;te.Result=Jg;te.Input=Xg;te.Rule=Dl;te.Root=Nl;te.Node=em;Gg.registerPostcss(te);var tm=te;te.default=te;var ue=hv(tm);ue.stringify;ue.fromJSON;ue.plugin;ue.parse;ue.list;ue.document;ue.comment;ue.atRule;ue.rule;ue.decl;ue.root;ue.CssSyntaxError;ue.Declaration;ue.Container;ue.Processor;ue.Document;ue.Comment;ue.Warning;ue.AtRule;ue.Result;ue.Input;ue.Rule;ue.Root;ue.Node;var rm=function(){function e(){for(var i=arguments.length,t=new Array(i),n=0;n<i;n++)t[n]=arguments[n];De(this,"parentElement",null),De(this,"parentNode",null),De(this,"ownerDocument"),De(this,"firstChild",null),De(this,"lastChild",null),De(this,"previousSibling",null),De(this,"nextSibling",null),De(this,"ELEMENT_NODE",1),De(this,"TEXT_NODE",3),De(this,"nodeType"),De(this,"nodeName"),De(this,"RRNodeType")}var r=e.prototype;return r.contains=function(t){if(F(t,e)){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1},r.appendChild=function(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")},r.insertBefore=function(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")},r.removeChild=function(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")},r.toString=function(){return"RRNode"},be(e,[{key:"childNodes",get:function(){for(var t=[],n=this.firstChild;n;)t.push(n),n=n.nextSibling;return t}}]),e}(),fu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},hu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xn={},nm=function(){return!!globalThis.Zone};function Ws(e){if(xn[e])return xn[e];var r=globalThis[e],i=r.prototype,t=e in fu?fu[e]:void 0,n=!!(t&&t.every(function(l){var f,p;return!!((p=(f=Object.getOwnPropertyDescriptor(i,l))==null?void 0:f.get)!=null&&p.toString().includes("[native code]"))})),o=e in hu?hu[e]:void 0,s=!!(o&&o.every(function(l){var f;return typeof i[l]=="function"&&((f=i[l])==null?void 0:f.toString().includes("[native code]"))}));if(n&&s&&!nm())return xn[e]=r.prototype,r.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return r.prototype;var c=u[e].prototype;return document.body.removeChild(a),c?xn[e]=c:i}catch{return i}}var io={};function yt(e,r,i){var t,n=e+"."+String(i);if(io[n])return io[n].call(r);var o=Ws(e),s=(t=Object.getOwnPropertyDescriptor(o,i))==null?void 0:t.get;return s?(io[n]=s,s.call(r)):r[i]}var oo={};function Ll(e,r,i){var t=e+"."+String(i);if(oo[t])return oo[t].bind(r);var n=Ws(e),o=n[i];return typeof o!="function"?r[i]:(oo[t]=o,o.bind(r))}function im(e){return yt("Node",e,"childNodes")}function om(e){return yt("Node",e,"parentNode")}function sm(e){return yt("Node",e,"parentElement")}function am(e){return yt("Node",e,"textContent")}function um(e,r){return Ll("Node",e,"contains")(r)}function cm(e){return Ll("Node",e,"getRootNode")()}function lm(e){return!e||!("host"in e)?null:yt("ShadowRoot",e,"host")}function fm(e){return e.styleSheets}function hm(e){return!e||!("shadowRoot"in e)?null:yt("Element",e,"shadowRoot")}function pm(e,r){return yt("Element",e,"querySelector")(r)}function dm(e,r){return yt("Element",e,"querySelectorAll")(r)}function Fl(){return Ws("MutationObserver").constructor}function $t(e,r,i){try{if(!(r in e))return function(){};var t=e[r],n=i(t);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:t}})),e[r]=n,function(){e[r]=t}}catch{return function(){}}}var B={childNodes:im,parentNode:om,parentElement:sm,textContent:am,contains:um,getRootNode:cm,host:lm,styleSheets:fm,shadowRoot:hm,querySelector:pm,querySelectorAll:dm,mutationObserver:Fl,patch:$t};function Ee(e,r,i){i===void 0&&(i=document);var t={capture:!0,passive:!0};return i.addEventListener(e,r,t),function(){return i.removeEventListener(e,r,t)}}var Ht=`Please stop import mirror directly. Instead of that,\r
|
|
58
58
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
59
|
-
or you can use record.mirror to access the mirror instance during recording.`,pu={map:{},getId:function(){return console.error(Ht),-1},getNode:function(){return console.error(Ht),null},removeNodeFromMap:function(){console.error(Ht)},has:function(){return console.error(Ht),!1},reset:function(){console.error(Ht)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(pu=new Proxy(pu,{get:function(r,i,t){return i==="map"&&console.error(Ht),Reflect.get(r,i,t)}}));function Hr(e,r,i){i===void 0&&(i={});var t=null,n=0;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var u=Date.now();!n&&i.leading===!1&&(n=u);var c=r-(u-n),l=this;c<=0||c>r?(t&&(clearTimeout(t),t=null),n=u,e.apply(l,s)):!t&&i.trailing!==!1&&(t=setTimeout(function(){n=i.leading===!1?0:Date.now(),t=null,e.apply(l,s)},c))}}function Di(e,r,i,t,n){n===void 0&&(n=window);var o=n.Object.getOwnPropertyDescriptor(e,r);return n.Object.defineProperty(e,r,t?i:{set:function(a){var u=this;setTimeout(function(){i.set.call(u,a)},0),o&&o.set&&o.set.call(this,a)}}),function(){return Di(e,r,o||{},!0)}}var ui=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ui=function(){return new Date().getTime()});function $l(e){var r,i,t,n,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((r=B.parentElement(o.body))==null?void 0:r.scrollLeft)||((i=o==null?void 0:o.body)==null?void 0:i.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((t=B.parentElement(o.body))==null?void 0:t.scrollTop)||((n=o==null?void 0:o.body)==null?void 0:n.scrollTop)||0}}function zl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Bl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ql(e){if(!e)return null;var r=e.nodeType===e.ELEMENT_NODE?e:B.parentElement(e);return r}function ke(e,r,i,t){if(!e)return!1;var n=ql(e);if(!n)return!1;try{if(typeof r=="string"){if(n.classList.contains(r)||t&&n.closest("."+r)!==null)return!0}else if(Qn(n,r,t))return!0}catch{}return!!(i&&(n.matches(i)||t&&n.closest(i)!==null))}function gm(e,r){return r.getId(e)!==-1}function so(e,r,i){return e.tagName==="TITLE"&&i.headTitleMutations?!0:r.getId(e)===Ur}function Vl(e,r){if(Or(e))return!1;var i=r.getId(e);if(!r.has(i))return!0;var t=B.parentNode(e);return t&&t.nodeType===e.DOCUMENT_NODE?!1:t?Vl(t,r):!0}function Zo(e){return!!e.changedTouches}function mm(e){e===void 0&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Wl(e,r){return!!(e.nodeName==="IFRAME"&&r.getMeta(e))}function Gl(e,r){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&r.getMeta(e))}function Qo(e){return e?F(e,nm)&&"shadowRoot"in e?!!e.shadowRoot:!!B.shadowRoot(e):!1}var ym=function(){function e(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}var r=e.prototype;return r.getId=function(t){var n;return(n=this.styleIDMap.get(t))!=null?n:-1},r.has=function(t){return this.styleIDMap.has(t)},r.add=function(t,n){if(this.has(t))return this.getId(t);var o;return n===void 0?o=this.id++:o=n,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o},r.getStyle=function(t){return this.idStyleMap.get(t)||null},r.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},r.generateId=function(){return this.id++},e}();function jl(e){var r,i=null;return"getRootNode"in e&&((r=B.getRootNode(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&B.host(B.getRootNode(e))&&(i=B.host(B.getRootNode(e))),i}function _m(e){for(var r=e,i;i=jl(r);)r=i;return r}function bm(e){var r=e.ownerDocument;if(!r)return!1;var i=_m(e);return B.contains(r,i)}function Hl(e){var r=e.ownerDocument;return r?B.contains(r,e)||bm(e):!1}var V=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(V||{}),D=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(D||{}),Ae=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(Ae||{}),Je=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(Je||{}),lr=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(lr||{}),Yt=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Yt||{}),Yl=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Yl||{});function du(e){return"__ln"in e}var wm=function(){function e(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}var r=e.prototype;return r.get=function(t){if(t>=this.length)throw new Error("Position outside of list range");for(var n=this.head,o=0;o<t;o++)n=(n==null?void 0:n.next)||null;return n},r.addNode=function(t){var n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&du(t.previousSibling)){var o=t.previousSibling.__ln.next;n.next=o,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,o&&(o.previous=n)}else if(t.nextSibling&&du(t.nextSibling)&&t.nextSibling.__ln.previous){var s=t.nextSibling.__ln.previous;n.previous=s,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,s&&(s.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++},r.removeNode=function(t){var n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)},e}(),vu=function(e,r){return e+"@"+r},Sm=function(){function e(){var i=this;k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",function(t){t.forEach(i.processMutation),i.emit()}),k(this,"emit",function(){if(!(i.frozen||i.locked)){for(var t=[],n=new Set,o=new wm,s=function(T){for(var $=T,X=Ur;X===Ur;)$=$&&$.nextSibling,X=$&&i.mirror.getId($);return X},a=function(T){var $=B.parentNode(T);if(!(!$||!Hl(T))){var X=!1;if(T.nodeType===Node.TEXT_NODE){var xe=$.tagName;if(xe==="TEXTAREA")return;xe==="STYLE"&&i.addedSet.has($)&&(X=!0)}var Z=Or($)?i.mirror.getId(jl(T)):i.mirror.getId($),Me=s(T);if(Z===-1||Me===-1)return o.addNode(T);var Ie=Xt(T,{doc:i.doc,mirror:i.mirror,blockClass:i.blockClass,blockSelector:i.blockSelector,maskTextClass:i.maskTextClass,maskTextSelector:i.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:i.inlineStylesheet,maskInputOptions:i.maskInputOptions,maskTextFn:i.maskTextFn,maskInputFn:i.maskInputFn,slimDOMOptions:i.slimDOMOptions,dataURLOptions:i.dataURLOptions,recordCanvas:i.recordCanvas,inlineImages:i.inlineImages,onSerialize:function(ce){Wl(ce,i.mirror)&&i.iframeManager.addIframe(ce),Gl(ce,i.mirror)&&i.stylesheetManager.trackLinkElement(ce),Qo(T)&&i.shadowDomManager.addShadowRoot(B.shadowRoot(T),i.doc)},onIframeLoad:function(ce,ye){i.iframeManager.attachIframe(ce,ye),i.shadowDomManager.observeAttachShadow(ce)},onStylesheetLoad:function(ce,ye){i.stylesheetManager.attachLinkElement(ce,ye)},cssCaptured:X});Ie&&(t.push({parentId:Z,nextId:Me,node:Ie}),n.add(Ie.id))}};i.mapRemoves.length;)i.mirror.removeNodeFromMap(i.mapRemoves.shift());for(var u=O(i.movedSet),c;!(c=u()).done;){var l=c.value;gu(i.removesSubTreeCache,l,i.mirror)&&!i.movedSet.has(B.parentNode(l))||a(l)}for(var f=O(i.addedSet),p;!(p=f()).done;){var g=p.value;!mu(i.droppedSet,g)&&!gu(i.removesSubTreeCache,g,i.mirror)||mu(i.movedSet,g)?a(g):i.droppedSet.add(g)}for(var d=null;o.length;){var _=null;if(d){var v=i.mirror.getId(B.parentNode(d.value)),y=s(d.value);v!==-1&&y!==-1&&(_=d)}if(!_)for(var b=o.tail;b;){var S=b;if(b=b.previous,S){var C=i.mirror.getId(B.parentNode(S.value)),I=s(S.value);if(I===-1)continue;if(C!==-1){_=S;break}else{var x=S.value,M=B.parentNode(x);if(M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var R=B.host(M),P=i.mirror.getId(R);if(P!==-1){_=S;break}}}}}if(!_){for(;o.head;)o.removeNode(o.head.value);break}d=_.previous,o.removeNode(_.value),a(_.value)}var H={texts:i.texts.map(function(T){var $=T.node,X=B.parentNode($);return X&&X.tagName==="TEXTAREA"&&i.genTextAreaValueMutation(X),{id:i.mirror.getId($),value:T.value}}).filter(function(T){return!n.has(T.id)}).filter(function(T){return i.mirror.has(T.id)}),attributes:i.attributes.map(function(T){var $=T.attributes;if(typeof $.style=="string"){var X=JSON.stringify(T.styleDiff),xe=JSON.stringify(T._unchangedStyles);X.length<$.style.length&&(X+xe).split("var(").length===$.style.split("var(").length&&($.style=T.styleDiff)}return{id:i.mirror.getId(T.node),attributes:$}}).filter(function(T){return!n.has(T.id)}).filter(function(T){return i.mirror.has(T.id)}),removes:i.removes,adds:t};!H.texts.length&&!H.attributes.length&&!H.removes.length&&!H.adds.length||(i.texts=[],i.attributes=[],i.attributeMap=new WeakMap,i.removes=[],i.addedSet=new Set,i.movedSet=new Set,i.droppedSet=new Set,i.removesSubTreeCache=new Set,i.movedMap={},i.mutationCb(H))}}),k(this,"genTextAreaValueMutation",function(t){var n=i.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},i.attributes.push(n),i.attributeMap.set(t,n));var o=Array.from(B.childNodes(t),function(s){return B.textContent(s)||""}).join("");n.attributes.value=Jn({element:t,maskInputOptions:i.maskInputOptions,tagName:t.tagName,type:Xn(t),value:o,maskInputFn:i.maskInputFn})}),k(this,"processMutation",function(t){if(!so(t.target,i.mirror,i.slimDOMOptions))switch(t.type){case"characterData":{var n=B.textContent(t.target);!ke(t.target,i.blockClass,i.blockSelector,!1)&&n!==t.oldValue&&i.texts.push({value:Sc(t.target,i.maskTextClass,i.maskTextSelector,!0)&&n?i.maskTextFn?i.maskTextFn(n,ql(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{var o=t.target,s=t.attributeName,a=t.target.getAttribute(s);if(s==="value"){var u=Xn(o);a=Jn({element:o,maskInputOptions:i.maskInputOptions,tagName:o.tagName,type:u,value:a,maskInputFn:i.maskInputFn})}if(ke(t.target,i.blockClass,i.blockSelector,!1)||a===t.oldValue)return;var c=i.attributeMap.get(t.target);if(o.tagName==="IFRAME"&&s==="src"&&!i.keepIframeSrcFn(a))if(!o.contentDocument)s="rr_src";else return;if(c||(c={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},i.attributes.push(c),i.attributeMap.set(t.target,c)),s==="type"&&o.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&o.setAttribute("data-rr-is-password","true"),!wc(o.tagName,s))if(c.attributes[s]=bc(i.doc,Dt(o.tagName),Dt(s),a),s==="style"){if(!i.unattachedDoc)try{i.unattachedDoc=document.implementation.createHTMLDocument()}catch{i.unattachedDoc=i.doc}var l=i.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(var f=O(Array.from(o.style)),p;!(p=f()).done;){var g=p.value,d=o.style.getPropertyValue(g),_=o.style.getPropertyPriority(g);d!==l.style.getPropertyValue(g)||_!==l.style.getPropertyPriority(g)?_===""?c.styleDiff[g]=d:c.styleDiff[g]=[d,_]:c._unchangedStyles[g]=[d,_]}for(var v=O(Array.from(l.style)),y;!(y=v()).done;){var b=y.value;o.style.getPropertyValue(b)===""&&(c.styleDiff[b]=!1)}}else s==="open"&&o.tagName==="DIALOG"&&(o.matches("dialog:modal")?c.attributes.rr_open_mode="modal":c.attributes.rr_open_mode="non-modal");break}case"childList":{if(ke(t.target,i.blockClass,i.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){i.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(function(S){return i.genAdds(S,t.target)}),t.removedNodes.forEach(function(S){var C=i.mirror.getId(S),I=Or(t.target)?i.mirror.getId(B.host(t.target)):i.mirror.getId(t.target);ke(t.target,i.blockClass,i.blockSelector,!1)||so(S,i.mirror,i.slimDOMOptions)||!gm(S,i.mirror)||(i.addedSet.has(S)?(es(i.addedSet,S),i.droppedSet.add(S)):i.addedSet.has(t.target)&&C===-1||Vl(t.target,i.mirror)||(i.movedSet.has(S)&&i.movedMap[vu(C,I)]?es(i.movedSet,S):(i.removes.push({parentId:I,id:C,isShadow:Or(t.target)&&xr(t.target)?!0:void 0}),Cm(S,i.removesSubTreeCache))),i.mapRemoves.push(S))});break}}}),k(this,"genAdds",function(t,n){if(!i.processedNodeManager.inOtherBuffer(t,i)&&!(i.addedSet.has(t)||i.movedSet.has(t))){if(i.mirror.hasNode(t)){if(so(t,i.mirror,i.slimDOMOptions))return;i.movedSet.add(t);var o=null;n&&i.mirror.hasNode(n)&&(o=i.mirror.getId(n)),o&&o!==-1&&(i.movedMap[vu(i.mirror.getId(t),o)]=!0)}else i.addedSet.add(t),i.droppedSet.delete(t);ke(t,i.blockClass,i.blockSelector,!1)||(B.childNodes(t).forEach(function(s){return i.genAdds(s)}),Qo(t)&&B.childNodes(B.shadowRoot(t)).forEach(function(s){i.processedNodeManager.add(s,i),i.genAdds(s,t)}))}})}var r=e.prototype;return r.init=function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(o){n[o]=t[o]})},r.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},r.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},r.isFrozen=function(){return this.frozen},r.lock=function(){this.locked=!0,this.canvasManager.lock()},r.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},r.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function es(e,r){e.delete(r),B.childNodes(r).forEach(function(i){return es(e,i)})}function Cm(e,r){for(var i=[e];i.length;){var t=i.pop();r.has(t)||(r.add(t),B.childNodes(t).forEach(function(n){return i.push(n)}))}}function gu(e,r,i){return e.size===0?!1:Im(e,r)}function Im(e,r,i){var t=B.parentNode(r);return t?e.has(t):!1}function mu(e,r){return e.size===0?!1:Kl(e,r)}function Kl(e,r){var i=B.parentNode(r);return i?e.has(i)?!0:Kl(e,i):!1}var Rr;function Em(e){Rr=e}function km(){Rr=void 0}var G=function(e){if(!Rr)return e;var r=function(){for(var i=arguments.length,t=new Array(i),n=0;n<i;n++)t[n]=arguments[n];try{return e.apply(void 0,[].concat(t))}catch(o){if(Rr&&Rr(o)===!0)return;throw o}};return r},Pt=[];function rn(e){try{if("composedPath"in e){var r=e.composedPath();if(r.length)return r[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Jl(e,r){var i=new Sm;Pt.push(i),i.init(e);var t=new(Ul())(G(i.processMutations.bind(i)));return t.observe(r,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function Om(e){var r=e.mousemoveCb,i=e.sampling,t=e.doc,n=e.mirror;if(i.mousemove===!1)return function(){};var o=typeof i.mousemove=="number"?i.mousemove:50,s=typeof i.mousemoveCallback=="number"?i.mousemoveCallback:500,a=[],u,c=Hr(G(function(p){var g=Date.now()-u;r(a.map(function(d){return d.timeOffset-=g,d}),p),a=[],u=null}),s),l=G(Hr(G(function(p){var g=rn(p),d=Zo(p)?p.changedTouches[0]:p,_=d.clientX,v=d.clientY;u||(u=ui()),a.push({x:_,y:v,id:n.getId(g),timeOffset:ui()-u}),c(typeof DragEvent<"u"&&F(p,DragEvent)?D.Drag:F(p,MouseEvent)?D.MouseMove:D.TouchMove)}),o,{trailing:!1})),f=[Ee("mousemove",l,t),Ee("touchmove",l,t),Ee("drag",l,t)];return G(function(){f.forEach(function(p){return p()})})}function xm(e){var r=e.mouseInteractionCb,i=e.doc,t=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.sampling;if(s.mouseInteraction===!1)return function(){};var a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,u=[],c=null,l=function(f){return function(p){var g=rn(p);if(!ke(g,n,o,!0)){var d=null,_=f;if("pointerType"in p){switch(p.pointerType){case"mouse":d=Je.Mouse;break;case"touch":d=Je.Touch;break;case"pen":d=Je.Pen;break}d===Je.Touch?Ae[f]===Ae.MouseDown?_="TouchStart":Ae[f]===Ae.MouseUp&&(_="TouchEnd"):Je.Pen}else Zo(p)&&(d=Je.Touch);d!==null?(c=d,(_.startsWith("Touch")&&d===Je.Touch||_.startsWith("Mouse")&&d===Je.Mouse)&&(d=null)):Ae[f]===Ae.Click&&(d=c,c=null);var v=Zo(p)?p.changedTouches[0]:p;if(v){var y=t.getId(g),b=v.clientX,S=v.clientY;G(r)(Y({type:Ae[_],id:y,x:b,y:S},d!==null&&{pointerType:d}))}}}};return Object.keys(Ae).filter(function(f){return Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&a[f]!==!1}).forEach(function(f){var p=Dt(f),g=l(f);if(window.PointerEvent)switch(Ae[f]){case Ae.MouseDown:case Ae.MouseUp:p=p.replace("mouse","pointer");break;case Ae.TouchStart:case Ae.TouchEnd:return}u.push(Ee(p,g,i))}),G(function(){u.forEach(function(f){return f()})})}function Xl(e){var r=e.scrollCb,i=e.doc,t=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.sampling,a=G(Hr(G(function(u){var c=rn(u);if(!(!c||ke(c,n,o,!0))){var l=t.getId(c);if(c===i&&i.defaultView){var f=$l(i.defaultView);r({id:l,x:f.left,y:f.top})}else r({id:l,x:c.scrollLeft,y:c.scrollTop})}}),s.scroll||100));return Ee("scroll",a,i)}function Rm(e,r){var i=e.viewportResizeCb,t=r.win,n=-1,o=-1,s=G(Hr(G(function(){var a=zl(),u=Bl();(n!==a||o!==u)&&(i({width:Number(u),height:Number(a)}),n=a,o=u)}),200));return Ee("resize",s,t)}var Am=["INPUT","TEXTAREA","SELECT"],yu=new WeakMap;function Mm(e){var r=e.inputCb,i=e.doc,t=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.ignoreClass,a=e.ignoreSelector,u=e.maskInputOptions,c=e.maskInputFn,l=e.sampling,f=e.userTriggeredOnInput;function p(C){var I=rn(C),x=C.isTrusted,M=I&&I.tagName;if(I&&M==="OPTION"&&(I=B.parentElement(I)),!(!I||!M||Am.indexOf(M)<0||ke(I,n,o,!0))&&!(I.classList.contains(s)||a&&I.matches(a))){var R=I.value,P=!1,H=Xn(I)||"";H==="radio"||H==="checkbox"?P=I.checked:(u[M.toLowerCase()]||u[H])&&(R=Jn({element:I,maskInputOptions:u,tagName:M,type:H,value:R,maskInputFn:c})),g(I,f?{text:R,isChecked:P,userTriggered:x}:{text:R,isChecked:P});var T=I.name;H==="radio"&&T&&P&&i.querySelectorAll('input[type="radio"][name="'+T+'"]').forEach(function($){if($!==I){var X=$.value;g($,f?{text:X,isChecked:!P,userTriggered:!1}:{text:X,isChecked:!P})}})}}function g(C,I){var x=yu.get(C);if(!x||x.text!==I.text||x.isChecked!==I.isChecked){yu.set(C,I);var M=t.getId(C);G(r)(Y({},I,{id:M}))}}var d=l.input==="last"?["change"]:["input","change"],_=d.map(function(C){return Ee(C,G(p),i)}),v=i.defaultView;if(!v)return function(){_.forEach(function(C){return C()})};var y=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),b=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];if(y&&y.set){var S;(S=_).push.apply(S,[].concat(b.map(function(C){return Di(C[0],C[1],{set:function(){G(p)({target:this,isTrusted:!1})}},!1,v)})))}return G(function(){_.forEach(function(C){return C()})})}function ci(e){var r=[];function i(t,n){if(An("CSSGroupingRule")&&F(t.parentRule,CSSGroupingRule)||An("CSSMediaRule")&&F(t.parentRule,CSSMediaRule)||An("CSSSupportsRule")&&F(t.parentRule,CSSSupportsRule)||An("CSSConditionRule")&&F(t.parentRule,CSSConditionRule)){var o=Array.from(t.parentRule.cssRules),s=o.indexOf(t);n.unshift(s)}else if(t.parentStyleSheet){var a=Array.from(t.parentStyleSheet.cssRules),u=a.indexOf(t);n.unshift(u)}return n}return i(e,r)}function st(e,r,i){var t,n;return e?(e.ownerNode?t=r.getId(e.ownerNode):n=i.getId(e),{styleId:n,id:t}):{}}function Tm(e,r){var i=e.styleSheetRuleCb,t=e.mirror,n=e.stylesheetManager,o=r.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var s=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:G(function(p,g,d){var _=d[0],v=d[1],y=st(g,t,n.styleMirror),b=y.id,S=y.styleId;return(b&&b!==-1||S&&S!==-1)&&i({id:b,styleId:S,adds:[{rule:_,index:v}]}),p.apply(g,d)})}),o.CSSStyleSheet.prototype.addRule=function(p,g,d){d===void 0&&(d=this.cssRules.length);var _=p+" { "+g+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[_,d])};var a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:G(function(p,g,d){var _=d[0],v=st(g,t,n.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,removes:[{index:_}]}),p.apply(g,d)})}),o.CSSStyleSheet.prototype.removeRule=function(p){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};var u;o.CSSStyleSheet.prototype.replace&&(u=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:G(function(p,g,d){var _=d[0],v=st(g,t,n.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,replace:_}),p.apply(g,d)})}));var c;o.CSSStyleSheet.prototype.replaceSync&&(c=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:G(function(p,g,d){var _=d[0],v=st(g,t,n.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,replaceSync:_}),p.apply(g,d)})}));var l={};Mn("CSSGroupingRule")?l.CSSGroupingRule=o.CSSGroupingRule:(Mn("CSSMediaRule")&&(l.CSSMediaRule=o.CSSMediaRule),Mn("CSSConditionRule")&&(l.CSSConditionRule=o.CSSConditionRule),Mn("CSSSupportsRule")&&(l.CSSSupportsRule=o.CSSSupportsRule));var f={};return Object.entries(l).forEach(function(p){var g=p[0],d=p[1];f[g]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(f[g].insertRule,{apply:G(function(_,v,y){var b=y[0],S=y[1],C=st(v.parentStyleSheet,t,n.styleMirror),I=C.id,x=C.styleId;return(I&&I!==-1||x&&x!==-1)&&i({id:I,styleId:x,adds:[{rule:b,index:[].concat(ci(v),[S||0])}]}),_.apply(v,y)})}),d.prototype.deleteRule=new Proxy(f[g].deleteRule,{apply:G(function(_,v,y){var b=y[0],S=st(v.parentStyleSheet,t,n.styleMirror),C=S.id,I=S.styleId;return(C&&C!==-1||I&&I!==-1)&&i({id:C,styleId:I,removes:[{index:[].concat(ci(v),[b])}]}),_.apply(v,y)})})}),G(function(){o.CSSStyleSheet.prototype.insertRule=s,o.CSSStyleSheet.prototype.deleteRule=a,u&&(o.CSSStyleSheet.prototype.replace=u),c&&(o.CSSStyleSheet.prototype.replaceSync=c),Object.entries(l).forEach(function(p){var g=p[0],d=p[1];d.prototype.insertRule=f[g].insertRule,d.prototype.deleteRule=f[g].deleteRule})})}function Zl(e,r){var i=e.mirror,t=e.stylesheetManager,n,o,s,a=null;r.nodeName==="#document"?a=i.getId(r):a=i.getId(B.host(r));var u=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(o=r.ownerDocument)==null?void 0:o.defaultView)==null?void 0:s.ShadowRoot,c=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?function(){}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var f;return(f=c.get)==null?void 0:f.call(this)},set:function(f){var p,g=(p=c.set)==null?void 0:p.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return g}}),G(function(){Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function Pm(e,r){var i=e.styleDeclarationCb,t=e.mirror,n=e.ignoreCSSAttributes,o=e.stylesheetManager,s=r.win,a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:G(function(c,l,f){var p,g=f[0],d=f[1],_=f[2];if(n.has(g))return a.apply(l,[g,d,_]);var v=st((p=l.parentRule)==null?void 0:p.parentStyleSheet,t,o.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,set:{property:g,value:d,priority:_},index:ci(l.parentRule)}),c.apply(l,f)})});var u=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:G(function(c,l,f){var p,g=f[0];if(n.has(g))return u.apply(l,[g]);var d=st((p=l.parentRule)==null?void 0:p.parentStyleSheet,t,o.styleMirror),_=d.id,v=d.styleId;return(_&&_!==-1||v&&v!==-1)&&i({id:_,styleId:v,remove:{property:g},index:ci(l.parentRule)}),c.apply(l,f)})}),G(function(){s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=u})}function Dm(e){var r=e.mediaInteractionCb,i=e.blockClass,t=e.blockSelector,n=e.mirror,o=e.sampling,s=e.doc,a=G(function(c){return Hr(G(function(l){var f=rn(l);if(!(!f||ke(f,i,t,!0))){var p=f.currentTime,g=f.volume,d=f.muted,_=f.playbackRate,v=f.loop;r({type:c,id:n.getId(f),currentTime:p,volume:g,muted:d,playbackRate:_,loop:v})}}),o.media||500)}),u=[Ee("play",a(Yt.Play),s),Ee("pause",a(Yt.Pause),s),Ee("seeked",a(Yt.Seeked),s),Ee("volumechange",a(Yt.VolumeChange),s),Ee("ratechange",a(Yt.RateChange),s)];return G(function(){u.forEach(function(c){return c()})})}function Nm(e){var r=e.fontCb,i=e.doc,t=i.defaultView;if(!t)return function(){};var n=[],o=new WeakMap,s=t.FontFace;t.FontFace=function(c,l,f){var p=new s(c,l,f);return o.set(p,{family:c,buffer:typeof l!="string",descriptors:f,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),p};var a=$t(i.fonts,"add",function(u){return function(c){return setTimeout(G(function(){var l=o.get(c);l&&(r(l),o.delete(c))}),0),u.apply(this,[c])}});return n.push(function(){t.FontFace=s}),n.push(a),G(function(){n.forEach(function(u){return u()})})}function Lm(e){var r=e.doc,i=e.mirror,t=e.blockClass,n=e.blockSelector,o=e.selectionCb,s=!0,a=G(function(){var u=r.getSelection();if(!(!u||s&&(u!=null&&u.isCollapsed))){s=u.isCollapsed||!1;for(var c=[],l=u.rangeCount||0,f=0;f<l;f++){var p=u.getRangeAt(f),g=p.startContainer,d=p.startOffset,_=p.endContainer,v=p.endOffset,y=ke(g,t,n,!0)||ke(_,t,n,!0);y||c.push({start:i.getId(g),startOffset:d,end:i.getId(_),endOffset:v})}o({ranges:c})}});return a(),Ee("selectionchange",a)}function Fm(e){var r=e.doc,i=e.customElementCb,t=r.defaultView;if(!t||!t.customElements)return function(){};var n=$t(t.customElements,"define",function(o){return function(s,a,u){try{i({define:{name:s}})}catch{console.warn("Custom element callback failed for "+s)}return o.apply(this,[s,a,u])}});return n}function Um(e,r){var i=e.mutationCb,t=e.mousemoveCb,n=e.mouseInteractionCb,o=e.scrollCb,s=e.viewportResizeCb,a=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,f=e.canvasMutationCb,p=e.fontCb,g=e.selectionCb,d=e.customElementCb;e.mutationCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mutation){var b;(b=r).mutation.apply(b,[].concat(v))}i.apply(void 0,[].concat(v))},e.mousemoveCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mousemove){var b;(b=r).mousemove.apply(b,[].concat(v))}t.apply(void 0,[].concat(v))},e.mouseInteractionCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mouseInteraction){var b;(b=r).mouseInteraction.apply(b,[].concat(v))}n.apply(void 0,[].concat(v))},e.scrollCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.scroll){var b;(b=r).scroll.apply(b,[].concat(v))}o.apply(void 0,[].concat(v))},e.viewportResizeCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.viewportResize){var b;(b=r).viewportResize.apply(b,[].concat(v))}s.apply(void 0,[].concat(v))},e.inputCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.input){var b;(b=r).input.apply(b,[].concat(v))}a.apply(void 0,[].concat(v))},e.mediaInteractionCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mediaInteaction){var b;(b=r).mediaInteaction.apply(b,[].concat(v))}u.apply(void 0,[].concat(v))},e.styleSheetRuleCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.styleSheetRule){var b;(b=r).styleSheetRule.apply(b,[].concat(v))}c.apply(void 0,[].concat(v))},e.styleDeclarationCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.styleDeclaration){var b;(b=r).styleDeclaration.apply(b,[].concat(v))}l.apply(void 0,[].concat(v))},e.canvasMutationCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.canvasMutation){var b;(b=r).canvasMutation.apply(b,[].concat(v))}f.apply(void 0,[].concat(v))},e.fontCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.font){var b;(b=r).font.apply(b,[].concat(v))}p.apply(void 0,[].concat(v))},e.selectionCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.selection){var b;(b=r).selection.apply(b,[].concat(v))}g.apply(void 0,[].concat(v))},e.customElementCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.customElement){var b;(b=r).customElement.apply(b,[].concat(v))}d.apply(void 0,[].concat(v))}}function $m(e,r){r===void 0&&(r={});var i=e.doc.defaultView;if(!i)return function(){};Um(e,r);var t;e.recordDOM&&(t=Jl(e,e.doc));var n=Om(e),o=xm(e),s=Xl(e),a=Rm(e,{win:i}),u=Mm(e),c=Dm(e),l=function(){},f=function(){},p=function(){},g=function(){};e.recordDOM&&(l=Tm(e,{win:i}),f=Zl(e,e.doc),p=Pm(e,{win:i}),e.collectFonts&&(g=Nm(e)));for(var d=Lm(e),_=Fm(e),v=[],y=O(e.plugins),b;!(b=y()).done;){var S=b.value;v.push(S.observer(S.callback,i,S.options))}return G(function(){Pt.forEach(function(C){return C.reset()}),t==null||t.disconnect(),n(),o(),s(),a(),u(),c(),l(),f(),p(),g(),d(),_(),v.forEach(function(C){return C()})})}function An(e){return typeof window[e]<"u"}function Mn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var _u=function(){function e(i){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=i}var r=e.prototype;return r.getId=function(t,n,o,s){var a=o||this.getIdToRemoteIdMap(t),u=s||this.getRemoteIdToIdMap(t),c=a.get(n);return c||(c=this.generateIdFn(),a.set(n,c),u.set(c,n)),c},r.getIds=function(t,n){var o=this,s=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return n.map(function(u){return o.getId(t,u,s,a)})},r.getRemoteId=function(t,n,o){var s=o||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;var a=s.get(n);return a||-1},r.getRemoteIds=function(t,n){var o=this,s=this.getRemoteIdToIdMap(t);return n.map(function(a){return o.getRemoteId(t,a,s)})},r.reset=function(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)},r.getIdToRemoteIdMap=function(t){var n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n},r.getRemoteIdToIdMap=function(t){var n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n},e}(),zm=function(){function e(i){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new _u(_c)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=i.mutationCb,this.wrappedEmit=i.wrappedEmit,this.stylesheetManager=i.stylesheetManager,this.recordCrossOriginIframes=i.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _u(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=i.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}var r=e.prototype;return r.addIframe=function(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)},r.addLoadListener=function(t){this.loadListener=t},r.attachIframe=function(t,n){var o,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((o=t.contentWindow)==null||o.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))},r.handleMessage=function(t){var n=t;if(!(n.data.type!=="rrweb"||n.origin!==n.data.origin)){var o=t.source;if(o){var s=this.crossOriginIframeMap.get(t.source);if(s){var a=this.transformCrossOriginEvent(s,n.data.event);a&&this.wrappedEmit(a,n.data.isCheckout)}}}},r.transformCrossOriginEvent=function(t,n){var o=this,s;switch(n.type){case V.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);var a=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(n.data.node,a),{timestamp:n.timestamp,type:V.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return n;case V.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case V.IncrementalSnapshot:switch(n.data.source){case D.Mutation:return n.data.adds.forEach(function(u){o.replaceIds(u,t,["parentId","nextId","previousId"]),o.replaceIdOnNode(u.node,t);var c=o.crossOriginIframeRootIdMap.get(t);c&&o.patchRootIdOnNode(u.node,c)}),n.data.removes.forEach(function(u){o.replaceIds(u,t,["parentId","id"])}),n.data.attributes.forEach(function(u){o.replaceIds(u,t,["id"])}),n.data.texts.forEach(function(u){o.replaceIds(u,t,["id"])}),n;case D.Drag:case D.TouchMove:case D.MouseMove:return n.data.positions.forEach(function(u){o.replaceIds(u,t,["id"])}),n;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(n.data,t,["id"]),n;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case D.Font:return n;case D.Selection:return n.data.ranges.forEach(function(u){o.replaceIds(u,t,["start","end"])}),n;case D.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(s=n.data.styles)==null||s.forEach(function(u){o.replaceStyleIds(u,t,["styleId"])}),n}}return!1},r.replace=function(t,n,o,s){for(var a=O(s),u;!(u=a()).done;){var c=u.value;!Array.isArray(n[c])&&typeof n[c]!="number"||(Array.isArray(n[c])?n[c]=t.getIds(o,n[c]):n[c]=t.getId(o,n[c]))}return n},r.replaceIds=function(t,n,o){return this.replace(this.crossOriginIframeMirror,t,n,o)},r.replaceStyleIds=function(t,n,o){return this.replace(this.crossOriginIframeStyleMirror,t,n,o)},r.replaceIdOnNode=function(t,n){var o=this;this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(function(s){o.replaceIdOnNode(s,n)})},r.patchRootIdOnNode=function(t,n){var o=this;t.type!==Yl.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(function(s){o.patchRootIdOnNode(s,n)})},e}(),Bm=function(){function e(i){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=i.mutationCb,this.scrollCb=i.scrollCb,this.bypassOptions=i.bypassOptions,this.mirror=i.mirror,this.init()}var r=e.prototype;return r.init=function(){this.reset(),this.patchAttachShadow(Element,document)},r.addShadowRoot=function(t,n){var o=this;if(xr(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=Jl(Y({},this.bypassOptions,{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(function(){return s.disconnect()}),this.restoreHandlers.push(Xl(Y({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(function(){t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&o.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,o.mirror.getId(B.host(t))),o.restoreHandlers.push(Zl({mirror:o.mirror,stylesheetManager:o.bypassOptions.stylesheetManager},t))},0)}},r.observeAttachShadow=function(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)},r.patchAttachShadow=function(t,n){var o=this;this.restoreHandlers.push($t(t.prototype,"attachShadow",function(s){return function(a){var u=s.call(this,a),c=B.shadowRoot(this);return c&&Hl(this)&&o.addShadowRoot(c,n),u}}))},r.reset=function(){this.restoreHandlers.forEach(function(t){try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Tn=0;Tn<Zt.length;Tn++)qm[Zt.charCodeAt(Tn)]=Tn;var Vm=function(r){var i=new Uint8Array(r),t,n=i.length,o="";for(t=0;t<n;t+=3)o+=Zt[i[t]>>2],o+=Zt[(i[t]&3)<<4|i[t+1]>>4],o+=Zt[(i[t+1]&15)<<2|i[t+2]>>6],o+=Zt[i[t+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},bu=new Map;function Wm(e,r){var i=bu.get(e);return i||(i=new Map,bu.set(e,i)),i.has(r)||i.set(r,[]),i.get(r)}var Ql=function(e,r,i){if(!(!e||!(tf(e,r)||(typeof e>"u"?"undefined":q(e))==="object"))){var t=e.constructor.name,n=Wm(i,t),o=n.indexOf(e);return o===-1&&(o=n.length,n.push(e)),o}};function Vn(e,r,i){if(F(e,Array))return e.map(function(d){return Vn(d,r,i)});if(e===null)return e;if(F(e,Float32Array)||F(e,Float64Array)||F(e,Int32Array)||F(e,Uint32Array)||F(e,Uint8Array)||F(e,Uint16Array)||F(e,Int16Array)||F(e,Int8Array)||F(e,Uint8ClampedArray)){var t=e.constructor.name;return{rr_type:t,args:[Object.values(e)]}}else if(F(e,ArrayBuffer)){var n=e.constructor.name,o=Vm(e);return{rr_type:n,base64:o}}else if(F(e,DataView)){var s=e.constructor.name;return{rr_type:s,args:[Vn(e.buffer,r,i),e.byteOffset,e.byteLength]}}else if(F(e,HTMLImageElement)){var a=e.constructor.name,u=e.src;return{rr_type:a,src:u}}else if(F(e,HTMLCanvasElement)){var c="HTMLImageElement",l=e.toDataURL();return{rr_type:c,src:l}}else if(F(e,ImageData)){var f=e.constructor.name;return{rr_type:f,args:[Vn(e.data,r,i),e.width,e.height]}}else if(tf(e,r)||(typeof e>"u"?"undefined":q(e))==="object"){var p=e.constructor.name,g=Ql(e,r,i);return{rr_type:p,index:g}}return e}var ef=function(e,r,i){return e.map(function(t){return Vn(t,r,i)})},tf=function(e,r){var i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"],t=i.filter(function(n){return typeof r[n]=="function"});return!!t.find(function(n){return F(e,r[n])})};function Gm(e,r,i,t){for(var n=function(){var c=u.value;try{if(typeof r.CanvasRenderingContext2D.prototype[c]!="function")return"continue";var l=$t(r.CanvasRenderingContext2D.prototype,c,function(p){return function(){for(var g=this,d=arguments.length,_=new Array(d),v=0;v<d;v++)_[v]=arguments[v];return ke(this.canvas,i,t,!0)||setTimeout(function(){var y=ef(_,r,g);e(g.canvas,{type:lr["2D"],property:c,args:y})},0),p.apply(this,_)}});o.push(l)}catch{var f=Di(r.CanvasRenderingContext2D.prototype,c,{set:function(d){e(this.canvas,{type:lr["2D"],property:c,args:[d],setter:!0})}});o.push(f)}},o=[],s=Object.getOwnPropertyNames(r.CanvasRenderingContext2D.prototype),a=O(s),u;!(u=a()).done;)n();return function(){o.forEach(function(c){return c()})}}function jm(e){return e==="experimental-webgl"?"webgl":e}function wu(e,r,i,t){var n=[];try{var o=$t(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),l=1;l<u;l++)c[l-1]=arguments[l];if(!ke(this,r,i,!0)){var f=jm(a);if("__context"in this||(this.__context=f),t&&["webgl","webgl2"].includes(f))if(c[0]&&q(c[0])==="object"){var p=c[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[].concat([a],c))}});n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach(function(s){return s()})}}function Su(e,r,i,t,n,o){for(var s=function(){var f=l.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))return"continue";try{if(typeof e[f]!="function")return"continue";var p=$t(e,f,function(d){return function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];var b=d.apply(this,v);if(Ql(b,o,this),"tagName"in this.canvas&&!ke(this.canvas,t,n,!0)){var S=ef(v,o,this),C={type:r,property:f,args:S};i(this.canvas,C)}return b}});a.push(p)}catch{var g=Di(e,f,{set:function(v){i(this.canvas,{type:r,property:f,args:[v],setter:!0})}});a.push(g)}},a=[],u=Object.getOwnPropertyNames(e),c=O(u),l;!(l=c()).done;)s();return a}function Hm(e,r,i,t){var n,o=[];if((n=o).push.apply(n,[].concat(Su(r.WebGLRenderingContext.prototype,lr.WebGL,e,i,t,r))),typeof r.WebGL2RenderingContext<"u"){var s;(s=o).push.apply(s,[].concat(Su(r.WebGL2RenderingContext.prototype,lr.WebGL2,e,i,t,r)))}return function(){o.forEach(function(a){return a()})}}var rf="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Ym=function(e){return Uint8Array.from(atob(e),function(r){return r.charCodeAt(0)})},Cu=typeof window<"u"&&window.Blob&&new Blob([Ym(rf)],{type:"text/javascript;charset=utf-8"});function Km(e){var r;try{if(r=Cu&&(window.URL||window.webkitURL).createObjectURL(Cu),!r)throw"";var i=new Worker(r,{name:e==null?void 0:e.name});return i.addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(r)}),i}catch{return new Worker("data:text/javascript;base64,"+rf,{name:e==null?void 0:e.name})}finally{r&&(window.URL||window.webkitURL).revokeObjectURL(r)}}var Jm=function(){function e(i){var t=this;k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",function(f,p){var g=t.rafStamps.invokeId&&t.rafStamps.latestId!==t.rafStamps.invokeId;(g||!t.rafStamps.invokeId)&&(t.rafStamps.invokeId=t.rafStamps.latestId),t.pendingCanvasMutations.has(f)||t.pendingCanvasMutations.set(f,[]),t.pendingCanvasMutations.get(f).push(p)});var n=i.sampling,o=n===void 0?"all":n,s=i.win,a=i.blockClass,u=i.blockSelector,c=i.recordCanvas,l=i.dataURLOptions;this.mutationCb=i.mutationCb,this.mirror=i.mirror,c&&o==="all"&&this.initCanvasMutationObserver(s,a,u),c&&typeof o=="number"&&this.initCanvasFPSObserver(o,s,a,u,{dataURLOptions:l})}var r=e.prototype;return r.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},r.freeze=function(){this.frozen=!0},r.unfreeze=function(){this.frozen=!1},r.lock=function(){this.locked=!0},r.unlock=function(){this.locked=!1},r.initCanvasFPSObserver=function(t,n,o,s,a){var u=this,c=wu(n,o,s,!0),l=new Map,f=new Km;f.onmessage=function(y){var b=y.data.id;if(l.set(b,!1),"base64"in y.data){var S=y.data,C=S.base64,I=S.type,x=S.width,M=S.height;u.mutationCb({id:b,type:lr["2D"],commands:[{property:"clearRect",args:[0,0,x,M]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:I}]},0,0]}]})}};var p=1e3/t,g=0,d,_=function(){var y=[];return n.document.querySelectorAll("canvas").forEach(function(b){ke(b,o,s,!0)||y.push(b)}),y},v=function(y){if(g&&y-g<p){d=requestAnimationFrame(v);return}g=y;var b=u;_().forEach(ws(function(S){var C,I,x,M;return Fr(this,function(R){switch(R.label){case 0:return I=b.mirror.getId(S),l.get(I)?[2]:S.width===0||S.height===0?[2]:(l.set(I,!0),["webgl","webgl2"].includes(S.__context)&&(x=S.getContext(S.__context),((C=x==null?void 0:x.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&x.clear(x.COLOR_BUFFER_BIT)),[4,createImageBitmap(S)]);case 1:return M=R.sent(),f.postMessage({id:I,bitmap:M,width:S.width,height:S.height,dataURLOptions:a.dataURLOptions},[M]),[2]}})})),d=requestAnimationFrame(v)};d=requestAnimationFrame(v),this.resetObservers=function(){c(),cancelAnimationFrame(d)}},r.initCanvasMutationObserver=function(t,n,o){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var s=wu(t,n,o,!1),a=Gm(this.processMutation.bind(this),t,n,o),u=Hm(this.processMutation.bind(this),t,n,o);this.resetObservers=function(){s(),a(),u()}},r.startPendingCanvasMutationFlusher=function(){var t=this;requestAnimationFrame(function(){return t.flushPendingCanvasMutations()})},r.startRAFTimestamping=function(){var t=this,n=function(o){t.rafStamps.latestId=o,requestAnimationFrame(n)};requestAnimationFrame(n)},r.flushPendingCanvasMutations=function(){var t=this;this.pendingCanvasMutations.forEach(function(n,o){var s=t.mirror.getId(o);t.flushPendingCanvasMutationFor(o,s)}),requestAnimationFrame(function(){return t.flushPendingCanvasMutations()})},r.flushPendingCanvasMutationFor=function(t,n){if(!(this.frozen||this.locked)){var o=this.pendingCanvasMutations.get(t);if(!(!o||n===-1)){var s=o.map(function(u){u.type;var c=Nr(u,["type"]);return c}),a=o[0].type;this.mutationCb({id:n,type:a,commands:s}),this.pendingCanvasMutations.delete(t)}}},e}(),Xm=function(){function e(i){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new ym),this.mutationCb=i.mutationCb,this.adoptedStyleSheetCb=i.adoptedStyleSheetCb}var r=e.prototype;return r.attachLinkElement=function(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)},r.trackLinkElement=function(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))},r.adoptStyleSheets=function(t,n){var o,s=function(){var f=l.value,p=void 0;o.styleMirror.has(f)?p=o.styleMirror.getId(f):(p=o.styleMirror.add(f),u.push({styleId:p,rules:Array.from(f.rules||CSSRule,function(g,d){return{rule:gc(g,f.href),index:d}})})),a.styleIds.push(p)};if(t.length!==0){for(var a={id:n,styleIds:[]},u=[],c=O(t),l;!(l=c()).done;)o=this,s();u.length>0&&(a.styles=u),this.adoptedStyleSheetCb(a)}},r.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},r.trackStylesheetInLinkElement=function(t){},e}(),Zm=function(){function e(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}var r=e.prototype;return r.inOtherBuffer=function(t,n){var o=this.nodeMap.get(t);return o&&Array.from(o).some(function(s){return s!==n})},r.add=function(t,n){var o=this;this.active||(this.active=!0,requestAnimationFrame(function(){o.nodeMap=new WeakMap,o.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))},r.destroy=function(){},e}(),fe,Wn,ao,li=!1;try{if(Array.from([1],function(e){return e*2})[0]!==2){var uo=document.createElement("iframe");document.body.appendChild(uo),Array.from=((Ia=uo.contentWindow)==null?void 0:Ia.Array.from)||Array.from,document.body.removeChild(uo)}}catch(e){console.debug("Unable to override Array.from",e)}var Ue=Jh();function _t(e){e===void 0&&(e={});var r=e.emit,i=e.checkoutEveryNms,t=e.checkoutEveryNth,n=e.blockClass,o=n===void 0?"rr-block":n,s=e.blockSelector,a=s===void 0?null:s,u=e.ignoreClass,c=u===void 0?"rr-ignore":u,l=e.ignoreSelector,f=l===void 0?null:l,p=e.maskTextClass,g=p===void 0?"rr-mask":p,d=e.maskTextSelector,_=d===void 0?null:d,v=e.inlineStylesheet,y=v===void 0?!0:v,b=e.maskAllInputs,S=e.maskInputOptions,C=e.slimDOMOptions,I=e.maskInputFn,x=e.maskTextFn,M=e.hooks,R=e.packFn,P=e.sampling,H=P===void 0?{}:P,T=e.dataURLOptions,$=T===void 0?{}:T,X=e.mousemoveWait,xe=e.recordDOM,Z=xe===void 0?!0:xe,Me=e.recordCanvas,Ie=Me===void 0?!1:Me,ce=e.recordCrossOriginIframes,ye=ce===void 0?!1:ce,Te=e.recordAfter,Ct=Te===void 0?e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load":Te,qe=e.userTriggeredOnInput,qt=qe===void 0?!1:qe,Pe=e.collectFonts,It=Pe===void 0?!1:Pe,J=e.inlineImages,Et=J===void 0?!1:J,kt=e.plugins,Vt=e.keepIframeSrcFn,mr=Vt===void 0?function(){return!1}:Vt,yr=e.ignoreCSSAttributes,zi=yr===void 0?new Set([]):yr,sn=e.errorHandler;Em(sn);var ot=ye?window.parent===window:!0,Ot=!1;if(!ot)try{window.parent.document&&(Ot=!1)}catch{Ot=!0}if(ot&&!r)throw new Error("emit function is required");if(!ot&&!Ot)return function(){};X!==void 0&&H.mousemove===void 0&&(H.mousemove=X),Ue.reset();var Wt=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:S!==void 0?S:{password:!0},_r=C===!0||C==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:C==="all",headMetaDescKeywords:C==="all",headTitleMutations:C==="all"}:C||{};mm();var Gt,xt=0,Ke=function(Q){for(var Re=O(kt||[]),A;!(A=Re()).done;){var le=A.value;le.eventProcessor&&(Q=le.eventProcessor(Q))}return R&&!Ot&&(Q=R(Q)),Q};fe=function(Q,Re){var A,le=Q;if(le.timestamp=ui(),(A=Pt[0])!=null&&A.isFrozen()&&le.type!==V.FullSnapshot&&!(le.type===V.IncrementalSnapshot&&le.data.source===D.Mutation)&&Pt.forEach(function(ch){return ch.unfreeze()}),ot)r==null||r(Ke(le),Re);else if(Ot){var sh={type:"rrweb",event:Ke(le),origin:window.location.origin,isCheckout:Re};window.parent.postMessage(sh,"*")}if(le.type===V.FullSnapshot)Gt=le,xt=0;else if(le.type===V.IncrementalSnapshot){if(le.data.source===D.Mutation&&le.data.isAttachIframe)return;xt++;var ah=t&&xt>=t,uh=i&&le.timestamp-Gt.timestamp>i;(ah||uh)&&Wn(!0)}};for(var Rt=function(Q){fe({type:V.IncrementalSnapshot,data:Y({source:D.Mutation},Q)})},va=function(Q){return fe({type:V.IncrementalSnapshot,data:Y({source:D.Scroll},Q)})},ga=function(Q){return fe({type:V.IncrementalSnapshot,data:Y({source:D.CanvasMutation},Q)})},ih=function(Q){return fe({type:V.IncrementalSnapshot,data:Y({source:D.AdoptedStyleSheet},Q)})},At=new Xm({mutationCb:Rt,adoptedStyleSheetCb:ih}),Mt=new zm({mirror:Ue,mutationCb:Rt,stylesheetManager:At,recordCrossOriginIframes:ye,wrappedEmit:fe}),oh=O(kt||[]),ma;!(ma=oh()).done;){var ya=ma.value;ya.getMirror&&ya.getMirror({nodeMirror:Ue,crossOriginIframeMirror:Mt.crossOriginIframeMirror,crossOriginIframeStyleMirror:Mt.crossOriginIframeStyleMirror})}var Bi=new Zm;ao=new Jm({recordCanvas:Ie,mutationCb:ga,win:window,blockClass:o,blockSelector:a,mirror:Ue,sampling:H.canvas,dataURLOptions:$});var an=new Bm({mutationCb:Rt,scrollCb:va,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:g,maskTextSelector:_,inlineStylesheet:y,maskInputOptions:Wt,dataURLOptions:$,maskTextFn:x,maskInputFn:I,recordCanvas:Ie,inlineImages:Et,sampling:H,slimDOMOptions:_r,iframeManager:Mt,stylesheetManager:At,canvasManager:ao,keepIframeSrcFn:mr,processedNodeManager:Bi},mirror:Ue});Wn=function(Q){if(Q===void 0&&(Q=!1),!!Z){fe({type:V.Meta,data:{href:window.location.href,width:Bl(),height:zl()}},Q),At.reset(),an.init(),Pt.forEach(function(A){return A.lock()});var Re=bp(document,{mirror:Ue,blockClass:o,blockSelector:a,maskTextClass:g,maskTextSelector:_,inlineStylesheet:y,maskAllInputs:Wt,maskTextFn:x,maskInputFn:I,slimDOM:_r,dataURLOptions:$,recordCanvas:Ie,inlineImages:Et,onSerialize:function(A){Wl(A,Ue)&&Mt.addIframe(A),Gl(A,Ue)&&At.trackLinkElement(A),Qo(A)&&an.addShadowRoot(B.shadowRoot(A),document)},onIframeLoad:function(A,le){Mt.attachIframe(A,le),an.observeAttachShadow(A)},onStylesheetLoad:function(A,le){At.attachLinkElement(A,le)},keepIframeSrcFn:mr});if(!Re)return console.warn("Failed to snapshot the document");fe({type:V.FullSnapshot,data:{node:Re,initialOffset:$l(window)}},Q),Pt.forEach(function(A){return A.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Ue.getId(document))}};try{var br=[],_a=function(Q){var Re;return G($m)({mutationCb:Rt,mousemoveCb:function(A,le){return fe({type:V.IncrementalSnapshot,data:{source:le,positions:A}})},mouseInteractionCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.MouseInteraction},A)})},scrollCb:va,viewportResizeCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.ViewportResize},A)})},inputCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.Input},A)})},mediaInteractionCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.MediaInteraction},A)})},styleSheetRuleCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.StyleSheetRule},A)})},styleDeclarationCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.StyleDeclaration},A)})},canvasMutationCb:ga,fontCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.Font},A)})},selectionCb:function(A){fe({type:V.IncrementalSnapshot,data:Y({source:D.Selection},A)})},customElementCb:function(A){fe({type:V.IncrementalSnapshot,data:Y({source:D.CustomElement},A)})},blockClass:o,ignoreClass:c,ignoreSelector:f,maskTextClass:g,maskTextSelector:_,maskInputOptions:Wt,inlineStylesheet:y,sampling:H,recordDOM:Z,recordCanvas:Ie,inlineImages:Et,userTriggeredOnInput:qt,collectFonts:It,doc:Q,maskInputFn:I,maskTextFn:x,keepIframeSrcFn:mr,blockSelector:a,slimDOMOptions:_r,dataURLOptions:$,mirror:Ue,iframeManager:Mt,stylesheetManager:At,shadowDomManager:an,processedNodeManager:Bi,canvasManager:ao,ignoreCSSAttributes:zi,plugins:((Re=kt==null?void 0:kt.filter(function(A){return A.observer}))==null?void 0:Re.map(function(A){return{observer:A.observer,options:A.options,callback:function(le){return fe({type:V.Plugin,data:{plugin:A.name,payload:le}})}}}))||[]},M)};Mt.addLoadListener(function(Q){try{br.push(_a(Q.contentDocument))}catch(Re){console.warn(Re)}});var qi=function(){Wn(),br.push(_a(document)),li=!0};return document.readyState==="interactive"||document.readyState==="complete"?qi():(br.push(Ee("DOMContentLoaded",function(){fe({type:V.DomContentLoaded,data:{}}),Ct==="DOMContentLoaded"&&qi()})),br.push(Ee("load",function(){fe({type:V.Load,data:{}}),Ct==="load"&&qi()},window))),function(){br.forEach(function(Q){try{Q()}catch(A){var Re=String(A).toLowerCase();Re.includes("cross-origin")||console.warn(A)}}),Bi.destroy(),li=!1,km()}}catch(Q){console.warn(Q)}}_t.addCustomEvent=function(e,r){if(!li)throw new Error("please add custom event after start recording");fe({type:V.Custom,data:{tag:e,payload:r}})};_t.freezePage=function(){Pt.forEach(function(e){return e.freeze()})};_t.takeFullSnapshot=function(e){if(!li)throw new Error("please take full snapshot after start recording");Wn(e)};_t.mirror=Ue;var Iu;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Iu||(Iu={}));_t.addCustomEvent;_t.freezePage;_t.takeFullSnapshot;var Eu=E.setImmediate,pt,ts,rs,nf=Object.prototype.toString,Qm=typeof Eu<"u"?function(r){return Eu(r)}:setTimeout;try{Object.defineProperty({},"x",{}),pt=function(r,i,t,n){return Object.defineProperty(r,i,{value:t,writable:!0,configurable:n!==!1})}}catch{pt=function(i,t,n){return i[t]=n,i}}rs=function(){var r,i,t;function n(o,s){this.fn=o,this.self=s,this.next=void 0}return{add:function(s,a){t=new n(s,a),i?i.next=t:r=t,i=t,t=void 0},drain:function(){var s=r;for(r=i=ts=void 0;s;)s.fn.call(s.self),s=s.next}}}();function fi(e,r){rs.add(e,r),ts||(ts=Qm(rs.drain))}function of(e){var r,i=typeof e;return e!==null&&(i==="object"||i==="function")&&(r=e.then),typeof r=="function"?r:!1}function Gs(){for(var e=0;e<this.chain.length;e++)ey(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function ey(e,r,i){var t,n;try{r===!1?i.reject(e.msg):(r===!0?t=e.msg:t=r.call(void 0,e.msg),t===i.promise?i.reject(TypeError("Promise-chain cycle")):(n=of(t))?n.call(t,i.resolve,i.reject):i.resolve(t))}catch(o){i.reject(o)}}function sf(e){var r,i=this;if(!i.triggered){i.triggered=!0,i.def&&(i=i.def);try{(r=of(e))?fi(function(){var t=new ku(i);try{r.call(e,function(){sf.apply(t,arguments)},function(){Ar.apply(t,arguments)})}catch(n){Ar.call(t,n)}}):(i.msg=e,i.state=1,i.chain.length>0&&fi(Gs,i))}catch(t){Ar.call(new ku(i),t)}}}function Ar(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&fi(Gs,r))}function af(e,r,i,t){for(var n=0;n<r.length;n++)(function(s){e.resolve(r[s]).then(function(u){i(s,u)},t)})(n)}function ku(e){this.def=e,this.triggered=!1}function ty(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function bt(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new ty(this);this.then=function(t,n){var o={success:typeof t=="function"?t:!0,failure:typeof n=="function"?n:!1};return o.promise=new this.constructor(function(a,u){if(typeof a!="function"||typeof u!="function")throw TypeError("Not a function");o.resolve=a,o.reject=u}),r.chain.push(o),r.state!==0&&fi(Gs,r),o.promise},this.catch=function(t){return this.then(void 0,t)};try{e.call(void 0,function(t){sf.call(r,t)},function(t){Ar.call(r,t)})}catch(i){Ar.call(r,i)}}var uf=pt({},"constructor",bt,!1);bt.prototype=uf;pt(uf,"__NPO__",0,!1);pt(bt,"resolve",function(r){var i=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new i(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");n(r)})});pt(bt,"reject",function(r){return new this(function(t,n){if(typeof t!="function"||typeof n!="function")throw TypeError("Not a function");n(r)})});pt(bt,"all",function(r){var i=this;return nf.call(r)!=="[object Array]"?i.reject(TypeError("Not an array")):r.length===0?i.resolve([]):new i(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");var s=r.length,a=Array(s),u=0;af(i,r,function(l,f){a[l]=f,++u===s&&n(a)},o)})});pt(bt,"race",function(r){var i=this;return nf.call(r)!=="[object Array]"?i.reject(TypeError("Not an array")):new i(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");af(i,r,function(a,u){n(u)},o)})});var W;typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?W=Promise:W=bt;var Le={DEBUG:!1,LIB_VERSION:"2.71.0"},Mr=24*60*60*1e3,co=8*1e3,Ni=Array.prototype,ry=Function.prototype,cf=Object.prototype,ct=Ni.slice,nn=cf.toString,Li=cf.hasOwnProperty,ve=E.console,lt=E.navigator,N=E.document,Pn=E.opera,Ou=E.screen,Xe=lt.userAgent,lo=ry.bind,xu=Ni.forEach,Ru=Ni.indexOf,Au=Ni.map,ny=Array.isArray,ns={},h={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},j={log:function(){if(Le.DEBUG&&!h.isUndefined(ve)&&ve)try{ve.log.apply(ve,arguments)}catch{h.each(arguments,function(r){ve.log(r)})}},warn:function(){if(Le.DEBUG&&!h.isUndefined(ve)&&ve){var e=["Mixpanel warning:"].concat(h.toArray(arguments));try{ve.warn.apply(ve,e)}catch{h.each(e,function(i){ve.warn(i)})}}},error:function(){if(Le.DEBUG&&!h.isUndefined(ve)&&ve){var e=["Mixpanel error:"].concat(h.toArray(arguments));try{ve.error.apply(ve,e)}catch{h.each(e,function(i){ve.error(i)})}}},critical:function(){if(!h.isUndefined(ve)&&ve){var e=["Mixpanel error:"].concat(h.toArray(arguments));try{ve.error.apply(ve,e)}catch{h.each(e,function(i){ve.error(i)})}}}},fo=function(e,r){return function(){return arguments[0]="["+r+"] "+arguments[0],e.apply(j,arguments)}},zt=function(e){return{log:fo(j.log,e),error:fo(j.error,e),critical:fo(j.critical,e)}},Yr=function(e){return function(){try{return e.apply(this,arguments)}catch(r){j.critical("Implementation error. Please turn on debug and contact support@mixpanel.com."),Le.DEBUG&&j.critical(r)}}},lf=function(e){var r=e.prototype;for(var i in r)typeof r[i]=="function"&&(r[i]=Yr(r[i]))};h.bind=function(e,r){var i,t;if(lo&&e.bind===lo)return lo.apply(e,ct.call(arguments,1));if(!h.isFunction(e))throw new TypeError;return i=ct.call(arguments,2),t=function(){if(!(this instanceof t))return e.apply(r,i.concat(ct.call(arguments)));var n={};n.prototype=e.prototype;var o=new n;n.prototype=null;var s=e.apply(o,i.concat(ct.call(arguments)));return Object(s)===s?s:o},t};h.each=function(e,r,i){if(e!=null){if(xu&&e.forEach===xu)e.forEach(r,i);else if(e.length===+e.length){for(var t=0,n=e.length;t<n;t++)if(t in e&&r.call(i,e[t],t,e)===ns)return}else for(var o in e)if(Li.call(e,o)&&r.call(i,e[o],o,e)===ns)return}};h.extend=function(e){return h.each(ct.call(arguments,1),function(r){for(var i in r)r[i]!==void 0&&(e[i]=r[i])}),e};h.isArray=ny||function(e){return nn.call(e)==="[object Array]"};h.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}};h.isArguments=function(e){return!!(e&&Li.call(e,"callee"))};h.toArray=function(e){return e?e.toArray?e.toArray():h.isArray(e)||h.isArguments(e)?ct.call(e):h.values(e):[]};h.map=function(e,r,i){if(Au&&e.map===Au)return e.map(r,i);var t=[];return h.each(e,function(n){t.push(r.call(i,n))}),t};h.keys=function(e){var r=[];return e===null||h.each(e,function(i,t){r[r.length]=t}),r};h.values=function(e){var r=[];return e===null||h.each(e,function(i){r[r.length]=i}),r};h.include=function(e,r){var i=!1;return e===null?i:Ru&&e.indexOf===Ru?e.indexOf(r)!=-1:(h.each(e,function(t){if(i||(i=t===r))return ns}),i)};h.includes=function(e,r){return e.indexOf(r)!==-1};h.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e};h.isObject=function(e){return e===Object(e)&&!h.isArray(e)};h.isEmptyObject=function(e){if(h.isObject(e)){for(var r in e)if(Li.call(e,r))return!1;return!0}return!1};h.isUndefined=function(e){return e===void 0};h.isString=function(e){return nn.call(e)=="[object String]"};h.isDate=function(e){return nn.call(e)=="[object Date]"};h.isNumber=function(e){return nn.call(e)=="[object Number]"};h.isElement=function(e){return!!(e&&e.nodeType===1)};h.encodeDates=function(e){return h.each(e,function(r,i){h.isDate(r)?e[i]=h.formatDate(r):h.isObject(r)&&(e[i]=h.encodeDates(r))}),e};h.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};h.formatDate=function(e){function r(i){return i<10?"0"+i:i}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())};h.strip_empty_properties=function(e){var r={};return h.each(e,function(i,t){h.isString(i)&&i.length>0&&(r[t]=i)}),r};h.truncate=function(e,r){var i;return typeof e=="string"?i=e.slice(0,r):h.isArray(e)?(i=[],h.each(e,function(t){i.push(h.truncate(t,r))})):h.isObject(e)?(i={},h.each(e,function(t,n){i[n]=h.truncate(t,r)})):i=e,i};h.JSONEncode=function(){return function(e){var r=e,i=function(n){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(a){var u=s[a];return typeof u=="string"?u:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'},t=function(n,o){var s="",a=" ",u=0,c="",l="",f=0,p=s,g=[],d=o[n];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(n)),typeof d){case"string":return i(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(s+=a,g=[],nn.apply(d)==="[object Array]"){for(f=d.length,u=0;u<f;u+=1)g[u]=t(u,d)||"null";return l=g.length===0?"[]":s?`[
|
|
59
|
+
or you can use record.mirror to access the mirror instance during recording.`,pu={map:{},getId:function(){return console.error(Ht),-1},getNode:function(){return console.error(Ht),null},removeNodeFromMap:function(){console.error(Ht)},has:function(){return console.error(Ht),!1},reset:function(){console.error(Ht)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(pu=new Proxy(pu,{get:function(r,i,t){return i==="map"&&console.error(Ht),Reflect.get(r,i,t)}}));function jr(e,r,i){i===void 0&&(i={});var t=null,n=0;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var u=Date.now();!n&&i.leading===!1&&(n=u);var c=r-(u-n),l=this;c<=0||c>r?(t&&(clearTimeout(t),t=null),n=u,e.apply(l,s)):!t&&i.trailing!==!1&&(t=setTimeout(function(){n=i.leading===!1?0:Date.now(),t=null,e.apply(l,s)},c))}}function Di(e,r,i,t,n){n===void 0&&(n=window);var o=n.Object.getOwnPropertyDescriptor(e,r);return n.Object.defineProperty(e,r,t?i:{set:function(a){var u=this;setTimeout(function(){i.set.call(u,a)},0),o&&o.set&&o.set.call(this,a)}}),function(){return Di(e,r,o||{},!0)}}var ui=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ui=function(){return new Date().getTime()});function Ul(e){var r,i,t,n,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((r=B.parentElement(o.body))==null?void 0:r.scrollLeft)||((i=o==null?void 0:o.body)==null?void 0:i.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((t=B.parentElement(o.body))==null?void 0:t.scrollTop)||((n=o==null?void 0:o.body)==null?void 0:n.scrollTop)||0}}function $l(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Bl(e){if(!e)return null;var r=e.nodeType===e.ELEMENT_NODE?e:B.parentElement(e);return r}function ke(e,r,i,t){if(!e)return!1;var n=Bl(e);if(!n)return!1;try{if(typeof r=="string"){if(n.classList.contains(r)||t&&n.closest("."+r)!==null)return!0}else if(Qn(n,r,t))return!0}catch{}return!!(i&&(n.matches(i)||t&&n.closest(i)!==null))}function vm(e,r){return r.getId(e)!==-1}function so(e,r,i){return e.tagName==="TITLE"&&i.headTitleMutations?!0:r.getId(e)===Fr}function ql(e,r){if(kr(e))return!1;var i=r.getId(e);if(!r.has(i))return!0;var t=B.parentNode(e);return t&&t.nodeType===e.DOCUMENT_NODE?!1:t?ql(t,r):!0}function Zo(e){return!!e.changedTouches}function gm(e){e===void 0&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Vl(e,r){return!!(e.nodeName==="IFRAME"&&r.getMeta(e))}function Wl(e,r){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&r.getMeta(e))}function Qo(e){return e?F(e,rm)&&"shadowRoot"in e?!!e.shadowRoot:!!B.shadowRoot(e):!1}var mm=function(){function e(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}var r=e.prototype;return r.getId=function(t){var n;return(n=this.styleIDMap.get(t))!=null?n:-1},r.has=function(t){return this.styleIDMap.has(t)},r.add=function(t,n){if(this.has(t))return this.getId(t);var o;return n===void 0?o=this.id++:o=n,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o},r.getStyle=function(t){return this.idStyleMap.get(t)||null},r.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},r.generateId=function(){return this.id++},e}();function Gl(e){var r,i=null;return"getRootNode"in e&&((r=B.getRootNode(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&B.host(B.getRootNode(e))&&(i=B.host(B.getRootNode(e))),i}function ym(e){for(var r=e,i;i=Gl(r);)r=i;return r}function _m(e){var r=e.ownerDocument;if(!r)return!1;var i=ym(e);return B.contains(r,i)}function jl(e){var r=e.ownerDocument;return r?B.contains(r,e)||_m(e):!1}var V=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(V||{}),D=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(D||{}),Ae=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(Ae||{}),Je=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(Je||{}),cr=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(cr||{}),Yt=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Yt||{}),Hl=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Hl||{});function du(e){return"__ln"in e}var bm=function(){function e(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}var r=e.prototype;return r.get=function(t){if(t>=this.length)throw new Error("Position outside of list range");for(var n=this.head,o=0;o<t;o++)n=(n==null?void 0:n.next)||null;return n},r.addNode=function(t){var n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&du(t.previousSibling)){var o=t.previousSibling.__ln.next;n.next=o,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,o&&(o.previous=n)}else if(t.nextSibling&&du(t.nextSibling)&&t.nextSibling.__ln.previous){var s=t.nextSibling.__ln.previous;n.previous=s,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,s&&(s.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++},r.removeNode=function(t){var n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)},e}(),vu=function(e,r){return e+"@"+r},wm=function(){function e(){var i=this;k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",function(t){t.forEach(i.processMutation),i.emit()}),k(this,"emit",function(){if(!(i.frozen||i.locked)){for(var t=[],n=new Set,o=new bm,s=function(T){for(var $=T,X=Fr;X===Fr;)$=$&&$.nextSibling,X=$&&i.mirror.getId($);return X},a=function(T){var $=B.parentNode(T);if(!(!$||!jl(T))){var X=!1;if(T.nodeType===Node.TEXT_NODE){var xe=$.tagName;if(xe==="TEXTAREA")return;xe==="STYLE"&&i.addedSet.has($)&&(X=!0)}var Z=kr($)?i.mirror.getId(Gl(T)):i.mirror.getId($),Me=s(T);if(Z===-1||Me===-1)return o.addNode(T);var Ie=Jt(T,{doc:i.doc,mirror:i.mirror,blockClass:i.blockClass,blockSelector:i.blockSelector,maskTextClass:i.maskTextClass,maskTextSelector:i.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:i.inlineStylesheet,maskInputOptions:i.maskInputOptions,maskTextFn:i.maskTextFn,maskInputFn:i.maskInputFn,slimDOMOptions:i.slimDOMOptions,dataURLOptions:i.dataURLOptions,recordCanvas:i.recordCanvas,inlineImages:i.inlineImages,onSerialize:function(ce){Vl(ce,i.mirror)&&i.iframeManager.addIframe(ce),Wl(ce,i.mirror)&&i.stylesheetManager.trackLinkElement(ce),Qo(T)&&i.shadowDomManager.addShadowRoot(B.shadowRoot(T),i.doc)},onIframeLoad:function(ce,ye){i.iframeManager.attachIframe(ce,ye),i.shadowDomManager.observeAttachShadow(ce)},onStylesheetLoad:function(ce,ye){i.stylesheetManager.attachLinkElement(ce,ye)},cssCaptured:X});Ie&&(t.push({parentId:Z,nextId:Me,node:Ie}),n.add(Ie.id))}};i.mapRemoves.length;)i.mirror.removeNodeFromMap(i.mapRemoves.shift());for(var u=O(i.movedSet),c;!(c=u()).done;){var l=c.value;gu(i.removesSubTreeCache,l,i.mirror)&&!i.movedSet.has(B.parentNode(l))||a(l)}for(var f=O(i.addedSet),p;!(p=f()).done;){var g=p.value;!mu(i.droppedSet,g)&&!gu(i.removesSubTreeCache,g,i.mirror)||mu(i.movedSet,g)?a(g):i.droppedSet.add(g)}for(var d=null;o.length;){var _=null;if(d){var v=i.mirror.getId(B.parentNode(d.value)),y=s(d.value);v!==-1&&y!==-1&&(_=d)}if(!_)for(var b=o.tail;b;){var S=b;if(b=b.previous,S){var C=i.mirror.getId(B.parentNode(S.value)),I=s(S.value);if(I===-1)continue;if(C!==-1){_=S;break}else{var x=S.value,M=B.parentNode(x);if(M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var R=B.host(M),P=i.mirror.getId(R);if(P!==-1){_=S;break}}}}}if(!_){for(;o.head;)o.removeNode(o.head.value);break}d=_.previous,o.removeNode(_.value),a(_.value)}var H={texts:i.texts.map(function(T){var $=T.node,X=B.parentNode($);return X&&X.tagName==="TEXTAREA"&&i.genTextAreaValueMutation(X),{id:i.mirror.getId($),value:T.value}}).filter(function(T){return!n.has(T.id)}).filter(function(T){return i.mirror.has(T.id)}),attributes:i.attributes.map(function(T){var $=T.attributes;if(typeof $.style=="string"){var X=JSON.stringify(T.styleDiff),xe=JSON.stringify(T._unchangedStyles);X.length<$.style.length&&(X+xe).split("var(").length===$.style.split("var(").length&&($.style=T.styleDiff)}return{id:i.mirror.getId(T.node),attributes:$}}).filter(function(T){return!n.has(T.id)}).filter(function(T){return i.mirror.has(T.id)}),removes:i.removes,adds:t};!H.texts.length&&!H.attributes.length&&!H.removes.length&&!H.adds.length||(i.texts=[],i.attributes=[],i.attributeMap=new WeakMap,i.removes=[],i.addedSet=new Set,i.movedSet=new Set,i.droppedSet=new Set,i.removesSubTreeCache=new Set,i.movedMap={},i.mutationCb(H))}}),k(this,"genTextAreaValueMutation",function(t){var n=i.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},i.attributes.push(n),i.attributeMap.set(t,n));var o=Array.from(B.childNodes(t),function(s){return B.textContent(s)||""}).join("");n.attributes.value=Jn({element:t,maskInputOptions:i.maskInputOptions,tagName:t.tagName,type:Xn(t),value:o,maskInputFn:i.maskInputFn})}),k(this,"processMutation",function(t){if(!so(t.target,i.mirror,i.slimDOMOptions))switch(t.type){case"characterData":{var n=B.textContent(t.target);!ke(t.target,i.blockClass,i.blockSelector,!1)&&n!==t.oldValue&&i.texts.push({value:wc(t.target,i.maskTextClass,i.maskTextSelector,!0)&&n?i.maskTextFn?i.maskTextFn(n,Bl(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{var o=t.target,s=t.attributeName,a=t.target.getAttribute(s);if(s==="value"){var u=Xn(o);a=Jn({element:o,maskInputOptions:i.maskInputOptions,tagName:o.tagName,type:u,value:a,maskInputFn:i.maskInputFn})}if(ke(t.target,i.blockClass,i.blockSelector,!1)||a===t.oldValue)return;var c=i.attributeMap.get(t.target);if(o.tagName==="IFRAME"&&s==="src"&&!i.keepIframeSrcFn(a))if(!o.contentDocument)s="rr_src";else return;if(c||(c={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},i.attributes.push(c),i.attributeMap.set(t.target,c)),s==="type"&&o.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&o.setAttribute("data-rr-is-password","true"),!bc(o.tagName,s))if(c.attributes[s]=_c(i.doc,Dt(o.tagName),Dt(s),a),s==="style"){if(!i.unattachedDoc)try{i.unattachedDoc=document.implementation.createHTMLDocument()}catch{i.unattachedDoc=i.doc}var l=i.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(var f=O(Array.from(o.style)),p;!(p=f()).done;){var g=p.value,d=o.style.getPropertyValue(g),_=o.style.getPropertyPriority(g);d!==l.style.getPropertyValue(g)||_!==l.style.getPropertyPriority(g)?_===""?c.styleDiff[g]=d:c.styleDiff[g]=[d,_]:c._unchangedStyles[g]=[d,_]}for(var v=O(Array.from(l.style)),y;!(y=v()).done;){var b=y.value;o.style.getPropertyValue(b)===""&&(c.styleDiff[b]=!1)}}else s==="open"&&o.tagName==="DIALOG"&&(o.matches("dialog:modal")?c.attributes.rr_open_mode="modal":c.attributes.rr_open_mode="non-modal");break}case"childList":{if(ke(t.target,i.blockClass,i.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){i.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(function(S){return i.genAdds(S,t.target)}),t.removedNodes.forEach(function(S){var C=i.mirror.getId(S),I=kr(t.target)?i.mirror.getId(B.host(t.target)):i.mirror.getId(t.target);ke(t.target,i.blockClass,i.blockSelector,!1)||so(S,i.mirror,i.slimDOMOptions)||!vm(S,i.mirror)||(i.addedSet.has(S)?(es(i.addedSet,S),i.droppedSet.add(S)):i.addedSet.has(t.target)&&C===-1||ql(t.target,i.mirror)||(i.movedSet.has(S)&&i.movedMap[vu(C,I)]?es(i.movedSet,S):(i.removes.push({parentId:I,id:C,isShadow:kr(t.target)&&Or(t.target)?!0:void 0}),Sm(S,i.removesSubTreeCache))),i.mapRemoves.push(S))});break}}}),k(this,"genAdds",function(t,n){if(!i.processedNodeManager.inOtherBuffer(t,i)&&!(i.addedSet.has(t)||i.movedSet.has(t))){if(i.mirror.hasNode(t)){if(so(t,i.mirror,i.slimDOMOptions))return;i.movedSet.add(t);var o=null;n&&i.mirror.hasNode(n)&&(o=i.mirror.getId(n)),o&&o!==-1&&(i.movedMap[vu(i.mirror.getId(t),o)]=!0)}else i.addedSet.add(t),i.droppedSet.delete(t);ke(t,i.blockClass,i.blockSelector,!1)||(B.childNodes(t).forEach(function(s){return i.genAdds(s)}),Qo(t)&&B.childNodes(B.shadowRoot(t)).forEach(function(s){i.processedNodeManager.add(s,i),i.genAdds(s,t)}))}})}var r=e.prototype;return r.init=function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(o){n[o]=t[o]})},r.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},r.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},r.isFrozen=function(){return this.frozen},r.lock=function(){this.locked=!0,this.canvasManager.lock()},r.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},r.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function es(e,r){e.delete(r),B.childNodes(r).forEach(function(i){return es(e,i)})}function Sm(e,r){for(var i=[e];i.length;){var t=i.pop();r.has(t)||(r.add(t),B.childNodes(t).forEach(function(n){return i.push(n)}))}}function gu(e,r,i){return e.size===0?!1:Cm(e,r)}function Cm(e,r,i){var t=B.parentNode(r);return t?e.has(t):!1}function mu(e,r){return e.size===0?!1:Yl(e,r)}function Yl(e,r){var i=B.parentNode(r);return i?e.has(i)?!0:Yl(e,i):!1}var xr;function Im(e){xr=e}function Em(){xr=void 0}var G=function(e){if(!xr)return e;var r=function(){for(var i=arguments.length,t=new Array(i),n=0;n<i;n++)t[n]=arguments[n];try{return e.apply(void 0,[].concat(t))}catch(o){if(xr&&xr(o)===!0)return;throw o}};return r},Pt=[];function tn(e){try{if("composedPath"in e){var r=e.composedPath();if(r.length)return r[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Kl(e,r){var i=new wm;Pt.push(i),i.init(e);var t=new(Fl())(G(i.processMutations.bind(i)));return t.observe(r,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function km(e){var r=e.mousemoveCb,i=e.sampling,t=e.doc,n=e.mirror;if(i.mousemove===!1)return function(){};var o=typeof i.mousemove=="number"?i.mousemove:50,s=typeof i.mousemoveCallback=="number"?i.mousemoveCallback:500,a=[],u,c=jr(G(function(p){var g=Date.now()-u;r(a.map(function(d){return d.timeOffset-=g,d}),p),a=[],u=null}),s),l=G(jr(G(function(p){var g=tn(p),d=Zo(p)?p.changedTouches[0]:p,_=d.clientX,v=d.clientY;u||(u=ui()),a.push({x:_,y:v,id:n.getId(g),timeOffset:ui()-u}),c(typeof DragEvent<"u"&&F(p,DragEvent)?D.Drag:F(p,MouseEvent)?D.MouseMove:D.TouchMove)}),o,{trailing:!1})),f=[Ee("mousemove",l,t),Ee("touchmove",l,t),Ee("drag",l,t)];return G(function(){f.forEach(function(p){return p()})})}function Om(e){var r=e.mouseInteractionCb,i=e.doc,t=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.sampling;if(s.mouseInteraction===!1)return function(){};var a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,u=[],c=null,l=function(f){return function(p){var g=tn(p);if(!ke(g,n,o,!0)){var d=null,_=f;if("pointerType"in p){switch(p.pointerType){case"mouse":d=Je.Mouse;break;case"touch":d=Je.Touch;break;case"pen":d=Je.Pen;break}d===Je.Touch?Ae[f]===Ae.MouseDown?_="TouchStart":Ae[f]===Ae.MouseUp&&(_="TouchEnd"):Je.Pen}else Zo(p)&&(d=Je.Touch);d!==null?(c=d,(_.startsWith("Touch")&&d===Je.Touch||_.startsWith("Mouse")&&d===Je.Mouse)&&(d=null)):Ae[f]===Ae.Click&&(d=c,c=null);var v=Zo(p)?p.changedTouches[0]:p;if(v){var y=t.getId(g),b=v.clientX,S=v.clientY;G(r)(Y({type:Ae[_],id:y,x:b,y:S},d!==null&&{pointerType:d}))}}}};return Object.keys(Ae).filter(function(f){return Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&a[f]!==!1}).forEach(function(f){var p=Dt(f),g=l(f);if(window.PointerEvent)switch(Ae[f]){case Ae.MouseDown:case Ae.MouseUp:p=p.replace("mouse","pointer");break;case Ae.TouchStart:case Ae.TouchEnd:return}u.push(Ee(p,g,i))}),G(function(){u.forEach(function(f){return f()})})}function Jl(e){var r=e.scrollCb,i=e.doc,t=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.sampling,a=G(jr(G(function(u){var c=tn(u);if(!(!c||ke(c,n,o,!0))){var l=t.getId(c);if(c===i&&i.defaultView){var f=Ul(i.defaultView);r({id:l,x:f.left,y:f.top})}else r({id:l,x:c.scrollLeft,y:c.scrollTop})}}),s.scroll||100));return Ee("scroll",a,i)}function xm(e,r){var i=e.viewportResizeCb,t=r.win,n=-1,o=-1,s=G(jr(G(function(){var a=$l(),u=zl();(n!==a||o!==u)&&(i({width:Number(u),height:Number(a)}),n=a,o=u)}),200));return Ee("resize",s,t)}var Rm=["INPUT","TEXTAREA","SELECT"],yu=new WeakMap;function Am(e){var r=e.inputCb,i=e.doc,t=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.ignoreClass,a=e.ignoreSelector,u=e.maskInputOptions,c=e.maskInputFn,l=e.sampling,f=e.userTriggeredOnInput;function p(C){var I=tn(C),x=C.isTrusted,M=I&&I.tagName;if(I&&M==="OPTION"&&(I=B.parentElement(I)),!(!I||!M||Rm.indexOf(M)<0||ke(I,n,o,!0))&&!(I.classList.contains(s)||a&&I.matches(a))){var R=I.value,P=!1,H=Xn(I)||"";H==="radio"||H==="checkbox"?P=I.checked:(u[M.toLowerCase()]||u[H])&&(R=Jn({element:I,maskInputOptions:u,tagName:M,type:H,value:R,maskInputFn:c})),g(I,f?{text:R,isChecked:P,userTriggered:x}:{text:R,isChecked:P});var T=I.name;H==="radio"&&T&&P&&i.querySelectorAll('input[type="radio"][name="'+T+'"]').forEach(function($){if($!==I){var X=$.value;g($,f?{text:X,isChecked:!P,userTriggered:!1}:{text:X,isChecked:!P})}})}}function g(C,I){var x=yu.get(C);if(!x||x.text!==I.text||x.isChecked!==I.isChecked){yu.set(C,I);var M=t.getId(C);G(r)(Y({},I,{id:M}))}}var d=l.input==="last"?["change"]:["input","change"],_=d.map(function(C){return Ee(C,G(p),i)}),v=i.defaultView;if(!v)return function(){_.forEach(function(C){return C()})};var y=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),b=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];if(y&&y.set){var S;(S=_).push.apply(S,[].concat(b.map(function(C){return Di(C[0],C[1],{set:function(){G(p)({target:this,isTrusted:!1})}},!1,v)})))}return G(function(){_.forEach(function(C){return C()})})}function ci(e){var r=[];function i(t,n){if(Rn("CSSGroupingRule")&&F(t.parentRule,CSSGroupingRule)||Rn("CSSMediaRule")&&F(t.parentRule,CSSMediaRule)||Rn("CSSSupportsRule")&&F(t.parentRule,CSSSupportsRule)||Rn("CSSConditionRule")&&F(t.parentRule,CSSConditionRule)){var o=Array.from(t.parentRule.cssRules),s=o.indexOf(t);n.unshift(s)}else if(t.parentStyleSheet){var a=Array.from(t.parentStyleSheet.cssRules),u=a.indexOf(t);n.unshift(u)}return n}return i(e,r)}function st(e,r,i){var t,n;return e?(e.ownerNode?t=r.getId(e.ownerNode):n=i.getId(e),{styleId:n,id:t}):{}}function Mm(e,r){var i=e.styleSheetRuleCb,t=e.mirror,n=e.stylesheetManager,o=r.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var s=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:G(function(p,g,d){var _=d[0],v=d[1],y=st(g,t,n.styleMirror),b=y.id,S=y.styleId;return(b&&b!==-1||S&&S!==-1)&&i({id:b,styleId:S,adds:[{rule:_,index:v}]}),p.apply(g,d)})}),o.CSSStyleSheet.prototype.addRule=function(p,g,d){d===void 0&&(d=this.cssRules.length);var _=p+" { "+g+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[_,d])};var a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:G(function(p,g,d){var _=d[0],v=st(g,t,n.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,removes:[{index:_}]}),p.apply(g,d)})}),o.CSSStyleSheet.prototype.removeRule=function(p){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};var u;o.CSSStyleSheet.prototype.replace&&(u=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:G(function(p,g,d){var _=d[0],v=st(g,t,n.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,replace:_}),p.apply(g,d)})}));var c;o.CSSStyleSheet.prototype.replaceSync&&(c=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:G(function(p,g,d){var _=d[0],v=st(g,t,n.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,replaceSync:_}),p.apply(g,d)})}));var l={};An("CSSGroupingRule")?l.CSSGroupingRule=o.CSSGroupingRule:(An("CSSMediaRule")&&(l.CSSMediaRule=o.CSSMediaRule),An("CSSConditionRule")&&(l.CSSConditionRule=o.CSSConditionRule),An("CSSSupportsRule")&&(l.CSSSupportsRule=o.CSSSupportsRule));var f={};return Object.entries(l).forEach(function(p){var g=p[0],d=p[1];f[g]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(f[g].insertRule,{apply:G(function(_,v,y){var b=y[0],S=y[1],C=st(v.parentStyleSheet,t,n.styleMirror),I=C.id,x=C.styleId;return(I&&I!==-1||x&&x!==-1)&&i({id:I,styleId:x,adds:[{rule:b,index:[].concat(ci(v),[S||0])}]}),_.apply(v,y)})}),d.prototype.deleteRule=new Proxy(f[g].deleteRule,{apply:G(function(_,v,y){var b=y[0],S=st(v.parentStyleSheet,t,n.styleMirror),C=S.id,I=S.styleId;return(C&&C!==-1||I&&I!==-1)&&i({id:C,styleId:I,removes:[{index:[].concat(ci(v),[b])}]}),_.apply(v,y)})})}),G(function(){o.CSSStyleSheet.prototype.insertRule=s,o.CSSStyleSheet.prototype.deleteRule=a,u&&(o.CSSStyleSheet.prototype.replace=u),c&&(o.CSSStyleSheet.prototype.replaceSync=c),Object.entries(l).forEach(function(p){var g=p[0],d=p[1];d.prototype.insertRule=f[g].insertRule,d.prototype.deleteRule=f[g].deleteRule})})}function Xl(e,r){var i=e.mirror,t=e.stylesheetManager,n,o,s,a=null;r.nodeName==="#document"?a=i.getId(r):a=i.getId(B.host(r));var u=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(o=r.ownerDocument)==null?void 0:o.defaultView)==null?void 0:s.ShadowRoot,c=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?function(){}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var f;return(f=c.get)==null?void 0:f.call(this)},set:function(f){var p,g=(p=c.set)==null?void 0:p.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return g}}),G(function(){Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function Tm(e,r){var i=e.styleDeclarationCb,t=e.mirror,n=e.ignoreCSSAttributes,o=e.stylesheetManager,s=r.win,a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:G(function(c,l,f){var p,g=f[0],d=f[1],_=f[2];if(n.has(g))return a.apply(l,[g,d,_]);var v=st((p=l.parentRule)==null?void 0:p.parentStyleSheet,t,o.styleMirror),y=v.id,b=v.styleId;return(y&&y!==-1||b&&b!==-1)&&i({id:y,styleId:b,set:{property:g,value:d,priority:_},index:ci(l.parentRule)}),c.apply(l,f)})});var u=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:G(function(c,l,f){var p,g=f[0];if(n.has(g))return u.apply(l,[g]);var d=st((p=l.parentRule)==null?void 0:p.parentStyleSheet,t,o.styleMirror),_=d.id,v=d.styleId;return(_&&_!==-1||v&&v!==-1)&&i({id:_,styleId:v,remove:{property:g},index:ci(l.parentRule)}),c.apply(l,f)})}),G(function(){s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=u})}function Pm(e){var r=e.mediaInteractionCb,i=e.blockClass,t=e.blockSelector,n=e.mirror,o=e.sampling,s=e.doc,a=G(function(c){return jr(G(function(l){var f=tn(l);if(!(!f||ke(f,i,t,!0))){var p=f.currentTime,g=f.volume,d=f.muted,_=f.playbackRate,v=f.loop;r({type:c,id:n.getId(f),currentTime:p,volume:g,muted:d,playbackRate:_,loop:v})}}),o.media||500)}),u=[Ee("play",a(Yt.Play),s),Ee("pause",a(Yt.Pause),s),Ee("seeked",a(Yt.Seeked),s),Ee("volumechange",a(Yt.VolumeChange),s),Ee("ratechange",a(Yt.RateChange),s)];return G(function(){u.forEach(function(c){return c()})})}function Dm(e){var r=e.fontCb,i=e.doc,t=i.defaultView;if(!t)return function(){};var n=[],o=new WeakMap,s=t.FontFace;t.FontFace=function(c,l,f){var p=new s(c,l,f);return o.set(p,{family:c,buffer:typeof l!="string",descriptors:f,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),p};var a=$t(i.fonts,"add",function(u){return function(c){return setTimeout(G(function(){var l=o.get(c);l&&(r(l),o.delete(c))}),0),u.apply(this,[c])}});return n.push(function(){t.FontFace=s}),n.push(a),G(function(){n.forEach(function(u){return u()})})}function Nm(e){var r=e.doc,i=e.mirror,t=e.blockClass,n=e.blockSelector,o=e.selectionCb,s=!0,a=G(function(){var u=r.getSelection();if(!(!u||s&&(u!=null&&u.isCollapsed))){s=u.isCollapsed||!1;for(var c=[],l=u.rangeCount||0,f=0;f<l;f++){var p=u.getRangeAt(f),g=p.startContainer,d=p.startOffset,_=p.endContainer,v=p.endOffset,y=ke(g,t,n,!0)||ke(_,t,n,!0);y||c.push({start:i.getId(g),startOffset:d,end:i.getId(_),endOffset:v})}o({ranges:c})}});return a(),Ee("selectionchange",a)}function Lm(e){var r=e.doc,i=e.customElementCb,t=r.defaultView;if(!t||!t.customElements)return function(){};var n=$t(t.customElements,"define",function(o){return function(s,a,u){try{i({define:{name:s}})}catch{console.warn("Custom element callback failed for "+s)}return o.apply(this,[s,a,u])}});return n}function Fm(e,r){var i=e.mutationCb,t=e.mousemoveCb,n=e.mouseInteractionCb,o=e.scrollCb,s=e.viewportResizeCb,a=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,f=e.canvasMutationCb,p=e.fontCb,g=e.selectionCb,d=e.customElementCb;e.mutationCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mutation){var b;(b=r).mutation.apply(b,[].concat(v))}i.apply(void 0,[].concat(v))},e.mousemoveCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mousemove){var b;(b=r).mousemove.apply(b,[].concat(v))}t.apply(void 0,[].concat(v))},e.mouseInteractionCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mouseInteraction){var b;(b=r).mouseInteraction.apply(b,[].concat(v))}n.apply(void 0,[].concat(v))},e.scrollCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.scroll){var b;(b=r).scroll.apply(b,[].concat(v))}o.apply(void 0,[].concat(v))},e.viewportResizeCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.viewportResize){var b;(b=r).viewportResize.apply(b,[].concat(v))}s.apply(void 0,[].concat(v))},e.inputCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.input){var b;(b=r).input.apply(b,[].concat(v))}a.apply(void 0,[].concat(v))},e.mediaInteractionCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.mediaInteaction){var b;(b=r).mediaInteaction.apply(b,[].concat(v))}u.apply(void 0,[].concat(v))},e.styleSheetRuleCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.styleSheetRule){var b;(b=r).styleSheetRule.apply(b,[].concat(v))}c.apply(void 0,[].concat(v))},e.styleDeclarationCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.styleDeclaration){var b;(b=r).styleDeclaration.apply(b,[].concat(v))}l.apply(void 0,[].concat(v))},e.canvasMutationCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.canvasMutation){var b;(b=r).canvasMutation.apply(b,[].concat(v))}f.apply(void 0,[].concat(v))},e.fontCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.font){var b;(b=r).font.apply(b,[].concat(v))}p.apply(void 0,[].concat(v))},e.selectionCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.selection){var b;(b=r).selection.apply(b,[].concat(v))}g.apply(void 0,[].concat(v))},e.customElementCb=function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];if(r.customElement){var b;(b=r).customElement.apply(b,[].concat(v))}d.apply(void 0,[].concat(v))}}function Um(e,r){r===void 0&&(r={});var i=e.doc.defaultView;if(!i)return function(){};Fm(e,r);var t;e.recordDOM&&(t=Kl(e,e.doc));var n=km(e),o=Om(e),s=Jl(e),a=xm(e,{win:i}),u=Am(e),c=Pm(e),l=function(){},f=function(){},p=function(){},g=function(){};e.recordDOM&&(l=Mm(e,{win:i}),f=Xl(e,e.doc),p=Tm(e,{win:i}),e.collectFonts&&(g=Dm(e)));for(var d=Nm(e),_=Lm(e),v=[],y=O(e.plugins),b;!(b=y()).done;){var S=b.value;v.push(S.observer(S.callback,i,S.options))}return G(function(){Pt.forEach(function(C){return C.reset()}),t==null||t.disconnect(),n(),o(),s(),a(),u(),c(),l(),f(),p(),g(),d(),_(),v.forEach(function(C){return C()})})}function Rn(e){return typeof window[e]<"u"}function An(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var _u=function(){function e(i){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=i}var r=e.prototype;return r.getId=function(t,n,o,s){var a=o||this.getIdToRemoteIdMap(t),u=s||this.getRemoteIdToIdMap(t),c=a.get(n);return c||(c=this.generateIdFn(),a.set(n,c),u.set(c,n)),c},r.getIds=function(t,n){var o=this,s=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return n.map(function(u){return o.getId(t,u,s,a)})},r.getRemoteId=function(t,n,o){var s=o||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;var a=s.get(n);return a||-1},r.getRemoteIds=function(t,n){var o=this,s=this.getRemoteIdToIdMap(t);return n.map(function(a){return o.getRemoteId(t,a,s)})},r.reset=function(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)},r.getIdToRemoteIdMap=function(t){var n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n},r.getRemoteIdToIdMap=function(t){var n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n},e}(),$m=function(){function e(i){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new _u(yc)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=i.mutationCb,this.wrappedEmit=i.wrappedEmit,this.stylesheetManager=i.stylesheetManager,this.recordCrossOriginIframes=i.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _u(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=i.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}var r=e.prototype;return r.addIframe=function(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)},r.addLoadListener=function(t){this.loadListener=t},r.attachIframe=function(t,n){var o,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((o=t.contentWindow)==null||o.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))},r.handleMessage=function(t){var n=t;if(!(n.data.type!=="rrweb"||n.origin!==n.data.origin)){var o=t.source;if(o){var s=this.crossOriginIframeMap.get(t.source);if(s){var a=this.transformCrossOriginEvent(s,n.data.event);a&&this.wrappedEmit(a,n.data.isCheckout)}}}},r.transformCrossOriginEvent=function(t,n){var o=this,s;switch(n.type){case V.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);var a=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(n.data.node,a),{timestamp:n.timestamp,type:V.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return n;case V.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case V.IncrementalSnapshot:switch(n.data.source){case D.Mutation:return n.data.adds.forEach(function(u){o.replaceIds(u,t,["parentId","nextId","previousId"]),o.replaceIdOnNode(u.node,t);var c=o.crossOriginIframeRootIdMap.get(t);c&&o.patchRootIdOnNode(u.node,c)}),n.data.removes.forEach(function(u){o.replaceIds(u,t,["parentId","id"])}),n.data.attributes.forEach(function(u){o.replaceIds(u,t,["id"])}),n.data.texts.forEach(function(u){o.replaceIds(u,t,["id"])}),n;case D.Drag:case D.TouchMove:case D.MouseMove:return n.data.positions.forEach(function(u){o.replaceIds(u,t,["id"])}),n;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(n.data,t,["id"]),n;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case D.Font:return n;case D.Selection:return n.data.ranges.forEach(function(u){o.replaceIds(u,t,["start","end"])}),n;case D.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(s=n.data.styles)==null||s.forEach(function(u){o.replaceStyleIds(u,t,["styleId"])}),n}}return!1},r.replace=function(t,n,o,s){for(var a=O(s),u;!(u=a()).done;){var c=u.value;!Array.isArray(n[c])&&typeof n[c]!="number"||(Array.isArray(n[c])?n[c]=t.getIds(o,n[c]):n[c]=t.getId(o,n[c]))}return n},r.replaceIds=function(t,n,o){return this.replace(this.crossOriginIframeMirror,t,n,o)},r.replaceStyleIds=function(t,n,o){return this.replace(this.crossOriginIframeStyleMirror,t,n,o)},r.replaceIdOnNode=function(t,n){var o=this;this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(function(s){o.replaceIdOnNode(s,n)})},r.patchRootIdOnNode=function(t,n){var o=this;t.type!==Hl.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(function(s){o.patchRootIdOnNode(s,n)})},e}(),zm=function(){function e(i){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=i.mutationCb,this.scrollCb=i.scrollCb,this.bypassOptions=i.bypassOptions,this.mirror=i.mirror,this.init()}var r=e.prototype;return r.init=function(){this.reset(),this.patchAttachShadow(Element,document)},r.addShadowRoot=function(t,n){var o=this;if(Or(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=Kl(Y({},this.bypassOptions,{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(function(){return s.disconnect()}),this.restoreHandlers.push(Jl(Y({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(function(){t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&o.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,o.mirror.getId(B.host(t))),o.restoreHandlers.push(Xl({mirror:o.mirror,stylesheetManager:o.bypassOptions.stylesheetManager},t))},0)}},r.observeAttachShadow=function(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)},r.patchAttachShadow=function(t,n){var o=this;this.restoreHandlers.push($t(t.prototype,"attachShadow",function(s){return function(a){var u=s.call(this,a),c=B.shadowRoot(this);return c&&jl(this)&&o.addShadowRoot(c,n),u}}))},r.reset=function(){this.restoreHandlers.forEach(function(t){try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Mn=0;Mn<Xt.length;Mn++)Bm[Xt.charCodeAt(Mn)]=Mn;var qm=function(r){var i=new Uint8Array(r),t,n=i.length,o="";for(t=0;t<n;t+=3)o+=Xt[i[t]>>2],o+=Xt[(i[t]&3)<<4|i[t+1]>>4],o+=Xt[(i[t+1]&15)<<2|i[t+2]>>6],o+=Xt[i[t+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},bu=new Map;function Vm(e,r){var i=bu.get(e);return i||(i=new Map,bu.set(e,i)),i.has(r)||i.set(r,[]),i.get(r)}var Zl=function(e,r,i){if(!(!e||!(ef(e,r)||(typeof e>"u"?"undefined":q(e))==="object"))){var t=e.constructor.name,n=Vm(i,t),o=n.indexOf(e);return o===-1&&(o=n.length,n.push(e)),o}};function qn(e,r,i){if(F(e,Array))return e.map(function(d){return qn(d,r,i)});if(e===null)return e;if(F(e,Float32Array)||F(e,Float64Array)||F(e,Int32Array)||F(e,Uint32Array)||F(e,Uint8Array)||F(e,Uint16Array)||F(e,Int16Array)||F(e,Int8Array)||F(e,Uint8ClampedArray)){var t=e.constructor.name;return{rr_type:t,args:[Object.values(e)]}}else if(F(e,ArrayBuffer)){var n=e.constructor.name,o=qm(e);return{rr_type:n,base64:o}}else if(F(e,DataView)){var s=e.constructor.name;return{rr_type:s,args:[qn(e.buffer,r,i),e.byteOffset,e.byteLength]}}else if(F(e,HTMLImageElement)){var a=e.constructor.name,u=e.src;return{rr_type:a,src:u}}else if(F(e,HTMLCanvasElement)){var c="HTMLImageElement",l=e.toDataURL();return{rr_type:c,src:l}}else if(F(e,ImageData)){var f=e.constructor.name;return{rr_type:f,args:[qn(e.data,r,i),e.width,e.height]}}else if(ef(e,r)||(typeof e>"u"?"undefined":q(e))==="object"){var p=e.constructor.name,g=Zl(e,r,i);return{rr_type:p,index:g}}return e}var Ql=function(e,r,i){return e.map(function(t){return qn(t,r,i)})},ef=function(e,r){var i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"],t=i.filter(function(n){return typeof r[n]=="function"});return!!t.find(function(n){return F(e,r[n])})};function Wm(e,r,i,t){for(var n=function(){var c=u.value;try{if(typeof r.CanvasRenderingContext2D.prototype[c]!="function")return"continue";var l=$t(r.CanvasRenderingContext2D.prototype,c,function(p){return function(){for(var g=this,d=arguments.length,_=new Array(d),v=0;v<d;v++)_[v]=arguments[v];return ke(this.canvas,i,t,!0)||setTimeout(function(){var y=Ql(_,r,g);e(g.canvas,{type:cr["2D"],property:c,args:y})},0),p.apply(this,_)}});o.push(l)}catch{var f=Di(r.CanvasRenderingContext2D.prototype,c,{set:function(d){e(this.canvas,{type:cr["2D"],property:c,args:[d],setter:!0})}});o.push(f)}},o=[],s=Object.getOwnPropertyNames(r.CanvasRenderingContext2D.prototype),a=O(s),u;!(u=a()).done;)n();return function(){o.forEach(function(c){return c()})}}function Gm(e){return e==="experimental-webgl"?"webgl":e}function wu(e,r,i,t){var n=[];try{var o=$t(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),l=1;l<u;l++)c[l-1]=arguments[l];if(!ke(this,r,i,!0)){var f=Gm(a);if("__context"in this||(this.__context=f),t&&["webgl","webgl2"].includes(f))if(c[0]&&q(c[0])==="object"){var p=c[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[].concat([a],c))}});n.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach(function(s){return s()})}}function Su(e,r,i,t,n,o){for(var s=function(){var f=l.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))return"continue";try{if(typeof e[f]!="function")return"continue";var p=$t(e,f,function(d){return function(){for(var _=arguments.length,v=new Array(_),y=0;y<_;y++)v[y]=arguments[y];var b=d.apply(this,v);if(Zl(b,o,this),"tagName"in this.canvas&&!ke(this.canvas,t,n,!0)){var S=Ql(v,o,this),C={type:r,property:f,args:S};i(this.canvas,C)}return b}});a.push(p)}catch{var g=Di(e,f,{set:function(v){i(this.canvas,{type:r,property:f,args:[v],setter:!0})}});a.push(g)}},a=[],u=Object.getOwnPropertyNames(e),c=O(u),l;!(l=c()).done;)s();return a}function jm(e,r,i,t){var n,o=[];if((n=o).push.apply(n,[].concat(Su(r.WebGLRenderingContext.prototype,cr.WebGL,e,i,t,r))),typeof r.WebGL2RenderingContext<"u"){var s;(s=o).push.apply(s,[].concat(Su(r.WebGL2RenderingContext.prototype,cr.WebGL2,e,i,t,r)))}return function(){o.forEach(function(a){return a()})}}var tf="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Hm=function(e){return Uint8Array.from(atob(e),function(r){return r.charCodeAt(0)})},Cu=typeof window<"u"&&window.Blob&&new Blob([Hm(tf)],{type:"text/javascript;charset=utf-8"});function Ym(e){var r;try{if(r=Cu&&(window.URL||window.webkitURL).createObjectURL(Cu),!r)throw"";var i=new Worker(r,{name:e==null?void 0:e.name});return i.addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(r)}),i}catch{return new Worker("data:text/javascript;base64,"+tf,{name:e==null?void 0:e.name})}finally{r&&(window.URL||window.webkitURL).revokeObjectURL(r)}}var Km=function(){function e(i){var t=this;k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",function(f,p){var g=t.rafStamps.invokeId&&t.rafStamps.latestId!==t.rafStamps.invokeId;(g||!t.rafStamps.invokeId)&&(t.rafStamps.invokeId=t.rafStamps.latestId),t.pendingCanvasMutations.has(f)||t.pendingCanvasMutations.set(f,[]),t.pendingCanvasMutations.get(f).push(p)});var n=i.sampling,o=n===void 0?"all":n,s=i.win,a=i.blockClass,u=i.blockSelector,c=i.recordCanvas,l=i.dataURLOptions;this.mutationCb=i.mutationCb,this.mirror=i.mirror,c&&o==="all"&&this.initCanvasMutationObserver(s,a,u),c&&typeof o=="number"&&this.initCanvasFPSObserver(o,s,a,u,{dataURLOptions:l})}var r=e.prototype;return r.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},r.freeze=function(){this.frozen=!0},r.unfreeze=function(){this.frozen=!1},r.lock=function(){this.locked=!0},r.unlock=function(){this.locked=!1},r.initCanvasFPSObserver=function(t,n,o,s,a){var u=this,c=wu(n,o,s,!0),l=new Map,f=new Ym;f.onmessage=function(y){var b=y.data.id;if(l.set(b,!1),"base64"in y.data){var S=y.data,C=S.base64,I=S.type,x=S.width,M=S.height;u.mutationCb({id:b,type:cr["2D"],commands:[{property:"clearRect",args:[0,0,x,M]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:I}]},0,0]}]})}};var p=1e3/t,g=0,d,_=function(){var y=[];return n.document.querySelectorAll("canvas").forEach(function(b){ke(b,o,s,!0)||y.push(b)}),y},v=function(y){if(g&&y-g<p){d=requestAnimationFrame(v);return}g=y;var b=u;_().forEach(ws(function(S){var C,I,x,M;return Lr(this,function(R){switch(R.label){case 0:return I=b.mirror.getId(S),l.get(I)?[2]:S.width===0||S.height===0?[2]:(l.set(I,!0),["webgl","webgl2"].includes(S.__context)&&(x=S.getContext(S.__context),((C=x==null?void 0:x.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&x.clear(x.COLOR_BUFFER_BIT)),[4,createImageBitmap(S)]);case 1:return M=R.sent(),f.postMessage({id:I,bitmap:M,width:S.width,height:S.height,dataURLOptions:a.dataURLOptions},[M]),[2]}})})),d=requestAnimationFrame(v)};d=requestAnimationFrame(v),this.resetObservers=function(){c(),cancelAnimationFrame(d)}},r.initCanvasMutationObserver=function(t,n,o){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var s=wu(t,n,o,!1),a=Wm(this.processMutation.bind(this),t,n,o),u=jm(this.processMutation.bind(this),t,n,o);this.resetObservers=function(){s(),a(),u()}},r.startPendingCanvasMutationFlusher=function(){var t=this;requestAnimationFrame(function(){return t.flushPendingCanvasMutations()})},r.startRAFTimestamping=function(){var t=this,n=function(o){t.rafStamps.latestId=o,requestAnimationFrame(n)};requestAnimationFrame(n)},r.flushPendingCanvasMutations=function(){var t=this;this.pendingCanvasMutations.forEach(function(n,o){var s=t.mirror.getId(o);t.flushPendingCanvasMutationFor(o,s)}),requestAnimationFrame(function(){return t.flushPendingCanvasMutations()})},r.flushPendingCanvasMutationFor=function(t,n){if(!(this.frozen||this.locked)){var o=this.pendingCanvasMutations.get(t);if(!(!o||n===-1)){var s=o.map(function(u){u.type;var c=Dr(u,["type"]);return c}),a=o[0].type;this.mutationCb({id:n,type:a,commands:s}),this.pendingCanvasMutations.delete(t)}}},e}(),Jm=function(){function e(i){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new mm),this.mutationCb=i.mutationCb,this.adoptedStyleSheetCb=i.adoptedStyleSheetCb}var r=e.prototype;return r.attachLinkElement=function(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)},r.trackLinkElement=function(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))},r.adoptStyleSheets=function(t,n){var o,s=function(){var f=l.value,p=void 0;o.styleMirror.has(f)?p=o.styleMirror.getId(f):(p=o.styleMirror.add(f),u.push({styleId:p,rules:Array.from(f.rules||CSSRule,function(g,d){return{rule:vc(g,f.href),index:d}})})),a.styleIds.push(p)};if(t.length!==0){for(var a={id:n,styleIds:[]},u=[],c=O(t),l;!(l=c()).done;)o=this,s();u.length>0&&(a.styles=u),this.adoptedStyleSheetCb(a)}},r.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},r.trackStylesheetInLinkElement=function(t){},e}(),Xm=function(){function e(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}var r=e.prototype;return r.inOtherBuffer=function(t,n){var o=this.nodeMap.get(t);return o&&Array.from(o).some(function(s){return s!==n})},r.add=function(t,n){var o=this;this.active||(this.active=!0,requestAnimationFrame(function(){o.nodeMap=new WeakMap,o.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))},r.destroy=function(){},e}(),fe,Vn,ao,li=!1;try{if(Array.from([1],function(e){return e*2})[0]!==2){var uo=document.createElement("iframe");document.body.appendChild(uo),Array.from=((Ia=uo.contentWindow)==null?void 0:Ia.Array.from)||Array.from,document.body.removeChild(uo)}}catch(e){console.debug("Unable to override Array.from",e)}var Ue=Kh();function _t(e){e===void 0&&(e={});var r=e.emit,i=e.checkoutEveryNms,t=e.checkoutEveryNth,n=e.blockClass,o=n===void 0?"rr-block":n,s=e.blockSelector,a=s===void 0?null:s,u=e.ignoreClass,c=u===void 0?"rr-ignore":u,l=e.ignoreSelector,f=l===void 0?null:l,p=e.maskTextClass,g=p===void 0?"rr-mask":p,d=e.maskTextSelector,_=d===void 0?null:d,v=e.inlineStylesheet,y=v===void 0?!0:v,b=e.maskAllInputs,S=e.maskInputOptions,C=e.slimDOMOptions,I=e.maskInputFn,x=e.maskTextFn,M=e.hooks,R=e.packFn,P=e.sampling,H=P===void 0?{}:P,T=e.dataURLOptions,$=T===void 0?{}:T,X=e.mousemoveWait,xe=e.recordDOM,Z=xe===void 0?!0:xe,Me=e.recordCanvas,Ie=Me===void 0?!1:Me,ce=e.recordCrossOriginIframes,ye=ce===void 0?!1:ce,Te=e.recordAfter,Ct=Te===void 0?e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load":Te,qe=e.userTriggeredOnInput,qt=qe===void 0?!1:qe,Pe=e.collectFonts,It=Pe===void 0?!1:Pe,J=e.inlineImages,Et=J===void 0?!1:J,kt=e.plugins,Vt=e.keepIframeSrcFn,gr=Vt===void 0?function(){return!1}:Vt,mr=e.ignoreCSSAttributes,zi=mr===void 0?new Set([]):mr,on=e.errorHandler;Im(on);var ot=ye?window.parent===window:!0,Ot=!1;if(!ot)try{window.parent.document&&(Ot=!1)}catch{Ot=!0}if(ot&&!r)throw new Error("emit function is required");if(!ot&&!Ot)return function(){};X!==void 0&&H.mousemove===void 0&&(H.mousemove=X),Ue.reset();var Wt=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:S!==void 0?S:{password:!0},yr=C===!0||C==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:C==="all",headMetaDescKeywords:C==="all",headTitleMutations:C==="all"}:C||{};gm();var Gt,xt=0,Ke=function(Q){for(var Re=O(kt||[]),A;!(A=Re()).done;){var le=A.value;le.eventProcessor&&(Q=le.eventProcessor(Q))}return R&&!Ot&&(Q=R(Q)),Q};fe=function(Q,Re){var A,le=Q;if(le.timestamp=ui(),(A=Pt[0])!=null&&A.isFrozen()&&le.type!==V.FullSnapshot&&!(le.type===V.IncrementalSnapshot&&le.data.source===D.Mutation)&&Pt.forEach(function(uh){return uh.unfreeze()}),ot)r==null||r(Ke(le),Re);else if(Ot){var oh={type:"rrweb",event:Ke(le),origin:window.location.origin,isCheckout:Re};window.parent.postMessage(oh,"*")}if(le.type===V.FullSnapshot)Gt=le,xt=0;else if(le.type===V.IncrementalSnapshot){if(le.data.source===D.Mutation&&le.data.isAttachIframe)return;xt++;var sh=t&&xt>=t,ah=i&&le.timestamp-Gt.timestamp>i;(sh||ah)&&Vn(!0)}};for(var Rt=function(Q){fe({type:V.IncrementalSnapshot,data:Y({source:D.Mutation},Q)})},va=function(Q){return fe({type:V.IncrementalSnapshot,data:Y({source:D.Scroll},Q)})},ga=function(Q){return fe({type:V.IncrementalSnapshot,data:Y({source:D.CanvasMutation},Q)})},nh=function(Q){return fe({type:V.IncrementalSnapshot,data:Y({source:D.AdoptedStyleSheet},Q)})},At=new Jm({mutationCb:Rt,adoptedStyleSheetCb:nh}),Mt=new $m({mirror:Ue,mutationCb:Rt,stylesheetManager:At,recordCrossOriginIframes:ye,wrappedEmit:fe}),ih=O(kt||[]),ma;!(ma=ih()).done;){var ya=ma.value;ya.getMirror&&ya.getMirror({nodeMirror:Ue,crossOriginIframeMirror:Mt.crossOriginIframeMirror,crossOriginIframeStyleMirror:Mt.crossOriginIframeStyleMirror})}var Bi=new Xm;ao=new Km({recordCanvas:Ie,mutationCb:ga,win:window,blockClass:o,blockSelector:a,mirror:Ue,sampling:H.canvas,dataURLOptions:$});var sn=new zm({mutationCb:Rt,scrollCb:va,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:g,maskTextSelector:_,inlineStylesheet:y,maskInputOptions:Wt,dataURLOptions:$,maskTextFn:x,maskInputFn:I,recordCanvas:Ie,inlineImages:Et,sampling:H,slimDOMOptions:yr,iframeManager:Mt,stylesheetManager:At,canvasManager:ao,keepIframeSrcFn:gr,processedNodeManager:Bi},mirror:Ue});Vn=function(Q){if(Q===void 0&&(Q=!1),!!Z){fe({type:V.Meta,data:{href:window.location.href,width:zl(),height:$l()}},Q),At.reset(),sn.init(),Pt.forEach(function(A){return A.lock()});var Re=_p(document,{mirror:Ue,blockClass:o,blockSelector:a,maskTextClass:g,maskTextSelector:_,inlineStylesheet:y,maskAllInputs:Wt,maskTextFn:x,maskInputFn:I,slimDOM:yr,dataURLOptions:$,recordCanvas:Ie,inlineImages:Et,onSerialize:function(A){Vl(A,Ue)&&Mt.addIframe(A),Wl(A,Ue)&&At.trackLinkElement(A),Qo(A)&&sn.addShadowRoot(B.shadowRoot(A),document)},onIframeLoad:function(A,le){Mt.attachIframe(A,le),sn.observeAttachShadow(A)},onStylesheetLoad:function(A,le){At.attachLinkElement(A,le)},keepIframeSrcFn:gr});if(!Re)return console.warn("Failed to snapshot the document");fe({type:V.FullSnapshot,data:{node:Re,initialOffset:Ul(window)}},Q),Pt.forEach(function(A){return A.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Ue.getId(document))}};try{var _r=[],_a=function(Q){var Re;return G(Um)({mutationCb:Rt,mousemoveCb:function(A,le){return fe({type:V.IncrementalSnapshot,data:{source:le,positions:A}})},mouseInteractionCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.MouseInteraction},A)})},scrollCb:va,viewportResizeCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.ViewportResize},A)})},inputCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.Input},A)})},mediaInteractionCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.MediaInteraction},A)})},styleSheetRuleCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.StyleSheetRule},A)})},styleDeclarationCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.StyleDeclaration},A)})},canvasMutationCb:ga,fontCb:function(A){return fe({type:V.IncrementalSnapshot,data:Y({source:D.Font},A)})},selectionCb:function(A){fe({type:V.IncrementalSnapshot,data:Y({source:D.Selection},A)})},customElementCb:function(A){fe({type:V.IncrementalSnapshot,data:Y({source:D.CustomElement},A)})},blockClass:o,ignoreClass:c,ignoreSelector:f,maskTextClass:g,maskTextSelector:_,maskInputOptions:Wt,inlineStylesheet:y,sampling:H,recordDOM:Z,recordCanvas:Ie,inlineImages:Et,userTriggeredOnInput:qt,collectFonts:It,doc:Q,maskInputFn:I,maskTextFn:x,keepIframeSrcFn:gr,blockSelector:a,slimDOMOptions:yr,dataURLOptions:$,mirror:Ue,iframeManager:Mt,stylesheetManager:At,shadowDomManager:sn,processedNodeManager:Bi,canvasManager:ao,ignoreCSSAttributes:zi,plugins:((Re=kt==null?void 0:kt.filter(function(A){return A.observer}))==null?void 0:Re.map(function(A){return{observer:A.observer,options:A.options,callback:function(le){return fe({type:V.Plugin,data:{plugin:A.name,payload:le}})}}}))||[]},M)};Mt.addLoadListener(function(Q){try{_r.push(_a(Q.contentDocument))}catch(Re){console.warn(Re)}});var qi=function(){Vn(),_r.push(_a(document)),li=!0};return document.readyState==="interactive"||document.readyState==="complete"?qi():(_r.push(Ee("DOMContentLoaded",function(){fe({type:V.DomContentLoaded,data:{}}),Ct==="DOMContentLoaded"&&qi()})),_r.push(Ee("load",function(){fe({type:V.Load,data:{}}),Ct==="load"&&qi()},window))),function(){_r.forEach(function(Q){try{Q()}catch(A){var Re=String(A).toLowerCase();Re.includes("cross-origin")||console.warn(A)}}),Bi.destroy(),li=!1,Em()}}catch(Q){console.warn(Q)}}_t.addCustomEvent=function(e,r){if(!li)throw new Error("please add custom event after start recording");fe({type:V.Custom,data:{tag:e,payload:r}})};_t.freezePage=function(){Pt.forEach(function(e){return e.freeze()})};_t.takeFullSnapshot=function(e){if(!li)throw new Error("please take full snapshot after start recording");Vn(e)};_t.mirror=Ue;var Iu;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Iu||(Iu={}));_t.addCustomEvent;_t.freezePage;_t.takeFullSnapshot;var Eu=E.setImmediate,pt,ts,rs,rf=Object.prototype.toString,Zm=typeof Eu<"u"?function(r){return Eu(r)}:setTimeout;try{Object.defineProperty({},"x",{}),pt=function(r,i,t,n){return Object.defineProperty(r,i,{value:t,writable:!0,configurable:n!==!1})}}catch{pt=function(i,t,n){return i[t]=n,i}}rs=function(){var r,i,t;function n(o,s){this.fn=o,this.self=s,this.next=void 0}return{add:function(s,a){t=new n(s,a),i?i.next=t:r=t,i=t,t=void 0},drain:function(){var s=r;for(r=i=ts=void 0;s;)s.fn.call(s.self),s=s.next}}}();function fi(e,r){rs.add(e,r),ts||(ts=Zm(rs.drain))}function nf(e){var r,i=typeof e;return e!==null&&(i==="object"||i==="function")&&(r=e.then),typeof r=="function"?r:!1}function Gs(){for(var e=0;e<this.chain.length;e++)Qm(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function Qm(e,r,i){var t,n;try{r===!1?i.reject(e.msg):(r===!0?t=e.msg:t=r.call(void 0,e.msg),t===i.promise?i.reject(TypeError("Promise-chain cycle")):(n=nf(t))?n.call(t,i.resolve,i.reject):i.resolve(t))}catch(o){i.reject(o)}}function of(e){var r,i=this;if(!i.triggered){i.triggered=!0,i.def&&(i=i.def);try{(r=nf(e))?fi(function(){var t=new ku(i);try{r.call(e,function(){of.apply(t,arguments)},function(){Rr.apply(t,arguments)})}catch(n){Rr.call(t,n)}}):(i.msg=e,i.state=1,i.chain.length>0&&fi(Gs,i))}catch(t){Rr.call(new ku(i),t)}}}function Rr(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&fi(Gs,r))}function sf(e,r,i,t){for(var n=0;n<r.length;n++)(function(s){e.resolve(r[s]).then(function(u){i(s,u)},t)})(n)}function ku(e){this.def=e,this.triggered=!1}function ey(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function bt(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new ey(this);this.then=function(t,n){var o={success:typeof t=="function"?t:!0,failure:typeof n=="function"?n:!1};return o.promise=new this.constructor(function(a,u){if(typeof a!="function"||typeof u!="function")throw TypeError("Not a function");o.resolve=a,o.reject=u}),r.chain.push(o),r.state!==0&&fi(Gs,r),o.promise},this.catch=function(t){return this.then(void 0,t)};try{e.call(void 0,function(t){of.call(r,t)},function(t){Rr.call(r,t)})}catch(i){Rr.call(r,i)}}var af=pt({},"constructor",bt,!1);bt.prototype=af;pt(af,"__NPO__",0,!1);pt(bt,"resolve",function(r){var i=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new i(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");n(r)})});pt(bt,"reject",function(r){return new this(function(t,n){if(typeof t!="function"||typeof n!="function")throw TypeError("Not a function");n(r)})});pt(bt,"all",function(r){var i=this;return rf.call(r)!=="[object Array]"?i.reject(TypeError("Not an array")):r.length===0?i.resolve([]):new i(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");var s=r.length,a=Array(s),u=0;sf(i,r,function(l,f){a[l]=f,++u===s&&n(a)},o)})});pt(bt,"race",function(r){var i=this;return rf.call(r)!=="[object Array]"?i.reject(TypeError("Not an array")):new i(function(n,o){if(typeof n!="function"||typeof o!="function")throw TypeError("Not a function");sf(i,r,function(a,u){n(u)},o)})});var W;typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?W=Promise:W=bt;var Le={DEBUG:!1,LIB_VERSION:"2.71.0"},Ar=24*60*60*1e3,co=8*1e3,Ni=Array.prototype,ty=Function.prototype,uf=Object.prototype,ct=Ni.slice,rn=uf.toString,Li=uf.hasOwnProperty,ve=E.console,lt=E.navigator,N=E.document,Tn=E.opera,Ou=E.screen,Xe=lt.userAgent,lo=ty.bind,xu=Ni.forEach,Ru=Ni.indexOf,Au=Ni.map,ry=Array.isArray,ns={},h={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},j={log:function(){if(Le.DEBUG&&!h.isUndefined(ve)&&ve)try{ve.log.apply(ve,arguments)}catch{h.each(arguments,function(r){ve.log(r)})}},warn:function(){if(Le.DEBUG&&!h.isUndefined(ve)&&ve){var e=["Mixpanel warning:"].concat(h.toArray(arguments));try{ve.warn.apply(ve,e)}catch{h.each(e,function(i){ve.warn(i)})}}},error:function(){if(Le.DEBUG&&!h.isUndefined(ve)&&ve){var e=["Mixpanel error:"].concat(h.toArray(arguments));try{ve.error.apply(ve,e)}catch{h.each(e,function(i){ve.error(i)})}}},critical:function(){if(!h.isUndefined(ve)&&ve){var e=["Mixpanel error:"].concat(h.toArray(arguments));try{ve.error.apply(ve,e)}catch{h.each(e,function(i){ve.error(i)})}}}},fo=function(e,r){return function(){return arguments[0]="["+r+"] "+arguments[0],e.apply(j,arguments)}},zt=function(e){return{log:fo(j.log,e),error:fo(j.error,e),critical:fo(j.critical,e)}},Hr=function(e){return function(){try{return e.apply(this,arguments)}catch(r){j.critical("Implementation error. Please turn on debug and contact support@mixpanel.com."),Le.DEBUG&&j.critical(r)}}},cf=function(e){var r=e.prototype;for(var i in r)typeof r[i]=="function"&&(r[i]=Hr(r[i]))};h.bind=function(e,r){var i,t;if(lo&&e.bind===lo)return lo.apply(e,ct.call(arguments,1));if(!h.isFunction(e))throw new TypeError;return i=ct.call(arguments,2),t=function(){if(!(this instanceof t))return e.apply(r,i.concat(ct.call(arguments)));var n={};n.prototype=e.prototype;var o=new n;n.prototype=null;var s=e.apply(o,i.concat(ct.call(arguments)));return Object(s)===s?s:o},t};h.each=function(e,r,i){if(e!=null){if(xu&&e.forEach===xu)e.forEach(r,i);else if(e.length===+e.length){for(var t=0,n=e.length;t<n;t++)if(t in e&&r.call(i,e[t],t,e)===ns)return}else for(var o in e)if(Li.call(e,o)&&r.call(i,e[o],o,e)===ns)return}};h.extend=function(e){return h.each(ct.call(arguments,1),function(r){for(var i in r)r[i]!==void 0&&(e[i]=r[i])}),e};h.isArray=ry||function(e){return rn.call(e)==="[object Array]"};h.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}};h.isArguments=function(e){return!!(e&&Li.call(e,"callee"))};h.toArray=function(e){return e?e.toArray?e.toArray():h.isArray(e)||h.isArguments(e)?ct.call(e):h.values(e):[]};h.map=function(e,r,i){if(Au&&e.map===Au)return e.map(r,i);var t=[];return h.each(e,function(n){t.push(r.call(i,n))}),t};h.keys=function(e){var r=[];return e===null||h.each(e,function(i,t){r[r.length]=t}),r};h.values=function(e){var r=[];return e===null||h.each(e,function(i){r[r.length]=i}),r};h.include=function(e,r){var i=!1;return e===null?i:Ru&&e.indexOf===Ru?e.indexOf(r)!=-1:(h.each(e,function(t){if(i||(i=t===r))return ns}),i)};h.includes=function(e,r){return e.indexOf(r)!==-1};h.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e};h.isObject=function(e){return e===Object(e)&&!h.isArray(e)};h.isEmptyObject=function(e){if(h.isObject(e)){for(var r in e)if(Li.call(e,r))return!1;return!0}return!1};h.isUndefined=function(e){return e===void 0};h.isString=function(e){return rn.call(e)=="[object String]"};h.isDate=function(e){return rn.call(e)=="[object Date]"};h.isNumber=function(e){return rn.call(e)=="[object Number]"};h.isElement=function(e){return!!(e&&e.nodeType===1)};h.encodeDates=function(e){return h.each(e,function(r,i){h.isDate(r)?e[i]=h.formatDate(r):h.isObject(r)&&(e[i]=h.encodeDates(r))}),e};h.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};h.formatDate=function(e){function r(i){return i<10?"0"+i:i}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())};h.strip_empty_properties=function(e){var r={};return h.each(e,function(i,t){h.isString(i)&&i.length>0&&(r[t]=i)}),r};h.truncate=function(e,r){var i;return typeof e=="string"?i=e.slice(0,r):h.isArray(e)?(i=[],h.each(e,function(t){i.push(h.truncate(t,r))})):h.isObject(e)?(i={},h.each(e,function(t,n){i[n]=h.truncate(t,r)})):i=e,i};h.JSONEncode=function(){return function(e){var r=e,i=function(n){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(a){var u=s[a];return typeof u=="string"?u:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'},t=function(n,o){var s="",a=" ",u=0,c="",l="",f=0,p=s,g=[],d=o[n];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(n)),typeof d){case"string":return i(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(s+=a,g=[],rn.apply(d)==="[object Array]"){for(f=d.length,u=0;u<f;u+=1)g[u]=t(u,d)||"null";return l=g.length===0?"[]":s?`[
|
|
60
60
|
`+s+g.join(`,
|
|
61
61
|
`+s)+`
|
|
62
62
|
`+p+"]":"["+g.join(",")+"]",s=p,l}for(c in d)Li.call(d,c)&&(l=t(c,d),l&&g.push(i(c)+(s?": ":":")+l));return l=g.length===0?"{}":s?"{"+g.join(",")+p+"}":"{"+g.join(",")+"}",s=p,l}};return t("",{"":r})}}();h.JSONDecode=function(){var e,r,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
63
63
|
`,r:"\r",t:" "},t,n=function(g){var d=new SyntaxError(g);throw d.at=e,d.text=t,d},o=function(g){return g&&g!==r&&n("Expected '"+g+"' instead of '"+r+"'"),r=t.charAt(e),e+=1,r},s=function(){var g,d="";for(r==="-"&&(d="-",o("-"));r>="0"&&r<="9";)d+=r,o();if(r===".")for(d+=".";o()&&r>="0"&&r<="9";)d+=r;if(r==="e"||r==="E")for(d+=r,o(),(r==="-"||r==="+")&&(d+=r,o());r>="0"&&r<="9";)d+=r,o();if(g=+d,!isFinite(g))n("Bad number");else return g},a=function(){var g,d,_="",v;if(r==='"')for(;o();){if(r==='"')return o(),_;if(r==="\\")if(o(),r==="u"){for(v=0,d=0;d<4&&(g=parseInt(o(),16),!!isFinite(g));d+=1)v=v*16+g;_+=String.fromCharCode(v)}else if(typeof i[r]=="string")_+=i[r];else break;else _+=r}n("Bad string")},u=function(){for(;r&&r<=" ";)o()},c=function(){switch(r){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}n('Unexpected "'+r+'"')},l,f=function(){var g=[];if(r==="["){if(o("["),u(),r==="]")return o("]"),g;for(;r;){if(g.push(l()),u(),r==="]")return o("]"),g;o(","),u()}}n("Bad array")},p=function(){var g,d={};if(r==="{"){if(o("{"),u(),r==="}")return o("}"),d;for(;r;){if(g=a(),u(),o(":"),Object.hasOwnProperty.call(d,g)&&n('Duplicate key "'+g+'"'),d[g]=l(),u(),r==="}")return o("}"),d;o(","),u()}}n("Bad object")};return l=function(){switch(u(),r){case"{":return p();case"[":return f();case'"':return a();case"-":return s();default:return r>="0"&&r<="9"?s():c()}},function(g){var d;return t=g,e=0,r=" ",d=l(),u(),r&&n("Syntax error"),d}}();h.base64Encode=function(e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i,t,n,o,s,a,u,c,l=0,f=0,p="",g=[];if(!e)return e;e=h.utf8Encode(e);do i=e.charCodeAt(l++),t=e.charCodeAt(l++),n=e.charCodeAt(l++),c=i<<16|t<<8|n,o=c>>18&63,s=c>>12&63,a=c>>6&63,u=c&63,g[f++]=r.charAt(o)+r.charAt(s)+r.charAt(a)+r.charAt(u);while(l<e.length);switch(p=g.join(""),e.length%3){case 1:p=p.slice(0,-2)+"==";break;case 2:p=p.slice(0,-1)+"=";break}return p};h.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,`
|
|
64
64
|
`).replace(/\r/g,`
|
|
65
|
-
`);var r="",i,t,n=0,o;for(i=t=0,n=e.length,o=0;o<n;o++){var s=e.charCodeAt(o),a=null;s<128?t++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(t>i&&(r+=e.substring(i,t)),r+=a,i=t=o+1)}return t>i&&(r+=e.substring(i,e.length)),r};h.UUID=function(){try{return E.crypto.randomUUID()}catch{for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",h.map(e,function(t){return t.toString(16)}).join("")}};var Mu=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];h.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<Mu.length;r++)if(e.indexOf(Mu[r])!==-1)return!0;return!1};h.HTTPBuildQuery=function(e,r){var i,t,n=[];return h.isUndefined(r)&&(r="&"),h.each(e,function(o,s){i=encodeURIComponent(o.toString()),t=encodeURIComponent(s),n[n.length]=t+"="+i}),n.join(r)};h.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var i="[\\?&]"+r+"=([^&#]*)",t=new RegExp(i),n=t.exec(e);if(n===null||n&&typeof n[1]!="string"&&n[1].length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{j.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};h.cookie={get:function(e){for(var r=e+"=",i=N.cookie.split(";"),t=0;t<i.length;t++){for(var n=i[t];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(r)===0)return decodeURIComponent(n.substring(r.length,n.length))}return null},parse:function(e){var r;try{r=h.JSONDecode(h.cookie.get(e))||{}}catch{}return r},set_seconds:function(e,r,i,t,n,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(t){var l=Tu(N.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*1e3),u="; expires="+f.toGMTString()}o&&(n=!0,c="; SameSite=None"),n&&(c+="; secure"),N.cookie=e+"="+encodeURIComponent(r)+u+"; path=/"+a+c},set:function(e,r,i,t,n,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(t){var l=Tu(N.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*24*60*60*1e3),u="; expires="+f.toGMTString()}o&&(n=!0,c="; SameSite=None"),n&&(c+="; secure");var p=e+"="+encodeURIComponent(r)+u+"; path=/"+a+c;return N.cookie=p,p},remove:function(e,r,i){h.cookie.set(e,"",-1,r,!1,!1,i)}};var ff=function(e){var r=!0;try{var i="__mplss_"+js(8),t="xyz";e.setItem(i,t),e.getItem(i)!==t&&(r=!1),e.removeItem(i)}catch{r=!1}return r},ho=null,Kr=function(e,r){return ho!==null&&!r?ho:ho=ff(e||E.localStorage)},po=null,iy=function(e,r){return po!==null&&!r?po:po=ff(e||E.sessionStorage)};function hf(e,r,i){var t=function(n){j.error(r+" error: "+n)};return{is_supported:function(n){var o=i(e,n);return o||j.error(r+" unsupported"),o},error:t,get:function(n){try{return e.getItem(n)}catch(o){t(o)}return null},parse:function(n){try{return h.JSONDecode(e.getItem(n))||{}}catch{}return null},set:function(n,o){try{e.setItem(n,o)}catch(s){t(s)}},remove:function(n){try{e.removeItem(n)}catch(o){t(o)}}}}h.localStorage=hf(E.localStorage,"localStorage",Kr);h.sessionStorage=hf(E.sessionStorage,"sessionStorage",iy);h.register_event=function(){var e=function(t,n,o,s,a){if(!t){j.error("No valid element provided to register_event");return}if(t.addEventListener&&!s)t.addEventListener(n,o,!!a);else{var u="on"+n,c=t[u];t[u]=r(t,o,c)}};function r(t,n,o){var s=function(a){if(a=a||i(E.event),!!a){var u=!0,c,l;return h.isFunction(o)&&(c=o(a)),l=n.call(t,a),(c===!1||l===!1)&&(u=!1),u}};return s}function i(t){return t&&(t.preventDefault=i.preventDefault,t.stopPropagation=i.stopPropagation),t}return i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0},e}();var oy=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');h.dom_query=function(){function e(n){return n.all?n.all:n.getElementsByTagName("*")}var r=/[\t\r\n]/g;function i(n,o){var s=" "+o+" ";return(" "+n.className+" ").replace(r," ").indexOf(s)>=0}function t(n){if(!N.getElementsByTagName)return[];var o=n.split(" "),s,a,u,c,l,f,p,g,d,_,v=[N];for(f=0;f<o.length;f++){if(s=o[f].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),u=a[0];var y=a[1],b=N.getElementById(y);if(!b||u&&b.nodeName.toLowerCase()!=u)return[];v=[b];continue}if(s.indexOf(".")>-1){a=s.split("."),u=a[0];var S=a[1];for(u||(u="*"),c=[],l=0,p=0;p<v.length;p++)for(u=="*"?d=e(v[p]):d=v[p].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];for(v=[],_=0,p=0;p<c.length;p++)c[p].className&&h.isString(c[p].className)&&i(c[p],S)&&(v[_++]=c[p]);continue}var C=s.match(oy);if(C){u=C[1];var I=C[2],x=C[3],M=C[4];for(u||(u="*"),c=[],l=0,p=0;p<v.length;p++)for(u=="*"?d=e(v[p]):d=v[p].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=[],_=0;var R;switch(x){case"=":R=function(P){return P.getAttribute(I)==M};break;case"~":R=function(P){return P.getAttribute(I).match(new RegExp("\\b"+M+"\\b"))};break;case"|":R=function(P){return P.getAttribute(I).match(new RegExp("^"+M+"-?"))};break;case"^":R=function(P){return P.getAttribute(I).indexOf(M)===0};break;case"$":R=function(P){return P.getAttribute(I).lastIndexOf(M)==P.getAttribute(I).length-M.length};break;case"*":R=function(P){return P.getAttribute(I).indexOf(M)>-1};break;default:R=function(P){return P.getAttribute(I)}}for(v=[],_=0,p=0;p<c.length;p++)R(c[p])&&(v[_++]=c[p]);continue}for(u=s,c=[],l=0,p=0;p<v.length;p++)for(d=v[p].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=c}return v}return function(n){return h.isElement(n)?[n]:h.isObject(n)&&!h.isUndefined(n.length)?n:t.call(this,n)}}();var sy=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],ay=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];h.info={campaignParams:function(e){var r="",i={};return h.each(sy,function(t){r=h.getQueryParam(N.URL,t),r.length?i[t]=r:e!==void 0&&(i[t]=e)}),i},clickParams:function(){var e="",r={};return h.each(ay,function(i){e=h.getQueryParam(N.URL,i),e.length&&(r[i]=e)}),r},marketingParams:function(){return h.extend(h.info.campaignParams(),h.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=h.info.searchEngine(e),i=r!="yahoo"?"q":"p",t={};if(r!==null){t.$search_engine=r;var n=h.getQueryParam(e,i);n.length&&(t.mp_keyword=n)}return t},browser:function(e,r,i){return r=r||"",i||h.includes(e," OPR/")?h.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":h.includes(e,"IEMobile")||h.includes(e,"WPDesktop")?"Internet Explorer Mobile":h.includes(e,"SamsungBrowser/")?"Samsung Internet":h.includes(e,"Edge")||h.includes(e,"Edg/")?"Microsoft Edge":h.includes(e,"FBIOS")?"Facebook Mobile":h.includes(e,"Whale/")?"Whale Browser":h.includes(e,"Chrome")?"Chrome":h.includes(e,"CriOS")?"Chrome iOS":h.includes(e,"UCWEB")||h.includes(e,"UCBrowser")?"UC Browser":h.includes(e,"FxiOS")?"Firefox iOS":h.includes(r,"Apple")?h.includes(e,"Mobile")?"Mobile Safari":"Safari":h.includes(e,"Android")?"Android Mobile":h.includes(e,"Konqueror")?"Konqueror":h.includes(e,"Firefox")?"Firefox":h.includes(e,"MSIE")||h.includes(e,"Trident/")?"Internet Explorer":h.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,i){var t=h.info.browser(e,r,i),n={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},o=n[t];if(o===void 0)return null;var s=e.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var e=Xe;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return E.location.href},properties:function(e){return typeof e!="object"&&(e={}),h.extend(h.strip_empty_properties({$os:h.info.os(),$browser:h.info.browser(Xe,lt.vendor,Pn),$referrer:N.referrer,$referring_domain:h.info.referringDomain(N.referrer),$device:h.info.device(Xe)}),{$current_url:h.info.currentUrl(),$browser_version:h.info.browserVersion(Xe,lt.vendor,Pn),$screen_height:Ou.height,$screen_width:Ou.width,mp_lib:"web",$lib_version:Le.LIB_VERSION,$insert_id:js(),time:h.timestamp()/1e3},h.strip_empty_properties(e))},people_properties:function(){return h.extend(h.strip_empty_properties({$os:h.info.os(),$browser:h.info.browser(Xe,lt.vendor,Pn)}),{$browser_version:h.info.browserVersion(Xe,lt.vendor,Pn)})},mpPageViewProperties:function(){return h.strip_empty_properties({current_page_title:N.title,current_domain:E.location.hostname,current_url_path:E.location.pathname,current_url_protocol:E.location.protocol,current_url_search:E.location.search})}};var uy=function(e,r){var i=null,t=[];return function(n){var o=this;return t.push(n),i||(i=new W(function(s){setTimeout(function(){var a=e.apply(o,[t]);i=null,t=[],s(a)},r)})),i}},js=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},cy=function(){var e=h.UUID().replace(/-/g,""),r=h.UUID().replace(/-/g,"").substring(0,16),i="01";return"00-"+e+"-"+r+"-"+i},ly=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,fy=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Tu=function(e){var r=fy,i=e.split("."),t=i[i.length-1];(t.length>4||t==="com"||t==="org")&&(r=ly);var n=e.match(r);return n?n[0]:""},hy=function(){var e=E.navigator.onLine;return h.isUndefined(e)||e},ht=function(){},fr=null,hi=null;typeof JSON<"u"&&(fr=JSON.stringify,hi=JSON.parse);fr=fr||h.JSONEncode;hi=hi||h.JSONDecode;h.info=h.info;h.info.browser=h.info.browser;h.info.browserVersion=h.info.browserVersion;h.info.device=h.info.device;h.info.properties=h.info.properties;h.isBlockedUA=h.isBlockedUA;h.isEmptyObject=h.isEmptyObject;h.isObject=h.isObject;h.JSONDecode=h.JSONDecode;h.JSONEncode=h.JSONEncode;h.toArray=h.toArray;h.NPO=bt;var py="mixpanelBrowserDb",pf="mixpanelRecordingEvents",Hs="mixpanelRecordingRegistry",dy=1,vy=[pf,Hs],Be=function(e){this.dbPromise=null,this.storeName=e};Be.prototype._openDb=function(){return new W(function(e,r){var i=E.indexedDB.open(py,dy);i.onerror=function(){r(i.error)},i.onsuccess=function(){e(i.result)},i.onupgradeneeded=function(t){var n=t.target.result;vy.forEach(function(o){n.createObjectStore(o)})}})};Be.prototype.init=function(){return E.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof E.IDBDatabase?W.resolve():W.reject(e)})):W.reject("indexedDB is not supported in this browser")};Be.prototype.isInitialized=function(){return!!this.dbPromise};Be.prototype.makeTransaction=function(e,r){var i=this.storeName,t=function(n){return new W(function(o,s){var a=n.transaction(i,e);a.oncomplete=function(){o(a)},a.onabort=a.onerror=function(){s(a.error)},r(a.objectStore(i))})};return this.dbPromise.then(t).catch((function(n){return n&&n.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(t)):W.reject(n)}).bind(this))};Be.prototype.setItem=function(e,r){return this.makeTransaction("readwrite",function(i){i.put(r,e)})};Be.prototype.getItem=function(e){var r;return this.makeTransaction("readonly",function(i){r=i.get(e)}).then(function(){return r.result})};Be.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(r){r.delete(e)})};Be.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(r){e=r.getAll()}).then(function(){return e.result})};var gy="__mp_opt_in_out_";function my(e,r){gf(!0,e,r)}function yy(e,r){gf(!1,e,r)}function _y(e,r){return vf(e,r)==="1"}function df(e,r){if(wy(r))return j.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var i=vf(e,r)==="0";return i&&j.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),i}function wt(e){return Js(e,function(r){return this.get_config(r)})}function St(e){return Js(e,function(r){return this._get_config(r)})}function dr(e){return Js(e,function(r){return this._get_config(r)})}function by(e,r){r=r||{},Ys(r).remove(Ks(e,r),!!r.crossSubdomainCookie,r.cookieDomain)}function Ys(e){return e=e||{},e.persistenceType==="localStorage"?h.localStorage:h.cookie}function Ks(e,r){return r=r||{},(r.persistencePrefix||gy)+e}function vf(e,r){return Ys(r).get(Ks(e,r))}function wy(e){if(e&&e.ignoreDnt)return!1;var r=e&&e.window||E,i=r.navigator||{},t=!1;return h.each([i.doNotTrack,i.msDoNotTrack,r.doNotTrack],function(n){h.includes([!0,1,"1","yes"],n)&&(t=!0)}),t}function gf(e,r,i){if(!h.isString(r)||!r.length){j.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}i=i||{},Ys(i).set(Ks(r,i),e?1:0,h.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&e&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})}function Js(e,r){return function(){var i=!1;try{var t=r.call(this,"token"),n=r.call(this,"ignore_dnt"),o=r.call(this,"opt_out_tracking_persistence_type"),s=r.call(this,"opt_out_tracking_cookie_prefix"),a=r.call(this,"window");t&&(i=df(t,{ignoreDnt:n,persistenceType:o,persistencePrefix:s,window:a}))}catch(c){j.error("Unexpected error when checking tracking opt-out status: "+c)}if(!i)return e.apply(this,arguments);var u=arguments[arguments.length-1];typeof u=="function"&&u(0)}}var Sy=zt("lock"),mf=function(e,r){r=r||{},this.storageKey=e,this.storage=r.storage||E.localStorage,this.pollIntervalMS=r.pollIntervalMS||100,this.timeoutMS=r.timeoutMS||2e3,this.promiseImpl=r.promiseImpl||W};mf.prototype.withLock=function(e,r){var i=this.promiseImpl;return new i(h.bind(function(t,n){var o=r||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),a=this.storageKey,u=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,f=a+":X",p=a+":Y",g=a+":Z",d=function(S){if(new Date().getTime()-s>c){Sy.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+o+"]"),l.removeItem(g),l.removeItem(p),y();return}setTimeout(function(){try{S()}catch(C){n(C)}},u*(Math.random()+.1))},_=function(S,C){S()?C():d(function(){_(S,C)})},v=function(){var S=l.getItem(p);return S&&S!==o?!1:(l.setItem(p,o),l.getItem(p)===o?!0:(Kr(l,!0)||n(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){l.setItem(f,o),_(v,function(){if(l.getItem(f)===o){b();return}d(function(){if(l.getItem(p)!==o){y();return}_(function(){return!l.getItem(g)},b)})})},b=function(){l.setItem(g,"1");var S=function(){l.removeItem(g),l.getItem(p)===o&&l.removeItem(p),l.getItem(f)===o&&l.removeItem(f)};e().then(function(C){S(),t(C)}).catch(function(C){S(),n(C)})};try{if(Kr(l,!0))y();else throw new Error("localStorage support check failed")}catch(S){n(S)}},this))};var vr=function(e){this.storage=e||E.localStorage};vr.prototype.init=function(){return W.resolve()};vr.prototype.isInitialized=function(){return!0};vr.prototype.setItem=function(e,r){return new W(h.bind(function(i,t){try{this.storage.setItem(e,fr(r))}catch(n){t(n)}i()},this))};vr.prototype.getItem=function(e){return new W(h.bind(function(r,i){var t;try{t=hi(this.storage.getItem(e))}catch(n){i(n)}r(t)},this))};vr.prototype.removeItem=function(e){return new W(h.bind(function(r,i){try{this.storage.removeItem(e)}catch(t){i(t)}r()},this))};var Pu=zt("batch"),He=function(e,r){r=r||{},this.storageKey=e,this.usePersistence=r.usePersistence,this.usePersistence&&(this.queueStorage=r.queueStorage||new vr,this.lock=new mf(e,{storage:r.sharedLockStorage||E.localStorage,timeoutMS:r.sharedLockTimeoutMS})),this.reportError=r.errorReporter||h.bind(Pu.error,Pu),this.pid=r.pid||null,this.memQueue=[],this.initialized=!1,r.enqueueThrottleMs?this.enqueuePersisted=uy(h.bind(this._enqueuePersisted,this),r.enqueueThrottleMs):this.enqueuePersisted=h.bind(function(i){return this._enqueuePersisted([i])},this)};He.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?W.resolve():this.queueStorage.init().then(h.bind(function(){this.initialized=!0},this)).catch(h.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))};He.prototype.enqueue=function(e,r){var i={id:js(),flushAfter:new Date().getTime()+r*2,payload:e};return this.usePersistence?this.enqueuePersisted(i):(this.memQueue.push(i),W.resolve(!0))};He.prototype._enqueuePersisted=function(e){var r=h.bind(function(){return this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(i){return this.saveToStorage(i.concat(e))},this)).then(h.bind(function(i){return i&&(this.memQueue=this.memQueue.concat(e)),i},this)).catch(h.bind(function(i){return this.reportError("Error enqueueing items",i,e),!1},this))},this);return this.lock.withLock(r,this.pid).catch(h.bind(function(i){return this.reportError("Error acquiring storage lock",i),!1},this))};He.prototype.fillBatch=function(e){var r=this.memQueue.slice(0,e);return this.usePersistence&&r.length<e?this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(i){if(i.length){var t={};h.each(r,function(s){t[s.id]=!0});for(var n=0;n<i.length;n++){var o=i[n];if(new Date().getTime()>o.flushAfter&&!t[o.id]&&(o.orphaned=!0,r.push(o),r.length>=e))break}}return r},this)):W.resolve(r)};var Du=function(e,r){var i=[];return h.each(e,function(t){t.id&&!r[t.id]&&i.push(t)}),i};He.prototype.removeItemsByID=function(e){var r={};if(h.each(e,function(t){r[t]=!0}),this.memQueue=Du(this.memQueue,r),this.usePersistence){var i=h.bind(function(){return this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(t){return t=Du(t,r),this.saveToStorage(t)},this)).then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(t){for(var n=0;n<t.length;n++){var o=t[n];if(o.id&&r[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(h.bind(function(t){return this.reportError("Error removing items",t,e),!1},this))},this);return this.lock.withLock(i,this.pid).catch(h.bind(function(t){return this.reportError("Error acquiring storage lock",t),Kr(this.lock.storage,!0)?!1:i().then(h.bind(function(n){return n||this.queueStorage.removeItem(this.storageKey).then(function(){return n})},this)).catch(h.bind(function(n){return this.reportError("Error clearing queue",n),!1},this))},this))}else return W.resolve(!0)};var Nu=function(e,r){var i=[];return h.each(e,function(t){var n=t.id;if(n in r){var o=r[n];o!==null&&(t.payload=o,i.push(t))}else i.push(t)}),i};He.prototype.updatePayloads=function(e){return this.memQueue=Nu(this.memQueue,e),this.usePersistence?this.lock.withLock(h.bind(function(){return this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(i){return i=Nu(i,e),this.saveToStorage(i)},this)).catch(h.bind(function(i){return this.reportError("Error updating items",e,i),!1},this))},this),this.pid).catch(h.bind(function(r){return this.reportError("Error acquiring storage lock",r),!1},this)):W.resolve(!0)};He.prototype.readFromStorage=function(){return this.ensureInit().then(h.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(h.bind(function(e){return e&&(h.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(h.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))};He.prototype.saveToStorage=function(e){return this.ensureInit().then(h.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(h.bind(function(r){return this.reportError("Error saving queue",r),!1},this))};He.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(h.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):W.resolve()};var Cy=10*60*1e3,Tr=zt("batch"),Fe=function(e,r){this.errorReporter=r.errorReporter,this.queue=new He(e,{errorReporter:h.bind(this.reportError,this),queueStorage:r.queueStorage,sharedLockStorage:r.sharedLockStorage,sharedLockTimeoutMS:r.sharedLockTimeoutMS,usePersistence:r.usePersistence,enqueueThrottleMs:r.enqueueThrottleMs}),this.libConfig=r.libConfig,this.sendRequest=r.sendRequestFunc,this.beforeSendHook=r.beforeSendHook,this.stopAllBatching=r.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=r.flushOnlyOnInterval||!1,this._flushPromise=null};Fe.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)};Fe.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};Fe.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};Fe.prototype.clear=function(){return this.queue.clear()};Fe.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};Fe.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};Fe.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(h.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))};Fe.prototype.sendRequestPromise=function(e,r){return new W(h.bind(function(i){this.sendRequest(e,r,i)},this))};Fe.prototype.flush=function(e){if(this.requestInProgress)return Tr.log("Flush: Request already in progress"),W.resolve();this.requestInProgress=!0,e=e||{};var r=this.libConfig.batch_request_timeout_ms,i=new Date().getTime(),t=this.batchSize;return this.queue.fillBatch(t).then(h.bind(function(n){var o=n.length===t,s=[],a={};if(h.each(n,function(f){var p=f.payload;if(this.beforeSendHook&&!f.orphaned&&(p=this.beforeSendHook(p)),p){p.event&&p.properties&&(p.properties=h.extend({},p.properties,{mp_sent_by_lib_version:Le.LIB_VERSION}));var g=!0,d=f.id;d?(this.itemIdsSentSuccessfully[d]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:f,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[d]}),g=!1):this.reportError("[dupe] found item with no ID",{item:f}),g&&s.push(p)}a[f.id]=p},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),W.resolve();var u=h.bind(function(){return this.queue.removeItemsByID(h.map(n,function(f){return f.id})).then(h.bind(function(f){return h.each(n,h.bind(function(p){var g=p.id;g?(this.itemIdsSentSuccessfully[g]=this.itemIdsSentSuccessfully[g]||0,this.itemIdsSentSuccessfully[g]++,this.itemIdsSentSuccessfully[g]>5&&this.reportError("[dupe] item ID sent too many times",{item:p,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[g]})):this.reportError("[dupe] found item with no ID while removing",{item:p})},this)),f?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),W.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),W.resolve())},this))},this),c=h.bind(function(f){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(a);if(h.isObject(f)&&f.error==="timeout"&&new Date().getTime()-i>=r)return this.reportError("Network timeout; retrying"),this.flush();if(h.isObject(f)&&(f.httpStatusCode>=500||f.httpStatusCode===429||f.httpStatusCode<=0&&!hy()||f.error==="timeout")){var p=this.flushInterval*2;return f.retryAfter&&(p=parseInt(f.retryAfter,10)*1e3||p),p=Math.min(Cy,p),this.reportError("Error; retry in "+p+" ms"),this.scheduleFlush(p),W.resolve()}else if(h.isObject(f)&&f.httpStatusCode===413)if(n.length>1){var g=Math.max(1,Math.floor(t/2));return this.batchSize=Math.min(this.batchSize,g,n.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),W.resolve()}else return this.reportError("Single-event request too large; dropping",n),this.resetBatchSize(),u();else return u()}catch(d){this.reportError("Error handling API response",d),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:r};return e.unloading&&(l.transport="sendBeacon"),Tr.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,l).then(c)},this)).catch(h.bind(function(n){this.reportError("Error flushing request queue",n),this.resetFlush()},this))};Fe.prototype.reportError=function(e,r){if(Tr.error.apply(Tr.error,arguments),this.errorReporter)try{r instanceof Error||(r=new Error(e)),this.errorReporter(e,r)}catch(i){Tr.error(i)}};var Xs=function(e){var r=Date.now();return!e||r>e.maxExpires||r>e.idleExpires},Iy=250,tr=zt("recorder"),Lu=E.CompressionStream,Ey={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},ky=new Set([D.MouseMove,D.MouseInteraction,D.Scroll,D.ViewportResize,D.Input,D.TouchMove,D.MediaInteraction,D.Drag,D.Selection]);function Oy(e){return e.type===V.IncrementalSnapshot&&ky.has(e.data.source)}var _e=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||ht,this._onMaxLengthReached=e.onMaxLengthReached||ht,this._onBatchSent=e.onBatchSent||ht,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=Mr,this.recordMinMs=0;var r=Kr(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new Be(pf),this.batcher=new Fe(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:Ey,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:r,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:Iy,sharedLockTimeoutMS:10*1e3})};_e.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},r=this._mixpanel.get_property("$device_id");r&&(e.$device_id=r);var i=this._mixpanel.get_property("$user_id");return i&&(e.$user_id=i),e};_e.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.batcher.flush().then((function(){return this.queueStorage.removeItem(this.batcherKey)}).bind(this))};_e.prototype.getConfig=function(e){return this._mixpanel.get_config(e)};_e.prototype.get_config=function(e){return this.getConfig(e)};_e.prototype.startRecording=function(e){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){tr.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>Mr&&(this.recordMaxMs=Mr,tr.critical("record_max_ms cannot be greater than "+Mr+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>co&&(this.recordMinMs=co,tr.critical("record_min_ms cannot be greater than "+co+"ms. Capping value.")),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=h.info.currentUrl(),this.replayStartUrl=h.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var r=(function(){clearTimeout(this.idleTimeoutId);var n=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,n),this.idleExpires=new Date().getTime()+n}).bind(this);r();var i=this.getConfig("record_block_selector");(i===""||i===null)&&(i=void 0);try{this._stopRecording=this._rrwebRecord({emit:(function(n){if(this.idleExpires&&this.idleExpires<n.timestamp){this._onIdleTimeout();return}Oy(n)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),r()),this.__enqueuePromise=this.batcher.enqueue(n)}).bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:i,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15}})}catch(n){this.reportError("Unexpected error when starting rrweb recording.",n)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var t=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),t)};_e.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(i){this.reportError("Error with rrweb stopRecording",i)}this._stopRecording=null}var r;return this.batcher.stopped?r=this.batcher.clear():e||(r=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),r};_e.prototype.isRrwebStopped=function(){return this._stopRecording===null};_e.prototype.flushEventsWithOptOut=function(e,r,i){var t=(function(n){n===0&&(this.stopRecording(),i({error:"Tracking has been opted out, stopping recording."}))}).bind(this);this._flushEvents(e,r,i,t)};_e.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(r){this.reportError("Error getting tab ID for serialization ",r),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}};_e.deserialize=function(e,r){var i=new _e(h.extend({},r,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,seqNo:e.seqNo,sharedLockStorage:r.sharedLockStorage}));return i};_e.prototype._sendRequest=function(e,r,i,t){var n=(function(s,a){s.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=h.info.currentUrl()),this._onBatchSent(),t({status:0,httpStatusCode:s.status,responseBody:a,retryAfter:s.headers.get("Retry-After")})}).bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");E.fetch(o+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(r),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:i}).then(function(s){s.json().then(function(a){n(s,a)}).catch(function(a){t({error:a})})}).catch(function(s){t({error:s,httpStatusCode:0})})};_e.prototype._flushEvents=wt(function(e,r,i){var t=e.length;if(t>0){for(var n=this.replayId,o=1/0,s=-1/0,a=!1,u=0;u<t;u++)o=Math.min(o,e[u].timestamp),s=Math.max(s,e[u].timestamp),e[u].type===V.FullSnapshot&&(a=!0);if(this.seqNo===0){if(!a){i({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var c=s-this.replayStartTime,l={$current_url:this.batchStartUrl,$lib_version:Le.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:n,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},f=JSON.stringify(e);if(Object.assign(l,this.getUserIdInfo()),Lu){var p=new Blob([f],{type:"application/json"}).stream(),g=p.pipeThrough(new Lu("gzip"));new Response(g).blob().then((function(d){l.format="gzip",this._sendRequest(n,l,d,i)}).bind(this))}else l.format="body",this._sendRequest(n,l,f,i)}});_e.prototype.reportError=function(e,r){tr.error.apply(tr.error,arguments);try{!r&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,r)}catch(i){tr.error(i)}};var rt=function(e){this.idb=new Be(Hs),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};rt.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")};rt.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)};rt.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return W.resolve();var r=e.tabId;return r?this.idb.init().then((function(){return this.idb.setItem(r,e)}).bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),W.resolve())};rt.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then((function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}).bind(this)).then((function(e){return Xs(e)?null:e}).bind(this)).catch(this.handleError.bind(this)):W.resolve(null)};rt.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()};rt.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then((function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}).bind(this)).catch(this.handleError.bind(this))};rt.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):W.resolve()};rt.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then((function(){return this.idb.getAll()}).bind(this)).then((function(e){var r=e.filter(function(i){return Xs(i)}).map((function(i){var t=_e.deserialize(i,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return t.unloadPersistedData().then((function(){return this.idb.removeItem(i.tabId)}).bind(this)).catch(this.handleError.bind(this))}).bind(this));return W.all(r)}).bind(this)).catch(this.handleError.bind(this)):W.resolve([])};var Pr=zt("recorder"),nt=function(e,r,i){this.mixpanelInstance=e,this.rrwebRecord=r||_t,this.sharedLockStorage=i,this.recordingRegistry=new rt({mixpanelInstance:this.mixpanelInstance,errorReporter:Pr.error,sharedLockStorage:i}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};nt.prototype.startRecording=function(e){if(e=e||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Pr.log("Recording already in progress, skipping startRecording.");return}var r=(function(){Pr.log("Idle timeout reached, restarting recording."),this.resetRecording()}).bind(this),i=(function(){Pr.log("Max recording length reached, stopping recording."),this.resetRecording()}).bind(this),t=(function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}).bind(this),n={mixpanelInstance:this.mixpanelInstance,onBatchSent:t,onIdleTimeout:r,onMaxLengthReached:i,replayId:h.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=_e.deserialize(e.activeSerializedRecording,n):this.activeRecording=new _e(n),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())};nt.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then((function(){return this.recordingRegistry.clearActiveRecording()}).bind(this)).then((function(){this.stopRecordingInProgress=!1}).bind(this))};nt.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)};nt.prototype._stopCurrentRecording=function(e,r){if(this.activeRecording){var i=this.activeRecording.stopRecording(e);return r&&(this.activeRecording=null),i}return W.resolve()};nt.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),W.resolve(null)):this.recordingRegistry.getActiveRecording().then((function(r){return r&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:r}):e?this.startRecording({shouldStopBatcher:!1}):(Pr.log("No resumable recording found."),null)}).bind(this))};nt.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})};nt.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null};Object.defineProperty(nt.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});E.__mp_recorder=nt;var Jr="change",tt="click",is="hashchange",xy="input",Fu="load",ft="mp_locationchange",Uu="popstate",Fi="scrollend",Zs="scroll",Ry="select",pi="submit",Ay="toggle",$u="visibilitychange",My=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],zu=["mp-include"],os=["mp-no-track"],Bu=os.concat(["mp-sensitive"]),Ty=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],Py={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},Dy={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},Ny={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},qu=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],Ly=5,ne=zt("autocapture");function ss(e){for(var r={},i=yf(e).split(" "),t=0;t<i.length;t++){var n=i[t];n&&(r[n]=!0)}return r}function yf(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function Fy(e){if(e.previousElementSibling)return e.previousElementSibling;do e=e.previousSibling;while(e&&!_f(e));return e}function Vu(e,r,i,t,n,o){var s={$classes:yf(e).split(" "),$tag_name:e.tagName.toLowerCase()},a=e.id;a&&(s.$id=a),Qs(e,r,n,o)&&h.each(Ty.concat(t),function(f){if(e.hasAttribute(f)&&!i[f]){var p=e.getAttribute(f);di(p)&&(s["$attr-"+f]=p)}});for(var u=1,c=1,l=e;l=Fy(l);)u++,l.tagName===e.tagName&&c++;return s.$nth_child=u,s.$nth_of_type=c,s}function Uy(e,r){var i=r.allowElementCallback,t=r.allowSelectors||[],n=r.blockAttrs||[],o=r.blockElementCallback,s=r.blockSelectors||[],a=r.captureTextContent||!1,u=r.captureExtraAttrs||[],c=r.capturedForHeatMap||!1,l={};h.each(n,function(I){l[I]=!0});var f=null,p=typeof e.target>"u"?e.srcElement:e.target;if(bf(p)&&(p=p.parentNode),qy(p,e)&&as(p,e,i,t)&&!vo(p,e,o,s)){for(var g=[p],d=p;d.parentNode&&!Ge(d,"body");)g.push(d.parentNode),d=d.parentNode;var _=[],v,y=!1;if(h.each(g,function(I){var x=Qs(I,e,i,t);!l.href&&I.tagName.toLowerCase()==="a"&&(v=I.getAttribute("href"),v=x&&di(v)&&v),vo(I,e,o,s)&&(y=!0),_.push(Vu(I,e,l,u,i,t))},this),!y){var b=N.documentElement;if(f={$event_type:e.type,$host:E.location.host,$pathname:E.location.pathname,$elements:_,$el_attr__href:v,$viewportHeight:Math.max(b.clientHeight,E.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,E.innerWidth||0),$pageHeight:N.body.offsetHeight||0,$pageWidth:N.body.offsetWidth||0},h.each(u,function(I){if(!l[I]&&p.hasAttribute(I)){var x=p.getAttribute(I);di(x)&&(f["$el_attr__"+I]=x)}}),a&&(S=Wu(p,e,i,t),S&&S.length&&(f.$el_text=S)),e.type===tt&&(h.each(My,function(I){I in e&&(f["$"+I]=e[I])}),c&&(f.$captured_for_heatmap=!0),p=$y(e)),a){var S=Wu(p,e,i,t);S&&S.length&&(f.$el_text=S)}if(p){if(!as(p,e,i,t)||vo(p,e,o,s))return null;var C=Vu(p,e,l,u,i,t);f.$target=C,f.$el_classes=C.$classes,h.extend(f,h.strip_empty_properties({$el_id:C.$id,$el_tag_name:C.$tag_name}))}}}return f}function Wu(e,r,i,t){var n="";return Qs(e,r,i,t)&&e.childNodes&&e.childNodes.length&&h.each(e.childNodes,function(o){bf(o)&&o.textContent&&(n+=h.trim(o.textContent).split(/(\s+)/).filter(di).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),h.trim(n)}function $y(e){for(var r=e.target,i=e.composedPath(),t=0;t<i.length;t++){var n=i[t];if(Ge(n,"a")||Ge(n,"button")||Ge(n,"input")||Ge(n,"select")||n.getAttribute&&n.getAttribute("role")==="button"){r=n;break}if(n===r)break}return r}function as(e,r,i,t){if(i)try{if(!i(e,r))return!1}catch(s){return ne.critical("Error while checking element in allowElementCallback",s),!1}if(!t.length)return!0;for(var n=0;n<t.length;n++){var o=t[n];try{if(e.matches(o))return!0}catch(s){ne.critical("Error while checking selector: "+o,s)}}return!1}function vo(e,r,i,t){var n;if(i)try{if(i(e,r))return!0}catch(a){return ne.critical("Error while checking element in blockElementCallback",a),!0}if(t&&t.length)for(n=0;n<t.length;n++){var o=t[n];try{if(e.matches(o))return!0}catch(a){ne.critical("Error while checking selector: "+o,a)}}var s=ss(e);for(n=0;n<os.length;n++)if(s[os[n]])return!0;return!1}function _f(e){return e&&e.nodeType===1}function Ge(e,r){return e&&e.tagName&&e.tagName.toLowerCase()===r.toLowerCase()}function bf(e){return e&&e.nodeType===3}function zy(){try{var e=N.createElement("div");return!!e.matches}catch{return!1}}function By(){return typeof WeakSet<"u"}function qy(e,r){if(!e||Ge(e,"html")||!_f(e))return!1;var i=e.tagName.toLowerCase();switch(i){case"form":return r.type===pi;case"input":return["button","submit"].indexOf(e.getAttribute("type"))===-1?r.type===Jr:r.type===tt;case"select":case"textarea":return r.type===Jr;default:return r.type===tt}}function Qs(e,r,i,t){var n;if(!as(e,r,i,t))return!1;for(var o=e;o.parentNode&&!Ge(o,"body");o=o.parentNode){var s=ss(o);for(n=0;n<Bu.length;n++)if(s[Bu[n]])return!1}var a=ss(e);for(n=0;n<zu.length;n++)if(a[zu[n]])return!0;if(Ge(e,"input")||Ge(e,"select")||Ge(e,"textarea")||e.getAttribute("contenteditable")==="true")return!1;var u=e.type||"";if(typeof u=="string")switch(u.toLowerCase()){case"hidden":return!1;case"password":return!1}var c=e.name||e.id||"";if(typeof c=="string"){var l=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(l.test(c.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function di(e){if(e===null||h.isUndefined(e))return!1;if(typeof e=="string"){e=h.trim(e);var r=/^(?:(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}))$/;if(r.test((e||"").replace(/[- ]/g,"")))return!1;var i=/(^\d{3}-?\d{2}-?\d{4}$)/;if(i.test(e))return!1}return!0}function wf(e){var r="onscrollend"in E,i=Yr(e),t=Fi;if(!r){var n=null,o=100;i=Yr(function(){clearTimeout(n),n=setTimeout(e,o)}),t=Zs}return{listener:i,eventType:t}}function Vy(e){for(var r=0;r<qu.length;r++)if(e.hasAttribute(qu[r]))return!0;return!1}function Wy(e){var r=e.getAttribute("role");if(!r)return!1;var i=r.trim().split(/\s+/)[0].toLowerCase();return Py[i]}function go(e){var r=e.tagName.toLowerCase();return!!(r==="button"||r==="input"||r==="select"||r==="textarea"||r==="details"||r==="dialog"||e.isContentEditable||e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend||Vy(e)||Wy(e)||r==="a"&&e.hasAttribute("href")||e.hasAttribute("tabindex"))}function Gy(e){if(!e||!e.tagName)return!0;var r=e.tagName.toLowerCase();if(Dy[r])return!0;if(go(e))return!1;for(var i=e.parentElement,t=0;i&&t<Ly;){if(go(i))return!1;if(i.getRootNode&&i.getRootNode()!==N){var n=i.getRootNode();if(n.host&&go(n.host))return!1}i=i.parentElement,t++}return!!Ny[r]}var jy=30,Hy=1e3,Yy=4;function Sf(){this.clicks=[]}Sf.prototype.isRageClick=function(e,r,i){i=i||{};var t=i.threshold_px||jy,n=i.timeout_ms||Hy,o=i.click_count||Yy,s=Date.now(),a=this.clicks[this.clicks.length-1];if(a&&s-a.timestamp<n&&Math.sqrt(Math.pow(e-a.x,2)+Math.pow(r-a.y,2))<t){if(this.clicks.push({x:e,y:r,timestamp:s}),this.clicks.length>=o)return this.clicks=[],!0}else this.clicks=[{x:e,y:r,timestamp:s}];return!1};function Bt(e,r){this.changeCallback=e||function(){},this.observerConfig=r,this.observedShadowRoots=null,this.shadowObservers=[]}Bt.prototype.getEventTarget=function(e){if(this.observedShadowRoots){var r=this.getComposedPath(e);return r&&r.length?r[0]:e.target||e.srcElement}};Bt.prototype.getComposedPath=function(e){return"composedPath"in e?e.composedPath():[]};Bt.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var r=this.getComposedPath(e),i=0;i<r.length;i++){var t=r[i];t&&t.shadowRoot&&this.observeShadowRoot(t.shadowRoot)}};Bt.prototype.observeShadowRoot=function(e){if(!(!this.observedShadowRoots||this.observedShadowRoots.has(e))){var r=this;try{this.observedShadowRoots.add(e);var i=new window.MutationObserver(function(){r.changeCallback()});i.observe(e,this.observerConfig),this.shadowObservers.push(i)}catch(t){ne.critical("Error while observing shadow root",t)}}};Bt.prototype.start=function(){if(!this.observedShadowRoots){if(!By()){ne.critical("Shadow DOM observation unavailable: WeakSet not supported");return}this.observedShadowRoots=new WeakSet}};Bt.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(r){ne.critical("Error while disconnecting shadow DOM observer",r)}this.shadowObservers=[],this.observedShadowRoots=null}};var Ky=500,Jy=[Jr,xy,pi,Ry,Ay],Xy=[Fi],Zy=[is],Gu={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function Ye(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}Ye.prototype.addClick=function(e){var r=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return r||(r=e.target||e.srcElement),!r||Gy(r)?!1:(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:r,event:e,timestamp:Date.now()}),!0)};Ye.prototype.trackClick=function(e,r){if(!this.isTracking)return!1;var i=this.addClick(e);return i&&this.triggerProcessing(r),i};Ye.prototype.getDeadClicks=function(e){if(this.pendingClicks.length===0)return[];var r=e.timeout_ms,i=Date.now(),t=this.pendingClicks.slice();this.pendingClicks=[];for(var n=[],o=0;o<t.length;o++){var s=t[o];i-s.timestamp>=r?this.hasChangesAfter(s.timestamp)||n.push(s):this.pendingClicks.push(s)}return n};Ye.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100};Ye.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()};Ye.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))};Ye.prototype.processRecursively=function(e){if(!this.isTracking||!this.onDeadClickCallback){this.processingActive=!1;return}var r=e.timeout_ms,i=this;this.processingTimeout=setTimeout(function(){if(i.processingActive){for(var t=i.getDeadClicks(e),n=0;n<t.length;n++)i.onDeadClickCallback(t[n].event);i.pendingClicks.length>0?i.processRecursively(e):i.processingActive=!1}},r)};Ye.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;Jy.forEach(function(i){var t=function(){e.recordChangeEvent()};document.addEventListener(i,t,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:i,handler:t,options:{capture:!0,passive:!0}})}),Zy.forEach(function(i){var t=function(){e.recordChangeEvent()};window.addEventListener(i,t),e.eventListeners.push({target:window,event:i,handler:t})}),Xy.forEach(function(i){var t=function(){e.recordChangeEvent()};window.addEventListener(i,t,{passive:!0}),e.eventListeners.push({target:window,event:i,handler:t,options:{passive:!0}})});var r=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",r),e.eventListeners.push({target:document,event:"selectionchange",handler:r}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,Gu)}catch(i){ne.critical("Error while setting up mutation observer",i)}if(window.customElements)try{this.shadowDOMObserver=new Bt(function(){e.recordChangeEvent()},Gu),this.shadowDOMObserver.start()}catch(i){ne.critical("Error while setting up shadow DOM observer",i),this.shadowDOMObserver=null}}};Ye.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;e<this.eventListeners.length;e++){var r=this.eventListeners[e];try{r.target.removeEventListener(r.event,r.handler,r.options)}catch(i){ne.critical("Error while removing event listener",i)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(i){ne.critical("Error while disconnecting mutation observer",i)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(i){ne.critical("Error while stopping shadow DOM observer",i)}this.shadowDOMObserver=null}}};var Cf="autocapture",Qy="track_pageview",If="full-url",e_="url-with-path-and-query-string",t_="url-with-path",r_="allow_element_callback",Ef="allow_selectors",kf="allow_url_regexes",Of="block_attrs",xf="block_element_callback",Rf="block_selectors",Af="block_url_regexes",Mf="capture_extra_attrs",Tf="capture_text_content",Pf="scroll_capture_all",Df="scroll_depth_percent_checkpoints",vi="click",gi="dead_click",us="input",Nf="pageview",mi="rage_click",cs="scroll",Ui="page_leave",ls="submit",ge={};ge[Ef]=[];ge[kf]=[];ge[Of]=[];ge[xf]=null;ge[Rf]=[];ge[Af]=[];ge[Mf]=[];ge[Tf]=!1;ge[Pf]=!1;ge[Df]=[25,50,75,100];ge[vi]=!0;ge[gi]=!0;ge[us]=!0;ge[Nf]=If;ge[mi]=!0;ge[cs]=!0;ge[Ui]=!1;ge[ls]=!0;var Xr={$mp_autocapture:!0},Lf="$mp_click",Ff="$mp_dead_click",n_="$mp_input_change",Uf="$mp_rage_click",i_="$mp_scroll",o_="$mp_submit",s_="$mp_page_leave",de=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};de.prototype.init=function(){if(!zy()){ne.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking()};de.prototype.getFullConfig=function(){var e=this.mp.get_config(Cf);return e?h.isObject(e)?h.extend({},ge,e):ge:{}};de.prototype.getConfig=function(e){return this.getFullConfig()[e]};de.prototype.currentUrlBlocked=function(){var e,r=h.info.currentUrl(),i=this.getConfig(kf)||[];if(i.length){var t=!1;for(e=0;e<i.length;e++){var n=i[e];try{if(r.match(n)){t=!0;break}}catch(s){return ne.critical("Error while checking block URL regex: "+n,s),!0}}if(!t)return!0}var o=this.getConfig(Af)||[];if(!o||!o.length)return!1;for(e=0;e<o.length;e++)try{if(r.match(o[e]))return!0}catch(s){return ne.critical("Error while checking block URL regex: "+o[e],s),!0}return!1};de.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(Cf)?this.getConfig(Nf):this.mp.get_config(Qy)};de.prototype.trackDomEvent=function(e,r){if(!this.currentUrlBlocked()){var i=this.mp.is_recording_heatmap_data()&&(r===Lf&&!this.getConfig(vi)||r===Uf&&!this._getClickTrackingConfig(mi)||r===Ff&&!this._getClickTrackingConfig(gi)),t=Uy(e,{allowElementCallback:this.getConfig(r_),allowSelectors:this.getConfig(Ef),blockAttrs:this.getConfig(Of),blockElementCallback:this.getConfig(xf),blockSelectors:this.getConfig(Rf),captureExtraAttrs:this.getConfig(Mf),captureTextContent:this.getConfig(Tf),capturedForHeatMap:i});t&&(h.extend(t,Xr),this.mp.track(r,t))}};de.prototype.initPageListeners=function(){if(E.removeEventListener(Uu,this.listenerPopstate),E.removeEventListener(is,this.listenerHashchange),!(!this.pageviewTrackingConfig()&&!this.getConfig(Ui)&&!this.mp.get_config("record_heatmap_data"))){this.listenerPopstate=function(){E.dispatchEvent(new Event(ft))},this.listenerHashchange=function(){E.dispatchEvent(new Event(ft))},E.addEventListener(Uu,this.listenerPopstate),E.addEventListener(is,this.listenerHashchange);var e=E.history.pushState;typeof e=="function"&&(E.history.pushState=function(i,t,n){e.call(E.history,i,t,n),E.dispatchEvent(new Event(ft))});var r=E.history.replaceState;typeof r=="function"&&(E.history.replaceState=function(i,t,n){r.call(E.history,i,t,n),E.dispatchEvent(new Event(ft))})}};de.prototype._getClickTrackingConfig=function(e){var r=this.getConfig(e);return r?r===!0?{}:typeof r=="object"?r:{}:null};de.prototype._trackPageLeave=function(e,r,i){if(!this.hasTrackedScrollSession){this.hasTrackedScrollSession=!0;var t=Math.max(N.documentElement.clientHeight,E.innerHeight||0),n=Math.round(Math.max(this.maxScrollViewDepth-t,0)/(i-t)*100),o=Math.round(t/i*100);i<=t&&(n=100,o=100);var s=h.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:n,$fold_line_percentage:o,$scroll_height:i,$event_type:e.type,$current_url:r||h.info.currentUrl(),$viewportHeight:t,$viewportWidth:Math.max(N.documentElement.clientWidth,E.innerWidth||0)},Xr);this.mp.is_recording_heatmap_data()&&!this.getConfig(Ui)&&(s.$captured_for_heatmap=!0),this.mp.track(s_,s,{transport:"sendBeacon"})}};de.prototype._initScrollDepthTracking=function(){if(E.removeEventListener(Zs,this.listenerScrollDepth),E.removeEventListener(Fi,this.listenerScrollDepth),!!this.mp.get_config("record_heatmap_data")){ne.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(N.documentElement.clientHeight,E.innerHeight||0);var e=(function(){if(!this.currentUrlBlocked()){var i=Math.max(N.documentElement.clientHeight,E.innerHeight||0)+E.scrollY;i>this.maxScrollViewDepth&&(this.maxScrollViewDepth=i),this.previousScrollHeight=N.body.scrollHeight}}).bind(this),r=wf(e);this.listenerScrollDepth=r.listener,E.addEventListener(r.eventType,this.listenerScrollDepth)}};de.prototype.initClickTracking=function(){E.removeEventListener(tt,this.listenerClick),!(!this.getConfig(vi)&&!this.mp.get_config("record_heatmap_data"))&&(ne.log("Initializing click tracking"),this.listenerClick=(function(e){!this.getConfig(vi)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(e,Lf)}).bind(this),E.addEventListener(tt,this.listenerClick))};de.prototype.initDeadClickTracking=function(){var e=this._getClickTrackingConfig(gi);if(!e&&!this.mp.get_config("record_heatmap_data")){this.stopDeadClickTracking();return}ne.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Ye((function(r){this.trackDomEvent(r,Ff)}).bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=(function(r){var i=this._getClickTrackingConfig(gi);if(!(!i&&!this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var t=i||{};t.timeout_ms||(t.timeout_ms=Ky),this._deadClickTracker.trackClick(r,t)}}).bind(this),E.addEventListener(tt,this.listenerDeadClick))};de.prototype.initInputTracking=function(){E.removeEventListener(Jr,this.listenerChange),this.getConfig(us)&&(ne.log("Initializing input tracking"),this.listenerChange=(function(e){this.getConfig(us)&&this.trackDomEvent(e,n_)}).bind(this),E.addEventListener(Jr,this.listenerChange))};de.prototype.initPageviewTracking=function(){if(E.removeEventListener(ft,this.listenerLocationchange),!!this.pageviewTrackingConfig()){ne.log("Initializing pageview tracking");var e="",r=!1;this.currentUrlBlocked()||(r=this.mp.track_pageview(Xr)),r&&(e=h.info.currentUrl()),this.listenerLocationchange=Yr((function(){if(!this.currentUrlBlocked()){var i=h.info.currentUrl(),t=!1,n=i.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],o=this.pageviewTrackingConfig();if(o===If?t=i!==e:o===e_?t=i.split("#")[0]!==e.split("#")[0]:o===t_&&(t=n),t){var s=this.mp.track_pageview(Xr);s&&(e=i),n&&(this.lastScrollCheckpoint=0,ne.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)),E.addEventListener(ft,this.listenerLocationchange)}};de.prototype.initRageClickTracking=function(){E.removeEventListener(tt,this.listenerRageClick);var e=this._getClickTrackingConfig(mi);!e&&!this.mp.get_config("record_heatmap_data")||(ne.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new Sf),this.listenerRageClick=(function(r){var i=this._getClickTrackingConfig(mi);!i&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(r.pageX,r.pageY,i)&&this.trackDomEvent(r,Uf)}).bind(this),E.addEventListener(tt,this.listenerRageClick))};de.prototype.initScrollTracking=function(){if(E.removeEventListener(Fi,this.listenerScroll),E.removeEventListener(Zs,this.listenerScroll),!!this.getConfig(cs)){ne.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=(function(){if(this.getConfig(cs)&&!this.currentUrlBlocked()){var i=this.getConfig(Pf),t=(this.getConfig(Df)||[]).slice().sort(function(l,f){return l-f}),n=E.scrollY,o=h.extend({$scroll_top:n},Xr);try{var s=N.body.scrollHeight,a=Math.round(n/(s-E.innerHeight)*100);if(o.$scroll_height=s,o.$scroll_percentage=a,a>this.lastScrollCheckpoint)for(var u=0;u<t.length;u++){var c=t[u];a>=c&&this.lastScrollCheckpoint<c&&(o.$scroll_checkpoint=c,this.lastScrollCheckpoint=c,i=!0)}}catch(l){ne.critical("Error while calculating scroll percentage",l)}i&&this.mp.track(i_,o)}}).bind(this),r=wf(e);this.listenerScroll=r.listener,E.addEventListener(r.eventType,this.listenerScroll)}};de.prototype.initSubmitTracking=function(){E.removeEventListener(pi,this.listenerSubmit),this.getConfig(ls)&&(ne.log("Initializing submit tracking"),this.listenerSubmit=(function(e){this.getConfig(ls)&&this.trackDomEvent(e,o_)}).bind(this),E.addEventListener(pi,this.listenerSubmit))};de.prototype.initPageLeaveTracking=function(){if(N.removeEventListener($u,this.listenerPageLeaveVisibilitychange),E.removeEventListener(ft,this.listenerPageLeaveLocationchange),E.removeEventListener(Fu,this.listenerPageLoad),!(!this.getConfig(Ui)&&!this.mp.get_config("record_heatmap_data"))){ne.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var e=h.info.currentUrl();this.listenerPageLoad=(function(){this.previousScrollHeight=N.body.scrollHeight}).bind(this),E.addEventListener(Fu,this.listenerPageLoad),this.listenerPageLeaveLocationchange=Yr((function(r){if(!this.currentUrlBlocked()){var i=h.info.currentUrl(),t=i!==e;t&&(this._trackPageLeave(r,e,this.previousScrollHeight),e=i,this.maxScrollViewDepth=Math.max(N.documentElement.clientHeight,E.innerHeight||0),this.previousScrollHeight=N.body.scrollHeight,this.hasTrackedScrollSession=!1)}}).bind(this)),E.addEventListener(ft,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=(function(r){N.hidden&&this._trackPageLeave(r,e,this.previousScrollHeight)}).bind(this),N.addEventListener($u,this.listenerPageLeaveVisibilitychange)}};de.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(E.removeEventListener(tt,this.listenerDeadClick),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)};lf(de);var Oe=zt("flags"),yi="flags",_i="context",fs={};fs[_i]={};var z=function(e){this.fetch=E.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc};z.prototype.init=function(){if(!this.minApisSupported()){Oe.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set};z.prototype.getFullConfig=function(){var e=this.getMpConfig(yi);return e?h.isObject(e)?h.extend({},fs,e):fs:{}};z.prototype.getConfig=function(e){return this.getFullConfig()[e]};z.prototype.isSystemEnabled=function(){return!!this.getMpConfig(yi)};z.prototype.updateContext=function(e,r){if(!this.isSystemEnabled())return Oe.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var i=this.getMpConfig(yi);h.isObject(i)||(i={});var t=r&&r.replace?{}:this.getConfig(_i);return i[_i]=h.extend({},t,e),this.setMpConfig(yi,i),this.fetchFlags()};z.prototype.areFlagsReady=function(){return this.isSystemEnabled()||Oe.error("Feature Flags not enabled"),!!this.flags};z.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this.getMpProperty("distinct_id"),r=this.getMpProperty("$device_id"),i=cy();Oe.log("Fetching flags for distinct ID: "+e);var t=h.extend({distinct_id:e,device_id:r},this.getConfig(_i)),n=new URLSearchParams;n.set("context",JSON.stringify(t)),n.set("token",this.getMpConfig("token")),n.set("mp_lib","web"),n.set("$lib_version",Le.LIB_VERSION);var o=this.getFullApiRoute()+"?"+n.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(E,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:i}}).then((function(s){return this.markFetchComplete(),s.json().then((function(a){var u=a.flags;if(!u)throw new Error("No flags in API response");var c=new Map;h.each(u,function(l,f){c.set(f,{key:l.variant_key,value:l.variant_value,experiment_id:l.experiment_id,is_experiment_active:l.is_experiment_active,is_qa_tester:l.is_qa_tester})}),this.flags=c,this._traceparent=i}).bind(this)).catch((function(a){this.markFetchComplete(),Oe.error(a)}).bind(this))}).bind(this)).catch((function(s){this.markFetchComplete(),Oe.error(s)}).bind(this)),this.fetchPromise};z.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){Oe.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null};z.prototype.getVariant=function(e,r){return this.fetchPromise?this.fetchPromise.then((function(){return this.getVariantSync(e,r)}).bind(this)).catch(function(i){return Oe.error(i),r}):new Promise(function(i){Oe.critical("Feature Flags not initialized"),i(r)})};z.prototype.getVariantSync=function(e,r){if(!this.areFlagsReady())return Oe.log("Flags not loaded yet"),r;var i=this.flags.get(e);return i?(this.trackFeatureCheck(e,i),i):(Oe.log('No flag found: "'+e+'"'),r)};z.prototype.getVariantValue=function(e,r){return this.getVariant(e,{value:r}).then(function(i){return i.value}).catch(function(i){return Oe.error(i),r})};z.prototype.getFeatureData=function(e,r){return Oe.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,r)};z.prototype.getVariantValueSync=function(e,r){return this.getVariantSync(e,{value:r}).value};z.prototype.isEnabled=function(e,r){return this.getVariantValue(e).then((function(){return this.isEnabledSync(e,r)}).bind(this)).catch(function(i){return Oe.error(i),r})};z.prototype.isEnabledSync=function(e,r){r=r||!1;var i=this.getVariantValueSync(e,r);return i!==!0&&i!==!1&&(Oe.error('Feature flag "'+e+'" value: '+i+" is not a boolean; returning fallback value: "+r),i=r),i};z.prototype.trackFeatureCheck=function(e,r){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var i={"Experiment name":e,"Variant name":r.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};r.experiment_id!=="undefined"&&(i.$experiment_id=r.experiment_id),r.is_experiment_active!=="undefined"&&(i.$is_experiment_active=r.is_experiment_active),r.is_qa_tester!=="undefined"&&(i.$is_qa_tester=r.is_qa_tester),this.track("$experiment_started",i)}};z.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"};lf(z);z.prototype.are_flags_ready=z.prototype.areFlagsReady;z.prototype.get_variant=z.prototype.getVariant;z.prototype.get_variant_sync=z.prototype.getVariantSync;z.prototype.get_variant_value=z.prototype.getVariantValue;z.prototype.get_variant_value_sync=z.prototype.getVariantValueSync;z.prototype.is_enabled=z.prototype.isEnabled;z.prototype.is_enabled_sync=z.prototype.isEnabledSync;z.prototype.update_context=z.prototype.updateContext;z.prototype.get_feature_data=z.prototype.getFeatureData;var it=function(){};it.prototype.create_properties=function(){};it.prototype.event_handler=function(){};it.prototype.after_track_handler=function(){};it.prototype.init=function(e){return this.mp=e,this};it.prototype.track=function(e,r,i,t){var n=this,o=h.dom_query(e);if(o.length===0){j.error("The DOM query ("+e+") returned 0 elements");return}return h.each(o,function(s){h.register_event(s,this.override_event,function(a){var u={},c=n.create_properties(i,this),l=n.mp.get_config("track_links_timeout");n.event_handler(a,this,u),window.setTimeout(n.track_callback(t,c,u,!0),l),n.mp.track(r,c,n.track_callback(t,c,u))})},this),!0};it.prototype.track_callback=function(e,r,i,t){t=t||!1;var n=this;return function(){i.callback_fired||(i.callback_fired=!0,!(e&&e(t,r)===!1)&&n.after_track_handler(r,i,t))}};it.prototype.create_properties=function(e,r){var i;return typeof e=="function"?i=e(r):i=h.extend({},e),i};var hr=function(){this.override_event="click"};h.inherit(hr,it);hr.prototype.create_properties=function(e,r){var i=hr.superclass.create_properties.apply(this,arguments);return r.href&&(i.url=r.href),i};hr.prototype.event_handler=function(e,r,i){i.new_tab=e.which===2||e.metaKey||e.ctrlKey||r.target==="_blank",i.href=r.href,i.new_tab||e.preventDefault()};hr.prototype.after_track_handler=function(e,r){r.new_tab||setTimeout(function(){window.location=r.href},0)};var $i=function(){this.override_event="submit"};h.inherit($i,it);$i.prototype.event_handler=function(e,r,i){i.element=r,e.preventDefault()};$i.prototype.after_track_handler=function(e,r){setTimeout(function(){r.element.submit()},0)};var dt="$set",pr="$set_once",$e="$unset",Nt="$add",je="$append",Lt="$union",Ze="$remove",a_="$delete",$f={set_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[dt]=t,i},unset_action:function(e){var r={},i=[];return h.isArray(e)||(e=[e]),h.each(e,function(t){this._is_reserved_property(t)||i.push(t)},this),r[$e]=i,r},set_once_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[pr]=t,i},union_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=h.isArray(n)?n:[n])},this):t[e]=h.isArray(r)?r:[r],i[Lt]=t,i},append_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[je]=t,i},remove_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[Ze]=t,i},delete_action:function(){var e={};return e[a_]="",e}},se=function(){};h.extend(se.prototype,$f);se.prototype._init=function(e,r,i){this._mixpanel=e,this._group_key=r,this._group_id=i};se.prototype.set=dr(function(e,r,i){var t=this.set_action(e,r);return h.isObject(e)&&(i=r),this._send_request(t,i)});se.prototype.set_once=dr(function(e,r,i){var t=this.set_once_action(e,r);return h.isObject(e)&&(i=r),this._send_request(t,i)});se.prototype.unset=dr(function(e,r){var i=this.unset_action(e);return this._send_request(i,r)});se.prototype.union=dr(function(e,r,i){h.isObject(e)&&(i=r);var t=this.union_action(e,r);return this._send_request(t,i)});se.prototype.delete=dr(function(e){var r=this.delete_action();return this._send_request(r,e)});se.prototype.remove=dr(function(e,r,i){var t=this.remove_action(e,r);return this._send_request(t,i)});se.prototype._send_request=function(e,r){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var i=h.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},r)};se.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};se.prototype._get_config=function(e){return this._mixpanel.get_config(e)};se.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};se.prototype.remove=se.prototype.remove;se.prototype.set=se.prototype.set;se.prototype.set_once=se.prototype.set_once;se.prototype.union=se.prototype.union;se.prototype.unset=se.prototype.unset;se.prototype.toString=se.prototype.toString;var L=function(){};h.extend(L.prototype,$f);L.prototype._init=function(e){this._mixpanel=e};L.prototype.set=St(function(e,r,i){var t=this.set_action(e,r);return h.isObject(e)&&(i=r),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),t[dt]=h.extend({},h.info.people_properties(),t[dt]),this._send_request(t,i)});L.prototype.set_once=St(function(e,r,i){var t=this.set_once_action(e,r);return h.isObject(e)&&(i=r),this._send_request(t,i)});L.prototype.unset=St(function(e,r){var i=this.unset_action(e);return this._send_request(i,r)});L.prototype.increment=St(function(e,r,i){var t={},n={};return h.isObject(e)?(h.each(e,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){j.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else n[s]=o},this),i=r):(h.isUndefined(r)&&(r=1),n[e]=r),t[Nt]=n,this._send_request(t,i)});L.prototype.append=St(function(e,r,i){h.isObject(e)&&(i=r);var t=this.append_action(e,r);return this._send_request(t,i)});L.prototype.remove=St(function(e,r,i){h.isObject(e)&&(i=r);var t=this.remove_action(e,r);return this._send_request(t,i)});L.prototype.union=St(function(e,r,i){h.isObject(e)&&(i=r);var t=this.union_action(e,r);return this._send_request(t,i)});L.prototype.track_charge=St(function(){j.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});L.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};L.prototype.delete_user=function(){if(!this._identify_called()){j.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};L.prototype.toString=function(){return this._mixpanel.toString()+".people"};L.prototype._send_request=function(e,r){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),t=this._mixpanel.get_property("$user_id"),n=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(e.$device_id=i),t&&(e.$user_id=t),n&&(e.$had_persisted_distinct_id=n);var o=h.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},r):(this._enqueue(e),h.isUndefined(r)||(this._get_config("verbose")?r({status:-1,error:null}):r(-1)),h.truncate(o,255))};L.prototype._get_config=function(e){return this._mixpanel.get_config(e)};L.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};L.prototype._enqueue=function(e){dt in e?this._mixpanel.persistence._add_to_people_queue(dt,e):pr in e?this._mixpanel.persistence._add_to_people_queue(pr,e):$e in e?this._mixpanel.persistence._add_to_people_queue($e,e):Nt in e?this._mixpanel.persistence._add_to_people_queue(Nt,e):je in e?this._mixpanel.persistence._add_to_people_queue(je,e):Ze in e?this._mixpanel.persistence._add_to_people_queue(Ze,e):Lt in e?this._mixpanel.persistence._add_to_people_queue(Lt,e):j.error("Invalid call to _enqueue():",e)};L.prototype._flush_one_queue=function(e,r,i,t){var n=this,o=h.extend({},this._mixpanel.persistence.load_queue(e)),s=o;!h.isUndefined(o)&&h.isObject(o)&&!h.isEmptyObject(o)&&(n._mixpanel.persistence._pop_from_people_queue(e,o),n._mixpanel.persistence.save(),t&&(s=t(o)),r.call(n,s,function(a,u){a===0&&n._mixpanel.persistence._add_to_people_queue(e,o),h.isUndefined(i)||i(a,u)}))};L.prototype._flush=function(e,r,i,t,n,o,s){var a=this;this._flush_one_queue(dt,this.set,e),this._flush_one_queue(pr,this.set_once,t),this._flush_one_queue($e,this.unset,o,function(v){return h.keys(v)}),this._flush_one_queue(Nt,this.increment,r),this._flush_one_queue(Lt,this.union,n);var u=this._mixpanel.persistence.load_queue(je);if(!h.isUndefined(u)&&h.isArray(u)&&u.length)for(var c,l=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(je,c),h.isUndefined(i)||i(v,y)},f=u.length-1;f>=0;f--)u=this._mixpanel.persistence.load_queue(je),c=u.pop(),a._mixpanel.persistence.save(),h.isEmptyObject(c)||a.append(c,l);var p=this._mixpanel.persistence.load_queue(Ze);if(!h.isUndefined(p)&&h.isArray(p)&&p.length)for(var g,d=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(Ze,g),h.isUndefined(s)||s(v,y)},_=p.length-1;_>=0;_--)p=this._mixpanel.persistence.load_queue(Ze),g=p.pop(),a._mixpanel.persistence.save(),h.isEmptyObject(g)||a.remove(g,d)};L.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};L.prototype.set=L.prototype.set;L.prototype.set_once=L.prototype.set_once;L.prototype.unset=L.prototype.unset;L.prototype.increment=L.prototype.increment;L.prototype.append=L.prototype.append;L.prototype.remove=L.prototype.remove;L.prototype.union=L.prototype.union;L.prototype.track_charge=L.prototype.track_charge;L.prototype.clear_charges=L.prototype.clear_charges;L.prototype.delete_user=L.prototype.delete_user;L.prototype.toString=L.prototype.toString;var ea="__mps",ta="__mpso",ra="__mpus",na="__mpa",ia="__mpap",oa="__mpr",sa="__mpu",zf="$people_distinct_id",bi="__alias",Zr="__timers",u_=[ea,ta,ra,na,ia,oa,sa,zf,bi,Zr],U=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var r=e.persistence;r!=="cookie"&&r!=="localStorage"&&(j.critical("Unknown persistence type "+r+"; falling back to cookie"),r=e.persistence="cookie"),r==="localStorage"&&h.localStorage.is_supported()?this.storage=h.localStorage:this.storage=h.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};U.prototype.properties=function(){var e={};return this.load(),h.each(this.props,function(r,i){h.include(u_,i)||(e[i]=r)}),e};U.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=h.extend({},e))}};U.prototype.upgrade=function(){var e,r;this.storage===h.localStorage?(e=h.cookie.parse(this.name),h.cookie.remove(this.name),h.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===h.cookie&&(r=h.localStorage.parse(this.name),h.localStorage.remove(this.name),r&&this.register_once(r))};U.prototype.save=function(){this.disabled||this.storage.set(this.name,fr(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};U.prototype.load_prop=function(e){return this.load(),this.props[e]};U.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};U.prototype.clear=function(){this.remove(),this.props={}};U.prototype.register_once=function(e,r,i){return h.isObject(e)?(typeof r>"u"&&(r="None"),this.expire_days=typeof i>"u"?this.default_expiry:i,this.load(),h.each(e,function(t,n){(!this.props.hasOwnProperty(n)||this.props[n]===r)&&(this.props[n]=t)},this),this.save(),!0):!1};U.prototype.register=function(e,r){return h.isObject(e)?(this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),h.extend(this.props,e),this.save(),!0):!1};U.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};U.prototype.update_search_keyword=function(e){this.register(h.info.searchInfo(e))};U.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:h.info.referringDomain(e)||"$direct"},"")};U.prototype.get_referrer_info=function(){return h.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};U.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};U.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};U.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};U.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};U.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};U.prototype.get_cross_subdomain=function(){return this.cross_subdomain};U.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};U.prototype._add_to_people_queue=function(e,r){var i=this._get_queue_key(e),t=r[e],n=this._get_or_create_queue(dt),o=this._get_or_create_queue(pr),s=this._get_or_create_queue($e),a=this._get_or_create_queue(Nt),u=this._get_or_create_queue(Lt),c=this._get_or_create_queue(Ze,[]),l=this._get_or_create_queue(je,[]);i===ea?(h.extend(n,t),this._pop_from_people_queue(Nt,t),this._pop_from_people_queue(Lt,t),this._pop_from_people_queue($e,t)):i===ta?(h.each(t,function(f,p){p in o||(o[p]=f)}),this._pop_from_people_queue($e,t)):i===ra?h.each(t,function(f){h.each([n,o,a,u],function(p){f in p&&delete p[f]}),h.each(l,function(p){f in p&&delete p[f]}),s[f]=!0}):i===na?(h.each(t,function(f,p){p in n?n[p]+=f:(p in a||(a[p]=0),a[p]+=f)},this),this._pop_from_people_queue($e,t)):i===sa?(h.each(t,function(f,p){h.isArray(f)&&(p in u||(u[p]=[]),h.each(f,function(g){h.include(u[p],g)||u[p].push(g)}))}),this._pop_from_people_queue($e,t)):i===oa?(c.push(t),this._pop_from_people_queue(je,t)):i===ia&&(l.push(t),this._pop_from_people_queue($e,t)),j.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),j.log(r),this.save()};U.prototype._pop_from_people_queue=function(e,r){var i=this.props[this._get_queue_key(e)];h.isUndefined(i)||h.each(r,function(t,n){e===je||e===Ze?h.each(i,function(o){o[n]===t&&delete o[n]}):delete i[n]},this)};U.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};U.prototype._get_queue_key=function(e){if(e===dt)return ea;if(e===pr)return ta;if(e===$e)return ra;if(e===Nt)return na;if(e===je)return ia;if(e===Ze)return oa;if(e===Lt)return sa;j.error("Invalid queue:",e)};U.prototype._get_or_create_queue=function(e,r){var i=this._get_queue_key(e);return r=h.isUndefined(r)?{}:r,this.props[i]||(this.props[i]=r)};U.prototype.set_event_timer=function(e,r){var i=this.load_prop(Zr)||{};i[e]=r,this.props[Zr]=i,this.save()};U.prototype.remove_event_timer=function(e){var r=this.load_prop(Zr)||{},i=r[e];return h.isUndefined(i)||(delete this.props[Zr][e],this.save()),i};var aa,Bf=function(e,r){throw new Error(e+" not available in this build.")},we,qf=0,c_=1,l_=function(e){return e},Ne="mixpanel",Vf="base64",f_="json",ua="$device:",rr=E.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Wf=!rr&&Xe.indexOf("MSIE")===-1&&Xe.indexOf("Mozilla")===-1,wi=null;lt.sendBeacon&&(wi=function(){return lt.sendBeacon.apply(lt,arguments)});var Gf={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},ju={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Gf,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:Vf,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:ht,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:ht,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!1,record_idle_timeout_ms:30*60*1e3,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:Mr,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},jf=!1,w=function(){},hs=function(e,r,i){var t,n=i===Ne?we:we[i];if(n&&aa===qf)t=n;else{if(n&&!h.isArray(n)){j.error("You have already initialized "+i);return}t=new w}if(t._cached_groups={},t._init(e,r,i),t.people=new L,t.people._init(t),!t.get_config("skip_first_touch_marketing")){var o=h.info.campaignParams(null),s={},a=!1;h.each(o,function(u,c){s["initial_"+c]=u,u&&(a=!0)}),a&&t.people.set_once(s)}return Le.DEBUG=Le.DEBUG||t.get_config("debug"),!h.isUndefined(n)&&h.isArray(n)&&(t._execute_array.call(t.people,n.people),t._execute_array(n)),t};w.prototype.init=function(e,r,i){if(h.isUndefined(i)){this.report_error("You must name your new library: init(token, config, name)");return}if(i===Ne){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var t=hs(e,r,i);return we[i]=t,t._loaded(),t};w.prototype._init=function(e,r,i){r=r||{},this.__loaded=!0,this.config={};var t={};if(!("api_payload_format"in r)){var n=r.api_host||ju.api_host;n.match(/\.mixpanel\.com/)&&(t.api_payload_format=f_)}if(this.set_config(h.extend({},ju,t,r,{name:i,token:e,callback_fn:(i===Ne?i:Ne+"."+i)+"._jsc"})),this._jsc=ht,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!h.localStorage.is_supported(!0)||!rr)this._batch_requests=!1,j.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),h.each(this.get_batcher_configs(),function(a){j.log("Clearing batch queue "+a.queue_key),h.localStorage.remove(a.queue_key)});else if(this.init_batchers(),wi&&E.addEventListener){var o=h.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);E.addEventListener("pagehide",function(a){a.persisted&&o()}),E.addEventListener("visibilitychange",function(){N.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new U(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=h.UUID();this.get_distinct_id()||this.register_once({distinct_id:ua+s,$device_id:s},""),this.flags=new z({getFullApiRoute:h.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:h.bind(this.get_config,this),setConfigFunc:h.bind(this.set_config,this),getPropertyFunc:h.bind(this.get_property,this),trackingFunc:h.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new de(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()};w.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))j.log("Tab ID initialization skipped due to disable_persistence config");else if(h.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),r="mp_tab_id_"+e,i="mp_gen_new_tab_id_"+e;(h.sessionStorage.get(i)||!h.sessionStorage.get(r))&&h.sessionStorage.set(r,"$tab-"+h.UUID()),h.sessionStorage.set(i,"1"),this.tab_id=h.sessionStorage.get(r),E.addEventListener("beforeunload",function(){h.sessionStorage.remove(i)})}catch(t){this.report_error("Error initializing tab id",t)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")};w.prototype.get_tab_id=function(){return this.tab_id||null};w.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return j.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new Be(Hs),r=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(i){for(var t=0;t<i.length;t++)if(Xs(i[t])||i[t].tabId===r)return!0;return!1}).catch(h.bind(function(i){this.report_error("Error checking recording registry",i)},this))};w.prototype._check_and_start_session_recording=wt(function(e){if(!E.MutationObserver){j.critical("Browser does not support MutationObserver; skipping session recording");return}var r=h.bind(function(t){var n=h.bind(function(){this._recorder=this._recorder||new E.__mp_recorder(this),this._recorder.resumeRecording(t)},this);h.isUndefined(E.__mp_recorder)?Bf(this.get_config("recorder_src"),n):n()},this),i=this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent");e||i?r(!0):this._should_load_recorder().then(function(t){t&&r(!1)})});w.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)};w.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()};w.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()};w.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()};w.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")};w.prototype.get_session_recording_properties=function(){var e={},r=this._get_session_replay_id();return r&&(e.$mp_replay_id=r),e};w.prototype.get_session_replay_url=function(){var e=null,r=this._get_session_replay_id();if(r){var i=h.HTTPBuildQuery({replay_id:r,distinct_id:this.get_distinct_id(),token:this.get_config("token")});e="https://mixpanel.com/projects/replay-redirect?"+i}return e};w.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null};w.prototype.__get_recorder=function(){return this._recorder};w.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=h.info.campaignParams(null);h.each(e,(function(r,i){this.unregister(i)}).bind(this))}};w.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(N.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(h.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(N.referrer)};w.prototype._dom_loaded=function(){h.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||h.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};w.prototype._track_dom=function(e,r){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!jf)return this.__dom_loaded_queue.push([e,r]),!1;var i=new e().init(this);return i.track.apply(i,r)};w.prototype._prepare_callback=function(e,r){if(h.isUndefined(e))return null;if(rr){var i=function(s){e(s,r)};return i}else{var t=this._jsc,n=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+n+"]";return t[n]=function(s){delete t[n],e(s,r)},o}};w.prototype._send_request=function(e,r,i,t){var n=!0;if(Wf)return this.__request_queue.push(arguments),n;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!t&&(h.isFunction(i)||typeof i=="string")&&(t=i,i=null),i=h.extend(o,i||{}),rr||(i.method="GET");var a=i.method==="POST",u=wi&&a&&i.transport.toLowerCase()==="sendbeacon",c=i.verbose;r.verbose&&(c=!0),this.get_config("test")&&(r.test=1),c&&(r.verbose=1),this.get_config("img")&&(r.img=1),rr||(t?r.callback=t:(c||this.get_config("test"))&&(r.callback="(function(){})")),r.ip=this.get_config("ip")?1:0,r._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(r.data),delete r.data),h.extend(r,this.get_config("api_extra_query_params")),e+="?"+h.HTTPBuildQuery(r);var l=this;if("img"in r){var f=N.createElement("img");f.src=e,N.body.appendChild(f)}else if(u){try{n=wi(e,s)}catch(y){l.report_error(y),n=!1}try{t&&t(n?1:0)}catch(y){l.report_error(y)}}else if(rr)try{var p=new XMLHttpRequest;p.open(i.method,e,!0);var g=this.get_config("xhr_headers");if(a&&(g["Content-Type"]="application/x-www-form-urlencoded"),h.each(g,function(y,b){p.setRequestHeader(b,y)}),i.timeout_ms&&typeof p.timeout<"u"){p.timeout=i.timeout_ms;var d=new Date().getTime()}p.withCredentials=!0,p.onreadystatechange=function(){if(p.readyState===4)if(p.status===200){if(t)if(c){var y;try{y=h.JSONDecode(p.responseText)}catch(C){if(l.report_error(C),i.ignore_json_errors)y=p.responseText;else return}t(y)}else t(Number(p.responseText))}else{var b;if(p.timeout&&!p.status&&new Date().getTime()-d>=p.timeout?b="timeout":b="Bad HTTP status: "+p.status+" "+p.statusText,l.report_error(b),t)if(c){var S=p.responseHeaders||{};t({status:0,httpStatusCode:p.status,error:b,retryAfter:S["Retry-After"]})}else t(0)}},p.send(s)}catch(y){l.report_error(y),n=!1}else{var _=N.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var v=N.getElementsByTagName("script")[0];v.parentNode.insertBefore(_,v)}return n};w.prototype._execute_array=function(e){var r,i=[],t=[],n=[];h.each(e,function(s){s&&(r=s[0],h.isArray(r)?n.push(s):typeof s=="function"?s.call(this):h.isArray(s)&&r==="alias"?i.push(s):h.isArray(s)&&r.indexOf("track")!==-1&&typeof this[r]=="function"?n.push(s):t.push(s))},this);var o=function(s,a){h.each(s,function(u){if(h.isArray(u[0])){var c=a;h.each(u,function(l){c=c[l[0]].apply(c,l.slice(1))})}else this[u[0]].apply(this,u.slice(1))},a)};o(i,this),o(t,this),o(n,this)};w.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};w.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs};w.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=h.bind(function(i){return new Fe(i.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:h.bind(function(t,n,o){var s=this.get_config("api_routes");this._send_request(this.get_api_host(i.api_name)+"/"+s[i.api_name],this._encode_data_for_request(t),n,this._prepare_callback(o,t))},this),beforeSendHook:h.bind(function(t){return this._run_hook("before_send_"+i.type,t)},this),stopAllBatchingFunc:h.bind(this.stop_batch_senders,this),usePersistence:!0})},this),r=this.get_batcher_configs();this.request_batchers={events:e(r.events),people:e(r.people),groups:e(r.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};w.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,h.each(this.request_batchers,function(e){e.start()}))};w.prototype.stop_batch_senders=function(){this._batch_requests=!1,h.each(this.request_batchers,function(e){e.stop(),e.clear()})};w.prototype.push=function(e){this._execute_array([e])};w.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};w.prototype._encode_data_for_request=function(e){var r=fr(e);return this.get_config("api_payload_format")===Vf&&(r=h.base64Encode(r)),{data:r}};w.prototype._track_or_batch=function(e,r){var i=h.truncate(e.data,255),t=e.endpoint,n=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};r=r||ht;var a=!0,u=h.bind(function(){return s.skip_hooks||(i=this._run_hook("before_send_"+e.type,i)),i?(j.log("MIXPANEL REQUEST:"),j.log(i),this._send_request(t,this._encode_data_for_request(i),s,this._prepare_callback(r,i))):null},this);return this._batch_requests&&!o?n.enqueue(i).then(function(c){c?r(1,i):u()}):a=u(),a&&i};w.prototype.track=wt(function(e,r,i,t){!t&&typeof i=="function"&&(t=i,i=null),i=i||{};var n=i.transport;n&&(i.transport=n);var o=i.send_immediately;if(typeof t!="function"&&(t=ht),h.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){t(0);return}r=h.extend({},r),r.token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!h.isUndefined(s)){var a=new Date().getTime()-s;r.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var u=this.get_config("track_marketing")?h.info.marketingParams():{};r=h.extend({},h.info.properties({mp_loader:this.get_config("mp_loader")}),u,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),r);var c=this.get_config("property_blacklist");h.isArray(c)?h.each(c,function(p){delete r[p]}):this.report_error("Invalid value for property_blacklist config: "+c);var l={event:e,properties:r},f=this._track_or_batch({type:"events",data:l,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:i},t);return f});w.prototype.set_group=wt(function(e,r,i){h.isArray(r)||(r=[r]);var t={};return t[e]=r,this.register(t),this.people.set(e,r,i)});w.prototype.add_group=wt(function(e,r,i){var t=this.get_property(e),n={};return t===void 0?(n[e]=[r],this.register(n)):t.indexOf(r)===-1&&(t.push(r),n[e]=t,this.register(n)),this.people.union(e,r,i)});w.prototype.remove_group=wt(function(e,r,i){var t=this.get_property(e);if(t!==void 0){var n=t.indexOf(r);n>-1&&(t.splice(n,1),this.register({group_key:t})),t.length===0&&this.unregister(e)}return this.people.remove(e,r,i)});w.prototype.track_with_groups=wt(function(e,r,i,t){var n=h.extend({},r||{});return h.each(i,function(o,s){o!=null&&(n[s]=o)}),this.track(e,n,t)});w.prototype._create_map_key=function(e,r){return e+"_"+JSON.stringify(r)};w.prototype._remove_group_from_cache=function(e,r){delete this._cached_groups[this._create_map_key(e,r)]};w.prototype.get_group=function(e,r){var i=this._create_map_key(e,r),t=this._cached_groups[i];return(t===void 0||t._group_key!==e||t._group_id!==r)&&(t=new se,t._init(this,e,r),this._cached_groups[i]=t),t};w.prototype.track_pageview=wt(function(e,r){typeof e!="object"&&(e={}),r=r||{};var i=r.event_name||"$mp_web_page_view",t=h.extend(h.info.mpPageViewProperties(),h.info.campaignParams(),h.info.clickParams()),n=h.extend({},t,e);return this.track(i,n)});w.prototype.track_links=function(){return this._track_dom.call(this,hr,arguments)};w.prototype.track_forms=function(){return this._track_dom.call(this,$i,arguments)};w.prototype.time_event=function(e){if(h.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var h_={persistent:!0},ca=function(e){var r;return h.isObject(e)?r=e:h.isUndefined(e)?r={}:r={days:e},h.extend({},h_,r)};w.prototype.register=function(e,r){var i=ca(r);i.persistent?this.persistence.register(e,i.days):h.extend(this.unpersisted_superprops,e)};w.prototype.register_once=function(e,r,i){var t=ca(i);t.persistent?this.persistence.register_once(e,r,t.days):(typeof r>"u"&&(r="None"),h.each(e,function(n,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===r)&&(this.unpersisted_superprops[o]=n)},this))};w.prototype.unregister=function(e,r){r=ca(r),r.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};w.prototype._register_single=function(e,r){var i={};i[e]=r,this.register(i)};w.prototype.identify=function(e,r,i,t,n,o,s,a){var u=this.get_distinct_id();if(e&&u!==e){if(typeof e=="string"&&e.indexOf(ua)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var c=u;this.register_once({$had_persisted_distinct_id:!0,$device_id:c},"")}e!==u&&e!==this.get_property(bi)&&(this.unregister(bi),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(r,i,t,n,o,s,a),e!==u&&this.track("$identify",{distinct_id:e,$anon_distinct_id:u},{skip_hooks:!0}),e!==u&&this.flags.fetchFlags()};w.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=h.UUID();this.register_once({distinct_id:ua+e,$device_id:e},""),this._check_and_start_session_recording()};w.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};w.prototype.alias=function(e,r){if(e===this.get_property(zf))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var i=this;return h.isUndefined(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(bi,e),this.track("$create_alias",{alias:e,distinct_id:r},{skip_hooks:!0},function(){i.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};w.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};w.prototype.set_config=function(e){if(h.isObject(e)){h.extend(this.config,e);var r=e.batch_size;r&&h.each(this.request_batchers,function(i){i.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Le.DEBUG=Le.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init()}};w.prototype.get_config=function(e){return this.config[e]};w.prototype._run_hook=function(e){var r=(this.config.hooks[e]||l_).apply(this,ct.call(arguments,1));return typeof r>"u"&&(this.report_error(e+" hook did not return a value"),r=null),r};w.prototype.get_property=function(e){return this.persistence.load_prop([e])};w.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")};w.prototype.toString=function(){var e=this.get_config("name");return e!==Ne&&(e=Ne+"."+e),e};w.prototype._event_is_disabled=function(e){return h.isBlockedUA(Xe)||this._flags.disable_all_events||h.include(this.__disabled_events,e)};w.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&h.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||h.cookie.get("mp_optout"))&&(h.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};w.prototype._gdpr_update_persistence=function(e){var r;if(e&&e.clear_persistence)r=!0;else if(e&&e.enable_persistence)r=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==r&&this.persistence.set_disabled(r),r?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()};w.prototype._gdpr_call_func=function(e,r){return r=h.extend({track:h.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},r),h.localStorage.is_supported()||(r.persistence_type="cookie"),e(this.get_config("token"),{track:r.track,trackEventName:r.track_event_name,trackProperties:r.track_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieDomain:r.cookie_domain,cookieExpiration:r.cookie_expiration,crossSiteCookie:r.cross_site_cookie,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie,ignoreDnt:r.ignore_dnt})};w.prototype.opt_in_tracking=function(e){e=h.extend({enable_persistence:!0},e),this._gdpr_call_func(my,e),this._gdpr_update_persistence(e)};w.prototype.opt_out_tracking=function(e){e=h.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(yy,e),this._gdpr_update_persistence(e)};w.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(_y,e)};w.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(df,e)};w.prototype.clear_opt_in_out_tracking=function(e){e=h.extend({enable_persistence:!0},e),this._gdpr_call_func(by,e),this._gdpr_update_persistence(e)};w.prototype.report_error=function(e,r){j.error.apply(j.error,arguments);try{!r&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,r)}catch(i){j.error(i)}};w.prototype.init=w.prototype.init;w.prototype.reset=w.prototype.reset;w.prototype.disable=w.prototype.disable;w.prototype.time_event=w.prototype.time_event;w.prototype.track=w.prototype.track;w.prototype.track_links=w.prototype.track_links;w.prototype.track_forms=w.prototype.track_forms;w.prototype.track_pageview=w.prototype.track_pageview;w.prototype.register=w.prototype.register;w.prototype.register_once=w.prototype.register_once;w.prototype.unregister=w.prototype.unregister;w.prototype.identify=w.prototype.identify;w.prototype.alias=w.prototype.alias;w.prototype.name_tag=w.prototype.name_tag;w.prototype.set_config=w.prototype.set_config;w.prototype.get_config=w.prototype.get_config;w.prototype.get_api_host=w.prototype.get_api_host;w.prototype.get_property=w.prototype.get_property;w.prototype.get_distinct_id=w.prototype.get_distinct_id;w.prototype.toString=w.prototype.toString;w.prototype.opt_out_tracking=w.prototype.opt_out_tracking;w.prototype.opt_in_tracking=w.prototype.opt_in_tracking;w.prototype.has_opted_out_tracking=w.prototype.has_opted_out_tracking;w.prototype.has_opted_in_tracking=w.prototype.has_opted_in_tracking;w.prototype.clear_opt_in_out_tracking=w.prototype.clear_opt_in_out_tracking;w.prototype.get_group=w.prototype.get_group;w.prototype.set_group=w.prototype.set_group;w.prototype.add_group=w.prototype.add_group;w.prototype.remove_group=w.prototype.remove_group;w.prototype.track_with_groups=w.prototype.track_with_groups;w.prototype.start_batch_senders=w.prototype.start_batch_senders;w.prototype.stop_batch_senders=w.prototype.stop_batch_senders;w.prototype.start_session_recording=w.prototype.start_session_recording;w.prototype.stop_session_recording=w.prototype.stop_session_recording;w.prototype.pause_session_recording=w.prototype.pause_session_recording;w.prototype.resume_session_recording=w.prototype.resume_session_recording;w.prototype.get_session_recording_properties=w.prototype.get_session_recording_properties;w.prototype.get_session_replay_url=w.prototype.get_session_replay_url;w.prototype.get_tab_id=w.prototype.get_tab_id;w.prototype.DEFAULT_API_ROUTES=Gf;w.prototype.__get_recorder=w.prototype.__get_recorder;U.prototype.properties=U.prototype.properties;U.prototype.update_search_keyword=U.prototype.update_search_keyword;U.prototype.update_referrer_info=U.prototype.update_referrer_info;U.prototype.get_cross_subdomain=U.prototype.get_cross_subdomain;U.prototype.clear=U.prototype.clear;var Qt={},p_=function(){h.each(Qt,function(e,r){r!==Ne&&(we[r]=e)}),we._=h},d_=function(){we.init=function(e,r,i){if(i)return we[i]||(we[i]=Qt[i]=hs(e,r,i),we[i]._loaded()),we[i];var t=we;Qt[Ne]?t=Qt[Ne]:e&&(t=hs(e,r,Ne),t._loaded(),Qt[Ne]=t),we=t,aa===c_&&(E[Ne]=we),p_()}},v_=function(){function e(){e.done||(e.done=!0,jf=!0,Wf=!1,h.each(Qt,function(t){t._dom_loaded()}))}function r(){try{N.documentElement.doScroll("left")}catch{setTimeout(r,1);return}e()}if(N.addEventListener)N.readyState==="complete"?e():N.addEventListener("DOMContentLoaded",e,!1);else if(N.attachEvent){N.attachEvent("onreadystatechange",e);var i=!1;try{i=E.frameElement===null}catch{}N.documentElement.doScroll&&i&&r()}h.register_event(E,"load",e,!0)};function g_(e){return Bf=e,aa=qf,we=new w,d_(),we.init(),v_(),we}function m_(e,r){r()}var mo=g_(m_);const Hf=Kt.createContext(null),y_=new Set(["","$VITE_MIXPANEL_TOKEN","inresi.mixpanel.token"]),Hu=e=>{if(typeof e!="string")return null;const r=e.trim().replace(/^"(.*)"$/,"$1").trim();return r&&!y_.has(r)?r:null},__=({children:e,token:r,envMode:i})=>{const[t,n]=Kt.useState(()=>Hu(r)),o=Kt.useRef(null);return Kt.useEffect(()=>{n(Hu(r))},[r]),Kt.useEffect(()=>{const s=(i??"production").toLowerCase(),a=s==="development"||s==="staging",u=s==="development",c="Mixpanel token not set. Pass a token prop to MixpanelProvider or define VITE_MIXPANEL_TOKEN.";if(!t){a?console.error(`❌ ${c}`):console.warn(`⚠️ ${c}`);return}o.current!==t&&(mo.init(t,{debug:u,persistence:"localStorage"}),o.current=t,(async()=>{try{const l=await fc;mo.identify(l)}catch(l){console.error("❌ Failed to set Mixpanel identity:",l)}})())},[i,t]),fh.jsx(Hf.Provider,{value:mo,children:e})},Yf=()=>{const e=Kt.useContext(Hf);if(!e)throw new Error("useMixpanel must be used within MixpanelProvider");return e},b_=["location","budget","size","other"],la=["cost_low_to_high","cost_high_to_low","newest","relevance"],Kf=e=>e==null?[]:(Array.isArray(e)?e:[e]).flatMap(i=>{if(i==null)return[];if(Array.isArray(i))return i;if(typeof i=="object"&&i!==null&&"value"in i){const t=i.value;return Array.isArray(t)?t:[t]}return[i]}).filter(i=>i!=null).map(i=>String(i)),on=m.z.object({property_id:m.z.string().min(1,"property_id is required"),property_slug:m.z.string().min(1,"property_slug is required")}),gr=on.extend({property_name:m.z.string().min(1,"property_name is required")}),w_=gr.extend({total_units_available:m.z.number().int().nonnegative(),results_unit_count:m.z.number().int().nonnegative(),unit_count_date:m.z.string().optional()}),S_=gr.extend({total_units_available:m.z.number().int().nonnegative(),results_unit_count:m.z.number().int().nonnegative(),unit_count_date:m.z.string().optional()}),ps=on.extend({question_index:m.z.number().int().nonnegative(),question_ENUM:m.z.string().min(1,"question_ENUM is required")}),C_=ps.extend({selected_answers_ENUM_Array:m.z.any().transform(e=>Kf(e)).refine(e=>Array.isArray(e),{message:"selected_answers_ENUM_Array must resolve to an array"})});on.extend({unit_id:m.z.string().min(1,"unit_id is required"),unit_title:m.z.string().min(1,"unit_title is required"),unit_slug:m.z.string().min(1,"unit_slug is required")});const fa=gr.extend({unit_id:m.z.string().min(1,"unit_id is required"),unit_title:m.z.string().min(1,"unit_title is required"),unit_slug:m.z.string().min(1,"unit_slug is required")}),I_=fa.extend({favorited_unit:m.z.boolean()}),Jf=m.z.any().transform(e=>Kf(e)).refine(e=>Array.isArray(e),{message:"Selection must resolve to an array"}),E_=gr.extend({filter_index:m.z.number().int().nonnegative(),filter_label:m.z.string().min(1,"filter_label is required"),selected_filters_ENUM:Jf,filter_name:m.z.string().optional()}),Yu=gr.extend({filter_index:m.z.number().int().nonnegative(),filter_label:m.z.string().min(1,"filter_label is required"),selected_filters_ENUM:Jf}),Ku=on.extend({sort_index:m.z.number().int().nonnegative(),sort_ENUM:m.z.enum(la)}),k_=gr.extend({sort_index:m.z.number().int().nonnegative(),sort_ENUM:m.z.enum(la),results_unit_count:m.z.number().int().nonnegative(),unit_count_date:m.z.string().optional()}),O_=on.extend({full_questionnaire_schema_json:m.z.unknown().optional(),unit_results:m.z.object({type:m.z.string().optional(),total:m.z.number().int().nonnegative().optional(),units:m.z.array(m.z.object({unit_id:m.z.string().min(1,"unit_id is required"),unit_name:m.z.string().optional()})).optional()}).optional()}),x_=fa.extend({favorited_unit:m.z.boolean()}),R_=fa.extend({favorited_unit:m.z.boolean()});function Xf(){const e=Yf();return(r,i)=>{e.track(r,i)}}const A_=(e,r,i)=>t=>{const n=r.parse(t);i(e,n)};function Zf(e){const r=(i,t)=>A_(i,t,e);return{trackViewAllUnits:i=>{const t=w_.parse({unit_count_date:new Date().toISOString(),...i});e("View All Units",t)},trackQuestionnaireSkip:r("Skip",ps),trackQuestionnaireContinue:r("Continue",C_),trackQuestionnaireBack:r("Back",ps),trackClickUnit:r("Click Unit",x_),trackHoverUnit:r("Unit Hovered",I_),trackLoadMore:i=>{const t=S_.parse({unit_count_date:new Date().toISOString(),...i});e("Load More",t)},trackOpenFilters:r("Filter Opened",E_),trackCancelFilter:r("Filter Canceled",Yu),trackApplyFilter:r("Filter Applied",Yu),trackOpenSort:i=>{const t=k_.parse({unit_count_date:new Date().toISOString(),...i});e("Open Sort",t)},trackSelectSort:r("Select Sort",Ku),trackCancelSort:r("Cancel Sort",Ku),trackClickUnitFavorites:r("Click Unit (Favorites)",R_),trackQuestionnaireResult:r("Questionnaire Result",O_)}}function M_(){const e=Xf();return Zf(e)}const ds={availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0},Dn={properties:{},currentPropertyId:null,currentPropertySlug:null,hasPreviouslySearched:[],unitResults:[],filters:ds,tempFilters:ds,apiFilters:{limit:10,page:1},resultsMode:"all",resolvedQuestionnaireValues:{},sortBy:"relevance"},T_=e=>e==null?[]:Array.isArray(e)?e:[e],Qf=e=>T_(e).flatMap(r=>{if(r==null)return[];if(Array.isArray(r))return r;if(typeof r=="object"&&"value"in r){const i=r.value;return Array.isArray(i)?i:i!=null?[i]:[]}return[r]}),Ju=e=>Qf(e).flatMap(r=>Array.isArray(r)?r:[r]).map(r=>String(r)).map(r=>r.trim()).filter(r=>r.length>0),P_=e=>Qf(e).map(r=>{if(typeof r=="number"&&Number.isFinite(r))return r;const i=Number(r);return Number.isFinite(i)?i:null}).filter(r=>r!==null),eh=e=>{if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="object"&&"value"in e)return eh(e.value);const r=Number(e);return Number.isFinite(r)?r:null};class ha{async getState(){const r=await ys("app");if(!r)return Dn;const i={...Dn,...r,properties:r.properties??{},unitResults:r.unitResults??[],currentPropertyId:r.currentPropertyId==null?null:String(r.currentPropertyId),currentPropertySlug:r.currentPropertySlug??null,hasPreviouslySearched:Array.isArray(r.hasPreviouslySearched)?r.hasPreviouslySearched.map(String):[]},t=Ln.safeParse(i);if(t.success)return t.data;const n=Object.entries(i.properties??{}).reduce((c,[l,f])=>{const p=Qr.safeParse(f);return p.success&&(c[l]=p.data),c},{}),s=(Array.isArray(i.unitResults)?i.unitResults:i.unitResults&&typeof i.unitResults=="object"?Object.values(i.unitResults):[]).reduce((c,l)=>{const f=nr.safeParse(l);return f.success&&c.push(f.data),c},[]),a={...i,properties:n,unitResults:s},u=Ln.safeParse(a);return u.success?u.data:Dn}async setState(r){const i=await this.getState(),t=r(i),n=Ln.parse(t);await _s("app",n)}async waitForCurrentProperty(r=1e3){const i=Date.now()+r;for(;Date.now()<i;){const o=await this.getState(),s=o.currentPropertyId;if(s&&o.properties[s])return s;await new Promise(a=>setTimeout(a,16))}const t=await this.getState(),n=t.currentPropertyId;if(n&&t.properties[n])return n;throw new Error("UnifiedStore: current property was not initialized in time")}async initializeProperty(r,i){const t=String(r);await this.setState(n=>n.properties&&n.properties[t]?{...n,currentPropertyId:t,currentPropertySlug:i}:{...n,currentPropertyId:t,currentPropertySlug:i,properties:{...n.properties,[t]:{id:t,slug:i,favoritedUnits:[],tourContactedOn:null,viewedUnits:[],questionnaireResults:null,tourContactData:null}}})}async setUnitResults(r,i){const t=i??nr,n=[];(Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[]).forEach((s,a)=>{const u=at(t,s,`unitResults[${a}]`);u&&n.push(u)}),await this.setState(s=>({...s,unitResults:n}))}async clearUnitResults(){await this.setState(r=>({...r,unitResults:[]}))}async setPropertyData(r,i,t){const n=String(r),o=t??er;await this.setState(s=>{const a=s.properties[n];if(!a)return s;const u=at(o,i,`properties.${n}.data`);return u?{...s,properties:{...s.properties,[n]:{...a,data:u}}}:s})}async mergePropertyData(r,i,t){const n=String(r),o=t??er;await this.setState(s=>{const a=s.properties[n];if(!a)return s;const u=a.data;if(!u){const p=at(o,i,`properties.${n}.data`);return p?{...s,properties:{...s.properties,[n]:{...a,data:p}}}:s}const c=o.partial(),l=at(c,i,`properties.${n}.data.partial`);if(!l)return s;const f=at(o,{...u,...l},`properties.${n}.data`);return f?{...s,properties:{...s.properties,[n]:{...a,data:f}}}:s})}async upsertPropertyFromApi(r,i){const n=(i??er).parse(r),o=n.id??n.propertyId;if(o==null)throw new Error("upsertPropertyFromApi: property id is required");const s=String(o),a=n.slug??void 0;await this.setState(u=>{const c=u.properties[s],l=c?{...c,...a?{slug:a}:{},data:n}:{id:s,slug:a??"",favoritedUnits:[],tourContactedOn:null,viewedUnits:[],questionnaireResults:null,tourContactData:null,data:n};return{...u,properties:{...u.properties,[s]:l}}})}async setCurrentProperty(r,i){const t=String(r);await this.setState(n=>({...n,currentPropertyId:t,currentPropertySlug:i||n.currentPropertySlug}))}async setCurrentPropertySlug(r){await this.setState(i=>({...i,currentPropertySlug:r}))}async setHasPreviouslySearched(r){await this.setState(i=>({...i,hasPreviouslySearched:Array.from(new Set([...i.hasPreviouslySearched,r]))}))}async toggleFavorite(r){await this.setState(i=>{const t=i.currentPropertyId;if(!t)return i;const n=i.properties[t];if(!n)return i;const s=n.favoritedUnits.includes(r)?n.favoritedUnits.filter(a=>a!==r):[...n.favoritedUnits,r];return{...i,properties:{...i.properties,[t]:{...n,favoritedUnits:s}}}})}async markUnitAsViewed(r,i){const t=new Date,n=`${String(t.getMonth()+1).padStart(2,"0")}/${String(t.getDate()).padStart(2,"0")}`;await this.setState(o=>{const s=o.currentPropertyId;if(!s)return o;const a=o.properties[s];if(!a)return o;const u=[...a.viewedUnits.filter(c=>c.unitId!==r),{unitId:r,viewedDate:n}];return{...o,properties:{...o.properties,[s]:{...a,viewedUnits:u}}}}),typeof window<"u"&&window.open(`//${i}`,"_blank")}async setTourContactedOn(){await this.setState(r=>{const i=r.currentPropertyId;if(!i)return r;const t=r.properties[i];return t?{...r,properties:{...r.properties,[i]:{...t,tourContactedOn:new Date().toISOString()}}}:r})}async getTourContactedOn(){var t;const r=await this.getState(),i=r.currentPropertyId;return i?((t=r.properties[i])==null?void 0:t.tourContactedOn)??null:null}async setQuestionnaireResults(r){await this.setState(i=>{const t=i.currentPropertyId;if(!t)return i;const n=i.properties[t];return n?{...i,properties:{...i.properties,[t]:{...n,questionnaireResults:r}}}:i})}async setTourContactData(r){const i=await this.waitForCurrentProperty();await this.setState(t=>{const n=t.properties[i];return n?{...t,properties:{...t.properties,[i]:{...n,tourContactData:r}}}:t})}async setFilters(r){await this.setState(i=>({...i,filters:{...i.filters,...r}}))}async setTempFilters(r){await this.setState(i=>({...i,tempFilters:{...i.tempFilters,...r}}))}async setFiltersToDefault(){await this.setState(r=>({...r,filters:ds}))}async setApiFilters(r){await this.setState(i=>({...i,apiFilters:{...i.apiFilters,...r}}))}async handleTempFilterChange(r,i){await this.setState(t=>({...t,tempFilters:{...t.tempFilters,[r]:i}}))}async submitFilterUpdate(){await this.setState(r=>{const i={...r.apiFilters,availability:Ju(r.filters.availability),bedrooms:P_(r.filters.bedrooms),cost:eh(r.filters.cost),highlights:Ju(r.filters.highlights)};return{...r,apiFilters:i}})}async setResultsMode(r){await this.setState(i=>({...i,resultsMode:r}))}async setSortBy(r){await this.setState(i=>({...i,sortBy:r}))}async setResolvedQuestionnaireValues(r,i){await this.setState(t=>({...t,resolvedQuestionnaireValues:{...t.resolvedQuestionnaireValues,[r]:i}}))}async getUnitState(r){var n;const i=await this.getState(),t=i.currentPropertyId?i.properties[i.currentPropertyId]:null;return{isFavorite:(t==null?void 0:t.favoritedUnits.includes(r))??!1,viewedDate:((n=t==null?void 0:t.viewedUnits.find(o=>o.unitId===r))==null?void 0:n.viewedDate)??""}}async getResultsUrl(){const r=await this.getState();return r.currentPropertySlug?`/${r.currentPropertySlug}/results`:null}async getCurrentProperty(){const r=await this.getState();return r.currentPropertyId?r.properties[r.currentPropertyId]??null:null}async getPropertyData(r){const i=await this.getState(),t=r==null?i.currentPropertyId:String(r);return t?i.properties[t]??null:null}async getFullState(){return this.getState()}async initialize(){await this.setState(r=>({...Dn,...r}))}}const K=new ha;function th(e){return(r,i)=>{const t=async()=>{const o=await K.getFullState();r({properties:o.properties,currentPropertyId:o.currentPropertyId,currentPropertySlug:o.currentPropertySlug,hasPreviouslySearched:o.hasPreviouslySearched,unitResults:o.unitResults,filters:o.filters,tempFilters:o.tempFilters,apiFilters:o.apiFilters,resultsMode:o.resultsMode,resolvedQuestionnaireValues:o.resolvedQuestionnaireValues,sortBy:o.sortBy})},n=async()=>{if(e!=null&&e.onFilterUpdate){const o=(await K.getFullState()).apiFilters;e.onFilterUpdate(o)}};return{properties:{},currentPropertyId:null,currentPropertySlug:null,hasPreviouslySearched:[],unitResults:[],filters:{availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0},tempFilters:{availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0},apiFilters:{limit:10,page:1},resultsMode:"all",resolvedQuestionnaireValues:{},sortBy:"relevance",filtersLoaded:!1,async initializeProperty(o,s){await K.initializeProperty(o,s),await t()},async setCurrentProperty(o,s){await K.setCurrentProperty(o,s),r({currentPropertyId:o,...s&&{currentPropertySlug:s}})},async setCurrentPropertySlug(o){await K.setCurrentPropertySlug(o),r({currentPropertySlug:o})},async setHasPreviouslySearched(o){await K.setHasPreviouslySearched(o),await t()},async toggleFavorite(o){await K.toggleFavorite(o),await t()},async markUnitAsViewed(o,s){await K.markUnitAsViewed(o,s),await t()},async setTourContactedOn(){await K.setTourContactedOn(),await t()},getTourContactedOn:K.getTourContactedOn.bind(K),async setQuestionnaireResults(o){await K.setQuestionnaireResults(o),await t()},async setTourContactData(o){await K.setTourContactData(o),await t()},async setUnitResults(o){await K.setUnitResults(o),await t()},async clearUnitResults(){await K.clearUnitResults(),await t()},async setFilters(o){await K.setFilters(o);const s=i();r({filters:{...s.filters,...o}})},async setTempFilters(o){await K.setTempFilters(o);const s=i();r({tempFilters:{...s.tempFilters,...o}})},async setFiltersToDefault(){await K.setFiltersToDefault(),r({filters:{availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0}})},async setApiFilters(o){await K.setApiFilters(o);const s=i();r({apiFilters:{...s.apiFilters,...o}})},async handleTempFilterChange(o,s){await K.handleTempFilterChange(o,s);const a=i();r({tempFilters:{...a.tempFilters,[o]:s}})},async submitFilterUpdate(){await K.submitFilterUpdate(),await t(),await n()},async setResultsMode(o){await K.setResultsMode(o),r({resultsMode:o})},async setSortBy(o){await K.setSortBy(o),r({sortBy:o})},async setResolvedQuestionnaireValues(o,s){await K.setResolvedQuestionnaireValues(o,s);const a=i();r({resolvedQuestionnaireValues:{...a.resolvedQuestionnaireValues,[o]:s}})},getUnitState(o){var u;const s=i(),a=s.currentPropertyId?s.properties[s.currentPropertyId]:null;return{isFavorite:(a==null?void 0:a.favoritedUnits.includes(o))??!1,viewedDate:((u=a==null?void 0:a.viewedUnits.find(c=>c.unitId===o))==null?void 0:u.viewedDate)??""}},getResultsUrl:K.getResultsUrl.bind(K),getCurrentProperty:K.getCurrentProperty.bind(K),getPropertyData:K.getPropertyData.bind(K),async _hydrate(){await t()},async _initialize(){await K.initialize(),await t(),r({filtersLoaded:!0})}}}}function D_(){return e=>r=>e(i=>i.getUnitState(r))}function rh(e,r){return{property:{unit:{favorites:{toggle:e.toggleFavorite.bind(e)},viewed:{mark:e.markUnitAsViewed.bind(e)}},questionnaire:{setResults:e.setQuestionnaireResults.bind(e)},tour:{setContactedOn:e.setTourContactedOn.bind(e),getContactedOn:e.getTourContactedOn.bind(e),setContactData:e.setTourContactData.bind(e)}},filters:{set:e.setFilters.bind(e),setTemp:e.setTempFilters.bind(e),setToDefault:e.setFiltersToDefault.bind(e),commitTemp:async(i,t)=>{const o=(r?r():e).tempFilters[i]??t;await e.handleTempFilterChange(i,o),await e.submitFilterUpdate()},commitAvailability:async()=>{await e.submitFilterUpdate()},submit:e.submitFilterUpdate.bind(e)}}}function N_(e){return(r,i)=>{const t=th(e)(r,i),n=rh(t,i);return{...t,...n}}}const L_={async isFavorite(e,r){return cc(e,r)},async toggle(e,r){return uc(e,r)},async set(e,r,i){return bs(e,r,i)},async getAll(e){return Ci(e)}},pa="//web.inresiapp.com",da="/placeholder.jpg",F_=e=>e?e.startsWith("?")?e:`?${e}`:"",nh=(e,r,i=pa)=>`${i}/${r}/unit/${e}/explore`,Gn=(e,r=da)=>!(e!=null&&e.CFURL)||!(e!=null&&e.name)||!(e!=null&&e.signature)?r:`${e.CFURL}${e.name}${F_(e.signature)}`;function U_(e){return{data:e}}function $_(e,r,i){var s,a;const t=(i==null?void 0:i.origin)??pa,n=(i==null?void 0:i.placeholderImage)??da,o=((s=e.hits)==null?void 0:s.map(u=>{var p,g;const c=u._source??{},l=typeof c.name=="string"?c.name:typeof c.title=="string"?c.title:"";return{...c,title:l,slug:nh(String(c.slug??""),r,t),imageUrl:Gn(c.image,n),secondaryImageUrl:Gn((p=c.additionalImages)==null?void 0:p[0],n),tertiaryImageUrl:Gn((g=c.additionalImages)==null?void 0:g[1],n)}}))??[];return{total:((a=e.total)==null?void 0:a.value)??o.length,maxScore:e.max_score??null,type:e.type??"units",hits:o}}const z_={asap:"ASAP",next_month:"Next Month","2_3_months":"2-3 Months",all:"Just Browsing"},jn={0:"Studio",1:"1 Bed",2:"2 Bed",3:"3+ Bed"},B_=new Set(Object.values(jn)),q_=e=>{if(!e||e.length===0)return;const r=new Set;for(const i of e){if(typeof i=="number"){const n=jn[i];n&&r.add(n);continue}const t=i.split(",").map(n=>n.trim());for(const n of t){const o=Number.parseInt(n,10);!Number.isNaN(o)&&jn[o]?r.add(jn[o]):B_.has(n)&&r.add(n)}}return r.size>0?Array.from(r):void 0},V_=e=>({availability:e.availability&&e.availability.length>0?e.availability.map(i=>z_[i]??i):void 0,bedrooms:q_(e.bedrooms),cost:e.cost??void 0,highlights:e.highlights??[]});exports.ApiUserSchema=dh;exports.AppStoreDataSchema=ph;exports.DEFAULT_PLACEHOLDER_IMAGE=da;exports.DEFAULT_WEB_ORIGIN=pa;exports.FavoritesSchema=Yn;exports.FiltersSchema=Dr;exports.MixpanelProvider=__;exports.OpenDBError=Zu;exports.PropertySchema=er;exports.PropertyStore=lc;exports.PropertyStoreDataSchema=Nn;exports.QueryParamsSchema=vs;exports.QuestionEnumValues=b_;exports.ResultsModeEnum=gs;exports.SCHEMA_VERSION=kr;exports.SchemaMismatchError=Xu;exports.SortByEnum=ms;exports.SortEnumValues=la;exports.Store=ha;exports.TourContactDataSchema=rc;exports.UnifiedStore=ha;exports.UnifiedStoreDataSchema=Ln;exports.UnitDataSchema=ec;exports.UnitFavoriteSchema=vh;exports.UnitSchema=nr;exports.UserPropertyStateSchema=Qr;exports.UserSchema=Tt;exports.UserUnitDataSchema=Qu;exports.ViewedUnitSchema=tc;exports.buildExploreUrl=nh;exports.buildImageUrl=Gn;exports.buildTrackingEvents=Zf;exports.configureValidation=nc;exports.createORMStringStorage=Sh;exports.createStructuredStore=N_;exports.createStructuredStoreActions=rh;exports.createUseUnitState=D_;exports.createZustandUnifiedStore=th;exports.debugDump=sc;exports.defaultIdGenerator=ic;exports.ensureUser=Si;exports.exportJSON=bh;exports.favorites=L_;exports.generateUserUUID=fc;exports.getDB=ze;exports.getFavoritedUnitsForProperty=Ci;exports.getUserUUID=oc;exports.isUnitFavorited=cc;exports.kvGet=ys;exports.kvRemove=wh;exports.kvSet=_s;exports.propertyStore=Ch;exports.resetDB=_h;exports.setFavoriteUnit=bs;exports.store=K;exports.toggleFavoriteUnit=uc;exports.transformUnitsApiResponse=U_;exports.transformUnitsApiResponseToClient=$_;exports.transformUnitsApiResponseToClientFilters=V_;exports.useMixpanel=Yf;exports.useTrackEvent=Xf;exports.useTrackingEvents=M_;
|
|
65
|
+
`);var r="",i,t,n=0,o;for(i=t=0,n=e.length,o=0;o<n;o++){var s=e.charCodeAt(o),a=null;s<128?t++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(t>i&&(r+=e.substring(i,t)),r+=a,i=t=o+1)}return t>i&&(r+=e.substring(i,e.length)),r};h.UUID=function(){try{return E.crypto.randomUUID()}catch{for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",h.map(e,function(t){return t.toString(16)}).join("")}};var Mu=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];h.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<Mu.length;r++)if(e.indexOf(Mu[r])!==-1)return!0;return!1};h.HTTPBuildQuery=function(e,r){var i,t,n=[];return h.isUndefined(r)&&(r="&"),h.each(e,function(o,s){i=encodeURIComponent(o.toString()),t=encodeURIComponent(s),n[n.length]=t+"="+i}),n.join(r)};h.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var i="[\\?&]"+r+"=([^&#]*)",t=new RegExp(i),n=t.exec(e);if(n===null||n&&typeof n[1]!="string"&&n[1].length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{j.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};h.cookie={get:function(e){for(var r=e+"=",i=N.cookie.split(";"),t=0;t<i.length;t++){for(var n=i[t];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(r)===0)return decodeURIComponent(n.substring(r.length,n.length))}return null},parse:function(e){var r;try{r=h.JSONDecode(h.cookie.get(e))||{}}catch{}return r},set_seconds:function(e,r,i,t,n,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(t){var l=Tu(N.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*1e3),u="; expires="+f.toGMTString()}o&&(n=!0,c="; SameSite=None"),n&&(c+="; secure"),N.cookie=e+"="+encodeURIComponent(r)+u+"; path=/"+a+c},set:function(e,r,i,t,n,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(t){var l=Tu(N.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*24*60*60*1e3),u="; expires="+f.toGMTString()}o&&(n=!0,c="; SameSite=None"),n&&(c+="; secure");var p=e+"="+encodeURIComponent(r)+u+"; path=/"+a+c;return N.cookie=p,p},remove:function(e,r,i){h.cookie.set(e,"",-1,r,!1,!1,i)}};var lf=function(e){var r=!0;try{var i="__mplss_"+js(8),t="xyz";e.setItem(i,t),e.getItem(i)!==t&&(r=!1),e.removeItem(i)}catch{r=!1}return r},ho=null,Yr=function(e,r){return ho!==null&&!r?ho:ho=lf(e||E.localStorage)},po=null,ny=function(e,r){return po!==null&&!r?po:po=lf(e||E.sessionStorage)};function ff(e,r,i){var t=function(n){j.error(r+" error: "+n)};return{is_supported:function(n){var o=i(e,n);return o||j.error(r+" unsupported"),o},error:t,get:function(n){try{return e.getItem(n)}catch(o){t(o)}return null},parse:function(n){try{return h.JSONDecode(e.getItem(n))||{}}catch{}return null},set:function(n,o){try{e.setItem(n,o)}catch(s){t(s)}},remove:function(n){try{e.removeItem(n)}catch(o){t(o)}}}}h.localStorage=ff(E.localStorage,"localStorage",Yr);h.sessionStorage=ff(E.sessionStorage,"sessionStorage",ny);h.register_event=function(){var e=function(t,n,o,s,a){if(!t){j.error("No valid element provided to register_event");return}if(t.addEventListener&&!s)t.addEventListener(n,o,!!a);else{var u="on"+n,c=t[u];t[u]=r(t,o,c)}};function r(t,n,o){var s=function(a){if(a=a||i(E.event),!!a){var u=!0,c,l;return h.isFunction(o)&&(c=o(a)),l=n.call(t,a),(c===!1||l===!1)&&(u=!1),u}};return s}function i(t){return t&&(t.preventDefault=i.preventDefault,t.stopPropagation=i.stopPropagation),t}return i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0},e}();var iy=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');h.dom_query=function(){function e(n){return n.all?n.all:n.getElementsByTagName("*")}var r=/[\t\r\n]/g;function i(n,o){var s=" "+o+" ";return(" "+n.className+" ").replace(r," ").indexOf(s)>=0}function t(n){if(!N.getElementsByTagName)return[];var o=n.split(" "),s,a,u,c,l,f,p,g,d,_,v=[N];for(f=0;f<o.length;f++){if(s=o[f].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),u=a[0];var y=a[1],b=N.getElementById(y);if(!b||u&&b.nodeName.toLowerCase()!=u)return[];v=[b];continue}if(s.indexOf(".")>-1){a=s.split("."),u=a[0];var S=a[1];for(u||(u="*"),c=[],l=0,p=0;p<v.length;p++)for(u=="*"?d=e(v[p]):d=v[p].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];for(v=[],_=0,p=0;p<c.length;p++)c[p].className&&h.isString(c[p].className)&&i(c[p],S)&&(v[_++]=c[p]);continue}var C=s.match(iy);if(C){u=C[1];var I=C[2],x=C[3],M=C[4];for(u||(u="*"),c=[],l=0,p=0;p<v.length;p++)for(u=="*"?d=e(v[p]):d=v[p].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=[],_=0;var R;switch(x){case"=":R=function(P){return P.getAttribute(I)==M};break;case"~":R=function(P){return P.getAttribute(I).match(new RegExp("\\b"+M+"\\b"))};break;case"|":R=function(P){return P.getAttribute(I).match(new RegExp("^"+M+"-?"))};break;case"^":R=function(P){return P.getAttribute(I).indexOf(M)===0};break;case"$":R=function(P){return P.getAttribute(I).lastIndexOf(M)==P.getAttribute(I).length-M.length};break;case"*":R=function(P){return P.getAttribute(I).indexOf(M)>-1};break;default:R=function(P){return P.getAttribute(I)}}for(v=[],_=0,p=0;p<c.length;p++)R(c[p])&&(v[_++]=c[p]);continue}for(u=s,c=[],l=0,p=0;p<v.length;p++)for(d=v[p].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=c}return v}return function(n){return h.isElement(n)?[n]:h.isObject(n)&&!h.isUndefined(n.length)?n:t.call(this,n)}}();var oy=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],sy=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];h.info={campaignParams:function(e){var r="",i={};return h.each(oy,function(t){r=h.getQueryParam(N.URL,t),r.length?i[t]=r:e!==void 0&&(i[t]=e)}),i},clickParams:function(){var e="",r={};return h.each(sy,function(i){e=h.getQueryParam(N.URL,i),e.length&&(r[i]=e)}),r},marketingParams:function(){return h.extend(h.info.campaignParams(),h.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=h.info.searchEngine(e),i=r!="yahoo"?"q":"p",t={};if(r!==null){t.$search_engine=r;var n=h.getQueryParam(e,i);n.length&&(t.mp_keyword=n)}return t},browser:function(e,r,i){return r=r||"",i||h.includes(e," OPR/")?h.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":h.includes(e,"IEMobile")||h.includes(e,"WPDesktop")?"Internet Explorer Mobile":h.includes(e,"SamsungBrowser/")?"Samsung Internet":h.includes(e,"Edge")||h.includes(e,"Edg/")?"Microsoft Edge":h.includes(e,"FBIOS")?"Facebook Mobile":h.includes(e,"Whale/")?"Whale Browser":h.includes(e,"Chrome")?"Chrome":h.includes(e,"CriOS")?"Chrome iOS":h.includes(e,"UCWEB")||h.includes(e,"UCBrowser")?"UC Browser":h.includes(e,"FxiOS")?"Firefox iOS":h.includes(r,"Apple")?h.includes(e,"Mobile")?"Mobile Safari":"Safari":h.includes(e,"Android")?"Android Mobile":h.includes(e,"Konqueror")?"Konqueror":h.includes(e,"Firefox")?"Firefox":h.includes(e,"MSIE")||h.includes(e,"Trident/")?"Internet Explorer":h.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,i){var t=h.info.browser(e,r,i),n={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},o=n[t];if(o===void 0)return null;var s=e.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var e=Xe;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return E.location.href},properties:function(e){return typeof e!="object"&&(e={}),h.extend(h.strip_empty_properties({$os:h.info.os(),$browser:h.info.browser(Xe,lt.vendor,Tn),$referrer:N.referrer,$referring_domain:h.info.referringDomain(N.referrer),$device:h.info.device(Xe)}),{$current_url:h.info.currentUrl(),$browser_version:h.info.browserVersion(Xe,lt.vendor,Tn),$screen_height:Ou.height,$screen_width:Ou.width,mp_lib:"web",$lib_version:Le.LIB_VERSION,$insert_id:js(),time:h.timestamp()/1e3},h.strip_empty_properties(e))},people_properties:function(){return h.extend(h.strip_empty_properties({$os:h.info.os(),$browser:h.info.browser(Xe,lt.vendor,Tn)}),{$browser_version:h.info.browserVersion(Xe,lt.vendor,Tn)})},mpPageViewProperties:function(){return h.strip_empty_properties({current_page_title:N.title,current_domain:E.location.hostname,current_url_path:E.location.pathname,current_url_protocol:E.location.protocol,current_url_search:E.location.search})}};var ay=function(e,r){var i=null,t=[];return function(n){var o=this;return t.push(n),i||(i=new W(function(s){setTimeout(function(){var a=e.apply(o,[t]);i=null,t=[],s(a)},r)})),i}},js=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},uy=function(){var e=h.UUID().replace(/-/g,""),r=h.UUID().replace(/-/g,"").substring(0,16),i="01";return"00-"+e+"-"+r+"-"+i},cy=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,ly=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Tu=function(e){var r=ly,i=e.split("."),t=i[i.length-1];(t.length>4||t==="com"||t==="org")&&(r=cy);var n=e.match(r);return n?n[0]:""},fy=function(){var e=E.navigator.onLine;return h.isUndefined(e)||e},ht=function(){},lr=null,hi=null;typeof JSON<"u"&&(lr=JSON.stringify,hi=JSON.parse);lr=lr||h.JSONEncode;hi=hi||h.JSONDecode;h.info=h.info;h.info.browser=h.info.browser;h.info.browserVersion=h.info.browserVersion;h.info.device=h.info.device;h.info.properties=h.info.properties;h.isBlockedUA=h.isBlockedUA;h.isEmptyObject=h.isEmptyObject;h.isObject=h.isObject;h.JSONDecode=h.JSONDecode;h.JSONEncode=h.JSONEncode;h.toArray=h.toArray;h.NPO=bt;var hy="mixpanelBrowserDb",hf="mixpanelRecordingEvents",Hs="mixpanelRecordingRegistry",py=1,dy=[hf,Hs],Be=function(e){this.dbPromise=null,this.storeName=e};Be.prototype._openDb=function(){return new W(function(e,r){var i=E.indexedDB.open(hy,py);i.onerror=function(){r(i.error)},i.onsuccess=function(){e(i.result)},i.onupgradeneeded=function(t){var n=t.target.result;dy.forEach(function(o){n.createObjectStore(o)})}})};Be.prototype.init=function(){return E.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof E.IDBDatabase?W.resolve():W.reject(e)})):W.reject("indexedDB is not supported in this browser")};Be.prototype.isInitialized=function(){return!!this.dbPromise};Be.prototype.makeTransaction=function(e,r){var i=this.storeName,t=function(n){return new W(function(o,s){var a=n.transaction(i,e);a.oncomplete=function(){o(a)},a.onabort=a.onerror=function(){s(a.error)},r(a.objectStore(i))})};return this.dbPromise.then(t).catch((function(n){return n&&n.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(t)):W.reject(n)}).bind(this))};Be.prototype.setItem=function(e,r){return this.makeTransaction("readwrite",function(i){i.put(r,e)})};Be.prototype.getItem=function(e){var r;return this.makeTransaction("readonly",function(i){r=i.get(e)}).then(function(){return r.result})};Be.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(r){r.delete(e)})};Be.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(r){e=r.getAll()}).then(function(){return e.result})};var vy="__mp_opt_in_out_";function gy(e,r){vf(!0,e,r)}function my(e,r){vf(!1,e,r)}function yy(e,r){return df(e,r)==="1"}function pf(e,r){if(by(r))return j.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var i=df(e,r)==="0";return i&&j.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),i}function wt(e){return Js(e,function(r){return this.get_config(r)})}function St(e){return Js(e,function(r){return this._get_config(r)})}function pr(e){return Js(e,function(r){return this._get_config(r)})}function _y(e,r){r=r||{},Ys(r).remove(Ks(e,r),!!r.crossSubdomainCookie,r.cookieDomain)}function Ys(e){return e=e||{},e.persistenceType==="localStorage"?h.localStorage:h.cookie}function Ks(e,r){return r=r||{},(r.persistencePrefix||vy)+e}function df(e,r){return Ys(r).get(Ks(e,r))}function by(e){if(e&&e.ignoreDnt)return!1;var r=e&&e.window||E,i=r.navigator||{},t=!1;return h.each([i.doNotTrack,i.msDoNotTrack,r.doNotTrack],function(n){h.includes([!0,1,"1","yes"],n)&&(t=!0)}),t}function vf(e,r,i){if(!h.isString(r)||!r.length){j.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}i=i||{},Ys(i).set(Ks(r,i),e?1:0,h.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&e&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})}function Js(e,r){return function(){var i=!1;try{var t=r.call(this,"token"),n=r.call(this,"ignore_dnt"),o=r.call(this,"opt_out_tracking_persistence_type"),s=r.call(this,"opt_out_tracking_cookie_prefix"),a=r.call(this,"window");t&&(i=pf(t,{ignoreDnt:n,persistenceType:o,persistencePrefix:s,window:a}))}catch(c){j.error("Unexpected error when checking tracking opt-out status: "+c)}if(!i)return e.apply(this,arguments);var u=arguments[arguments.length-1];typeof u=="function"&&u(0)}}var wy=zt("lock"),gf=function(e,r){r=r||{},this.storageKey=e,this.storage=r.storage||E.localStorage,this.pollIntervalMS=r.pollIntervalMS||100,this.timeoutMS=r.timeoutMS||2e3,this.promiseImpl=r.promiseImpl||W};gf.prototype.withLock=function(e,r){var i=this.promiseImpl;return new i(h.bind(function(t,n){var o=r||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),a=this.storageKey,u=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,f=a+":X",p=a+":Y",g=a+":Z",d=function(S){if(new Date().getTime()-s>c){wy.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+o+"]"),l.removeItem(g),l.removeItem(p),y();return}setTimeout(function(){try{S()}catch(C){n(C)}},u*(Math.random()+.1))},_=function(S,C){S()?C():d(function(){_(S,C)})},v=function(){var S=l.getItem(p);return S&&S!==o?!1:(l.setItem(p,o),l.getItem(p)===o?!0:(Yr(l,!0)||n(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){l.setItem(f,o),_(v,function(){if(l.getItem(f)===o){b();return}d(function(){if(l.getItem(p)!==o){y();return}_(function(){return!l.getItem(g)},b)})})},b=function(){l.setItem(g,"1");var S=function(){l.removeItem(g),l.getItem(p)===o&&l.removeItem(p),l.getItem(f)===o&&l.removeItem(f)};e().then(function(C){S(),t(C)}).catch(function(C){S(),n(C)})};try{if(Yr(l,!0))y();else throw new Error("localStorage support check failed")}catch(S){n(S)}},this))};var dr=function(e){this.storage=e||E.localStorage};dr.prototype.init=function(){return W.resolve()};dr.prototype.isInitialized=function(){return!0};dr.prototype.setItem=function(e,r){return new W(h.bind(function(i,t){try{this.storage.setItem(e,lr(r))}catch(n){t(n)}i()},this))};dr.prototype.getItem=function(e){return new W(h.bind(function(r,i){var t;try{t=hi(this.storage.getItem(e))}catch(n){i(n)}r(t)},this))};dr.prototype.removeItem=function(e){return new W(h.bind(function(r,i){try{this.storage.removeItem(e)}catch(t){i(t)}r()},this))};var Pu=zt("batch"),He=function(e,r){r=r||{},this.storageKey=e,this.usePersistence=r.usePersistence,this.usePersistence&&(this.queueStorage=r.queueStorage||new dr,this.lock=new gf(e,{storage:r.sharedLockStorage||E.localStorage,timeoutMS:r.sharedLockTimeoutMS})),this.reportError=r.errorReporter||h.bind(Pu.error,Pu),this.pid=r.pid||null,this.memQueue=[],this.initialized=!1,r.enqueueThrottleMs?this.enqueuePersisted=ay(h.bind(this._enqueuePersisted,this),r.enqueueThrottleMs):this.enqueuePersisted=h.bind(function(i){return this._enqueuePersisted([i])},this)};He.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?W.resolve():this.queueStorage.init().then(h.bind(function(){this.initialized=!0},this)).catch(h.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))};He.prototype.enqueue=function(e,r){var i={id:js(),flushAfter:new Date().getTime()+r*2,payload:e};return this.usePersistence?this.enqueuePersisted(i):(this.memQueue.push(i),W.resolve(!0))};He.prototype._enqueuePersisted=function(e){var r=h.bind(function(){return this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(i){return this.saveToStorage(i.concat(e))},this)).then(h.bind(function(i){return i&&(this.memQueue=this.memQueue.concat(e)),i},this)).catch(h.bind(function(i){return this.reportError("Error enqueueing items",i,e),!1},this))},this);return this.lock.withLock(r,this.pid).catch(h.bind(function(i){return this.reportError("Error acquiring storage lock",i),!1},this))};He.prototype.fillBatch=function(e){var r=this.memQueue.slice(0,e);return this.usePersistence&&r.length<e?this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(i){if(i.length){var t={};h.each(r,function(s){t[s.id]=!0});for(var n=0;n<i.length;n++){var o=i[n];if(new Date().getTime()>o.flushAfter&&!t[o.id]&&(o.orphaned=!0,r.push(o),r.length>=e))break}}return r},this)):W.resolve(r)};var Du=function(e,r){var i=[];return h.each(e,function(t){t.id&&!r[t.id]&&i.push(t)}),i};He.prototype.removeItemsByID=function(e){var r={};if(h.each(e,function(t){r[t]=!0}),this.memQueue=Du(this.memQueue,r),this.usePersistence){var i=h.bind(function(){return this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(t){return t=Du(t,r),this.saveToStorage(t)},this)).then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(t){for(var n=0;n<t.length;n++){var o=t[n];if(o.id&&r[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(h.bind(function(t){return this.reportError("Error removing items",t,e),!1},this))},this);return this.lock.withLock(i,this.pid).catch(h.bind(function(t){return this.reportError("Error acquiring storage lock",t),Yr(this.lock.storage,!0)?!1:i().then(h.bind(function(n){return n||this.queueStorage.removeItem(this.storageKey).then(function(){return n})},this)).catch(h.bind(function(n){return this.reportError("Error clearing queue",n),!1},this))},this))}else return W.resolve(!0)};var Nu=function(e,r){var i=[];return h.each(e,function(t){var n=t.id;if(n in r){var o=r[n];o!==null&&(t.payload=o,i.push(t))}else i.push(t)}),i};He.prototype.updatePayloads=function(e){return this.memQueue=Nu(this.memQueue,e),this.usePersistence?this.lock.withLock(h.bind(function(){return this.ensureInit().then(h.bind(function(){return this.readFromStorage()},this)).then(h.bind(function(i){return i=Nu(i,e),this.saveToStorage(i)},this)).catch(h.bind(function(i){return this.reportError("Error updating items",e,i),!1},this))},this),this.pid).catch(h.bind(function(r){return this.reportError("Error acquiring storage lock",r),!1},this)):W.resolve(!0)};He.prototype.readFromStorage=function(){return this.ensureInit().then(h.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(h.bind(function(e){return e&&(h.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(h.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))};He.prototype.saveToStorage=function(e){return this.ensureInit().then(h.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(h.bind(function(r){return this.reportError("Error saving queue",r),!1},this))};He.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(h.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):W.resolve()};var Sy=10*60*1e3,Mr=zt("batch"),Fe=function(e,r){this.errorReporter=r.errorReporter,this.queue=new He(e,{errorReporter:h.bind(this.reportError,this),queueStorage:r.queueStorage,sharedLockStorage:r.sharedLockStorage,sharedLockTimeoutMS:r.sharedLockTimeoutMS,usePersistence:r.usePersistence,enqueueThrottleMs:r.enqueueThrottleMs}),this.libConfig=r.libConfig,this.sendRequest=r.sendRequestFunc,this.beforeSendHook=r.beforeSendHook,this.stopAllBatching=r.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=r.flushOnlyOnInterval||!1,this._flushPromise=null};Fe.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)};Fe.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};Fe.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};Fe.prototype.clear=function(){return this.queue.clear()};Fe.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};Fe.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};Fe.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(h.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))};Fe.prototype.sendRequestPromise=function(e,r){return new W(h.bind(function(i){this.sendRequest(e,r,i)},this))};Fe.prototype.flush=function(e){if(this.requestInProgress)return Mr.log("Flush: Request already in progress"),W.resolve();this.requestInProgress=!0,e=e||{};var r=this.libConfig.batch_request_timeout_ms,i=new Date().getTime(),t=this.batchSize;return this.queue.fillBatch(t).then(h.bind(function(n){var o=n.length===t,s=[],a={};if(h.each(n,function(f){var p=f.payload;if(this.beforeSendHook&&!f.orphaned&&(p=this.beforeSendHook(p)),p){p.event&&p.properties&&(p.properties=h.extend({},p.properties,{mp_sent_by_lib_version:Le.LIB_VERSION}));var g=!0,d=f.id;d?(this.itemIdsSentSuccessfully[d]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:f,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[d]}),g=!1):this.reportError("[dupe] found item with no ID",{item:f}),g&&s.push(p)}a[f.id]=p},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),W.resolve();var u=h.bind(function(){return this.queue.removeItemsByID(h.map(n,function(f){return f.id})).then(h.bind(function(f){return h.each(n,h.bind(function(p){var g=p.id;g?(this.itemIdsSentSuccessfully[g]=this.itemIdsSentSuccessfully[g]||0,this.itemIdsSentSuccessfully[g]++,this.itemIdsSentSuccessfully[g]>5&&this.reportError("[dupe] item ID sent too many times",{item:p,batchSize:n.length,timesSent:this.itemIdsSentSuccessfully[g]})):this.reportError("[dupe] found item with no ID while removing",{item:p})},this)),f?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),W.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),W.resolve())},this))},this),c=h.bind(function(f){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(a);if(h.isObject(f)&&f.error==="timeout"&&new Date().getTime()-i>=r)return this.reportError("Network timeout; retrying"),this.flush();if(h.isObject(f)&&(f.httpStatusCode>=500||f.httpStatusCode===429||f.httpStatusCode<=0&&!fy()||f.error==="timeout")){var p=this.flushInterval*2;return f.retryAfter&&(p=parseInt(f.retryAfter,10)*1e3||p),p=Math.min(Sy,p),this.reportError("Error; retry in "+p+" ms"),this.scheduleFlush(p),W.resolve()}else if(h.isObject(f)&&f.httpStatusCode===413)if(n.length>1){var g=Math.max(1,Math.floor(t/2));return this.batchSize=Math.min(this.batchSize,g,n.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),W.resolve()}else return this.reportError("Single-event request too large; dropping",n),this.resetBatchSize(),u();else return u()}catch(d){this.reportError("Error handling API response",d),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:r};return e.unloading&&(l.transport="sendBeacon"),Mr.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,l).then(c)},this)).catch(h.bind(function(n){this.reportError("Error flushing request queue",n),this.resetFlush()},this))};Fe.prototype.reportError=function(e,r){if(Mr.error.apply(Mr.error,arguments),this.errorReporter)try{r instanceof Error||(r=new Error(e)),this.errorReporter(e,r)}catch(i){Mr.error(i)}};var Xs=function(e){var r=Date.now();return!e||r>e.maxExpires||r>e.idleExpires},Cy=250,er=zt("recorder"),Lu=E.CompressionStream,Iy={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},Ey=new Set([D.MouseMove,D.MouseInteraction,D.Scroll,D.ViewportResize,D.Input,D.TouchMove,D.MediaInteraction,D.Drag,D.Selection]);function ky(e){return e.type===V.IncrementalSnapshot&&Ey.has(e.data.source)}var _e=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||ht,this._onMaxLengthReached=e.onMaxLengthReached||ht,this._onBatchSent=e.onBatchSent||ht,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=Ar,this.recordMinMs=0;var r=Yr(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new Be(hf),this.batcher=new Fe(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:Iy,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:r,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:Cy,sharedLockTimeoutMS:10*1e3})};_e.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},r=this._mixpanel.get_property("$device_id");r&&(e.$device_id=r);var i=this._mixpanel.get_property("$user_id");return i&&(e.$user_id=i),e};_e.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.batcher.flush().then((function(){return this.queueStorage.removeItem(this.batcherKey)}).bind(this))};_e.prototype.getConfig=function(e){return this._mixpanel.get_config(e)};_e.prototype.get_config=function(e){return this.getConfig(e)};_e.prototype.startRecording=function(e){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){er.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>Ar&&(this.recordMaxMs=Ar,er.critical("record_max_ms cannot be greater than "+Ar+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>co&&(this.recordMinMs=co,er.critical("record_min_ms cannot be greater than "+co+"ms. Capping value.")),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=h.info.currentUrl(),this.replayStartUrl=h.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var r=(function(){clearTimeout(this.idleTimeoutId);var n=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,n),this.idleExpires=new Date().getTime()+n}).bind(this);r();var i=this.getConfig("record_block_selector");(i===""||i===null)&&(i=void 0);try{this._stopRecording=this._rrwebRecord({emit:(function(n){if(this.idleExpires&&this.idleExpires<n.timestamp){this._onIdleTimeout();return}ky(n)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),r()),this.__enqueuePromise=this.batcher.enqueue(n)}).bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:i,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15}})}catch(n){this.reportError("Unexpected error when starting rrweb recording.",n)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var t=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),t)};_e.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(i){this.reportError("Error with rrweb stopRecording",i)}this._stopRecording=null}var r;return this.batcher.stopped?r=this.batcher.clear():e||(r=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),r};_e.prototype.isRrwebStopped=function(){return this._stopRecording===null};_e.prototype.flushEventsWithOptOut=function(e,r,i){var t=(function(n){n===0&&(this.stopRecording(),i({error:"Tracking has been opted out, stopping recording."}))}).bind(this);this._flushEvents(e,r,i,t)};_e.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(r){this.reportError("Error getting tab ID for serialization ",r),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}};_e.deserialize=function(e,r){var i=new _e(h.extend({},r,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,seqNo:e.seqNo,sharedLockStorage:r.sharedLockStorage}));return i};_e.prototype._sendRequest=function(e,r,i,t){var n=(function(s,a){s.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=h.info.currentUrl()),this._onBatchSent(),t({status:0,httpStatusCode:s.status,responseBody:a,retryAfter:s.headers.get("Retry-After")})}).bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");E.fetch(o+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(r),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:i}).then(function(s){s.json().then(function(a){n(s,a)}).catch(function(a){t({error:a})})}).catch(function(s){t({error:s,httpStatusCode:0})})};_e.prototype._flushEvents=wt(function(e,r,i){var t=e.length;if(t>0){for(var n=this.replayId,o=1/0,s=-1/0,a=!1,u=0;u<t;u++)o=Math.min(o,e[u].timestamp),s=Math.max(s,e[u].timestamp),e[u].type===V.FullSnapshot&&(a=!0);if(this.seqNo===0){if(!a){i({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var c=s-this.replayStartTime,l={$current_url:this.batchStartUrl,$lib_version:Le.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:n,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},f=JSON.stringify(e);if(Object.assign(l,this.getUserIdInfo()),Lu){var p=new Blob([f],{type:"application/json"}).stream(),g=p.pipeThrough(new Lu("gzip"));new Response(g).blob().then((function(d){l.format="gzip",this._sendRequest(n,l,d,i)}).bind(this))}else l.format="body",this._sendRequest(n,l,f,i)}});_e.prototype.reportError=function(e,r){er.error.apply(er.error,arguments);try{!r&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,r)}catch(i){er.error(i)}};var rt=function(e){this.idb=new Be(Hs),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};rt.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")};rt.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)};rt.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return W.resolve();var r=e.tabId;return r?this.idb.init().then((function(){return this.idb.setItem(r,e)}).bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),W.resolve())};rt.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then((function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}).bind(this)).then((function(e){return Xs(e)?null:e}).bind(this)).catch(this.handleError.bind(this)):W.resolve(null)};rt.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()};rt.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then((function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}).bind(this)).catch(this.handleError.bind(this))};rt.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):W.resolve()};rt.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then((function(){return this.idb.getAll()}).bind(this)).then((function(e){var r=e.filter(function(i){return Xs(i)}).map((function(i){var t=_e.deserialize(i,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return t.unloadPersistedData().then((function(){return this.idb.removeItem(i.tabId)}).bind(this)).catch(this.handleError.bind(this))}).bind(this));return W.all(r)}).bind(this)).catch(this.handleError.bind(this)):W.resolve([])};var Tr=zt("recorder"),nt=function(e,r,i){this.mixpanelInstance=e,this.rrwebRecord=r||_t,this.sharedLockStorage=i,this.recordingRegistry=new rt({mixpanelInstance:this.mixpanelInstance,errorReporter:Tr.error,sharedLockStorage:i}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};nt.prototype.startRecording=function(e){if(e=e||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Tr.log("Recording already in progress, skipping startRecording.");return}var r=(function(){Tr.log("Idle timeout reached, restarting recording."),this.resetRecording()}).bind(this),i=(function(){Tr.log("Max recording length reached, stopping recording."),this.resetRecording()}).bind(this),t=(function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}).bind(this),n={mixpanelInstance:this.mixpanelInstance,onBatchSent:t,onIdleTimeout:r,onMaxLengthReached:i,replayId:h.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=_e.deserialize(e.activeSerializedRecording,n):this.activeRecording=new _e(n),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())};nt.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then((function(){return this.recordingRegistry.clearActiveRecording()}).bind(this)).then((function(){this.stopRecordingInProgress=!1}).bind(this))};nt.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)};nt.prototype._stopCurrentRecording=function(e,r){if(this.activeRecording){var i=this.activeRecording.stopRecording(e);return r&&(this.activeRecording=null),i}return W.resolve()};nt.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),W.resolve(null)):this.recordingRegistry.getActiveRecording().then((function(r){return r&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:r}):e?this.startRecording({shouldStopBatcher:!1}):(Tr.log("No resumable recording found."),null)}).bind(this))};nt.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})};nt.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null};Object.defineProperty(nt.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});E.__mp_recorder=nt;var Kr="change",tt="click",is="hashchange",Oy="input",Fu="load",ft="mp_locationchange",Uu="popstate",Fi="scrollend",Zs="scroll",xy="select",pi="submit",Ry="toggle",$u="visibilitychange",Ay=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],zu=["mp-include"],os=["mp-no-track"],Bu=os.concat(["mp-sensitive"]),My=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],Ty={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},Py={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},Dy={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},qu=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],Ny=5,ne=zt("autocapture");function ss(e){for(var r={},i=mf(e).split(" "),t=0;t<i.length;t++){var n=i[t];n&&(r[n]=!0)}return r}function mf(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function Ly(e){if(e.previousElementSibling)return e.previousElementSibling;do e=e.previousSibling;while(e&&!yf(e));return e}function Vu(e,r,i,t,n,o){var s={$classes:mf(e).split(" "),$tag_name:e.tagName.toLowerCase()},a=e.id;a&&(s.$id=a),Qs(e,r,n,o)&&h.each(My.concat(t),function(f){if(e.hasAttribute(f)&&!i[f]){var p=e.getAttribute(f);di(p)&&(s["$attr-"+f]=p)}});for(var u=1,c=1,l=e;l=Ly(l);)u++,l.tagName===e.tagName&&c++;return s.$nth_child=u,s.$nth_of_type=c,s}function Fy(e,r){var i=r.allowElementCallback,t=r.allowSelectors||[],n=r.blockAttrs||[],o=r.blockElementCallback,s=r.blockSelectors||[],a=r.captureTextContent||!1,u=r.captureExtraAttrs||[],c=r.capturedForHeatMap||!1,l={};h.each(n,function(I){l[I]=!0});var f=null,p=typeof e.target>"u"?e.srcElement:e.target;if(_f(p)&&(p=p.parentNode),By(p,e)&&as(p,e,i,t)&&!vo(p,e,o,s)){for(var g=[p],d=p;d.parentNode&&!Ge(d,"body");)g.push(d.parentNode),d=d.parentNode;var _=[],v,y=!1;if(h.each(g,function(I){var x=Qs(I,e,i,t);!l.href&&I.tagName.toLowerCase()==="a"&&(v=I.getAttribute("href"),v=x&&di(v)&&v),vo(I,e,o,s)&&(y=!0),_.push(Vu(I,e,l,u,i,t))},this),!y){var b=N.documentElement;if(f={$event_type:e.type,$host:E.location.host,$pathname:E.location.pathname,$elements:_,$el_attr__href:v,$viewportHeight:Math.max(b.clientHeight,E.innerHeight||0),$viewportWidth:Math.max(b.clientWidth,E.innerWidth||0),$pageHeight:N.body.offsetHeight||0,$pageWidth:N.body.offsetWidth||0},h.each(u,function(I){if(!l[I]&&p.hasAttribute(I)){var x=p.getAttribute(I);di(x)&&(f["$el_attr__"+I]=x)}}),a&&(S=Wu(p,e,i,t),S&&S.length&&(f.$el_text=S)),e.type===tt&&(h.each(Ay,function(I){I in e&&(f["$"+I]=e[I])}),c&&(f.$captured_for_heatmap=!0),p=Uy(e)),a){var S=Wu(p,e,i,t);S&&S.length&&(f.$el_text=S)}if(p){if(!as(p,e,i,t)||vo(p,e,o,s))return null;var C=Vu(p,e,l,u,i,t);f.$target=C,f.$el_classes=C.$classes,h.extend(f,h.strip_empty_properties({$el_id:C.$id,$el_tag_name:C.$tag_name}))}}}return f}function Wu(e,r,i,t){var n="";return Qs(e,r,i,t)&&e.childNodes&&e.childNodes.length&&h.each(e.childNodes,function(o){_f(o)&&o.textContent&&(n+=h.trim(o.textContent).split(/(\s+)/).filter(di).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),h.trim(n)}function Uy(e){for(var r=e.target,i=e.composedPath(),t=0;t<i.length;t++){var n=i[t];if(Ge(n,"a")||Ge(n,"button")||Ge(n,"input")||Ge(n,"select")||n.getAttribute&&n.getAttribute("role")==="button"){r=n;break}if(n===r)break}return r}function as(e,r,i,t){if(i)try{if(!i(e,r))return!1}catch(s){return ne.critical("Error while checking element in allowElementCallback",s),!1}if(!t.length)return!0;for(var n=0;n<t.length;n++){var o=t[n];try{if(e.matches(o))return!0}catch(s){ne.critical("Error while checking selector: "+o,s)}}return!1}function vo(e,r,i,t){var n;if(i)try{if(i(e,r))return!0}catch(a){return ne.critical("Error while checking element in blockElementCallback",a),!0}if(t&&t.length)for(n=0;n<t.length;n++){var o=t[n];try{if(e.matches(o))return!0}catch(a){ne.critical("Error while checking selector: "+o,a)}}var s=ss(e);for(n=0;n<os.length;n++)if(s[os[n]])return!0;return!1}function yf(e){return e&&e.nodeType===1}function Ge(e,r){return e&&e.tagName&&e.tagName.toLowerCase()===r.toLowerCase()}function _f(e){return e&&e.nodeType===3}function $y(){try{var e=N.createElement("div");return!!e.matches}catch{return!1}}function zy(){return typeof WeakSet<"u"}function By(e,r){if(!e||Ge(e,"html")||!yf(e))return!1;var i=e.tagName.toLowerCase();switch(i){case"form":return r.type===pi;case"input":return["button","submit"].indexOf(e.getAttribute("type"))===-1?r.type===Kr:r.type===tt;case"select":case"textarea":return r.type===Kr;default:return r.type===tt}}function Qs(e,r,i,t){var n;if(!as(e,r,i,t))return!1;for(var o=e;o.parentNode&&!Ge(o,"body");o=o.parentNode){var s=ss(o);for(n=0;n<Bu.length;n++)if(s[Bu[n]])return!1}var a=ss(e);for(n=0;n<zu.length;n++)if(a[zu[n]])return!0;if(Ge(e,"input")||Ge(e,"select")||Ge(e,"textarea")||e.getAttribute("contenteditable")==="true")return!1;var u=e.type||"";if(typeof u=="string")switch(u.toLowerCase()){case"hidden":return!1;case"password":return!1}var c=e.name||e.id||"";if(typeof c=="string"){var l=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(l.test(c.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function di(e){if(e===null||h.isUndefined(e))return!1;if(typeof e=="string"){e=h.trim(e);var r=/^(?:(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}))$/;if(r.test((e||"").replace(/[- ]/g,"")))return!1;var i=/(^\d{3}-?\d{2}-?\d{4}$)/;if(i.test(e))return!1}return!0}function bf(e){var r="onscrollend"in E,i=Hr(e),t=Fi;if(!r){var n=null,o=100;i=Hr(function(){clearTimeout(n),n=setTimeout(e,o)}),t=Zs}return{listener:i,eventType:t}}function qy(e){for(var r=0;r<qu.length;r++)if(e.hasAttribute(qu[r]))return!0;return!1}function Vy(e){var r=e.getAttribute("role");if(!r)return!1;var i=r.trim().split(/\s+/)[0].toLowerCase();return Ty[i]}function go(e){var r=e.tagName.toLowerCase();return!!(r==="button"||r==="input"||r==="select"||r==="textarea"||r==="details"||r==="dialog"||e.isContentEditable||e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend||qy(e)||Vy(e)||r==="a"&&e.hasAttribute("href")||e.hasAttribute("tabindex"))}function Wy(e){if(!e||!e.tagName)return!0;var r=e.tagName.toLowerCase();if(Py[r])return!0;if(go(e))return!1;for(var i=e.parentElement,t=0;i&&t<Ny;){if(go(i))return!1;if(i.getRootNode&&i.getRootNode()!==N){var n=i.getRootNode();if(n.host&&go(n.host))return!1}i=i.parentElement,t++}return!!Dy[r]}var Gy=30,jy=1e3,Hy=4;function wf(){this.clicks=[]}wf.prototype.isRageClick=function(e,r,i){i=i||{};var t=i.threshold_px||Gy,n=i.timeout_ms||jy,o=i.click_count||Hy,s=Date.now(),a=this.clicks[this.clicks.length-1];if(a&&s-a.timestamp<n&&Math.sqrt(Math.pow(e-a.x,2)+Math.pow(r-a.y,2))<t){if(this.clicks.push({x:e,y:r,timestamp:s}),this.clicks.length>=o)return this.clicks=[],!0}else this.clicks=[{x:e,y:r,timestamp:s}];return!1};function Bt(e,r){this.changeCallback=e||function(){},this.observerConfig=r,this.observedShadowRoots=null,this.shadowObservers=[]}Bt.prototype.getEventTarget=function(e){if(this.observedShadowRoots){var r=this.getComposedPath(e);return r&&r.length?r[0]:e.target||e.srcElement}};Bt.prototype.getComposedPath=function(e){return"composedPath"in e?e.composedPath():[]};Bt.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var r=this.getComposedPath(e),i=0;i<r.length;i++){var t=r[i];t&&t.shadowRoot&&this.observeShadowRoot(t.shadowRoot)}};Bt.prototype.observeShadowRoot=function(e){if(!(!this.observedShadowRoots||this.observedShadowRoots.has(e))){var r=this;try{this.observedShadowRoots.add(e);var i=new window.MutationObserver(function(){r.changeCallback()});i.observe(e,this.observerConfig),this.shadowObservers.push(i)}catch(t){ne.critical("Error while observing shadow root",t)}}};Bt.prototype.start=function(){if(!this.observedShadowRoots){if(!zy()){ne.critical("Shadow DOM observation unavailable: WeakSet not supported");return}this.observedShadowRoots=new WeakSet}};Bt.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(r){ne.critical("Error while disconnecting shadow DOM observer",r)}this.shadowObservers=[],this.observedShadowRoots=null}};var Yy=500,Ky=[Kr,Oy,pi,xy,Ry],Jy=[Fi],Xy=[is],Gu={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function Ye(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}Ye.prototype.addClick=function(e){var r=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return r||(r=e.target||e.srcElement),!r||Wy(r)?!1:(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:r,event:e,timestamp:Date.now()}),!0)};Ye.prototype.trackClick=function(e,r){if(!this.isTracking)return!1;var i=this.addClick(e);return i&&this.triggerProcessing(r),i};Ye.prototype.getDeadClicks=function(e){if(this.pendingClicks.length===0)return[];var r=e.timeout_ms,i=Date.now(),t=this.pendingClicks.slice();this.pendingClicks=[];for(var n=[],o=0;o<t.length;o++){var s=t[o];i-s.timestamp>=r?this.hasChangesAfter(s.timestamp)||n.push(s):this.pendingClicks.push(s)}return n};Ye.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100};Ye.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()};Ye.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))};Ye.prototype.processRecursively=function(e){if(!this.isTracking||!this.onDeadClickCallback){this.processingActive=!1;return}var r=e.timeout_ms,i=this;this.processingTimeout=setTimeout(function(){if(i.processingActive){for(var t=i.getDeadClicks(e),n=0;n<t.length;n++)i.onDeadClickCallback(t[n].event);i.pendingClicks.length>0?i.processRecursively(e):i.processingActive=!1}},r)};Ye.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;Ky.forEach(function(i){var t=function(){e.recordChangeEvent()};document.addEventListener(i,t,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:i,handler:t,options:{capture:!0,passive:!0}})}),Xy.forEach(function(i){var t=function(){e.recordChangeEvent()};window.addEventListener(i,t),e.eventListeners.push({target:window,event:i,handler:t})}),Jy.forEach(function(i){var t=function(){e.recordChangeEvent()};window.addEventListener(i,t,{passive:!0}),e.eventListeners.push({target:window,event:i,handler:t,options:{passive:!0}})});var r=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",r),e.eventListeners.push({target:document,event:"selectionchange",handler:r}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,Gu)}catch(i){ne.critical("Error while setting up mutation observer",i)}if(window.customElements)try{this.shadowDOMObserver=new Bt(function(){e.recordChangeEvent()},Gu),this.shadowDOMObserver.start()}catch(i){ne.critical("Error while setting up shadow DOM observer",i),this.shadowDOMObserver=null}}};Ye.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;e<this.eventListeners.length;e++){var r=this.eventListeners[e];try{r.target.removeEventListener(r.event,r.handler,r.options)}catch(i){ne.critical("Error while removing event listener",i)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(i){ne.critical("Error while disconnecting mutation observer",i)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(i){ne.critical("Error while stopping shadow DOM observer",i)}this.shadowDOMObserver=null}}};var Sf="autocapture",Zy="track_pageview",Cf="full-url",Qy="url-with-path-and-query-string",e_="url-with-path",t_="allow_element_callback",If="allow_selectors",Ef="allow_url_regexes",kf="block_attrs",Of="block_element_callback",xf="block_selectors",Rf="block_url_regexes",Af="capture_extra_attrs",Mf="capture_text_content",Tf="scroll_capture_all",Pf="scroll_depth_percent_checkpoints",vi="click",gi="dead_click",us="input",Df="pageview",mi="rage_click",cs="scroll",Ui="page_leave",ls="submit",ge={};ge[If]=[];ge[Ef]=[];ge[kf]=[];ge[Of]=null;ge[xf]=[];ge[Rf]=[];ge[Af]=[];ge[Mf]=!1;ge[Tf]=!1;ge[Pf]=[25,50,75,100];ge[vi]=!0;ge[gi]=!0;ge[us]=!0;ge[Df]=Cf;ge[mi]=!0;ge[cs]=!0;ge[Ui]=!1;ge[ls]=!0;var Jr={$mp_autocapture:!0},Nf="$mp_click",Lf="$mp_dead_click",r_="$mp_input_change",Ff="$mp_rage_click",n_="$mp_scroll",i_="$mp_submit",o_="$mp_page_leave",de=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};de.prototype.init=function(){if(!$y()){ne.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking()};de.prototype.getFullConfig=function(){var e=this.mp.get_config(Sf);return e?h.isObject(e)?h.extend({},ge,e):ge:{}};de.prototype.getConfig=function(e){return this.getFullConfig()[e]};de.prototype.currentUrlBlocked=function(){var e,r=h.info.currentUrl(),i=this.getConfig(Ef)||[];if(i.length){var t=!1;for(e=0;e<i.length;e++){var n=i[e];try{if(r.match(n)){t=!0;break}}catch(s){return ne.critical("Error while checking block URL regex: "+n,s),!0}}if(!t)return!0}var o=this.getConfig(Rf)||[];if(!o||!o.length)return!1;for(e=0;e<o.length;e++)try{if(r.match(o[e]))return!0}catch(s){return ne.critical("Error while checking block URL regex: "+o[e],s),!0}return!1};de.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(Sf)?this.getConfig(Df):this.mp.get_config(Zy)};de.prototype.trackDomEvent=function(e,r){if(!this.currentUrlBlocked()){var i=this.mp.is_recording_heatmap_data()&&(r===Nf&&!this.getConfig(vi)||r===Ff&&!this._getClickTrackingConfig(mi)||r===Lf&&!this._getClickTrackingConfig(gi)),t=Fy(e,{allowElementCallback:this.getConfig(t_),allowSelectors:this.getConfig(If),blockAttrs:this.getConfig(kf),blockElementCallback:this.getConfig(Of),blockSelectors:this.getConfig(xf),captureExtraAttrs:this.getConfig(Af),captureTextContent:this.getConfig(Mf),capturedForHeatMap:i});t&&(h.extend(t,Jr),this.mp.track(r,t))}};de.prototype.initPageListeners=function(){if(E.removeEventListener(Uu,this.listenerPopstate),E.removeEventListener(is,this.listenerHashchange),!(!this.pageviewTrackingConfig()&&!this.getConfig(Ui)&&!this.mp.get_config("record_heatmap_data"))){this.listenerPopstate=function(){E.dispatchEvent(new Event(ft))},this.listenerHashchange=function(){E.dispatchEvent(new Event(ft))},E.addEventListener(Uu,this.listenerPopstate),E.addEventListener(is,this.listenerHashchange);var e=E.history.pushState;typeof e=="function"&&(E.history.pushState=function(i,t,n){e.call(E.history,i,t,n),E.dispatchEvent(new Event(ft))});var r=E.history.replaceState;typeof r=="function"&&(E.history.replaceState=function(i,t,n){r.call(E.history,i,t,n),E.dispatchEvent(new Event(ft))})}};de.prototype._getClickTrackingConfig=function(e){var r=this.getConfig(e);return r?r===!0?{}:typeof r=="object"?r:{}:null};de.prototype._trackPageLeave=function(e,r,i){if(!this.hasTrackedScrollSession){this.hasTrackedScrollSession=!0;var t=Math.max(N.documentElement.clientHeight,E.innerHeight||0),n=Math.round(Math.max(this.maxScrollViewDepth-t,0)/(i-t)*100),o=Math.round(t/i*100);i<=t&&(n=100,o=100);var s=h.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:n,$fold_line_percentage:o,$scroll_height:i,$event_type:e.type,$current_url:r||h.info.currentUrl(),$viewportHeight:t,$viewportWidth:Math.max(N.documentElement.clientWidth,E.innerWidth||0)},Jr);this.mp.is_recording_heatmap_data()&&!this.getConfig(Ui)&&(s.$captured_for_heatmap=!0),this.mp.track(o_,s,{transport:"sendBeacon"})}};de.prototype._initScrollDepthTracking=function(){if(E.removeEventListener(Zs,this.listenerScrollDepth),E.removeEventListener(Fi,this.listenerScrollDepth),!!this.mp.get_config("record_heatmap_data")){ne.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(N.documentElement.clientHeight,E.innerHeight||0);var e=(function(){if(!this.currentUrlBlocked()){var i=Math.max(N.documentElement.clientHeight,E.innerHeight||0)+E.scrollY;i>this.maxScrollViewDepth&&(this.maxScrollViewDepth=i),this.previousScrollHeight=N.body.scrollHeight}}).bind(this),r=bf(e);this.listenerScrollDepth=r.listener,E.addEventListener(r.eventType,this.listenerScrollDepth)}};de.prototype.initClickTracking=function(){E.removeEventListener(tt,this.listenerClick),!(!this.getConfig(vi)&&!this.mp.get_config("record_heatmap_data"))&&(ne.log("Initializing click tracking"),this.listenerClick=(function(e){!this.getConfig(vi)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(e,Nf)}).bind(this),E.addEventListener(tt,this.listenerClick))};de.prototype.initDeadClickTracking=function(){var e=this._getClickTrackingConfig(gi);if(!e&&!this.mp.get_config("record_heatmap_data")){this.stopDeadClickTracking();return}ne.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Ye((function(r){this.trackDomEvent(r,Lf)}).bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=(function(r){var i=this._getClickTrackingConfig(gi);if(!(!i&&!this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var t=i||{};t.timeout_ms||(t.timeout_ms=Yy),this._deadClickTracker.trackClick(r,t)}}).bind(this),E.addEventListener(tt,this.listenerDeadClick))};de.prototype.initInputTracking=function(){E.removeEventListener(Kr,this.listenerChange),this.getConfig(us)&&(ne.log("Initializing input tracking"),this.listenerChange=(function(e){this.getConfig(us)&&this.trackDomEvent(e,r_)}).bind(this),E.addEventListener(Kr,this.listenerChange))};de.prototype.initPageviewTracking=function(){if(E.removeEventListener(ft,this.listenerLocationchange),!!this.pageviewTrackingConfig()){ne.log("Initializing pageview tracking");var e="",r=!1;this.currentUrlBlocked()||(r=this.mp.track_pageview(Jr)),r&&(e=h.info.currentUrl()),this.listenerLocationchange=Hr((function(){if(!this.currentUrlBlocked()){var i=h.info.currentUrl(),t=!1,n=i.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],o=this.pageviewTrackingConfig();if(o===Cf?t=i!==e:o===Qy?t=i.split("#")[0]!==e.split("#")[0]:o===e_&&(t=n),t){var s=this.mp.track_pageview(Jr);s&&(e=i),n&&(this.lastScrollCheckpoint=0,ne.log("Path change: re-initializing scroll depth checkpoints"))}}}).bind(this)),E.addEventListener(ft,this.listenerLocationchange)}};de.prototype.initRageClickTracking=function(){E.removeEventListener(tt,this.listenerRageClick);var e=this._getClickTrackingConfig(mi);!e&&!this.mp.get_config("record_heatmap_data")||(ne.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new wf),this.listenerRageClick=(function(r){var i=this._getClickTrackingConfig(mi);!i&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(r.pageX,r.pageY,i)&&this.trackDomEvent(r,Ff)}).bind(this),E.addEventListener(tt,this.listenerRageClick))};de.prototype.initScrollTracking=function(){if(E.removeEventListener(Fi,this.listenerScroll),E.removeEventListener(Zs,this.listenerScroll),!!this.getConfig(cs)){ne.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=(function(){if(this.getConfig(cs)&&!this.currentUrlBlocked()){var i=this.getConfig(Tf),t=(this.getConfig(Pf)||[]).slice().sort(function(l,f){return l-f}),n=E.scrollY,o=h.extend({$scroll_top:n},Jr);try{var s=N.body.scrollHeight,a=Math.round(n/(s-E.innerHeight)*100);if(o.$scroll_height=s,o.$scroll_percentage=a,a>this.lastScrollCheckpoint)for(var u=0;u<t.length;u++){var c=t[u];a>=c&&this.lastScrollCheckpoint<c&&(o.$scroll_checkpoint=c,this.lastScrollCheckpoint=c,i=!0)}}catch(l){ne.critical("Error while calculating scroll percentage",l)}i&&this.mp.track(n_,o)}}).bind(this),r=bf(e);this.listenerScroll=r.listener,E.addEventListener(r.eventType,this.listenerScroll)}};de.prototype.initSubmitTracking=function(){E.removeEventListener(pi,this.listenerSubmit),this.getConfig(ls)&&(ne.log("Initializing submit tracking"),this.listenerSubmit=(function(e){this.getConfig(ls)&&this.trackDomEvent(e,i_)}).bind(this),E.addEventListener(pi,this.listenerSubmit))};de.prototype.initPageLeaveTracking=function(){if(N.removeEventListener($u,this.listenerPageLeaveVisibilitychange),E.removeEventListener(ft,this.listenerPageLeaveLocationchange),E.removeEventListener(Fu,this.listenerPageLoad),!(!this.getConfig(Ui)&&!this.mp.get_config("record_heatmap_data"))){ne.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var e=h.info.currentUrl();this.listenerPageLoad=(function(){this.previousScrollHeight=N.body.scrollHeight}).bind(this),E.addEventListener(Fu,this.listenerPageLoad),this.listenerPageLeaveLocationchange=Hr((function(r){if(!this.currentUrlBlocked()){var i=h.info.currentUrl(),t=i!==e;t&&(this._trackPageLeave(r,e,this.previousScrollHeight),e=i,this.maxScrollViewDepth=Math.max(N.documentElement.clientHeight,E.innerHeight||0),this.previousScrollHeight=N.body.scrollHeight,this.hasTrackedScrollSession=!1)}}).bind(this)),E.addEventListener(ft,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=(function(r){N.hidden&&this._trackPageLeave(r,e,this.previousScrollHeight)}).bind(this),N.addEventListener($u,this.listenerPageLeaveVisibilitychange)}};de.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(E.removeEventListener(tt,this.listenerDeadClick),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)};cf(de);var Oe=zt("flags"),yi="flags",_i="context",fs={};fs[_i]={};var z=function(e){this.fetch=E.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc};z.prototype.init=function(){if(!this.minApisSupported()){Oe.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set};z.prototype.getFullConfig=function(){var e=this.getMpConfig(yi);return e?h.isObject(e)?h.extend({},fs,e):fs:{}};z.prototype.getConfig=function(e){return this.getFullConfig()[e]};z.prototype.isSystemEnabled=function(){return!!this.getMpConfig(yi)};z.prototype.updateContext=function(e,r){if(!this.isSystemEnabled())return Oe.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var i=this.getMpConfig(yi);h.isObject(i)||(i={});var t=r&&r.replace?{}:this.getConfig(_i);return i[_i]=h.extend({},t,e),this.setMpConfig(yi,i),this.fetchFlags()};z.prototype.areFlagsReady=function(){return this.isSystemEnabled()||Oe.error("Feature Flags not enabled"),!!this.flags};z.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this.getMpProperty("distinct_id"),r=this.getMpProperty("$device_id"),i=uy();Oe.log("Fetching flags for distinct ID: "+e);var t=h.extend({distinct_id:e,device_id:r},this.getConfig(_i)),n=new URLSearchParams;n.set("context",JSON.stringify(t)),n.set("token",this.getMpConfig("token")),n.set("mp_lib","web"),n.set("$lib_version",Le.LIB_VERSION);var o=this.getFullApiRoute()+"?"+n.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(E,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:i}}).then((function(s){return this.markFetchComplete(),s.json().then((function(a){var u=a.flags;if(!u)throw new Error("No flags in API response");var c=new Map;h.each(u,function(l,f){c.set(f,{key:l.variant_key,value:l.variant_value,experiment_id:l.experiment_id,is_experiment_active:l.is_experiment_active,is_qa_tester:l.is_qa_tester})}),this.flags=c,this._traceparent=i}).bind(this)).catch((function(a){this.markFetchComplete(),Oe.error(a)}).bind(this))}).bind(this)).catch((function(s){this.markFetchComplete(),Oe.error(s)}).bind(this)),this.fetchPromise};z.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){Oe.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null};z.prototype.getVariant=function(e,r){return this.fetchPromise?this.fetchPromise.then((function(){return this.getVariantSync(e,r)}).bind(this)).catch(function(i){return Oe.error(i),r}):new Promise(function(i){Oe.critical("Feature Flags not initialized"),i(r)})};z.prototype.getVariantSync=function(e,r){if(!this.areFlagsReady())return Oe.log("Flags not loaded yet"),r;var i=this.flags.get(e);return i?(this.trackFeatureCheck(e,i),i):(Oe.log('No flag found: "'+e+'"'),r)};z.prototype.getVariantValue=function(e,r){return this.getVariant(e,{value:r}).then(function(i){return i.value}).catch(function(i){return Oe.error(i),r})};z.prototype.getFeatureData=function(e,r){return Oe.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,r)};z.prototype.getVariantValueSync=function(e,r){return this.getVariantSync(e,{value:r}).value};z.prototype.isEnabled=function(e,r){return this.getVariantValue(e).then((function(){return this.isEnabledSync(e,r)}).bind(this)).catch(function(i){return Oe.error(i),r})};z.prototype.isEnabledSync=function(e,r){r=r||!1;var i=this.getVariantValueSync(e,r);return i!==!0&&i!==!1&&(Oe.error('Feature flag "'+e+'" value: '+i+" is not a boolean; returning fallback value: "+r),i=r),i};z.prototype.trackFeatureCheck=function(e,r){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var i={"Experiment name":e,"Variant name":r.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};r.experiment_id!=="undefined"&&(i.$experiment_id=r.experiment_id),r.is_experiment_active!=="undefined"&&(i.$is_experiment_active=r.is_experiment_active),r.is_qa_tester!=="undefined"&&(i.$is_qa_tester=r.is_qa_tester),this.track("$experiment_started",i)}};z.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"};cf(z);z.prototype.are_flags_ready=z.prototype.areFlagsReady;z.prototype.get_variant=z.prototype.getVariant;z.prototype.get_variant_sync=z.prototype.getVariantSync;z.prototype.get_variant_value=z.prototype.getVariantValue;z.prototype.get_variant_value_sync=z.prototype.getVariantValueSync;z.prototype.is_enabled=z.prototype.isEnabled;z.prototype.is_enabled_sync=z.prototype.isEnabledSync;z.prototype.update_context=z.prototype.updateContext;z.prototype.get_feature_data=z.prototype.getFeatureData;var it=function(){};it.prototype.create_properties=function(){};it.prototype.event_handler=function(){};it.prototype.after_track_handler=function(){};it.prototype.init=function(e){return this.mp=e,this};it.prototype.track=function(e,r,i,t){var n=this,o=h.dom_query(e);if(o.length===0){j.error("The DOM query ("+e+") returned 0 elements");return}return h.each(o,function(s){h.register_event(s,this.override_event,function(a){var u={},c=n.create_properties(i,this),l=n.mp.get_config("track_links_timeout");n.event_handler(a,this,u),window.setTimeout(n.track_callback(t,c,u,!0),l),n.mp.track(r,c,n.track_callback(t,c,u))})},this),!0};it.prototype.track_callback=function(e,r,i,t){t=t||!1;var n=this;return function(){i.callback_fired||(i.callback_fired=!0,!(e&&e(t,r)===!1)&&n.after_track_handler(r,i,t))}};it.prototype.create_properties=function(e,r){var i;return typeof e=="function"?i=e(r):i=h.extend({},e),i};var fr=function(){this.override_event="click"};h.inherit(fr,it);fr.prototype.create_properties=function(e,r){var i=fr.superclass.create_properties.apply(this,arguments);return r.href&&(i.url=r.href),i};fr.prototype.event_handler=function(e,r,i){i.new_tab=e.which===2||e.metaKey||e.ctrlKey||r.target==="_blank",i.href=r.href,i.new_tab||e.preventDefault()};fr.prototype.after_track_handler=function(e,r){r.new_tab||setTimeout(function(){window.location=r.href},0)};var $i=function(){this.override_event="submit"};h.inherit($i,it);$i.prototype.event_handler=function(e,r,i){i.element=r,e.preventDefault()};$i.prototype.after_track_handler=function(e,r){setTimeout(function(){r.element.submit()},0)};var dt="$set",hr="$set_once",$e="$unset",Nt="$add",je="$append",Lt="$union",Ze="$remove",s_="$delete",Uf={set_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[dt]=t,i},unset_action:function(e){var r={},i=[];return h.isArray(e)||(e=[e]),h.each(e,function(t){this._is_reserved_property(t)||i.push(t)},this),r[$e]=i,r},set_once_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[hr]=t,i},union_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=h.isArray(n)?n:[n])},this):t[e]=h.isArray(r)?r:[r],i[Lt]=t,i},append_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[je]=t,i},remove_action:function(e,r){var i={},t={};return h.isObject(e)?h.each(e,function(n,o){this._is_reserved_property(o)||(t[o]=n)},this):t[e]=r,i[Ze]=t,i},delete_action:function(){var e={};return e[s_]="",e}},se=function(){};h.extend(se.prototype,Uf);se.prototype._init=function(e,r,i){this._mixpanel=e,this._group_key=r,this._group_id=i};se.prototype.set=pr(function(e,r,i){var t=this.set_action(e,r);return h.isObject(e)&&(i=r),this._send_request(t,i)});se.prototype.set_once=pr(function(e,r,i){var t=this.set_once_action(e,r);return h.isObject(e)&&(i=r),this._send_request(t,i)});se.prototype.unset=pr(function(e,r){var i=this.unset_action(e);return this._send_request(i,r)});se.prototype.union=pr(function(e,r,i){h.isObject(e)&&(i=r);var t=this.union_action(e,r);return this._send_request(t,i)});se.prototype.delete=pr(function(e){var r=this.delete_action();return this._send_request(r,e)});se.prototype.remove=pr(function(e,r,i){var t=this.remove_action(e,r);return this._send_request(t,i)});se.prototype._send_request=function(e,r){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var i=h.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},r)};se.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};se.prototype._get_config=function(e){return this._mixpanel.get_config(e)};se.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};se.prototype.remove=se.prototype.remove;se.prototype.set=se.prototype.set;se.prototype.set_once=se.prototype.set_once;se.prototype.union=se.prototype.union;se.prototype.unset=se.prototype.unset;se.prototype.toString=se.prototype.toString;var L=function(){};h.extend(L.prototype,Uf);L.prototype._init=function(e){this._mixpanel=e};L.prototype.set=St(function(e,r,i){var t=this.set_action(e,r);return h.isObject(e)&&(i=r),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),t[dt]=h.extend({},h.info.people_properties(),t[dt]),this._send_request(t,i)});L.prototype.set_once=St(function(e,r,i){var t=this.set_once_action(e,r);return h.isObject(e)&&(i=r),this._send_request(t,i)});L.prototype.unset=St(function(e,r){var i=this.unset_action(e);return this._send_request(i,r)});L.prototype.increment=St(function(e,r,i){var t={},n={};return h.isObject(e)?(h.each(e,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){j.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else n[s]=o},this),i=r):(h.isUndefined(r)&&(r=1),n[e]=r),t[Nt]=n,this._send_request(t,i)});L.prototype.append=St(function(e,r,i){h.isObject(e)&&(i=r);var t=this.append_action(e,r);return this._send_request(t,i)});L.prototype.remove=St(function(e,r,i){h.isObject(e)&&(i=r);var t=this.remove_action(e,r);return this._send_request(t,i)});L.prototype.union=St(function(e,r,i){h.isObject(e)&&(i=r);var t=this.union_action(e,r);return this._send_request(t,i)});L.prototype.track_charge=St(function(){j.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});L.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};L.prototype.delete_user=function(){if(!this._identify_called()){j.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};L.prototype.toString=function(){return this._mixpanel.toString()+".people"};L.prototype._send_request=function(e,r){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),t=this._mixpanel.get_property("$user_id"),n=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(e.$device_id=i),t&&(e.$user_id=t),n&&(e.$had_persisted_distinct_id=n);var o=h.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},r):(this._enqueue(e),h.isUndefined(r)||(this._get_config("verbose")?r({status:-1,error:null}):r(-1)),h.truncate(o,255))};L.prototype._get_config=function(e){return this._mixpanel.get_config(e)};L.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};L.prototype._enqueue=function(e){dt in e?this._mixpanel.persistence._add_to_people_queue(dt,e):hr in e?this._mixpanel.persistence._add_to_people_queue(hr,e):$e in e?this._mixpanel.persistence._add_to_people_queue($e,e):Nt in e?this._mixpanel.persistence._add_to_people_queue(Nt,e):je in e?this._mixpanel.persistence._add_to_people_queue(je,e):Ze in e?this._mixpanel.persistence._add_to_people_queue(Ze,e):Lt in e?this._mixpanel.persistence._add_to_people_queue(Lt,e):j.error("Invalid call to _enqueue():",e)};L.prototype._flush_one_queue=function(e,r,i,t){var n=this,o=h.extend({},this._mixpanel.persistence.load_queue(e)),s=o;!h.isUndefined(o)&&h.isObject(o)&&!h.isEmptyObject(o)&&(n._mixpanel.persistence._pop_from_people_queue(e,o),n._mixpanel.persistence.save(),t&&(s=t(o)),r.call(n,s,function(a,u){a===0&&n._mixpanel.persistence._add_to_people_queue(e,o),h.isUndefined(i)||i(a,u)}))};L.prototype._flush=function(e,r,i,t,n,o,s){var a=this;this._flush_one_queue(dt,this.set,e),this._flush_one_queue(hr,this.set_once,t),this._flush_one_queue($e,this.unset,o,function(v){return h.keys(v)}),this._flush_one_queue(Nt,this.increment,r),this._flush_one_queue(Lt,this.union,n);var u=this._mixpanel.persistence.load_queue(je);if(!h.isUndefined(u)&&h.isArray(u)&&u.length)for(var c,l=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(je,c),h.isUndefined(i)||i(v,y)},f=u.length-1;f>=0;f--)u=this._mixpanel.persistence.load_queue(je),c=u.pop(),a._mixpanel.persistence.save(),h.isEmptyObject(c)||a.append(c,l);var p=this._mixpanel.persistence.load_queue(Ze);if(!h.isUndefined(p)&&h.isArray(p)&&p.length)for(var g,d=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(Ze,g),h.isUndefined(s)||s(v,y)},_=p.length-1;_>=0;_--)p=this._mixpanel.persistence.load_queue(Ze),g=p.pop(),a._mixpanel.persistence.save(),h.isEmptyObject(g)||a.remove(g,d)};L.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};L.prototype.set=L.prototype.set;L.prototype.set_once=L.prototype.set_once;L.prototype.unset=L.prototype.unset;L.prototype.increment=L.prototype.increment;L.prototype.append=L.prototype.append;L.prototype.remove=L.prototype.remove;L.prototype.union=L.prototype.union;L.prototype.track_charge=L.prototype.track_charge;L.prototype.clear_charges=L.prototype.clear_charges;L.prototype.delete_user=L.prototype.delete_user;L.prototype.toString=L.prototype.toString;var ea="__mps",ta="__mpso",ra="__mpus",na="__mpa",ia="__mpap",oa="__mpr",sa="__mpu",$f="$people_distinct_id",bi="__alias",Xr="__timers",a_=[ea,ta,ra,na,ia,oa,sa,$f,bi,Xr],U=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var r=e.persistence;r!=="cookie"&&r!=="localStorage"&&(j.critical("Unknown persistence type "+r+"; falling back to cookie"),r=e.persistence="cookie"),r==="localStorage"&&h.localStorage.is_supported()?this.storage=h.localStorage:this.storage=h.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};U.prototype.properties=function(){var e={};return this.load(),h.each(this.props,function(r,i){h.include(a_,i)||(e[i]=r)}),e};U.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=h.extend({},e))}};U.prototype.upgrade=function(){var e,r;this.storage===h.localStorage?(e=h.cookie.parse(this.name),h.cookie.remove(this.name),h.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===h.cookie&&(r=h.localStorage.parse(this.name),h.localStorage.remove(this.name),r&&this.register_once(r))};U.prototype.save=function(){this.disabled||this.storage.set(this.name,lr(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};U.prototype.load_prop=function(e){return this.load(),this.props[e]};U.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};U.prototype.clear=function(){this.remove(),this.props={}};U.prototype.register_once=function(e,r,i){return h.isObject(e)?(typeof r>"u"&&(r="None"),this.expire_days=typeof i>"u"?this.default_expiry:i,this.load(),h.each(e,function(t,n){(!this.props.hasOwnProperty(n)||this.props[n]===r)&&(this.props[n]=t)},this),this.save(),!0):!1};U.prototype.register=function(e,r){return h.isObject(e)?(this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),h.extend(this.props,e),this.save(),!0):!1};U.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};U.prototype.update_search_keyword=function(e){this.register(h.info.searchInfo(e))};U.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:h.info.referringDomain(e)||"$direct"},"")};U.prototype.get_referrer_info=function(){return h.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};U.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};U.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};U.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};U.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};U.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};U.prototype.get_cross_subdomain=function(){return this.cross_subdomain};U.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};U.prototype._add_to_people_queue=function(e,r){var i=this._get_queue_key(e),t=r[e],n=this._get_or_create_queue(dt),o=this._get_or_create_queue(hr),s=this._get_or_create_queue($e),a=this._get_or_create_queue(Nt),u=this._get_or_create_queue(Lt),c=this._get_or_create_queue(Ze,[]),l=this._get_or_create_queue(je,[]);i===ea?(h.extend(n,t),this._pop_from_people_queue(Nt,t),this._pop_from_people_queue(Lt,t),this._pop_from_people_queue($e,t)):i===ta?(h.each(t,function(f,p){p in o||(o[p]=f)}),this._pop_from_people_queue($e,t)):i===ra?h.each(t,function(f){h.each([n,o,a,u],function(p){f in p&&delete p[f]}),h.each(l,function(p){f in p&&delete p[f]}),s[f]=!0}):i===na?(h.each(t,function(f,p){p in n?n[p]+=f:(p in a||(a[p]=0),a[p]+=f)},this),this._pop_from_people_queue($e,t)):i===sa?(h.each(t,function(f,p){h.isArray(f)&&(p in u||(u[p]=[]),h.each(f,function(g){h.include(u[p],g)||u[p].push(g)}))}),this._pop_from_people_queue($e,t)):i===oa?(c.push(t),this._pop_from_people_queue(je,t)):i===ia&&(l.push(t),this._pop_from_people_queue($e,t)),j.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),j.log(r),this.save()};U.prototype._pop_from_people_queue=function(e,r){var i=this.props[this._get_queue_key(e)];h.isUndefined(i)||h.each(r,function(t,n){e===je||e===Ze?h.each(i,function(o){o[n]===t&&delete o[n]}):delete i[n]},this)};U.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};U.prototype._get_queue_key=function(e){if(e===dt)return ea;if(e===hr)return ta;if(e===$e)return ra;if(e===Nt)return na;if(e===je)return ia;if(e===Ze)return oa;if(e===Lt)return sa;j.error("Invalid queue:",e)};U.prototype._get_or_create_queue=function(e,r){var i=this._get_queue_key(e);return r=h.isUndefined(r)?{}:r,this.props[i]||(this.props[i]=r)};U.prototype.set_event_timer=function(e,r){var i=this.load_prop(Xr)||{};i[e]=r,this.props[Xr]=i,this.save()};U.prototype.remove_event_timer=function(e){var r=this.load_prop(Xr)||{},i=r[e];return h.isUndefined(i)||(delete this.props[Xr][e],this.save()),i};var aa,zf=function(e,r){throw new Error(e+" not available in this build.")},we,Bf=0,u_=1,c_=function(e){return e},Ne="mixpanel",qf="base64",l_="json",ua="$device:",tr=E.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Vf=!tr&&Xe.indexOf("MSIE")===-1&&Xe.indexOf("Mozilla")===-1,wi=null;lt.sendBeacon&&(wi=function(){return lt.sendBeacon.apply(lt,arguments)});var Wf={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},ju={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Wf,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:qf,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:ht,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:ht,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!1,record_idle_timeout_ms:30*60*1e3,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:Ar,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Gf=!1,w=function(){},hs=function(e,r,i){var t,n=i===Ne?we:we[i];if(n&&aa===Bf)t=n;else{if(n&&!h.isArray(n)){j.error("You have already initialized "+i);return}t=new w}if(t._cached_groups={},t._init(e,r,i),t.people=new L,t.people._init(t),!t.get_config("skip_first_touch_marketing")){var o=h.info.campaignParams(null),s={},a=!1;h.each(o,function(u,c){s["initial_"+c]=u,u&&(a=!0)}),a&&t.people.set_once(s)}return Le.DEBUG=Le.DEBUG||t.get_config("debug"),!h.isUndefined(n)&&h.isArray(n)&&(t._execute_array.call(t.people,n.people),t._execute_array(n)),t};w.prototype.init=function(e,r,i){if(h.isUndefined(i)){this.report_error("You must name your new library: init(token, config, name)");return}if(i===Ne){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var t=hs(e,r,i);return we[i]=t,t._loaded(),t};w.prototype._init=function(e,r,i){r=r||{},this.__loaded=!0,this.config={};var t={};if(!("api_payload_format"in r)){var n=r.api_host||ju.api_host;n.match(/\.mixpanel\.com/)&&(t.api_payload_format=l_)}if(this.set_config(h.extend({},ju,t,r,{name:i,token:e,callback_fn:(i===Ne?i:Ne+"."+i)+"._jsc"})),this._jsc=ht,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!h.localStorage.is_supported(!0)||!tr)this._batch_requests=!1,j.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),h.each(this.get_batcher_configs(),function(a){j.log("Clearing batch queue "+a.queue_key),h.localStorage.remove(a.queue_key)});else if(this.init_batchers(),wi&&E.addEventListener){var o=h.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);E.addEventListener("pagehide",function(a){a.persisted&&o()}),E.addEventListener("visibilitychange",function(){N.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new U(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=h.UUID();this.get_distinct_id()||this.register_once({distinct_id:ua+s,$device_id:s},""),this.flags=new z({getFullApiRoute:h.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:h.bind(this.get_config,this),setConfigFunc:h.bind(this.set_config,this),getPropertyFunc:h.bind(this.get_property,this),trackingFunc:h.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new de(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()};w.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))j.log("Tab ID initialization skipped due to disable_persistence config");else if(h.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),r="mp_tab_id_"+e,i="mp_gen_new_tab_id_"+e;(h.sessionStorage.get(i)||!h.sessionStorage.get(r))&&h.sessionStorage.set(r,"$tab-"+h.UUID()),h.sessionStorage.set(i,"1"),this.tab_id=h.sessionStorage.get(r),E.addEventListener("beforeunload",function(){h.sessionStorage.remove(i)})}catch(t){this.report_error("Error initializing tab id",t)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")};w.prototype.get_tab_id=function(){return this.tab_id||null};w.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return j.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new Be(Hs),r=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(i){for(var t=0;t<i.length;t++)if(Xs(i[t])||i[t].tabId===r)return!0;return!1}).catch(h.bind(function(i){this.report_error("Error checking recording registry",i)},this))};w.prototype._check_and_start_session_recording=wt(function(e){if(!E.MutationObserver){j.critical("Browser does not support MutationObserver; skipping session recording");return}var r=h.bind(function(t){var n=h.bind(function(){this._recorder=this._recorder||new E.__mp_recorder(this),this._recorder.resumeRecording(t)},this);h.isUndefined(E.__mp_recorder)?zf(this.get_config("recorder_src"),n):n()},this),i=this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent");e||i?r(!0):this._should_load_recorder().then(function(t){t&&r(!1)})});w.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)};w.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()};w.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()};w.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()};w.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")};w.prototype.get_session_recording_properties=function(){var e={},r=this._get_session_replay_id();return r&&(e.$mp_replay_id=r),e};w.prototype.get_session_replay_url=function(){var e=null,r=this._get_session_replay_id();if(r){var i=h.HTTPBuildQuery({replay_id:r,distinct_id:this.get_distinct_id(),token:this.get_config("token")});e="https://mixpanel.com/projects/replay-redirect?"+i}return e};w.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null};w.prototype.__get_recorder=function(){return this._recorder};w.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=h.info.campaignParams(null);h.each(e,(function(r,i){this.unregister(i)}).bind(this))}};w.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(N.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(h.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(N.referrer)};w.prototype._dom_loaded=function(){h.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||h.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};w.prototype._track_dom=function(e,r){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Gf)return this.__dom_loaded_queue.push([e,r]),!1;var i=new e().init(this);return i.track.apply(i,r)};w.prototype._prepare_callback=function(e,r){if(h.isUndefined(e))return null;if(tr){var i=function(s){e(s,r)};return i}else{var t=this._jsc,n=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+n+"]";return t[n]=function(s){delete t[n],e(s,r)},o}};w.prototype._send_request=function(e,r,i,t){var n=!0;if(Vf)return this.__request_queue.push(arguments),n;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!t&&(h.isFunction(i)||typeof i=="string")&&(t=i,i=null),i=h.extend(o,i||{}),tr||(i.method="GET");var a=i.method==="POST",u=wi&&a&&i.transport.toLowerCase()==="sendbeacon",c=i.verbose;r.verbose&&(c=!0),this.get_config("test")&&(r.test=1),c&&(r.verbose=1),this.get_config("img")&&(r.img=1),tr||(t?r.callback=t:(c||this.get_config("test"))&&(r.callback="(function(){})")),r.ip=this.get_config("ip")?1:0,r._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(r.data),delete r.data),h.extend(r,this.get_config("api_extra_query_params")),e+="?"+h.HTTPBuildQuery(r);var l=this;if("img"in r){var f=N.createElement("img");f.src=e,N.body.appendChild(f)}else if(u){try{n=wi(e,s)}catch(y){l.report_error(y),n=!1}try{t&&t(n?1:0)}catch(y){l.report_error(y)}}else if(tr)try{var p=new XMLHttpRequest;p.open(i.method,e,!0);var g=this.get_config("xhr_headers");if(a&&(g["Content-Type"]="application/x-www-form-urlencoded"),h.each(g,function(y,b){p.setRequestHeader(b,y)}),i.timeout_ms&&typeof p.timeout<"u"){p.timeout=i.timeout_ms;var d=new Date().getTime()}p.withCredentials=!0,p.onreadystatechange=function(){if(p.readyState===4)if(p.status===200){if(t)if(c){var y;try{y=h.JSONDecode(p.responseText)}catch(C){if(l.report_error(C),i.ignore_json_errors)y=p.responseText;else return}t(y)}else t(Number(p.responseText))}else{var b;if(p.timeout&&!p.status&&new Date().getTime()-d>=p.timeout?b="timeout":b="Bad HTTP status: "+p.status+" "+p.statusText,l.report_error(b),t)if(c){var S=p.responseHeaders||{};t({status:0,httpStatusCode:p.status,error:b,retryAfter:S["Retry-After"]})}else t(0)}},p.send(s)}catch(y){l.report_error(y),n=!1}else{var _=N.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var v=N.getElementsByTagName("script")[0];v.parentNode.insertBefore(_,v)}return n};w.prototype._execute_array=function(e){var r,i=[],t=[],n=[];h.each(e,function(s){s&&(r=s[0],h.isArray(r)?n.push(s):typeof s=="function"?s.call(this):h.isArray(s)&&r==="alias"?i.push(s):h.isArray(s)&&r.indexOf("track")!==-1&&typeof this[r]=="function"?n.push(s):t.push(s))},this);var o=function(s,a){h.each(s,function(u){if(h.isArray(u[0])){var c=a;h.each(u,function(l){c=c[l[0]].apply(c,l.slice(1))})}else this[u[0]].apply(this,u.slice(1))},a)};o(i,this),o(t,this),o(n,this)};w.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};w.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs};w.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=h.bind(function(i){return new Fe(i.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:h.bind(function(t,n,o){var s=this.get_config("api_routes");this._send_request(this.get_api_host(i.api_name)+"/"+s[i.api_name],this._encode_data_for_request(t),n,this._prepare_callback(o,t))},this),beforeSendHook:h.bind(function(t){return this._run_hook("before_send_"+i.type,t)},this),stopAllBatchingFunc:h.bind(this.stop_batch_senders,this),usePersistence:!0})},this),r=this.get_batcher_configs();this.request_batchers={events:e(r.events),people:e(r.people),groups:e(r.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};w.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,h.each(this.request_batchers,function(e){e.start()}))};w.prototype.stop_batch_senders=function(){this._batch_requests=!1,h.each(this.request_batchers,function(e){e.stop(),e.clear()})};w.prototype.push=function(e){this._execute_array([e])};w.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};w.prototype._encode_data_for_request=function(e){var r=lr(e);return this.get_config("api_payload_format")===qf&&(r=h.base64Encode(r)),{data:r}};w.prototype._track_or_batch=function(e,r){var i=h.truncate(e.data,255),t=e.endpoint,n=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};r=r||ht;var a=!0,u=h.bind(function(){return s.skip_hooks||(i=this._run_hook("before_send_"+e.type,i)),i?(j.log("MIXPANEL REQUEST:"),j.log(i),this._send_request(t,this._encode_data_for_request(i),s,this._prepare_callback(r,i))):null},this);return this._batch_requests&&!o?n.enqueue(i).then(function(c){c?r(1,i):u()}):a=u(),a&&i};w.prototype.track=wt(function(e,r,i,t){!t&&typeof i=="function"&&(t=i,i=null),i=i||{};var n=i.transport;n&&(i.transport=n);var o=i.send_immediately;if(typeof t!="function"&&(t=ht),h.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){t(0);return}r=h.extend({},r),r.token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!h.isUndefined(s)){var a=new Date().getTime()-s;r.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var u=this.get_config("track_marketing")?h.info.marketingParams():{};r=h.extend({},h.info.properties({mp_loader:this.get_config("mp_loader")}),u,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),r);var c=this.get_config("property_blacklist");h.isArray(c)?h.each(c,function(p){delete r[p]}):this.report_error("Invalid value for property_blacklist config: "+c);var l={event:e,properties:r},f=this._track_or_batch({type:"events",data:l,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:i},t);return f});w.prototype.set_group=wt(function(e,r,i){h.isArray(r)||(r=[r]);var t={};return t[e]=r,this.register(t),this.people.set(e,r,i)});w.prototype.add_group=wt(function(e,r,i){var t=this.get_property(e),n={};return t===void 0?(n[e]=[r],this.register(n)):t.indexOf(r)===-1&&(t.push(r),n[e]=t,this.register(n)),this.people.union(e,r,i)});w.prototype.remove_group=wt(function(e,r,i){var t=this.get_property(e);if(t!==void 0){var n=t.indexOf(r);n>-1&&(t.splice(n,1),this.register({group_key:t})),t.length===0&&this.unregister(e)}return this.people.remove(e,r,i)});w.prototype.track_with_groups=wt(function(e,r,i,t){var n=h.extend({},r||{});return h.each(i,function(o,s){o!=null&&(n[s]=o)}),this.track(e,n,t)});w.prototype._create_map_key=function(e,r){return e+"_"+JSON.stringify(r)};w.prototype._remove_group_from_cache=function(e,r){delete this._cached_groups[this._create_map_key(e,r)]};w.prototype.get_group=function(e,r){var i=this._create_map_key(e,r),t=this._cached_groups[i];return(t===void 0||t._group_key!==e||t._group_id!==r)&&(t=new se,t._init(this,e,r),this._cached_groups[i]=t),t};w.prototype.track_pageview=wt(function(e,r){typeof e!="object"&&(e={}),r=r||{};var i=r.event_name||"$mp_web_page_view",t=h.extend(h.info.mpPageViewProperties(),h.info.campaignParams(),h.info.clickParams()),n=h.extend({},t,e);return this.track(i,n)});w.prototype.track_links=function(){return this._track_dom.call(this,fr,arguments)};w.prototype.track_forms=function(){return this._track_dom.call(this,$i,arguments)};w.prototype.time_event=function(e){if(h.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var f_={persistent:!0},ca=function(e){var r;return h.isObject(e)?r=e:h.isUndefined(e)?r={}:r={days:e},h.extend({},f_,r)};w.prototype.register=function(e,r){var i=ca(r);i.persistent?this.persistence.register(e,i.days):h.extend(this.unpersisted_superprops,e)};w.prototype.register_once=function(e,r,i){var t=ca(i);t.persistent?this.persistence.register_once(e,r,t.days):(typeof r>"u"&&(r="None"),h.each(e,function(n,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===r)&&(this.unpersisted_superprops[o]=n)},this))};w.prototype.unregister=function(e,r){r=ca(r),r.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};w.prototype._register_single=function(e,r){var i={};i[e]=r,this.register(i)};w.prototype.identify=function(e,r,i,t,n,o,s,a){var u=this.get_distinct_id();if(e&&u!==e){if(typeof e=="string"&&e.indexOf(ua)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var c=u;this.register_once({$had_persisted_distinct_id:!0,$device_id:c},"")}e!==u&&e!==this.get_property(bi)&&(this.unregister(bi),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(r,i,t,n,o,s,a),e!==u&&this.track("$identify",{distinct_id:e,$anon_distinct_id:u},{skip_hooks:!0}),e!==u&&this.flags.fetchFlags()};w.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=h.UUID();this.register_once({distinct_id:ua+e,$device_id:e},""),this._check_and_start_session_recording()};w.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};w.prototype.alias=function(e,r){if(e===this.get_property($f))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var i=this;return h.isUndefined(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(bi,e),this.track("$create_alias",{alias:e,distinct_id:r},{skip_hooks:!0},function(){i.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};w.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};w.prototype.set_config=function(e){if(h.isObject(e)){h.extend(this.config,e);var r=e.batch_size;r&&h.each(this.request_batchers,function(i){i.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Le.DEBUG=Le.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init()}};w.prototype.get_config=function(e){return this.config[e]};w.prototype._run_hook=function(e){var r=(this.config.hooks[e]||c_).apply(this,ct.call(arguments,1));return typeof r>"u"&&(this.report_error(e+" hook did not return a value"),r=null),r};w.prototype.get_property=function(e){return this.persistence.load_prop([e])};w.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")};w.prototype.toString=function(){var e=this.get_config("name");return e!==Ne&&(e=Ne+"."+e),e};w.prototype._event_is_disabled=function(e){return h.isBlockedUA(Xe)||this._flags.disable_all_events||h.include(this.__disabled_events,e)};w.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&h.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||h.cookie.get("mp_optout"))&&(h.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};w.prototype._gdpr_update_persistence=function(e){var r;if(e&&e.clear_persistence)r=!0;else if(e&&e.enable_persistence)r=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==r&&this.persistence.set_disabled(r),r?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()};w.prototype._gdpr_call_func=function(e,r){return r=h.extend({track:h.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},r),h.localStorage.is_supported()||(r.persistence_type="cookie"),e(this.get_config("token"),{track:r.track,trackEventName:r.track_event_name,trackProperties:r.track_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieDomain:r.cookie_domain,cookieExpiration:r.cookie_expiration,crossSiteCookie:r.cross_site_cookie,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie,ignoreDnt:r.ignore_dnt})};w.prototype.opt_in_tracking=function(e){e=h.extend({enable_persistence:!0},e),this._gdpr_call_func(gy,e),this._gdpr_update_persistence(e)};w.prototype.opt_out_tracking=function(e){e=h.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(my,e),this._gdpr_update_persistence(e)};w.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(yy,e)};w.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(pf,e)};w.prototype.clear_opt_in_out_tracking=function(e){e=h.extend({enable_persistence:!0},e),this._gdpr_call_func(_y,e),this._gdpr_update_persistence(e)};w.prototype.report_error=function(e,r){j.error.apply(j.error,arguments);try{!r&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,r)}catch(i){j.error(i)}};w.prototype.init=w.prototype.init;w.prototype.reset=w.prototype.reset;w.prototype.disable=w.prototype.disable;w.prototype.time_event=w.prototype.time_event;w.prototype.track=w.prototype.track;w.prototype.track_links=w.prototype.track_links;w.prototype.track_forms=w.prototype.track_forms;w.prototype.track_pageview=w.prototype.track_pageview;w.prototype.register=w.prototype.register;w.prototype.register_once=w.prototype.register_once;w.prototype.unregister=w.prototype.unregister;w.prototype.identify=w.prototype.identify;w.prototype.alias=w.prototype.alias;w.prototype.name_tag=w.prototype.name_tag;w.prototype.set_config=w.prototype.set_config;w.prototype.get_config=w.prototype.get_config;w.prototype.get_api_host=w.prototype.get_api_host;w.prototype.get_property=w.prototype.get_property;w.prototype.get_distinct_id=w.prototype.get_distinct_id;w.prototype.toString=w.prototype.toString;w.prototype.opt_out_tracking=w.prototype.opt_out_tracking;w.prototype.opt_in_tracking=w.prototype.opt_in_tracking;w.prototype.has_opted_out_tracking=w.prototype.has_opted_out_tracking;w.prototype.has_opted_in_tracking=w.prototype.has_opted_in_tracking;w.prototype.clear_opt_in_out_tracking=w.prototype.clear_opt_in_out_tracking;w.prototype.get_group=w.prototype.get_group;w.prototype.set_group=w.prototype.set_group;w.prototype.add_group=w.prototype.add_group;w.prototype.remove_group=w.prototype.remove_group;w.prototype.track_with_groups=w.prototype.track_with_groups;w.prototype.start_batch_senders=w.prototype.start_batch_senders;w.prototype.stop_batch_senders=w.prototype.stop_batch_senders;w.prototype.start_session_recording=w.prototype.start_session_recording;w.prototype.stop_session_recording=w.prototype.stop_session_recording;w.prototype.pause_session_recording=w.prototype.pause_session_recording;w.prototype.resume_session_recording=w.prototype.resume_session_recording;w.prototype.get_session_recording_properties=w.prototype.get_session_recording_properties;w.prototype.get_session_replay_url=w.prototype.get_session_replay_url;w.prototype.get_tab_id=w.prototype.get_tab_id;w.prototype.DEFAULT_API_ROUTES=Wf;w.prototype.__get_recorder=w.prototype.__get_recorder;U.prototype.properties=U.prototype.properties;U.prototype.update_search_keyword=U.prototype.update_search_keyword;U.prototype.update_referrer_info=U.prototype.update_referrer_info;U.prototype.get_cross_subdomain=U.prototype.get_cross_subdomain;U.prototype.clear=U.prototype.clear;var Zt={},h_=function(){h.each(Zt,function(e,r){r!==Ne&&(we[r]=e)}),we._=h},p_=function(){we.init=function(e,r,i){if(i)return we[i]||(we[i]=Zt[i]=hs(e,r,i),we[i]._loaded()),we[i];var t=we;Zt[Ne]?t=Zt[Ne]:e&&(t=hs(e,r,Ne),t._loaded(),Zt[Ne]=t),we=t,aa===u_&&(E[Ne]=we),h_()}},d_=function(){function e(){e.done||(e.done=!0,Gf=!0,Vf=!1,h.each(Zt,function(t){t._dom_loaded()}))}function r(){try{N.documentElement.doScroll("left")}catch{setTimeout(r,1);return}e()}if(N.addEventListener)N.readyState==="complete"?e():N.addEventListener("DOMContentLoaded",e,!1);else if(N.attachEvent){N.attachEvent("onreadystatechange",e);var i=!1;try{i=E.frameElement===null}catch{}N.documentElement.doScroll&&i&&r()}h.register_event(E,"load",e,!0)};function v_(e){return zf=e,aa=Bf,we=new w,p_(),we.init(),d_(),we}function g_(e,r){r()}var mo=v_(g_);const jf=jn.createContext(null),m_=new Set(["","$VITE_MIXPANEL_TOKEN","inresi.mixpanel.token"]),y_=e=>{if(typeof e!="string")return null;const r=e.trim().replace(/^"(.*)"$/,"$1").trim();return r&&!m_.has(r)?r:null},__=({children:e,token:r,envMode:i})=>{console.log(r);const t=y_(r);console.log(t);const n=jn.useRef(null);return jn.useEffect(()=>{const o=(i??"production").toLowerCase(),s=o==="development"||o==="staging",a=o==="development",u="Mixpanel token not set. Pass a token prop to MixpanelProvider or define VITE_MIXPANEL_TOKEN.";if(!t){s?console.error(`❌ ${u}`):console.warn(`⚠️ ${u}`);return}n.current!==t&&(mo.init(t,{debug:a,persistence:"localStorage"}),n.current=t,(async()=>{try{const c=await lc;mo.identify(c)}catch(c){console.error("❌ Failed to set Mixpanel identity:",c)}})())},[i,t]),lh.jsx(jf.Provider,{value:mo,children:e})},Hf=()=>{const e=jn.useContext(jf);if(!e)throw new Error("useMixpanel must be used within MixpanelProvider");return e},b_=["location","budget","size","other"],la=["cost_low_to_high","cost_high_to_low","newest","relevance"],Yf=e=>e==null?[]:(Array.isArray(e)?e:[e]).flatMap(i=>{if(i==null)return[];if(Array.isArray(i))return i;if(typeof i=="object"&&i!==null&&"value"in i){const t=i.value;return Array.isArray(t)?t:[t]}return[i]}).filter(i=>i!=null).map(i=>String(i)),nn=m.z.object({property_id:m.z.string().min(1,"property_id is required"),property_slug:m.z.string().min(1,"property_slug is required")}),vr=nn.extend({property_name:m.z.string().min(1,"property_name is required")}),w_=vr.extend({total_units_available:m.z.number().int().nonnegative(),results_unit_count:m.z.number().int().nonnegative(),unit_count_date:m.z.string().optional()}),S_=vr.extend({total_units_available:m.z.number().int().nonnegative(),results_unit_count:m.z.number().int().nonnegative(),unit_count_date:m.z.string().optional()}),ps=nn.extend({question_index:m.z.number().int().nonnegative(),question_ENUM:m.z.string().min(1,"question_ENUM is required")}),C_=ps.extend({selected_answers_ENUM_Array:m.z.any().transform(e=>Yf(e)).refine(e=>Array.isArray(e),{message:"selected_answers_ENUM_Array must resolve to an array"})});nn.extend({unit_id:m.z.string().min(1,"unit_id is required"),unit_title:m.z.string().min(1,"unit_title is required"),unit_slug:m.z.string().min(1,"unit_slug is required")});const fa=vr.extend({unit_id:m.z.string().min(1,"unit_id is required"),unit_title:m.z.string().min(1,"unit_title is required"),unit_slug:m.z.string().min(1,"unit_slug is required")}),I_=fa.extend({favorited_unit:m.z.boolean()}),Kf=m.z.any().transform(e=>Yf(e)).refine(e=>Array.isArray(e),{message:"Selection must resolve to an array"}),E_=vr.extend({filter_index:m.z.number().int().nonnegative(),filter_label:m.z.string().min(1,"filter_label is required"),selected_filters_ENUM:Kf,filter_name:m.z.string().optional()}),Hu=vr.extend({filter_index:m.z.number().int().nonnegative(),filter_label:m.z.string().min(1,"filter_label is required"),selected_filters_ENUM:Kf}),Yu=nn.extend({sort_index:m.z.number().int().nonnegative(),sort_ENUM:m.z.enum(la)}),k_=vr.extend({sort_index:m.z.number().int().nonnegative(),sort_ENUM:m.z.enum(la),results_unit_count:m.z.number().int().nonnegative(),unit_count_date:m.z.string().optional()}),O_=nn.extend({full_questionnaire_schema_json:m.z.unknown().optional(),unit_results:m.z.object({type:m.z.string().optional(),total:m.z.number().int().nonnegative().optional(),units:m.z.array(m.z.object({unit_id:m.z.string().min(1,"unit_id is required"),unit_name:m.z.string().optional()})).optional()}).optional()}),x_=fa.extend({favorited_unit:m.z.boolean()}),R_=fa.extend({favorited_unit:m.z.boolean()});function Jf(){const e=Hf();return(r,i)=>{e.track(r,i)}}const A_=(e,r,i)=>t=>{const n=r.parse(t);i(e,n)};function Xf(e){const r=(i,t)=>A_(i,t,e);return{trackViewAllUnits:i=>{const t=w_.parse({unit_count_date:new Date().toISOString(),...i});e("View All Units",t)},trackQuestionnaireSkip:r("Skip",ps),trackQuestionnaireContinue:r("Continue",C_),trackQuestionnaireBack:r("Back",ps),trackClickUnit:r("Click Unit",x_),trackHoverUnit:r("Unit Hovered",I_),trackLoadMore:i=>{const t=S_.parse({unit_count_date:new Date().toISOString(),...i});e("Load More",t)},trackOpenFilters:r("Filter Opened",E_),trackCancelFilter:r("Filter Canceled",Hu),trackApplyFilter:r("Filter Applied",Hu),trackOpenSort:i=>{const t=k_.parse({unit_count_date:new Date().toISOString(),...i});e("Open Sort",t)},trackSelectSort:r("Select Sort",Yu),trackCancelSort:r("Cancel Sort",Yu),trackClickUnitFavorites:r("Click Unit (Favorites)",R_),trackQuestionnaireResult:r("Questionnaire Result",O_)}}function M_(){const e=Jf();return Xf(e)}const ds={availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0},Pn={properties:{},currentPropertyId:null,currentPropertySlug:null,hasPreviouslySearched:[],unitResults:[],filters:ds,tempFilters:ds,apiFilters:{limit:10,page:1},resultsMode:"all",resolvedQuestionnaireValues:{},sortBy:"relevance"},T_=e=>e==null?[]:Array.isArray(e)?e:[e],Zf=e=>T_(e).flatMap(r=>{if(r==null)return[];if(Array.isArray(r))return r;if(typeof r=="object"&&"value"in r){const i=r.value;return Array.isArray(i)?i:i!=null?[i]:[]}return[r]}),Ku=e=>Zf(e).flatMap(r=>Array.isArray(r)?r:[r]).map(r=>String(r)).map(r=>r.trim()).filter(r=>r.length>0),P_=e=>Zf(e).map(r=>{if(typeof r=="number"&&Number.isFinite(r))return r;const i=Number(r);return Number.isFinite(i)?i:null}).filter(r=>r!==null),Qf=e=>{if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="object"&&"value"in e)return Qf(e.value);const r=Number(e);return Number.isFinite(r)?r:null};class ha{async getState(){const r=await ys("app");if(!r)return Pn;const i={...Pn,...r,properties:r.properties??{},unitResults:r.unitResults??[],currentPropertyId:r.currentPropertyId==null?null:String(r.currentPropertyId),currentPropertySlug:r.currentPropertySlug??null,hasPreviouslySearched:Array.isArray(r.hasPreviouslySearched)?r.hasPreviouslySearched.map(String):[]},t=Nn.safeParse(i);if(t.success)return t.data;const n=Object.entries(i.properties??{}).reduce((c,[l,f])=>{const p=Zr.safeParse(f);return p.success&&(c[l]=p.data),c},{}),s=(Array.isArray(i.unitResults)?i.unitResults:i.unitResults&&typeof i.unitResults=="object"?Object.values(i.unitResults):[]).reduce((c,l)=>{const f=rr.safeParse(l);return f.success&&c.push(f.data),c},[]),a={...i,properties:n,unitResults:s},u=Nn.safeParse(a);return u.success?u.data:Pn}async setState(r){const i=await this.getState(),t=r(i),n=Nn.parse(t);await _s("app",n)}async waitForCurrentProperty(r=1e3){const i=Date.now()+r;for(;Date.now()<i;){const o=await this.getState(),s=o.currentPropertyId;if(s&&o.properties[s])return s;await new Promise(a=>setTimeout(a,16))}const t=await this.getState(),n=t.currentPropertyId;if(n&&t.properties[n])return n;throw new Error("UnifiedStore: current property was not initialized in time")}async initializeProperty(r,i){const t=String(r);await this.setState(n=>n.properties&&n.properties[t]?{...n,currentPropertyId:t,currentPropertySlug:i}:{...n,currentPropertyId:t,currentPropertySlug:i,properties:{...n.properties,[t]:{id:t,slug:i,favoritedUnits:[],tourContactedOn:null,viewedUnits:[],questionnaireResults:null,tourContactData:null}}})}async setUnitResults(r,i){const t=i??rr,n=[];(Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[]).forEach((s,a)=>{const u=at(t,s,`unitResults[${a}]`);u&&n.push(u)}),await this.setState(s=>({...s,unitResults:n}))}async clearUnitResults(){await this.setState(r=>({...r,unitResults:[]}))}async setPropertyData(r,i,t){const n=String(r),o=t??Qt;await this.setState(s=>{const a=s.properties[n];if(!a)return s;const u=at(o,i,`properties.${n}.data`);return u?{...s,properties:{...s.properties,[n]:{...a,data:u}}}:s})}async mergePropertyData(r,i,t){const n=String(r),o=t??Qt;await this.setState(s=>{const a=s.properties[n];if(!a)return s;const u=a.data;if(!u){const p=at(o,i,`properties.${n}.data`);return p?{...s,properties:{...s.properties,[n]:{...a,data:p}}}:s}const c=o.partial(),l=at(c,i,`properties.${n}.data.partial`);if(!l)return s;const f=at(o,{...u,...l},`properties.${n}.data`);return f?{...s,properties:{...s.properties,[n]:{...a,data:f}}}:s})}async upsertPropertyFromApi(r,i){const n=(i??Qt).parse(r),o=n.id??n.propertyId;if(o==null)throw new Error("upsertPropertyFromApi: property id is required");const s=String(o),a=n.slug??void 0;await this.setState(u=>{const c=u.properties[s],l=c?{...c,...a?{slug:a}:{},data:n}:{id:s,slug:a??"",favoritedUnits:[],tourContactedOn:null,viewedUnits:[],questionnaireResults:null,tourContactData:null,data:n};return{...u,properties:{...u.properties,[s]:l}}})}async setCurrentProperty(r,i){const t=String(r);await this.setState(n=>({...n,currentPropertyId:t,currentPropertySlug:i||n.currentPropertySlug}))}async setCurrentPropertySlug(r){await this.setState(i=>({...i,currentPropertySlug:r}))}async setHasPreviouslySearched(r){await this.setState(i=>({...i,hasPreviouslySearched:Array.from(new Set([...i.hasPreviouslySearched,r]))}))}async toggleFavorite(r){await this.setState(i=>{const t=i.currentPropertyId;if(!t)return i;const n=i.properties[t];if(!n)return i;const s=n.favoritedUnits.includes(r)?n.favoritedUnits.filter(a=>a!==r):[...n.favoritedUnits,r];return{...i,properties:{...i.properties,[t]:{...n,favoritedUnits:s}}}})}async markUnitAsViewed(r,i){const t=new Date,n=`${String(t.getMonth()+1).padStart(2,"0")}/${String(t.getDate()).padStart(2,"0")}`;await this.setState(o=>{const s=o.currentPropertyId;if(!s)return o;const a=o.properties[s];if(!a)return o;const u=[...a.viewedUnits.filter(c=>c.unitId!==r),{unitId:r,viewedDate:n}];return{...o,properties:{...o.properties,[s]:{...a,viewedUnits:u}}}}),typeof window<"u"&&window.open(`//${i}`,"_blank")}async setTourContactedOn(){await this.setState(r=>{const i=r.currentPropertyId;if(!i)return r;const t=r.properties[i];return t?{...r,properties:{...r.properties,[i]:{...t,tourContactedOn:new Date().toISOString()}}}:r})}async getTourContactedOn(){var t;const r=await this.getState(),i=r.currentPropertyId;return i?((t=r.properties[i])==null?void 0:t.tourContactedOn)??null:null}async setQuestionnaireResults(r){await this.setState(i=>{const t=i.currentPropertyId;if(!t)return i;const n=i.properties[t];return n?{...i,properties:{...i.properties,[t]:{...n,questionnaireResults:r}}}:i})}async setTourContactData(r){const i=await this.waitForCurrentProperty();await this.setState(t=>{const n=t.properties[i];return n?{...t,properties:{...t.properties,[i]:{...n,tourContactData:r}}}:t})}async setFilters(r){await this.setState(i=>({...i,filters:{...i.filters,...r}}))}async setTempFilters(r){await this.setState(i=>({...i,tempFilters:{...i.tempFilters,...r}}))}async setFiltersToDefault(){await this.setState(r=>({...r,filters:ds}))}async setApiFilters(r){await this.setState(i=>({...i,apiFilters:{...i.apiFilters,...r}}))}async handleTempFilterChange(r,i){await this.setState(t=>({...t,tempFilters:{...t.tempFilters,[r]:i}}))}async submitFilterUpdate(){await this.setState(r=>{const i={...r.apiFilters,availability:Ku(r.filters.availability),bedrooms:P_(r.filters.bedrooms),cost:Qf(r.filters.cost),highlights:Ku(r.filters.highlights)};return{...r,apiFilters:i}})}async setResultsMode(r){await this.setState(i=>({...i,resultsMode:r}))}async setSortBy(r){await this.setState(i=>({...i,sortBy:r}))}async setResolvedQuestionnaireValues(r,i){await this.setState(t=>({...t,resolvedQuestionnaireValues:{...t.resolvedQuestionnaireValues,[r]:i}}))}async getUnitState(r){var n;const i=await this.getState(),t=i.currentPropertyId?i.properties[i.currentPropertyId]:null;return{isFavorite:(t==null?void 0:t.favoritedUnits.includes(r))??!1,viewedDate:((n=t==null?void 0:t.viewedUnits.find(o=>o.unitId===r))==null?void 0:n.viewedDate)??""}}async getResultsUrl(){const r=await this.getState();return r.currentPropertySlug?`/${r.currentPropertySlug}/results`:null}async getCurrentProperty(){const r=await this.getState();return r.currentPropertyId?r.properties[r.currentPropertyId]??null:null}async getPropertyData(r){const i=await this.getState(),t=r==null?i.currentPropertyId:String(r);return t?i.properties[t]??null:null}async getFullState(){return this.getState()}async initialize(){await this.setState(r=>({...Pn,...r}))}}const K=new ha;function eh(e){return(r,i)=>{const t=async()=>{const o=await K.getFullState();r({properties:o.properties,currentPropertyId:o.currentPropertyId,currentPropertySlug:o.currentPropertySlug,hasPreviouslySearched:o.hasPreviouslySearched,unitResults:o.unitResults,filters:o.filters,tempFilters:o.tempFilters,apiFilters:o.apiFilters,resultsMode:o.resultsMode,resolvedQuestionnaireValues:o.resolvedQuestionnaireValues,sortBy:o.sortBy})},n=async()=>{if(e!=null&&e.onFilterUpdate){const o=(await K.getFullState()).apiFilters;e.onFilterUpdate(o)}};return{properties:{},currentPropertyId:null,currentPropertySlug:null,hasPreviouslySearched:[],unitResults:[],filters:{availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0},tempFilters:{availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0},apiFilters:{limit:10,page:1},resultsMode:"all",resolvedQuestionnaireValues:{},sortBy:"relevance",filtersLoaded:!1,async initializeProperty(o,s){await K.initializeProperty(o,s),await t()},async setCurrentProperty(o,s){await K.setCurrentProperty(o,s),r({currentPropertyId:o,...s&&{currentPropertySlug:s}})},async setCurrentPropertySlug(o){await K.setCurrentPropertySlug(o),r({currentPropertySlug:o})},async setHasPreviouslySearched(o){await K.setHasPreviouslySearched(o),await t()},async toggleFavorite(o){await K.toggleFavorite(o),await t()},async markUnitAsViewed(o,s){await K.markUnitAsViewed(o,s),await t()},async setTourContactedOn(){await K.setTourContactedOn(),await t()},getTourContactedOn:K.getTourContactedOn.bind(K),async setQuestionnaireResults(o){await K.setQuestionnaireResults(o),await t()},async setTourContactData(o){await K.setTourContactData(o),await t()},async setUnitResults(o){await K.setUnitResults(o),await t()},async clearUnitResults(){await K.clearUnitResults(),await t()},async setFilters(o){await K.setFilters(o);const s=i();r({filters:{...s.filters,...o}})},async setTempFilters(o){await K.setTempFilters(o);const s=i();r({tempFilters:{...s.tempFilters,...o}})},async setFiltersToDefault(){await K.setFiltersToDefault(),r({filters:{availability:void 0,bedrooms:void 0,cost:void 0,highlights:void 0}})},async setApiFilters(o){await K.setApiFilters(o);const s=i();r({apiFilters:{...s.apiFilters,...o}})},async handleTempFilterChange(o,s){await K.handleTempFilterChange(o,s);const a=i();r({tempFilters:{...a.tempFilters,[o]:s}})},async submitFilterUpdate(){await K.submitFilterUpdate(),await t(),await n()},async setResultsMode(o){await K.setResultsMode(o),r({resultsMode:o})},async setSortBy(o){await K.setSortBy(o),r({sortBy:o})},async setResolvedQuestionnaireValues(o,s){await K.setResolvedQuestionnaireValues(o,s);const a=i();r({resolvedQuestionnaireValues:{...a.resolvedQuestionnaireValues,[o]:s}})},getUnitState(o){var u;const s=i(),a=s.currentPropertyId?s.properties[s.currentPropertyId]:null;return{isFavorite:(a==null?void 0:a.favoritedUnits.includes(o))??!1,viewedDate:((u=a==null?void 0:a.viewedUnits.find(c=>c.unitId===o))==null?void 0:u.viewedDate)??""}},getResultsUrl:K.getResultsUrl.bind(K),getCurrentProperty:K.getCurrentProperty.bind(K),getPropertyData:K.getPropertyData.bind(K),async _hydrate(){await t()},async _initialize(){await K.initialize(),await t(),r({filtersLoaded:!0})}}}}function D_(){return e=>r=>e(i=>i.getUnitState(r))}function th(e,r){return{property:{unit:{favorites:{toggle:e.toggleFavorite.bind(e)},viewed:{mark:e.markUnitAsViewed.bind(e)}},questionnaire:{setResults:e.setQuestionnaireResults.bind(e)},tour:{setContactedOn:e.setTourContactedOn.bind(e),getContactedOn:e.getTourContactedOn.bind(e),setContactData:e.setTourContactData.bind(e)}},filters:{set:e.setFilters.bind(e),setTemp:e.setTempFilters.bind(e),setToDefault:e.setFiltersToDefault.bind(e),commitTemp:async(i,t)=>{const o=(r?r():e).tempFilters[i]??t;await e.handleTempFilterChange(i,o),await e.submitFilterUpdate()},commitAvailability:async()=>{await e.submitFilterUpdate()},submit:e.submitFilterUpdate.bind(e)}}}function N_(e){return(r,i)=>{const t=eh(e)(r,i),n=th(t,i);return{...t,...n}}}const L_={async isFavorite(e,r){return uc(e,r)},async toggle(e,r){return ac(e,r)},async set(e,r,i){return bs(e,r,i)},async getAll(e){return Ci(e)}},pa="//web.inresiapp.com",da="/placeholder.jpg",F_=e=>e?e.startsWith("?")?e:`?${e}`:"",rh=(e,r,i=pa)=>`${i}/${r}/unit/${e}/explore`,Wn=(e,r=da)=>!(e!=null&&e.CFURL)||!(e!=null&&e.name)||!(e!=null&&e.signature)?r:`${e.CFURL}${e.name}${F_(e.signature)}`;function U_(e){return{data:e}}function $_(e,r,i){var s,a;const t=(i==null?void 0:i.origin)??pa,n=(i==null?void 0:i.placeholderImage)??da,o=((s=e.hits)==null?void 0:s.map(u=>{var p,g;const c=u._source??{},l=typeof c.name=="string"?c.name:typeof c.title=="string"?c.title:"";return{...c,title:l,slug:rh(String(c.slug??""),r,t),imageUrl:Wn(c.image,n),secondaryImageUrl:Wn((p=c.additionalImages)==null?void 0:p[0],n),tertiaryImageUrl:Wn((g=c.additionalImages)==null?void 0:g[1],n)}}))??[];return{total:((a=e.total)==null?void 0:a.value)??o.length,maxScore:e.max_score??null,type:e.type??"units",hits:o}}const z_={asap:"ASAP",next_month:"Next Month","2_3_months":"2-3 Months",all:"Just Browsing"},Gn={0:"Studio",1:"1 Bed",2:"2 Bed",3:"3+ Bed"},B_=new Set(Object.values(Gn)),q_=e=>{if(!e||e.length===0)return;const r=new Set;for(const i of e){if(typeof i=="number"){const n=Gn[i];n&&r.add(n);continue}const t=i.split(",").map(n=>n.trim());for(const n of t){const o=Number.parseInt(n,10);!Number.isNaN(o)&&Gn[o]?r.add(Gn[o]):B_.has(n)&&r.add(n)}}return r.size>0?Array.from(r):void 0},V_=e=>({availability:e.availability&&e.availability.length>0?e.availability.map(i=>z_[i]??i):void 0,bedrooms:q_(e.bedrooms),cost:e.cost??void 0,highlights:e.highlights??[]});exports.ApiUserSchema=ph;exports.AppStoreDataSchema=hh;exports.DEFAULT_PLACEHOLDER_IMAGE=da;exports.DEFAULT_WEB_ORIGIN=pa;exports.FavoritesSchema=Yn;exports.FiltersSchema=Pr;exports.MixpanelProvider=__;exports.OpenDBError=Xu;exports.PropertySchema=Qt;exports.PropertyStore=cc;exports.PropertyStoreDataSchema=Dn;exports.QueryParamsSchema=vs;exports.QuestionEnumValues=b_;exports.ResultsModeEnum=gs;exports.SCHEMA_VERSION=Er;exports.SchemaMismatchError=Ju;exports.SortByEnum=ms;exports.SortEnumValues=la;exports.Store=ha;exports.TourContactDataSchema=tc;exports.UnifiedStore=ha;exports.UnifiedStoreDataSchema=Nn;exports.UnitDataSchema=Qu;exports.UnitFavoriteSchema=dh;exports.UnitSchema=rr;exports.UserPropertyStateSchema=Zr;exports.UserSchema=Tt;exports.UserUnitDataSchema=Zu;exports.ViewedUnitSchema=ec;exports.buildExploreUrl=rh;exports.buildImageUrl=Wn;exports.buildTrackingEvents=Xf;exports.configureValidation=rc;exports.createORMStringStorage=wh;exports.createStructuredStore=N_;exports.createStructuredStoreActions=th;exports.createUseUnitState=D_;exports.createZustandUnifiedStore=eh;exports.debugDump=oc;exports.defaultIdGenerator=nc;exports.ensureUser=Si;exports.exportJSON=_h;exports.favorites=L_;exports.generateUserUUID=lc;exports.getDB=ze;exports.getFavoritedUnitsForProperty=Ci;exports.getUserUUID=ic;exports.isUnitFavorited=uc;exports.kvGet=ys;exports.kvRemove=bh;exports.kvSet=_s;exports.propertyStore=Sh;exports.resetDB=yh;exports.setFavoriteUnit=bs;exports.store=K;exports.toggleFavoriteUnit=ac;exports.transformUnitsApiResponse=U_;exports.transformUnitsApiResponseToClient=$_;exports.transformUnitsApiResponseToClientFilters=V_;exports.useMixpanel=Hf;exports.useTrackEvent=Jf;exports.useTrackingEvents=M_;
|
|
66
66
|
//# sourceMappingURL=index.cjs.map
|