posthog-js 1.424.0 → 1.425.0

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.
Files changed (78) hide show
  1. package/dist/all-external-dependencies.js +1 -1
  2. package/dist/all-external-dependencies.js.map +1 -1
  3. package/dist/array.full.es5.js +1 -1
  4. package/dist/array.full.es5.js.map +1 -1
  5. package/dist/array.full.js +1 -1
  6. package/dist/array.full.js.map +1 -1
  7. package/dist/array.full.no-external.js +1 -1
  8. package/dist/array.full.no-external.js.map +1 -1
  9. package/dist/array.js +1 -1
  10. package/dist/array.js.map +1 -1
  11. package/dist/array.no-external.js +1 -1
  12. package/dist/array.no-external.js.map +1 -1
  13. package/dist/conversations.js +1 -1
  14. package/dist/conversations.js.map +1 -1
  15. package/dist/customizations.full.js +1 -1
  16. package/dist/customizations.full.js.map +1 -1
  17. package/dist/customizations.js +1 -1
  18. package/dist/customizations.js.map +1 -1
  19. package/dist/dead-clicks-autocapture.js.map +1 -1
  20. package/dist/default-extensions.js +1 -1
  21. package/dist/default-extensions.js.map +1 -1
  22. package/dist/extension-bundles.js +1 -1
  23. package/dist/extension-bundles.js.map +1 -1
  24. package/dist/lazy-recorder.js +1 -1
  25. package/dist/lazy-recorder.js.map +1 -1
  26. package/dist/main.js +1 -1
  27. package/dist/main.js.map +1 -1
  28. package/dist/module.d.ts +2 -0
  29. package/dist/module.full.d.ts +2 -0
  30. package/dist/module.full.js +1 -1
  31. package/dist/module.full.js.map +1 -1
  32. package/dist/module.full.no-external.d.ts +2 -0
  33. package/dist/module.full.no-external.js +1 -1
  34. package/dist/module.full.no-external.js.map +1 -1
  35. package/dist/module.js +1 -1
  36. package/dist/module.js.map +1 -1
  37. package/dist/module.no-external.d.ts +2 -0
  38. package/dist/module.no-external.js +1 -1
  39. package/dist/module.no-external.js.map +1 -1
  40. package/dist/module.slim.js +1 -1
  41. package/dist/module.slim.js.map +1 -1
  42. package/dist/module.slim.no-external.d.ts +2 -0
  43. package/dist/module.slim.no-external.js +1 -1
  44. package/dist/module.slim.no-external.js.map +1 -1
  45. package/dist/posthog-recorder.js +1 -1
  46. package/dist/posthog-recorder.js.map +1 -1
  47. package/dist/product-tours.js.map +1 -1
  48. package/dist/recorder-v2.js +1 -1
  49. package/dist/recorder-v2.js.map +1 -1
  50. package/dist/recorder.js +1 -1
  51. package/dist/recorder.js.map +1 -1
  52. package/dist/src/posthog-core.d.ts +2 -0
  53. package/lib/package.json +5 -5
  54. package/lib/src/customizations/posthogReduxLogger.js.map +1 -1
  55. package/lib/src/entrypoints/dead-clicks-autocapture.js +0 -1
  56. package/lib/src/entrypoints/dead-clicks-autocapture.js.map +1 -1
  57. package/lib/src/extensions/conversations/external/components/IdentificationFormView.js.map +1 -1
  58. package/lib/src/extensions/conversations/external/components/NewConversationButton.js.map +1 -1
  59. package/lib/src/extensions/conversations/external/components/RestoreRequestView.js.map +1 -1
  60. package/lib/src/extensions/conversations/external/components/RichContent.js +0 -1
  61. package/lib/src/extensions/conversations/external/components/RichContent.js.map +1 -1
  62. package/lib/src/extensions/conversations/external/components/TicketListItem.js.map +1 -1
  63. package/lib/src/extensions/conversations/external/components/TicketListView.js.map +1 -1
  64. package/lib/src/extensions/conversations/external/index.js +26 -11
  65. package/lib/src/extensions/conversations/external/index.js.map +1 -1
  66. package/lib/src/extensions/replay/external/json-ld.js.map +1 -1
  67. package/lib/src/extensions/replay/external/network-plugin.js +17 -9
  68. package/lib/src/extensions/replay/external/network-plugin.js.map +1 -1
  69. package/lib/src/extensions/replay/external/triggerMatching.js +0 -2
  70. package/lib/src/extensions/replay/external/triggerMatching.js.map +1 -1
  71. package/lib/src/posthog-core.d.ts +2 -0
  72. package/lib/src/posthog-core.js +5 -0
  73. package/lib/src/posthog-core.js.map +1 -1
  74. package/lib/src/posthog-persistence.js +0 -1
  75. package/lib/src/posthog-persistence.js.map +1 -1
  76. package/lib/src/utils/event-receiver.js +0 -2
  77. package/lib/src/utils/event-receiver.js.map +1 -1
  78. package/package.json +11 -11
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var e="undefined"!=typeof window?window:void 0,t="undefined"!=typeof globalThis?globalThis:e,r=null==t?void 0:t.navigator,i=null==t?void 0:t.document,n=null==t?void 0:t.location;null!=t&&t.XMLHttpRequest&&new t.XMLHttpRequest;var a=null==r?void 0:r.userAgent,o="undefined"!=typeof globalThis?globalThis:e;o&&"undefined"==typeof self&&(o.self=o),o&&"undefined"==typeof File&&(o.File=function(){});var s=null!=e?e:{};function u(e,t,r,i,n,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(i,n)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(i,n){var a=e.apply(t,r);function o(e){u(a,i,n,o,s,"next",e)}function s(e){u(a,i,n,o,s,"throw",e)}o(void 0)}))}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},h.apply(null,arguments)}var c={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5,Plugin:6},d={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8,CanvasMutation:9,Font:10,Log:11,Drag:12,StyleDeclaration:13,Selection:14,AdoptedStyleSheet:15,CustomElement:16},v="min_length",f="max_length";function p(e,t){return-1!==e.indexOf(t)}var g=function(e){return e.trim()},m=Object.prototype,y=m.hasOwnProperty,b=m.toString,w=Array.isArray||function(e){return"[object Array]"===b.call(e)},k=e=>"function"==typeof e,_=e=>e===Object(e)&&!w(e),S=e=>void 0===e,x=e=>"[object String]"==b.call(e),C=e=>x(e)&&0===e.trim().length,M=e=>null===e,T=e=>S(e)||M(e),I=e=>"[object Number]"==b.call(e)&&e==e,R=e=>"[object Boolean]"===b.call(e),A=e=>e instanceof FormData;function E(e){return null===e||"object"!=typeof e}function L(e,t){return{}.toString.call(e)==="[object "+t+"]"}function O(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return P(e,Error)}}function D(e){return"undefined"!=typeof Event&&P(e,Event)}function P(e,t){try{return e instanceof t}catch(e){return!1}}function N(e,t,r,i,n){return t>r&&(i.warn("min cannot be greater than max."),t=r),I(e)?e>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):t>e?(i.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),N(n||r,t,r,i))}class F{constructor(e){this.C={},this.I=e.I,this.R=N(e.bucketSize,0,100,e.A),this.O=N(e.refillRate,0,this.R,e.A),this.N=N(e.refillInterval,0,864e5,e.A)}F(e,t){var r=Math.floor((t-e.lastAccess)/this.N);r>0&&(e.tokens=Math.min(e.tokens+r*this.O,this.R),e.lastAccess=e.lastAccess+r*this.N)}consumeRateLimit(e){var t,r=Date.now(),i=String(e),n=this.C[i];return n?this.F(n,r):this.C[i]=n={tokens:this.R,lastAccess:r},0===n.tokens||(n.tokens--,0===n.tokens&&(null==(t=this.I)||t.call(this,e)),0===n.tokens)}stop(){this.C={}}}var q="Mobile",j="Android",B="Tablet",H=j+" "+B,U="iPad",z="Apple Watch",W="BlackBerry",V="Nintendo",Z="PlayStation",G="Xbox",Q="Windows Phone",J="Nokia",Y="Ouya",K="Generic",X=K+" "+q.toLowerCase(),ee=K+" "+B.toLowerCase(),te=new RegExp(G,"i"),re=new RegExp(Z+" \\w+","i"),ie=new RegExp(V+" \\w+","i"),ne=new RegExp(W+"|PlayBook|BB10","i");function ae(e){return e?e.split("#")[0]:e}var oe,se,ue,le,he="NativeGzipValidationError",ce=e=>{throw function(e,t){var r=new Error(t);try{Object.defineProperty(r,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch(e){}return r}(he,"Native gzip produced invalid output: "+e)},de=function(){var e=l((function*(e,t){18>e.size&&ce("too-short");var r,i=new Uint8Array(yield e.slice(0,10).arrayBuffer());(2>(r=i).length||31!==r[0]||139!==r[1]||8!==i[2])&&ce("invalid-header");var n=new DataView(yield e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(oe)return oe;oe=[];for(var e=0;256>e;e++){for(var t=e,r=0;8>r;r++)t=1&t?3988292384^t>>>1:t>>>1;oe[e]=t>>>0}return oe})(),r=4294967295,i=0;e.length>i;i++)r=t[255&(r^e[i])]^r>>>8;return(4294967295^r)>>>0})(t)&&ce("invalid-crc");var a=t.length>>>0;n.getUint32(4,!0)!==a&&ce("invalid-size")}));return function(t,r){return e.apply(this,arguments)}}();function ve(){return ve=l((function*(e,t,r){void 0===t&&(t=!0);try{var i=(new TextEncoder).encode(e),n=new globalThis.CompressionStream("gzip"),a=n.writable.getWriter(),o=a.write(i).then((()=>a.close())).catch(function(){var e=l((function*(e){try{yield a.abort(e)}catch(e){}throw e}));return function(t){return e.apply(this,arguments)}}()),s=new Response(n.readable).blob(),u=(yield Promise.all([s,o]))[0];return yield de(u,i),u}catch(e){if(null!=r&&r.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})),ve.apply(this,arguments)}function fe(e,t){if(e){var r=e.find((e=>e.type===t));return null==r?void 0:r.value}}function pe(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return le&&r.length===ue||(ue=r.length,le=r.reduce(((r,i)=>{se||(se={});var n=se[i];if(n)r[n[0]]=n[1];else for(var a=e(i),o=a.length-1;o>=0;o--){var s=a[o],u=null==s?void 0:s.filename,l=t[i];if(u&&l){r[u]=l,se[i]=[u,l];break}}return r}),{})),le}}var ge="?";function me(e,t,r,i,n){var a={platform:e,filename:t,function:"<anonymous>"===r?ge:r,in_app:!(null!=t&&t.startsWith("webkit-masked-url://"))&&"<anonymous>"!==t};return S(i)||(a.lineno=i),S(n)||(a.colno=n),a}var ye=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return r||i?[-1!==e.indexOf("@")?e.split("@")[0]:ge,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},be=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,we=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ke=/\((\S*)(?::(\d+))(?::(\d+))\)/,_e=(e,t)=>{var r=be.exec(e);if(r)return me(t,r[1],ge,+r[2],+r[3]);var i=we.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var n=ke.exec(i[2]);n&&(i[2]=n[1],i[3]=n[2],i[4]=n[3])}var a=ye(i[1]||ge,i[2]);return me(t,a[1],a[0],i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},Se=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ce=(e,t)=>{var r=Se.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var i=xe.exec(r[3]);i&&(r[1]=r[1]||"eval",r[3]=i[1],r[4]=i[2],r[5]="")}var n=r[3],a=r[1]||ge,o=ye(a,n);return me(t,n=o[1],a=o[0],r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Me=/\(error: (.*)\)/;var Te=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var Ie=["fatal","error","warning","log","info","debug"];function Re(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var i=r.length;i>0;i--){var n=r.slice(0,i).join(", ");if(t>=n.length)return i===r.length?n:n.length>t?n.slice(0,t)+"...":n}return""}var Ae={DEBUG:!1,LIB_VERSION:"0.7.1",LIB_NAME:"browser-common"},Ee=function(t,r){var i=(void 0===r?{}:r).debugEnabled,n={q(r){if(e&&(Ae.DEBUG||e.POSTHOG_DEBUG||i)&&!S(e.console)&&e.console){for(var n=("__rrweb_original__"in e.console[r]?e.console[r].__rrweb_original__:e.console[r]),a=arguments.length,o=new Array(a>1?a-1:0),s=1;a>s;s++)o[s-1]=arguments[s];n(t,...o)}},debug(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("error",...t)},critical(){for(var e=arguments.length,r=new Array(e),i=0;e>i;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(e,r)=>Ee(t+" "+e,r)};return n},Le=Ee("[PostHog.js]"),Oe=Le.createLogger;function De(e,t){if(!T(e))if(w(e))e.forEach(t);else if(A(e))e.forEach(((e,r)=>t(e,r)));else for(var r in e)y.call(e,r)&&t(e[r],r)}function Pe(e){for(var t=Object.keys(e),r=t.length,i=new Array(r);r--;)i[r]=[t[r],e[t[r]]];return i}function Ne(e,t,r,i){var n=null!=i?i:{},a=n.capture,o=n.passive;null==e||e.addEventListener(t,r,{capture:void 0!==a&&a,passive:void 0===o||o})}var Fe=["localhost","127.0.0.1"],qe=e=>{var t=null==i?void 0:i.createElement("a");return S(t)?null:(t.href=e,t)},je=function(e,t){var r,i;void 0===t&&(t="&");var n=[];return De(e,(function(e,t){S(e)||S(t)||"undefined"===t||(r=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),i=encodeURIComponent(t),n[n.length]=i+"="+r)})),n.join(t)};function Be(t){var r,i=null==e||null==(r=e.location)?void 0:r.href;return S(i)?void 0:function(e,t){var r,i=null==e||null==(r=e.config)?void 0:r.get_current_url;if(!k(i))return t;try{var n=i(t);return x(n)&&n?n:t}catch(e){return Le.error("Error in get_current_url, falling back to window.location.href",e),t}}(t,i)}var He=1,$e=3,Ue=11;function ze(e){return!!e&&e.nodeType===He}function We(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Ve(e){return!!e&&e.nodeType===Ue&&ze(e.host)}var Ze=1e3;function Ge(e){return e?g(e).split(/\s+/):[]}function Qe(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Ge(t)}function Je(e){var t="";return rt(e)&&!it(e)&&e.childNodes&&e.childNodes.length&&De(e.childNodes,(function(e){var r;(function(e){return!!e&&e.nodeType===$e})(e)&&e.textContent&&(t+=null!==(r=function(e){return T(e)?null:g(e).split(/(\s+)/).filter((e=>ct(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==r?r:"")})),g(t)}var Ye=["a","button","form","input","select","textarea","label"];function Ke(e){var t=e.parentNode;return!(!t||!ze(t))&&t}var Xe=[".ph-no-deadclick",".ph-no-capture"];var et=e=>!e||We(e,"html")||!ze(e),tt=(t,r)=>{if(!e||et(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,n=[t],a=t;a.parentNode&&!We(a,"body");)if(Ve(a.parentNode))n.push(a.parentNode.host),a=a.parentNode.host;else{var o=Ke(a);if(!o)break;if(Ye.indexOf(o.tagName.toLowerCase())>-1)i=!0;else try{var s=e.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(i=!0)}catch(e){}n.push(o),a=o}return{parentIsUsefulElement:i,targetElementList:n}};function rt(e){for(var t=new Set,r=0,i=e;i.parentNode&&!We(i,"body");i=i.parentNode){if(r++>=Ze||t.has(i))return!1;t.add(i);var n=Qe(i);if(p(n,"ph-sensitive")||p(n,"ph-no-capture"))return!1}if(p(Qe(e),"ph-include"))return!0;var a=e.type||"";if(x(a))switch(a.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";return!x(o)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,""))}function it(e){return!!(We(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||We(e,"select")||We(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var nt=new RegExp("^(?:(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}))$"),at=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,ot=[16,15,14,13],st=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),ut=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),lt=/[0-9A-Za-z_]/;function ht(e){for(var t=0,r=!1,i=e.length-1;i>=0;i--){var n=e.charCodeAt(i)-48;r&&(n*=2)>9&&(n-=9),t+=n,r=!r}return t%10==0}function ct(e,t){if(void 0===t&&(t=!0),T(e))return!1;if(x(e)){e=g(e);var r=t?nt.test((e||"").replace(/[- ]/g,"")):function(e){var t;for(at.lastIndex=0;t=at.exec(e);){var r=t[2];if(r)for(var i=r.replace(/[- ]/g,""),n=0;i.length>n;n++)for(var a of ot){var o=n+a;if(i.length>=o){var s=i.slice(n,o);if(nt.test(s)&&ht(s))return!0}}}return!1}(e);if(r)return!1;var i=t?st.test(e):function(e){var t;for(ut.lastIndex=0;t=ut.exec(e);){var r=t[1],i=t[3];if(!(r&&i&&lt.test(r)&&lt.test(i)))return!0}return!1}(e);if(i)return!1}return!0}function dt(e){var t=Je(e);return ct(t=(t+" "+vt(e)).trim())?t:""}function vt(e){var t="";return e&&e.childNodes&&e.childNodes.length&&De(e.childNodes,(function(e){var r;if(e&&"span"===(null==(r=e.tagName)?void 0:r.toLowerCase()))try{var i=Je(e);t=(t+" "+i).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+vt(e)).trim())}catch(e){Le.error("[AutoCapture]",e)}})),t}function ft(e){return e.replace(/"|\\"/g,'\\"')}function pt(e){var t=e.attr__class;if(t)return w(t)?t:Ge(t)}var gt="[SessionRecording]",mt="redacted",yt=1e6;function bt(e){var t;return Math.min(yt,null!==(t=e.payloadSizeLimitBytes)&&void 0!==t?t:yt)}var wt={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:yt,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","google-analytics.com","analytics.google.com","nr-data.net","datadoghq.com","datadoghq.eu","ddog-gov.com","segment.io","rudderstack.com","amplitude.com","mixpanel.com","hotjar.com","hotjar.io","fullstory.com"],streamNetworkBody:!1},kt=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],_t=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],St=["auth","token","secret","session","api-key","apikey","api_key","credential","password","passwd","cookie","csrf","xsrf"],xt=e=>{T(e)||De(Object.keys(e),(t=>{(e=>{var t=e.toLowerCase();return kt.includes(t)||St.some((e=>t.includes(e)))})(t)&&(e[t]=mt)}))},Ct=["/s/","/e/","/i/"];function Mt(e,t,r,i){if(T(e))return e;var n=(null==t?void 0:t["content-length"])||function(e){return new Blob([e]).size}(e);return x(n)&&(n=parseInt(n)),n>r?gt+" "+i+" body too large to record ("+n+" bytes)":e}function Tt(e,t){if(T(e))return e;var r=e;return ct(r,!1)||(r=gt+" "+t+" body "+mt),De(_t,(e=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(e))&&(r=gt+" "+t+" body "+mt+" as might contain: "+e)})),r}var It=new WeakSet,Rt="$session_recording_remote_config",At="$replay_sample_rate",Et="$replay_override_sampling",Lt="$replay_override_linked_flag",Ot="$replay_override_url_trigger",Dt="$replay_override_event_trigger",Pt="$session_is_sampled",Nt="$session_past_minimum_duration",Ft="$session_recording_url_trigger_activated_session",qt="$session_recording_event_trigger_activated_session",jt="$posthog_sr_group_event_trigger_",Bt="$posthog_sr_group_url_trigger_",Ht="$posthog_sr_group_sampling_",$t="$debug_first_full_snapshot_timestamp",Ut="$sess_rec_flush_size",zt="$stored_person_properties",Wt="$surveys",Vt="$sdk_debug_replay_pending_trigger_conditions",Zt="$sdk_debug_replay_remote_trigger_matching_config",Gt="disabled",Qt="sampled",Jt="active",Yt="buffering",Kt="paused",Xt="rrweb_error",er="trigger",tr=er+"_activated",rr=er+"_pending",ir=er+"_"+Gt;function nr(e,t,r,i,n,a){return 0===t?ir:(null==e?void 0:e.get_property(r?i+r:n))===a?tr:rr}function ar(e,t,r){return t.some((t=>{var i;return"regex"===t.matching&&(null!==(i=null==r?void 0:r.get(t.url))&&void 0!==i?i:new RegExp(t.url)).test(e)}))}function or(e){return e.includes(tr)?tr:e.includes(rr)?rr:ir}function sr(e){var t=new Set(e);switch(t.delete(ir),t.size){case 0:return ir;case 1:return Array.from(t)[0];default:return rr}}class ur{constructor(e){this.j=e}triggerStatus(e){return or(this.j.map((t=>t.triggerStatus(e))))}triggerStatusNoSideEffects(e){return or(this.j.map((t=>t.triggerStatusNoSideEffects(e))))}stop(){this.j.forEach((e=>e.stop()))}}class lr{constructor(e){this.j=e}triggerStatus(e){return sr(this.j.map((t=>t.triggerStatus(e))))}triggerStatusNoSideEffects(e){return sr(this.j.map((t=>t.triggerStatusNoSideEffects(e))))}stop(){this.j.forEach((e=>e.stop()))}}class hr{triggerStatus(){return this.triggerStatusNoSideEffects()}triggerStatusNoSideEffects(){return tr}stop(){}}var cr=e=>"sessionRecording"in e;class dr{constructor(e,t){this.B=[],this.H=[],this.$=new Map,this.U=new Map,this.W="",this.urlBlocked=!1,this._instance=e,this.V=t}onConfig(e){var t,r;this.B=(cr(e)?_(e.sessionRecording)?null==(t=e.sessionRecording)?void 0:t.urlTriggers:[]:null==e?void 0:e.urlTriggers)||[],this.H=(cr(e)?_(e.sessionRecording)?null==(r=e.sessionRecording)?void 0:r.urlBlocklist:[]:null==e?void 0:e.urlBlocklist)||[],this.Z()}Z(){for(var e of(this.$.clear(),this.U.clear(),this.B))if("regex"===e.matching&&!this.$.has(e.url))try{this.$.set(e.url,new RegExp(e.url))}catch(t){Le.error("Invalid URL trigger regex pattern:",e.url,t)}for(var t of this.H)if("regex"===t.matching&&!this.U.has(t.url))try{this.U.set(t.url,new RegExp(t.url))}catch(e){Le.error("Invalid URL blocklist regex pattern:",t.url,e)}}onRemoteConfig(e){this.onConfig(e)}G(e){return nr(this._instance,this.B.length,this.V,Bt,Ft,e)}triggerStatus(e){var t=this.triggerStatusNoSideEffects(e);return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:t}),t}triggerStatusNoSideEffects(e){return this.G(e)}isCurrentUrlBlocked(){var e=Be(this._instance);if(!e)return!1;try{return ar(e,this.H,this.U)}catch(e){return!0}}checkUrlBlocklist(e,t){var r=Be(this._instance);if(r&&r!==this.W){this.W=r;var i=this.urlBlocked,n=ar(r,this.H,this.U);i&&n||(n&&!i?e():!n&&i&&t())}}checkUrlTriggerConditions(e,t,r,i){var n=Be(this._instance);if(n&&n!==this.W){this.W=n;var a=this.urlBlocked,o=ar(n,this.H,this.U);o&&!a?e():!o&&a&&t();var s=this.G(i)===tr,u=ar(n,this.B,this.$);!s&&u&&r("url",n)}}stop(){this.W=""}}class vr{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.J=()=>{},this._instance=e}triggerStatus(){var e=this.triggerStatusNoSideEffects();return this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}triggerStatusNoSideEffects(){var e=rr;return T(this.linkedFlag)&&(e=ir),this.linkedFlagSeen&&(e=tr),e}onConfig(e,t){var r;if(this.linkedFlag=(cr(e)?_(e.sessionRecording)?null==(r=e.sessionRecording)?void 0:r.linkedFlag:null:null==e?void 0:e.linkedFlag)||null,!T(this.linkedFlag)&&!this.linkedFlagSeen){var i=x(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=x(this.linkedFlag)?null:this.linkedFlag.variant;this.J=this._instance.onFeatureFlags(((e,r)=>{var a=!1;if(_(r)&&i in r){var o=r[i];a=R(o)?!0===o:n?o===n:!!o}var s=a&&!this.linkedFlagSeen;this.linkedFlagSeen=a,s&&t(i,n)}))}}onRemoteConfig(e,t){this.onConfig(e,t)}stop(){this.J()}}class fr{constructor(e,t){this.Y=[],this._instance=e,this.V=t}onConfig(e){var t;this.Y=(cr(e)?_(e.sessionRecording)?null==(t=e.sessionRecording)?void 0:t.eventTriggers:[]:null==e?void 0:e.eventTriggers)||[]}onRemoteConfig(e){this.onConfig(e)}K(e){return nr(this._instance,this.Y.length,this.V,jt,qt,e)}triggerStatus(e){var t=this.triggerStatusNoSideEffects(e);return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:t}),t}triggerStatusNoSideEffects(e){return this.K(e)}checkEventTriggerConditions(e,t,r){if(0!==this.Y.length){var i=this.K(r)===tr,n=this.Y.includes(e);!i&&n&&t("event",e)}}stop(){}}class pr{constructor(e,t,r){if(this._instance=e,this.group=t,this.X=new dr(e,t.id),this.ee=new fr(e,t.id),this.te=new vr(e),t.conditions.events&&t.conditions.events.length>0||t.conditions.urls&&t.conditions.urls.length>0||t.conditions.flag){var i=(t.conditions.events||[]).map((e=>e.name)),n={urlTriggers:t.conditions.urls||[],eventTriggers:i,linkedFlag:t.conditions.flag||null,urlBlocklist:[]};this.X.onConfig(n),this.ee.onConfig(n),this.te.onConfig(n,r);var a=[this.ee,this.X,this.te];this.re="any"===t.conditions.matchType?new ur(a):new lr(a)}else this.re=new hr}triggerStatus(e){return this.re.triggerStatus(e)}triggerStatusNoSideEffects(e){return this.re.triggerStatusNoSideEffects(e)}getPendingTriggerConditions(e){return this.triggerStatusNoSideEffects(e)!==rr?[]:[{label:"URL condition not matched",status:this.X.triggerStatusNoSideEffects(e)},{label:"event condition not matched",status:this.ee.triggerStatusNoSideEffects(e)},{label:"linked flag condition not matched",status:this.te.triggerStatusNoSideEffects()}].filter((e=>e.status===rr)).map((e=>e.label))}checkEventTriggerConditions(e,t,r){this.ee.checkEventTriggerConditions(e,t,r)}checkUrlTriggerConditions(e,t,r,i){this.X.checkUrlTriggerConditions(e,t,r,i)}activateTrigger(e,t){var r;null==(r=this._instance.persistence)||r.register({["url"===e?Bt+this.group.id:jt+this.group.id]:t})}stop(){this.X.stop(),this.ee.stop(),this.te.stop()}}function gr(e){if(e.rrwebError)return Xt;if(!e.receivedFlags)return Yt;if(!e.isRecordingEnabled)return Gt;if(e.urlTriggerMatching.urlBlocked)return Kt;var t=!0===e.isSampled,r=new ur([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId);return t?Qt:r===tr?Jt:r===rr?Yt:!1===e.isSampled?Gt:Jt}function mr(e){if(e.rrwebError)return Xt;if(!e.receivedFlags)return Yt;if(!e.isRecordingEnabled)return Gt;if(e.urlTriggerMatching.urlBlocked)return Kt;var t=new lr([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId),r=t!==ir,i=R(e.isSampled);return r&&t===rr?Yt:r&&t===ir||i&&!e.isSampled?Gt:!0===e.isSampled?Qt:Jt}function yr(){var e=[];return function(t,r){if(_(r)||w(r)){for(;e.length>0&&e[e.length-1]!==this;)e.pop();return e.includes(r)?"[Circular]":(e.push(r),r)}return r}}function br(e){var t=JSON.stringify(e,yr());return t?new Blob([t]).size:0}function wr(e){if(M(e))return 4;if(S(e))return 0;switch(typeof e){case"string":return e.length+2;case"number":return String(e).length;case"boolean":return e?4:5;case"object":if(w(e)){for(var t=2,r=0;e.length>r;r++){r>0&&(t+=1);var i=e[r];t+=S(i)||M(i)?4:wr(i)}return t}var n=e,a=2,o=!0;for(var s in n)if({}.hasOwnProperty.call(n,s)){var u=n[s];S(u)||(o||(a+=1),o=!1,a+=s.length+3+wr(u))}return a;default:return 0}}function kr(e,t){if(void 0===t&&(t=6606028.8),e.size>=t&&e.data.length>1){var r=Math.floor(e.data.length/2),i=e.sizes.slice(0,r),n=e.sizes.slice(r);return[kr({size:i.reduce(((e,t)=>e+t),0),data:e.data.slice(0,r),sizes:i,sessionId:e.sessionId,windowId:e.windowId}),kr({size:n.reduce(((e,t)=>e+t),0),data:e.data.slice(r),sizes:n,sessionId:e.sessionId,windowId:e.windowId})].flatMap((e=>e))}return[e]}var _r=Uint8Array,Sr=Uint16Array,xr=Uint32Array,Cr=new _r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Mr=new _r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Tr=new _r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ir=function(e,t){for(var r=new Sr(31),i=0;31>i;++i)r[i]=t+=1<<e[i-1];var n=new xr(r[30]);for(i=1;30>i;++i)for(var a=r[i];r[i+1]>a;++a)n[a]=a-r[i]<<5|i;return[r,n]},Rr=Ir(Cr,2),Ar=Rr[1];Rr[0][28]=258,Ar[258]=28;for(var Er=Ir(Mr,0)[1],Lr=new Sr(32768),Or=0;32768>Or;++Or){var Dr=(43690&Or)>>>1|(21845&Or)<<1;Lr[Or]=((65280&(Dr=(61680&(Dr=(52428&Dr)>>>2|(13107&Dr)<<2))>>>4|(3855&Dr)<<4))>>>8|(255&Dr)<<8)>>>1}var Pr=function(e,t,r){for(var i=e.length,n=0,a=new Sr(t);i>n;++n)++a[e[n]-1];var o,s=new Sr(t);for(n=0;t>n;++n)s[n]=s[n-1]+a[n-1]<<1;if(r){o=new Sr(1<<t);var u=15-t;for(n=0;i>n;++n)if(e[n])for(var l=n<<4|e[n],h=t-e[n],c=s[e[n]-1]++<<h,d=c|(1<<h)-1;d>=c;++c)o[Lr[c]>>>u]=l}else for(o=new Sr(i),n=0;i>n;++n)o[n]=Lr[s[e[n]-1]++]>>>15-e[n];return o},Nr=new _r(288);for(Or=0;144>Or;++Or)Nr[Or]=8;for(Or=144;256>Or;++Or)Nr[Or]=9;for(Or=256;280>Or;++Or)Nr[Or]=7;for(Or=280;288>Or;++Or)Nr[Or]=8;var Fr=new _r(32);for(Or=0;32>Or;++Or)Fr[Or]=5;var qr=Pr(Nr,9,0),jr=Pr(Fr,5,0),Br=function(e){return(e/8>>0)+(7&e&&1)},Hr=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var i=new(e instanceof Sr?Sr:e instanceof xr?xr:_r)(r-t);return i.set(e.subarray(t,r)),i},$r=function(e,t,r){var i=t/8>>0;e[i]|=r<<=7&t,e[i+1]|=r>>>8},Ur=function(e,t,r){var i=t/8>>0;e[i]|=r<<=7&t,e[i+1]|=r>>>8,e[i+2]|=r>>>16},zr=function(e,t){for(var r=[],i=0;e.length>i;++i)e[i]&&r.push({s:i,f:e[i]});var n=r.length,a=r.slice();if(!n)return[new _r(0),0];if(1==n){var o=new _r(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var s=r[0],u=r[1],l=0,h=1,c=2;for(r[0]={s:-1,f:s.f+u.f,l:s,r:u};h!=n-1;)s=r[r[c].f>r[l].f?l++:c++],u=r[l!=h&&r[c].f>r[l].f?l++:c++],r[h++]={s:-1,f:s.f+u.f,l:s,r:u};var d=a[0].s;for(i=1;n>i;++i)a[i].s>d&&(d=a[i].s);var v=new Sr(d+1),f=Wr(r[h-1],v,0);if(f>t){i=0;var p=0,g=f-t,m=1<<g;for(a.sort((function(e,t){return v[t.s]-v[e.s]||e.f-t.f}));n>i;++i){var y=a[i].s;if(t>=v[y])break;p+=m-(1<<f-v[y]),v[y]=t}for(p>>>=g;p>0;){var b=a[i].s;t>v[b]?p-=1<<t-v[b]++-1:++i}for(;i>=0&&p;--i){var w=a[i].s;v[w]==t&&(--v[w],++p)}f=t}return[new _r(v),f]},Wr=function(e,t,r){return-1==e.s?Math.max(Wr(e.l,t,r+1),Wr(e.r,t,r+1)):t[e.s]=r},Vr=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Sr(++t),i=0,n=e[0],a=1,o=function(e){r[i++]=e},s=1;t>=s;++s)if(e[s]==n&&s!=t)++a;else{if(!n&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(n),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(n);a=1,n=e[s]}return[r.subarray(0,i),t]},Zr=function(e,t){for(var r=0,i=0;t.length>i;++i)r+=e[i]*t[i];return r},Gr=function(e,t,r){var i=r.length,n=Br(t+2);e[n]=255&i,e[n+1]=i>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var a=0;i>a;++a)e[n+a+4]=r[a];return 8*(n+4+i)},Qr=function(e,t,r,i,n,a,o,s,u,l,h){$r(t,h++,r),++n[256];for(var c=zr(n,15),d=c[0],v=c[1],f=zr(a,15),p=f[0],g=f[1],m=Vr(d),y=m[0],b=m[1],w=Vr(p),k=w[0],_=w[1],S=new Sr(19),x=0;y.length>x;++x)S[31&y[x]]++;for(x=0;k.length>x;++x)S[31&k[x]]++;for(var C=zr(S,7),M=C[0],T=C[1],I=19;I>4&&!M[Tr[I-1]];--I);var R,A,E,L,O=l+5<<3,D=Zr(n,Nr)+Zr(a,Fr)+o,P=Zr(n,d)+Zr(a,p)+o+14+3*I+Zr(S,M)+(2*S[16]+3*S[17]+7*S[18]);if(D>=O&&P>=O)return Gr(t,h,e.subarray(u,u+l));if($r(t,h,1+(D>P)),h+=2,D>P){R=Pr(d,v,0),A=d,E=Pr(p,g,0),L=p;var N=Pr(M,T,0);for($r(t,h,b-257),$r(t,h+5,_-1),$r(t,h+10,I-4),h+=14,x=0;I>x;++x)$r(t,h+3*x,M[Tr[x]]);h+=3*I;for(var F=[y,k],q=0;2>q;++q){var j=F[q];for(x=0;j.length>x;++x)$r(t,h,N[B=31&j[x]]),h+=M[B],B>15&&($r(t,h,j[x]>>>5&127),h+=j[x]>>>12)}}else R=qr,A=Nr,E=jr,L=Fr;for(x=0;s>x;++x)if(i[x]>255){var B;Ur(t,h,R[257+(B=i[x]>>>18&31)]),h+=A[B+257],B>7&&($r(t,h,i[x]>>>23&31),h+=Cr[B]);var H=31&i[x];Ur(t,h,E[H]),h+=L[H],H>3&&(Ur(t,h,i[x]>>>5&8191),h+=Mr[H])}else Ur(t,h,R[i[x]]),h+=A[i[x]];return Ur(t,h,R[256]),h+A[256]},Jr=new xr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Yr=function(){for(var e=new xr(256),t=0;256>t;++t){for(var r=t,i=9;--i;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e}(),Kr=function(){var e=4294967295;return{p(t){for(var r=e,i=0;t.length>i;++i)r=Yr[255&r^t[i]]^r>>>8;e=r},d:()=>4294967295^e}},Xr=function(e,t,r,i,n){return function(e,t,r,i,n,a){var o=e.length,s=new _r(i+o+5*(1+Math.floor(o/7e3))+n),u=s.subarray(i,s.length-n),l=0;if(!t||8>o)for(var h=0;o>=h;h+=65535){var c=h+65535;o>c?l=Gr(u,l,e.subarray(h,c)):(u[h]=true,l=Gr(u,l,e.subarray(h,o)))}else{for(var d=Jr[t-1],v=d>>>13,f=8191&d,p=(1<<r)-1,g=new Sr(32768),m=new Sr(p+1),y=Math.ceil(r/3),b=2*y,w=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&p},k=new xr(25e3),_=new Sr(288),S=new Sr(32),x=0,C=0,M=(h=0,0),T=0,I=0;o>h;++h){var R=w(h),A=32767&h,E=m[R];if(g[A]=E,m[R]=A,h>=T){var L=o-h;if((x>7e3||M>24576)&&L>423){l=Qr(e,u,0,k,_,S,C,M,I,h-I,l),M=x=C=0,I=h;for(var O=0;286>O;++O)_[O]=0;for(O=0;30>O;++O)S[O]=0}var D=2,P=0,N=f,F=A-E&32767;if(L>2&&R==w(h-F))for(var q=Math.min(v,L)-1,j=Math.min(32767,h),B=Math.min(258,L);j>=F&&--N&&A!=E;){if(e[h+D]==e[h+D-F]){for(var H=0;B>H&&e[h+H]==e[h+H-F];++H);if(H>D){if(D=H,P=F,H>q)break;var U=Math.min(F,H-2),z=0;for(O=0;U>O;++O){var W=h-F+O+32768&32767,V=W-g[W]+32768&32767;V>z&&(z=V,E=W)}}}F+=(A=E)-(E=g[A])+32768&32767}if(P){k[M++]=268435456|Ar[D]<<18|Er[P];var Z=31&Ar[D],G=31&Er[P];C+=Cr[Z]+Mr[G],++_[257+Z],++S[G],T=h+D,++x}else k[M++]=e[h],++_[e[h]]}}l=Qr(e,u,true,k,_,S,C,M,I,h-I,l)}return Hr(s,0,i+Br(l)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,i)},ei=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ti=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ei(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var i=0;r.length>=i;++i)e[i+10]=r.charCodeAt(i)}},ri=function(e){return 10+(e.filename&&e.filename.length+1||0)};function ii(e,t){for(var r="",i=0;e.length>i;){var n=e[i++];r+=String.fromCharCode(n)}return r}class ni{constructor(e,t){var r,i,n,a;void 0===t&&(t={}),this.ie={},this.ne=Date.now(),this.ae=-1/0,this.oe=()=>{var e=Date.now(),t=e-this.ne;t>0?(this.se=Math.min(this.ue,this.se+t/1e3*this.le),this.ne=e):this.ne=e},this.he=e=>{if(!this.ie[e]){var t,r;this.ie[e]=!0;var i=this.ce(e);null==(t=(r=this.de).onBlockedNode)||t.call(r,e,i)}},this.ve=e=>{var t=this.ce(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){var r=t.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[e,t]},this.ce=e=>this._rrweb.mirror.getNode(e),this.fe=e=>{var t,r,i,n,a,o,s,u;return(null!==(t=null==(r=e.removes)?void 0:r.length)&&void 0!==t?t:0)+(null!==(i=null==(n=e.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(a=null==(o=e.texts)?void 0:o.length)&&void 0!==a?a:0)+(null!==(s=null==(u=e.adds)?void 0:u.length)&&void 0!==s?s:0)},this.throttleMutations=e=>{if(3!==e.type||0!==e.data.source)return e;var t=e.data,r=this.fe(t);if(t.attributes){var i=t.attributes.length;t.attributes=t.attributes.filter((e=>{var t=this.ve(e.id);return!this.pe.consumeRateLimit(t[0])&&e}));var n,a,o=i-t.attributes.length;o>0&&(null==(n=(a=this.de).onDroppedAttributeMutations)||n.call(a,o))}var s=this.fe(t);if(0!==s||r===s){if(this.ge)return e;this.oe();var u,l,h=wr(e);return h>this.se?(null==(u=(l=this.de).onDroppedOversizedMutation)||u.call(l,h),void this.me()):(this.se-=h,e)}},this.me=()=>{if(!this.ye){var e=Math.max(0,this.be-(Date.now()-this.ae));this.ye=setTimeout((()=>{var e,t;this.ye=void 0,this.ae=Date.now(),null==(e=(t=this.de).requestFullSnapshot)||e.call(t)}),e)}},this._rrweb=e,this.de=t,this.pe=new F({bucketSize:null!==(r=this.de.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.de.refillRate)&&void 0!==i?i:10,refillInterval:1e3,I:this.he,A:Le}),this.ue=null!==(n=this.de.bytesBucketSize)&&void 0!==n?n:0,this.le=null!==(a=this.de.bytesRefillRate)&&void 0!==a?a:25600,this.ge=!Number.isFinite(this.ue)||0>=this.ue,this.se=this.ue;var o=this.de.resyncIntervalMs;this.be=I(o)&&Number.isFinite(o)&&o>0?o:3e5}reset(){this.ie={},this.ye&&(clearTimeout(this.ye),this.ye=void 0),this.ae=Date.now()}stop(){this.pe.stop(),this.reset(),this.se=this.ue,this.ne=Date.now(),this.ae=-1/0}}Ae.DEBUG=!1,Ae.LIB_VERSION="1.424.0",Ae.LIB_NAME="web";class ai{constructor(e){if(!e.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.we=e.get_property.bind(e),this.ke=e.persistence.set_property.bind(e.persistence)}trackSize(e,t){this.ke(Ut,{sessionId:e,size:this.currentTrackedSize(e)+t})}currentTrackedSize(e){var t,r=this.we(Ut);return _(t=r)&&x(t.sessionId)&&I(t.size)&&r.sessionId===e?r.size:0}}function oi(e,t){return function(e){for(var t=0,r=0;e.length>r;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Math.abs(t)}(e)%100<N(100*t,0,100,Le)}function si(e){return"$survey_response_"+e}function ui(e,t){if(!t)return null;var r=e[si(t)];return w(r)?[...r]:r}function li(e,t,r){void 0===e&&(e={});var i={};return t.questions.forEach((t=>{if(!S(t.originalQuestionIndex)){var r,n=0===(r=t.originalQuestionIndex)?"$survey_response":"$survey_response_"+r,a=ui(e,t.id);S(a)||(i[n]=a)}})),h({$survey_questions:t.questions.map((t=>{var i,n;return{id:t.id,question:null!==(i=null==r?void 0:r[null!==(n=t.id)&&void 0!==n?n:""])&&void 0!==i?i:t.question,response:ui(e,t.id)}}))},e,i)}function hi(e,t){var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r}function ci(e){return"string"==typeof e&&e.trim()?e.trim():null}function di(e){return e.toLowerCase()}function vi(e,t,r){if(!e||!t)return null;var i=di(t),n=Object.keys(e).find((e=>di(e)===i));if(n)return null==r||r.debug("Found exact translation match: "+n),n;if(i.includes("-")){var a=i.split("-")[0],o=Object.keys(e).find((e=>di(e)===a));if(o)return null==r||r.debug("Found base language translation match: "+o+" (from "+t+")"),o}return null}var fi=["thankYouMessageHeader","thankYouMessageDescription","thankYouMessageCloseButtonText","introScreenHeader","introScreenDescription","introScreenButtonText","submitButtonText","backButtonText"];function pi(e,t,r){var i,n=vi(e.translations,t,r),a=h({},e),o=!1;if(n){var s,u=null==(s=e.translations)?void 0:s[n];if(u)if(null==r||r.info("Applying survey-level translation for language: "+n),S(u.name)||(a.name=u.name,o=!0),a.appearance){var l=h({},a.appearance);for(var c of fi){var d=u[c];S(d)||(l[c]=d,o=!0)}a.appearance=l}else(function(e){return fi.some((t=>!S(e[t])))})(u)&&(o=!0)}var v=e.questions.map((e=>function(e,t,r){var i,n=vi(e.translations,t,r);if(!n)return{question:e,matchedKey:null,hasChanges:!1};var a=null==(i=e.translations)?void 0:i[n];if(!a)return{question:e,matchedKey:null,hasChanges:!1};var o=h({},e),s=!1;return S(a.question)||(o.question=a.question,s=!0),S(a.description)||(o.description=a.description,s=!0),S(a.buttonText)||(o.buttonText=a.buttonText,s=!0),"link"in o&&!S(a.link)&&(o.link=a.link,s=!0),"lowerBoundLabel"in o&&!S(a.lowerBoundLabel)&&(o.lowerBoundLabel=a.lowerBoundLabel,s=!0),"upperBoundLabel"in o&&!S(a.upperBoundLabel)&&(o.upperBoundLabel=a.upperBoundLabel,s=!0),"choices"in o&&function(e){return w(e.choices)}(a)&&(o.choices=a.choices,s=!0),{question:s?o:e,matchedKey:s?n:null,hasChanges:s}}(e,t,r))),f=v.map((e=>e.question)),p=v.some((e=>e.hasChanges)),g=null;return n||(g=(null==(i=v.find((e=>e.matchedKey)))?void 0:i.matchedKey)||null),p&&(a.questions=f,o=!0,null==r||r.info("Applied question-level translations for language: "+t)),{survey:a,matchedKey:o?n||g:null}}function gi(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}var mi=(e,t)=>{if(!(e=>{try{new RegExp(e)}catch(e){return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},yi=e=>e.toLowerCase(),bi={exact:(e,t)=>t.some((t=>e.some((e=>t===e)))),is_not:(e,t)=>t.every((t=>e.every((e=>t!==e)))),regex:(e,t)=>t.some((t=>e.some((e=>mi(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!mi(t,e))))),icontains:(e,t)=>t.map(yi).some((t=>e.map(yi).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(yi).every((t=>e.map(yi).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r<parseFloat(e)))}))},wi=new Set(["is_not","not_icontains","not_regex"]);function ki(e,t,r){return!e||0===e.length||e.every((e=>{var i="person"===e.type?r:t,n=null==i?void 0:i[e.key],a=e.operator||"exact";if(S(n)||M(n))return wi.has(a);var o=bi[a];return!!o&&!S(e.value)&&!M(e.value)&&o(w(e.value)?e.value.map(String):[String(e.value)],w(n)?n.map(String):[String(n)])}))}var _i=Oe("[SessionRecording]");function Si(e,t){return t?e:"!"+e}function xi(e,t){return e===t||e!=="!"+t&&null}class Ci{constructor(e,t,r,i,n,a,o){this._e=null,this.Se=mr,this._instance=e,this.X=t,this.ee=r,this.te=i,this.xe=n,this.Ce=a,this.Me=o}onRemoteConfig(e){this._e=I(e.sampleRate)?e.sampleRate:null,"any"===e.triggerMatchType?(this.Te=new ur([this.ee,this.X]),this.Se=gr):(this.Te=new lr([this.ee,this.X]),this.Se=mr),this._instance.register_for_session({[Zt]:e.triggerMatchType}),this.X.onConfig(e),this.ee.onConfig(e),this.te.onConfig(e,((e,t)=>{this.xe("linked_flag_matched",{flag:e,variant:t}),this.Me()}))}getStatus(e){return this.Se({receivedFlags:!0,isRecordingEnabled:!0,isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId})}getMinimumDuration(e){var t=this._instance.get_property("$session_recording_remote_config"),r=null==t?void 0:t.minimumDurationMilliseconds;return I(r)?r:null}checkUrlTriggers(e,t,r,i){this.X.checkUrlTriggerConditions(t,r,i,e)}setupEventTriggerListeners(e,t,r){if(0!==this.ee.Y.length&&T(this.Ie))return this.Ie=e((e=>{try{this.ee.checkEventTriggerConditions(e.event,r,t)}catch(e){_i.error("Could not activate event trigger",e)}})),this.Ie}makeSamplingDecisions(e){var t,r,i,n=this._e;if(!I(n))return null==(r=this._instance.persistence)||r.unregister(Pt),void(null==(i=this._instance.persistence)||i.unregister(At));var a=this._instance.get_property(Pt),o=this._instance.get_property(At),s=xi(a,e),u=I(o)&&o!==n,l=S(o)&&a===e,h=u||l||!R(s),c=h?oi(e,n):s;h&&(c?this.xe("sampled"):_i.warn("Sample rate ("+n+") has determined that this sessionId ("+e+") will not be sent to the server.")),null==(t=this._instance.persistence)||t.register({[Pt]:Si(e,c),[At]:M(o)&&a===e?null:n})}ensureSamplingDecision(e){if(I(this._e)){var t=this._instance.get_property(Pt);R(xi(t,e))||this.makeSamplingDecisions(e)}}onFlushComplete(){}clearConditionalRecordingPersistence(){var e,t,r,i,n;null==(e=this._instance.persistence)||e.unregister(qt),null==(t=this._instance.persistence)||t.unregister(Ft),null==(r=this._instance.persistence)||r.unregister(Pt),null==(i=this._instance.persistence)||i.unregister(At),null==(n=this._instance.persistence)||n.unregister(Nt)}updateActiveTriggers(e){}hasPendingTriggers(e){var t;return(null==(t=this.Te)?void 0:t.triggerStatus(e))===rr}getPendingTriggerConditions(e){return[{label:"URL condition not matched",status:this.X.triggerStatusNoSideEffects(e)},{label:"event condition not matched",status:this.ee.triggerStatusNoSideEffects(e)},{label:"linked flag condition not matched",status:this.te.triggerStatusNoSideEffects()}].filter((e=>e.status===rr)).map((e=>e.label))}stop(){var e;null==(e=this.Ie)||e.call(this),this.Ie=void 0,this.ee.stop(),this.X.stop(),this.te.stop()}}class Mi{constructor(e,t,r,i,n){this.Re=[],this.Ae=new Map,this.Ee=!1,this._instance=e,this.X=t,this.xe=r,this.Le=i,this.Me=n}onRemoteConfig(e){e.triggerGroups&&0!==e.triggerGroups.length?(this.Oe(e.triggerGroups),this._instance.register_for_session({[Zt]:"v2_trigger_groups",$sdk_debug_replay_trigger_groups_count:e.triggerGroups.length}),this.X.onConfig(e)):_i.warn("[V2Strategy] No trigger groups configured")}getStatus(e){return function(e){if(e.rrwebError)return Xt;if(e.urlTriggerMatching.urlBlocked)return Kt;var t=e.triggerGroupMatchers,r=e.triggerGroupSamplingResults;if(0===t.length)return Gt;var i=!1,n=!1;for(var a of t){var o=a.triggerStatus(e.sessionId);if(o===tr){var s=a.group.id,u=r.get(s);S(u)?Le.warn("[V2 Triggers] Group activated but no sampling decision found",{groupId:s}):!0===u&&(n=!0)}else o===rr&&(i=!0)}return n?Qt:i?Yt:Gt}({isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId,triggerGroupMatchers:this.Re,triggerGroupSamplingResults:this.Ae,minimumDuration:this.getMinimumDuration(e.sessionId)})}getMinimumDuration(e){var t=null;for(var r of this.Re)if("trigger_activated"===r.triggerStatus(e)){var i=r.group.minDurationMs;I(i)&&(M(t)||t>i)&&(t=i)}return t}checkUrlTriggers(e,t,r,i){var n=this;this.X.checkUrlBlocklist(t,r);var a=function(i){i.checkUrlTriggerConditions(t,r,(t=>{n.De(i,void 0)&&(i.activateTrigger(t,e),n.updateActiveTriggers(e),n.Me(t))}),e)};for(var o of this.Re)a(o)}setupEventTriggerListeners(e,t,r){var i=this;return this.Ie=e((e=>{var r;if(this.Ee)return _i.info("[SessionRecorder] Stopping trigger checks - initial buffer flushed"),null==(r=this.Ie)||r.call(this),void(this.Ie=void 0);try{var n=function(r){r.checkEventTriggerConditions(e.event,(n=>{if(i.De(r,e.properties)){var a=(r.group.conditions.events||[]).filter((t=>t.name===e.event)),o=i._instance.get_property(zt),s=a.some((t=>!t.properties||0===t.properties.length||ki(t.properties,e.properties,o)));s&&(r.activateTrigger(n,t),i.updateActiveTriggers(t),i.Me(n))}}),t)};for(var a of this.Re)n(a)}catch(e){_i.error("Could not activate event trigger for trigger groups",e)}})),this.Ie}makeSamplingDecisions(e){for(var t of this.Re){var r,i=t.group,n=i.id,a=i.sampleRate,o=Ht+n,s=this._instance.get_property(o),u=null,l=!1,h=!1,c=!1;if(_(s)){var d=s.sessionId,v=s.sampleRate,f=s.sampled;l="string"==typeof d&&d!==e,h=I(v)&&v!==a,u=d===e&&I(v)&&v===a&&R(f)?f:null}else u=s===e||null,l="string"==typeof s&&s!==e,c=s===e;var p=l||h||c||!R(u),g=p?oi(e+n,a):u;p&&this.Le("triggerGroupSamplingDecisionMade",{group_id:n,group_name:i.name,sampleRate:a,isSampled:g}),this.Ae.set(n,g),null==(r=this._instance.persistence)||r.register({[o]:{sessionId:e,sampleRate:a,sampled:g}})}this.updateActiveTriggers(e)}ensureSamplingDecision(e){}onFlushComplete(){this.Ee=!0}clearConditionalRecordingPersistence(){var e,t,r;for(var i of(null==(e=this._instance.persistence)||e.unregister(Pt),null==(t=this._instance.persistence)||t.unregister(At),null==(r=this._instance.persistence)||r.unregister(Nt),this.Re)){var n,a,o,s=i.group.id;null==(n=this._instance.persistence)||n.unregister(jt+s),null==(a=this._instance.persistence)||a.unregister(Bt+s),null==(o=this._instance.persistence)||o.unregister(Ht+s)}}updateActiveTriggers(e){var t=[];for(var r of this.Re){var i=r.group,n=i.id,a="trigger_activated"===r.triggerStatus(e),o=!0===this.Ae.get(n);a&&t.push({id:n,name:i.name,matched:!0,sampled:o})}this._instance.register_for_session({$sdk_debug_replay_matched_recording_trigger_groups:t})}hasPendingTriggers(e){for(var t of this.Re)if(t.triggerStatus(e)===rr)return!0;return!1}getPendingTriggerConditions(e){return this.Re.flatMap((t=>t.triggerStatusNoSideEffects(e)!==rr?[]:t.getPendingTriggerConditions(e).map((e=>'trigger group "'+t.group.name+'": '+e))))}stop(){var e;null==(e=this.Ie)||e.call(this),this.Ie=void 0,this.Re.forEach((e=>e.stop())),this.Re=[],this.Ae.clear(),this.X.stop()}De(e,t){var r=e.group.conditions.properties;return!r||0===r.length||ki(r,t,this._instance.get_property(zt))}Oe(e){var t=this;this.Re.forEach((e=>e.stop())),this.Re=[],this.Ae.clear();var r=function(e){var r=new pr(t._instance,e,((r,i)=>{t.xe("linked_flag_matched",{flag:r,variant:i,group_id:e.id,group_name:e.name}),t.Me()}));t.Re.push(r)};for(var i of e)r(i)}}var Ti=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ii=1e5,Ri="https://schema.org",Ai=[],Ei="actionStatus availability bestRating contentRating encodingFormat eventAttendanceMode eventStatus highPrice inLanguage isAccessibleForFree isFamilyFriendly itemCondition itemListOrder lowPrice maximumAttendeeCapacity nonprofitStatus numberOfItems offerCount position price priceCurrency priceValidUntil publicAccess ratingCount ratingValue reviewCount smokingAllowed worstRating".split(" "),Li="Action BorrowAction ReadAction SearchAction SeekToAction SolveMathAction WatchAction".split(" "),Oi="AutoDealer Bakery BarOrPub CafeOrCoffeeShop CollegeOrUniversity Corporation DaySpa Dentist EducationalOrganization Electrician FoodEstablishment GovernmentOrganization HealthClub Hotel LegalService Library LibrarySystem LocalBusiness Locksmith LodgingBusiness MedicalBusiness NGO OnlineStore Organization PerformingGroup Pharmacy Physician Plumber RealEstateAgent Restaurant School SportsOrganization Store".split(" "),Di="Accommodation AdministrativeArea Country Place State".split(" "),Pi={AggregateOffer:{offers:["Offer"]},Brand:{name:!0},BreadcrumbList:{itemListElement:["ListItem"]},CreativeWork:{genre:!0,dateCreated:!0,dateModified:!0,datePublished:!0,expires:!0,learningResourceType:!0,educationalLevel:!0,educationalUse:!0,interactivityType:!0,aggregateRating:["AggregateRating"],potentialAction:Li,publisher:Oi},Event:{startDate:!0,endDate:!0,previousStartDate:!0,aggregateRating:["AggregateRating"],offers:["AggregateOffer","Offer"]},ItemList:{itemListElement:["ListItem"]},ListItem:{item:Ai},Offer:{seller:Oi},Organization:{name:!0,legalName:!0,foundingDate:!0,dissolutionDate:!0,aggregateRating:["AggregateRating"],brand:["Brand"]},Person:{},Place:{aggregateRating:["AggregateRating"]},Product:{name:!0,sku:!0,mpn:!0,gtin:!0,gtin8:!0,gtin12:!0,gtin13:!0,gtin14:!0,productID:!0,productGroupID:!0,asin:!0,model:!0,category:!0,color:!0,material:!0,pattern:!0,size:!0,productionDate:!0,releaseDate:!0,brand:["Brand","Organization"],manufacturer:Oi,offers:["Offer","AggregateOffer"],aggregateRating:["AggregateRating"]},Service:{name:!0,serviceType:!0,category:!0,provider:Oi,areaServed:Di,offers:["AggregateOffer","Offer"],aggregateRating:["AggregateRating"]},OfferCatalog:{name:!0,itemListElement:Ai}},Ni={},Fi=[[Li,Ni],["3DModel AboutPage Answer Article AudioObject Blog BlogPosting Book Clip CollectionPage Comment ContactPage Course CreativeWorkSeason CreativeWorkSeries DataCatalog DataDownload DataFeed Dataset DiscussionForumPosting Episode FAQPage Game HowTo HowToDirection HowToSection HowToStep HowToTip ImageObject LearningResource MediaObject Message MobileApplication Movie MusicPlaylist MusicRecording NewsArticle Photograph PodcastEpisode PodcastSeries ProfilePage QAPage Question Quiz Recipe Review ScholarlyArticle SearchResultsPage SiteNavigationElement SocialMediaPosting SoftwareApplication TVEpisode TVSeries TechArticle VacationRental VideoGame VideoObject WebApplication WebPage WebPageElement WebSite".split(" "),Pi.CreativeWork],["BroadcastEvent BusinessEvent EducationEvent Festival MusicEvent SportsEvent TheaterEvent".split(" "),Pi.Event],[Oi,Pi.Organization],[Di,Pi.Place],["Car IndividualProduct ProductGroup ProductModel".split(" "),Pi.Product],["AggregateRating EmployerAggregateRating Rating".split(" "),Ni]],qi="AlignmentObject BedDetails Certification ContactPoint CreditCard DefinedRegion EducationalOccupationalCredential EntryPoint GeoCoordinates GeoShape InteractionCounter JobPosting LocationFeatureSpecification MathSolver MemberProgram MemberProgramTier MerchantReturnPolicy MerchantReturnPolicySeasonalOverride MonetaryAmount NutritionInformation OccupationalExperienceRequirements OfferShippingDetails OpeningHoursSpecification PeopleAudience PostalAddress PriceSpecification PropertyValue QuantitativeValue ServicePeriod ShippingConditions ShippingDeliveryTime ShippingRateSettings ShippingService SpeakableSpecification Thing UnitPriceSpecification".split(" ");function ji(e,t){return y.call(e,t)?e[t]:void 0}function Bi(e){var t=typeof e;return M(e)||"string"===t||"number"===t||"boolean"===t}function Hi(e){return Bi(e)||w(e)&&e.every(Bi)?e:void 0}function $i(e){if(y.call(Pi,e))return Pi[e];for(var t of Fi){var r=t[1];if(t[0].includes(e))return r}return qi.includes(e)?Ni:void 0}function Ui(e,t){if(!_(e))return null;var r=ji(e,"@type"),i=function(e){return("string"==typeof e?[e]:w(e)?e:[]).filter((e=>"string"==typeof e)).map((e=>e.replace(/^https?:\/\/schema\.org\//,""))).filter((e=>!!$i(e)))}(r).filter((e=>!t||!t.length||t.includes(e)));if(!i.length)return null;var n={"@type":"string"==typeof r?i[0]:i},a=Hi(ji(e,"@id"));for(var o of(S(a)||(n["@id"]=a),Ei)){var s=Hi(ji(e,o));S(s)||(n[o]=s)}for(var u of i){var l=$i(u),h=function(){var t=ji(e,c),r=l[c];if(!0===r){var i=Hi(t);S(i)||(n[c]=i)}else if(w(t)){var a=t.map((e=>Ui(e,r))).filter(_);a.length&&(n[c]=a)}else{var o=Ui(t,r);o&&(n[c]=o)}};for(var c of Object.keys(l))h()}return n}function zi(e){if(!_(e))return null;var t=ji(e,"@context");if("string"!=typeof t||!/^https?:\/\/schema\.org\/?$/.test(t))return null;var r=Ui(e);if(r)return h({"@context":Ri},r);var i=ji(e,"@graph");if(!w(i))return null;var n=i.map((e=>Ui(e))).filter(_);return n.length?{"@context":Ri,"@graph":n}:null}function Wi(e){var t;return"SCRIPT"===e.nodeName&&"application/ld+json"===(null==(t=e.getAttribute("type"))?void 0:t.trim().toLowerCase())}function Vi(e,t,r){if("string"==typeof t?e.classList.contains(t):t&&Array.from(e.classList).some((e=>(t.lastIndex=0,t.test(e)))))return!0;try{return!!r&&e.matches(r)}catch(e){return!1}}function Zi(e){return Wi(e)?[e]:e.nodeType!==e.ELEMENT_NODE?[]:Array.from(e.querySelectorAll("script")).filter(Wi)}function Gi(e){return S(e)?void 0:Math.round(e)}function Qi(e){return _(e)?e.network_timing:e}var Ji,Yi,Ki=943718.4,Xi="[SessionRecording]",en=Oe(Xi),tn=[d.MouseMove,d.MouseInteraction,d.Scroll,d.ViewportResize,d.Input,d.TouchMove,d.MediaInteraction,d.Drag],rn=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function nn(){var e;return null==s||null==(e=s.__PosthogExtensions__)?void 0:e.rrweb}function an(){var e;return null==(e=nn())?void 0:e.record}function on(e){try{return JSON.stringify(e)}catch(t){return JSON.stringify(e,yr())}}function sn(e){return ii(function(e,t){void 0===t&&(t={});var r=Kr(),i=e.length;r.p(e);var n=Xr(e,t,ri(t),8),a=n.length;return ti(n,t),ei(n,a-8,r.d()),ei(n,a-4,i),n}(function(e,t){var r=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new _r(e.length+(e.length>>>1)),n=0,a=function(e){i[n++]=e},o=0;r>o;++o){if(n+5>i.length){var s=new _r(n+8+(r-o<<1));s.set(i),i=s}var u=e.charCodeAt(o);128>u?a(u):2048>u?(a(192|u>>>6),a(128|63&u)):u>55295&&57344>u?(a(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++o))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return Hr(i,0,n)}(on(e))))}function un(e){return ln.apply(this,arguments)}function ln(){return ln=l((function*(e){var t=on(e),r=yield function(e,t,r){return ve.apply(this,arguments)}(t,Ae.DEBUG,{rethrow:!0});return ii(new Uint8Array(yield r.arrayBuffer()))})),ln.apply(this,arguments)}var hn="undefined"!=typeof globalThis&&"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&"function"==typeof Response.prototype.blob,cn=!1;function dn(e){return w(e)&&0===e.length?Ji=null!=Ji?Ji:sn([]):sn(e)}function vn(e){return fn.apply(this,arguments)}function fn(){return(fn=l((function*(e){return w(e)&&0===e.length?Ji||(Yi=null!=Yi?Yi:un([]).then((e=>(Ji=e,e))).catch((e=>{throw Ji=void 0,Yi=void 0,e}))):un(e)}))).apply(this,arguments)}function pn(e){return hn&&!cn&&function(e){return e.type===c.FullSnapshot||e.type===c.IncrementalSnapshot&&(e.data.source===d.Mutation||e.data.source===d.StyleSheetRule)}(e)}function gn(e){return{event:e,size:wr(e)}}function mn(e,t){return h({},e,{data:t,cv:"2024-10"})}function yn(e,t){return h({},e,{cv:"2024-10",data:h({},e.data,t)})}function bn(e){try{if(e.type===c.FullSnapshot)return gn(mn(e,sn(e.data)));if(e.type===c.IncrementalSnapshot&&e.data.source===d.Mutation)return gn(yn(e,{texts:dn(e.data.texts),attributes:dn(e.data.attributes),removes:dn(e.data.removes),adds:dn(e.data.adds)}));if(e.type===c.IncrementalSnapshot&&e.data.source===d.StyleSheetRule)return gn(yn(e,{adds:e.data.adds?sn(e.data.adds):void 0,removes:e.data.removes?sn(e.data.removes):void 0}))}catch(e){en.error("could not compress event - will use uncompressed event",e)}return{event:e,size:br(e)}}function wn(){return wn=l((function*(e){try{if(e.type===c.FullSnapshot)return gn(mn(e,yield un(e.data)));if(e.type===c.IncrementalSnapshot&&e.data.source===d.Mutation){var t=yield Promise.all([vn(e.data.texts),vn(e.data.attributes),vn(e.data.removes),vn(e.data.adds)]);return gn(yn(e,{texts:t[0],attributes:t[1],removes:t[2],adds:t[3]}))}if(e.type===c.IncrementalSnapshot&&e.data.source===d.StyleSheetRule){var r=yield Promise.all([e.data.adds?un(e.data.adds):void 0,e.data.removes?un(e.data.removes):void 0]);return gn(yn(e,{adds:r[0],removes:r[1]}))}}catch(t){return(e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return(e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""))(e)||t===he})(t)&&(cn=!0),en.error("could not compress event asynchronously - trying synchronous compression",t),bn(e)}return{event:e,size:br(e)}})),wn.apply(this,arguments)}function kn(e,t){return e.type===c.Custom&&e.data.tag===t}function _n(e){return kn(e,"sessionIdle")}function Sn(e){return kn(e,"$session_ending")}function xn(e){return kn(e,"$session_starting")}class Cn{get sessionId(){return this.Pe}get Ne(){if(!this._instance.sessionManager)throw new Error(Xi+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Fe(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get qe(){return xi(this._instance.get_property(Pt),this.sessionId)}get _e(){var e,t=null==(e=this.je)?void 0:e.sampleRate;return I(t)?t:null}get Be(){var e,t;return null!==(e=null==(t=this.He)?void 0:t.getMinimumDuration(this.sessionId))&&void 0!==e?e:null}constructor(e,t){this.$e="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.Ue=void 0,this.ze=!1,this.We=Date.now(),this.Ve=!1,this.Ze=[],this.Ge="unknown",this.Qe=0,this.Je=0,this.Ye=0,this.Ke=0,this.Xe=!1,this.et=!1,this.tt=!1,this.rt=!1,this.it=!1,this.nt=!1,this.ot=!1,this.st=!1,this.ut=!1,this.ht=!1,this.ct=!1,this.dt=!1,this.vt=[],this.ft=void 0,this.yt=void 0,this.bt=[],this.wt=0,this.kt=0,this._t=!1,this.St=void 0,this.Ie=void 0,this.xt=void 0,this.Ct=void 0,this.Mt=void 0,this.Tt=(e,t,r)=>{var i,n,a;if(r&&(e!==this.Pe||t!==this.It)){var o,s=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),u=this.Pe,l=this.It;if(s&&this.Le("$session_ending",{currentSessionId:u,currentWindowId:l,nextSessionId:e,nextWindowId:t,changeReason:r,lastActivityTimestamp:this.We,flushed_size:null==(o=this.Rt)?void 0:o.currentTrackedSize(u)}),null==(i=this._instance.persistence)||i.unregister($t),this.ot=!1,null==(n=nn())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.Le("$session_id_change",{sessionId:e,windowId:t,changeReason:r}),this.At(),!(!1===this.Ge&&this.isStarted||this.Pe===e&&this.It===t)){var h=this.Pe!==e&&!1!==this.Ge;this.Ge="unknown",this.Et(h)}s&&this.Le("$session_starting",{previousSessionId:u,previousWindowId:l,nextSessionId:e,nextWindowId:t,changeReason:r,lastActivityTimestamp:this.We}),null==(a=this.He)||a.makeSamplingDecisions(e)}},this.Lt=()=>{var e;return(null==(e=this._instance.persistence)?void 0:e.props[Nt])===this.Pe},this.Ot=()=>{var e,t;if(0===this.Dt.data.length)return null;var r=null==(e=this.Dt.data[0])?void 0:e.timestamp,i=null==(t=this.Dt.data[this.Dt.data.length-1])?void 0:t.timestamp;return I(r)&&I(i)?i-r:null},this.Pt=()=>{var e,t,r=this.Be;if(!I(r))return!1;if(null===(e=null==(t=this._instance.config.session_recording)?void 0:t.strictMinimumDuration)||void 0===e||!e){var i=this.Nt;return I(i)&&i>=0&&r>i}if(this.Lt())return!1;var n,a=this.Ot();return!!M(a)||r>a||(null==(n=this._instance.persistence)||n.register({[Nt]:this.Pe}),!1)},this.Ft=()=>{this.status!==Yt?(this.Xe&&this.et&&this.qt&&!this.tt&&(this.Xe=!1),this.jt(),this.Bt()):this.Ht()},this.$t=()=>{this.Ft()},this.Ut=()=>{this.Le("browser offline",{})},this.zt=()=>{this.Le("browser online",{})},this.Wt=()=>{null!=i&&i.visibilityState&&("visible"===i.visibilityState&&(this.qt=!0),this.Le("window "+i.visibilityState,{}))},this._instance=e,this.qt=null==t||t;var r=this.Ne.checkAndGetSessionAndWindowId(),n=r.windowId;this.Pe=r.sessionId,this.It=n,this.te=new vr(this._instance),this.X=new dr(this._instance),this.ee=new fr(this._instance),this.Dt=this.Ht(),this.Ne.sessionTimeoutMs>this.Fe||en.warn("session_idle_threshold_ms ("+this.Fe+") is greater than the session timeout ("+this.Ne.sessionTimeoutMs+"). Session will never be detected as idle"),this.Rt=new ai(this._instance)}setDocumentWasEverVisible(e){e&&(this.qt=!0)}get Vt(){var e,t,r,i,n,a,o,s,u,l=null==(e=this.je)?void 0:e.masking,h={maskAllInputs:null==(t=this._instance.config.session_recording)?void 0:t.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector,maskAllElementAttributes:null==(n=this._instance.config.session_recording)?void 0:n.maskAllElementAttributes},c=null!==(a=null==h?void 0:h.maskAllInputs)&&void 0!==a?a:null==l?void 0:l.maskAllInputs,d=null!==(o=null==h?void 0:h.maskTextSelector)&&void 0!==o?o:null==l?void 0:l.maskTextSelector,v=null!==(s=null==h?void 0:h.blockSelector)&&void 0!==s?s:null==l?void 0:l.blockSelector,f=null!==(u=null==h?void 0:h.maskAllElementAttributes)&&void 0!==u?u:null==l?void 0:l.maskAllElementAttributes;return S(c)&&S(d)&&S(v)&&S(f)?void 0:{maskAllInputs:null==c||c,maskTextSelector:d,blockSelector:v,maskAllElementAttributes:f}}Zt(){var e;if(!this.ut){var t=null==(e=this.je)?void 0:e.masking;if(!T(t)){var r=this._instance.config.session_recording,i=["maskAllInputs","maskTextSelector","blockSelector","maskAllElementAttributes"].filter((e=>{var i=null==r?void 0:r[e],n=t[e];return!S(i)&&i!==n}));0!==i.length&&(this.ut=!0,en.warn('Session recording masking is configured both in `posthog.init` and in your project settings, and they differ. The `session_recording` options in `posthog.init` take precedence, so the project ("Privacy and masking") setting is ignored for: '+i.join(", ")+". Remove these masking options from `posthog.init` to use the project setting instead. See https://posthog.com/docs/session-replay/privacy",{client:{maskAllInputs:null==r?void 0:r.maskAllInputs,maskTextSelector:null==r?void 0:r.maskTextSelector,blockSelector:null==r?void 0:r.blockSelector,maskAllElementAttributes:null==r?void 0:r.maskAllElementAttributes},project:t}))}}}get Gt(){var e;return N(null==(e=this._instance.config.session_recording.canvasCapture)?void 0:e.resolutionScale,.1,1,Oe("canvas recording resolution scale"),1)}get Qt(){var e,t,r,i,n,a,o,s=this._instance.config.session_recording.captureCanvas,u=null==(e=this.je)?void 0:e.canvasRecording,l=null!==(t=null!==(r=null==s?void 0:s.recordCanvas)&&void 0!==r?r:null==u?void 0:u.enabled)&&void 0!==t&&t,h=null!==(i=null!==(n=null==s?void 0:s.canvasFps)&&void 0!==n?n:null==u?void 0:u.fps)&&void 0!==i?i:4,c=null!==(a=null!==(o=null==s?void 0:s.canvasQuality)&&void 0!==o?o:null==u?void 0:u.quality)&&void 0!==a?a:.4;if("string"==typeof c){var d=parseFloat(c);c=isNaN(d)?.4:d}return{enabled:l,fps:N(h,0,12,Oe("canvas recording fps"),4),quality:N(c,0,1,Oe("canvas recording quality"),.4)}}get Jt(){var e,t=!(null==(e=this.je)||!e.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:t}get Yt(){var e,t,r,i=null==(e=this.je)?void 0:e.networkPayloadCapture,n={recordHeaders:null==(t=this._instance.config.session_recording)?void 0:t.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},a=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),o=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),s=Qi(this._instance.config.capture_performance),u=Qi(null==i?void 0:i.capturePerformance),l=!!(R(s)?s:u);return a||o||l?{recordHeaders:a,recordBody:o,recordPerformance:l}:void 0}Kt(){var e,t,r=[],i=null==(e=s.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordConsolePlugin;i&&this.Jt&&r.push(i());var a=null==(t=s.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordNetworkPlugin;if(this.Yt&&k(a))if(!Fe.includes(n.hostname)||this._forceAllowLocalhostNetworkCapture){var o=k(this._instance.requestRouter.isIngestionEndpoint)?this._instance.requestRouter.isIngestionEndpoint.bind(this._instance.requestRouter):void 0;r.push(a(((e,t,r)=>{var i,n={payloadSizeLimitBytes:wt.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...wt.performanceEntryTypeToObserve],payloadHostDenyList:[...t.payloadHostDenyList||[],...wt.payloadHostDenyList]},a=!1!==e.session_recording.recordHeaders&&t.recordHeaders,o=!1!==e.session_recording.recordBody&&t.recordBody,s=!1!==e.capture_performance&&t.recordPerformance,u=(i=bt(n),e=>(null!=e&&e.requestBody&&(e.requestBody=Mt(e.requestBody,e.requestHeaders,i,"Request")),null!=e&&e.responseBody&&(e.responseBody=Mt(e.responseBody,e.responseHeaders,i,"Response")),e)),l=t=>{return u(((e,t,r)=>{var i;if(null==r||!r(e.name)){var n=qe(e.name),a=0===t.indexOf("http")?null==(i=qe(t))?void 0:i.pathname:t;"/"===a&&(a="");var o=null==n?void 0:n.pathname.replace(a||"","");if(!(n&&o&&Ct.some((e=>0===o.indexOf(e)))))return e}})((xt((i=t).requestHeaders),xt(i.responseHeaders),i),e.api_host,r));var i},c=k(e.session_recording.maskNetworkRequestFn);return c&&k(e.session_recording.maskCapturedNetworkRequestFn)&&Le.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),c&&(e.session_recording.maskCapturedNetworkRequestFn=t=>{var r=e.session_recording.maskNetworkRequestFn({url:t.name});return!r&&t.isInitial?r:h({},t,{name:null==r?void 0:r.url})}),n.maskRequestFn=k(e.session_recording.maskCapturedNetworkRequestFn)?t=>{var r=l(t);if(r){var i=r.isInitial?{name:"",entryType:r.entryType,startTime:r.startTime,duration:r.duration,endTime:r.endTime,timeOrigin:r.timeOrigin,timestamp:r.timestamp,isInitial:!0}:void 0,n=null==e.session_recording.maskCapturedNetworkRequestFn?void 0:e.session_recording.maskCapturedNetworkRequestFn(r);return T(n)&&i?(It.add(i),i):null!=n?n:void 0}}:e=>function(e){if(!S(e))return e.requestBody=Tt(e.requestBody,"Request"),e.responseBody=Tt(e.responseBody,"Response"),e}(l(e)),h({},wt,n,{recordHeaders:a,recordBody:o,recordPerformance:s,recordInitialRequests:s,streamNetworkBody:!0===e.session_recording.streamNetworkBody})})(this._instance.config,this.Yt,o)))}else en.info("NetworkCapture not started because we are on localhost.");return r}Xt(e){return this._instance.config.disable_capture_url_hashes?ae(e):e}er(e,t){void 0===t&&(t=!1);var r=t?ae(e):this.Xt(e),i=this._instance.config.mask_personal_data_properties?[...Ti,...this._instance.config.custom_personal_data_properties||[]]:[];return this.tr(function(e,t,r){if(!e||!t||!t.length)return e;for(var i=e.split("#"),n=i[1],a=(i[0]||"").split("?"),o=a[1],s=a[0],u=(o||"").split("&"),l=[],h=0;u.length>h;h++){var c=u[h].split("=");w(c)&&(t.includes(c[0])?l.push(c[0]+"=<masked>"):l.push(u[h]))}var d=s;return null!=o&&(d+="?"+l.join("&")),null!=n&&(d+="#"+n),d}(r,i))}tr(e){var t=this._instance.config.session_recording;if(t.maskCapturedNetworkRequestFn){var r,i=t.maskCapturedNetworkRequestFn({name:e});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(t.maskNetworkRequestFn){var n=t.maskNetworkRequestFn({url:e});return null==n?void 0:n.url}return e}rr(e){try{return e.rrwebMethod(),!0}catch(t){return 10>this.Ze.length?this.Ze.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt+1,rrwebMethod:e.rrwebMethod}):en.warn("could not emit queued rrweb event.",t,e),!1}}Le(e,t){return this.rr(rn((()=>an().addCustomEvent(e,t))))}ir(){var e;return this.ze&&!0===(null==(e=this._instance.config.session_recording)?void 0:e.captureJsonLd)&&!this.X.urlBlocked&&!0!==this.Ge}nr(e){if(!this.ir())return!1;try{var t=an();return!!t&&(t.addCustomEvent("$json_ld",e),this.ir())}catch(e){return!1}}ar(e){void 0===e&&(e=!1),Promise.resolve().then((()=>{var t;return null==(t=this.sr)?void 0:t.scan(e)}))}ur(){try{if(this._instance.config.capture_pageview||!e)return;var t=new URL(e.location.href),r=this.er(t.origin+t.pathname+t.search);this.lr!==r&&(this.lr=r,this.Le("$url_changed",{href:r}))}catch(e){}}hr(){if(this.Ze.length){var e=[...this.Ze];this.Ze=[],e.forEach((e=>{Date.now()-e.enqueuedAt>2e3||this.rr(e)}))}}Ce(){return this.rr(rn((()=>an().takeFullSnapshot())))}get cr(){var e,t,r;if(null!=(e=this.He)&&e.hasPendingTriggers(this.sessionId)&&!["sampled","active"].includes(this.status)){var i,n=null==(i=this._instance.config.session_recording)?void 0:i.trigger_pending_buffer_interval_millis;return I(n)&&Number.isFinite(n)&&n>=1e3&&36e5>=n?n:6e4}return null!==(t=null==(r=this._instance.config.session_recording)?void 0:r.full_snapshot_interval_millis)&&void 0!==t?t:3e5}dr(){if(this.vr&&clearInterval(this.vr),!0!==this.Ge){var e=this.cr;e&&(this.vr=setInterval((()=>{this.Ce()}),e))}}Me(e){"event"===e&&this.pr(),!this.X.urlBlocked&&["sampled","active"].includes(this.status)&&this.dr()}gr(){var e;this.X.urlBlocked||(this.X.urlBlocked=!0,null==(e=this.sr)||e.scan(),clearInterval(this.vr),en.info("recording paused due to URL blocker"),this.Le("recording paused",{reason:"url blocker"}))}mr(){var e;this.X.urlBlocked&&(null==(e=this.sr)||e.scan(),this.X.urlBlocked=!1,this.Ce(),this.ar(),this.dr(),this.Le("recording resumed",{reason:"left blocked url"}),en.info("recording resumed"))}yr(e,t){var r;if("event"===e&&this.pr(),!this.Ve&&null!=(r=this.He)&&r.hasPendingTriggers(this.sessionId)){this.Ve=!0;try{var i,n;null==(i=this._instance.persistence)||i.register({["url"===e?Ft:qt]:this.sessionId}),null==(n=this.He)||n.updateActiveTriggers(this.sessionId),this.Me(),this.Bt(),this.xe(e+"_trigger_matched",{["url"===e?"matchedUrl":"matchedEvent"]:t})}finally{this.Ve=!1}}}get isStarted(){return!!this.Ue}get je(){var e=this._instance.get_property(Rt);if(e){var t;try{t=_(e)?e:JSON.parse(e)}catch(e){return void en.warn("persisted remote config for session recording is invalid and will be ignored",e)}if(!this.isStarted){var r,i,n=null!==(r=t.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>36e5)return en.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:e}),void(null==(i=this._instance.persistence)||i.unregister(Rt))}return t}}br(e,t,r){this._instance.get_property(e)&&(t(),r())}start(t){var r,n,a=this.je;if(a){this.isStarted||(this.Xe=!1!==this.Ge&&!this.rt,this.rt=!1,this.et=this.Xe,this.tt=!1),this._t&&(this.wr(),this.Ht());var o=this.Ne.checkAndGetSessionAndWindowId(),s=o.windowId;this.Pe=o.sessionId,this.It=s,null==(r=this._instance.persistence)||r.unregister($t),null!=a&&a.endpoint&&(this.$e=null==a?void 0:a.endpoint),this.He=2===(null==a?void 0:a.version)&&(null==a?void 0:a.triggerGroups)&&a.triggerGroups.length>0?new Mi(this._instance,this.X,this.xe.bind(this),this.Le.bind(this),this.Me.bind(this)):new Ci(this._instance,this.X,this.ee,this.te,this.xe.bind(this),this.Ce.bind(this),this.Me.bind(this)),this.He.onRemoteConfig(a),null==(n=this.Ie)||n.call(this),this.Ie=this.He.setupEventTriggerListeners(this._instance.on.bind(this._instance,"eventCaptured"),this.sessionId,((e,t)=>this.yr(e,t))),this.br(Et,(()=>{this.overrideSampling()}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Et)})),this.br(Lt,(()=>{this.overrideLinkedFlag()}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Lt)})),this.br(Dt,(()=>{this.overrideTrigger("event")}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Dt)})),this.br(Ot,(()=>{this.overrideTrigger("url")}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Ot)})),this.He.makeSamplingDecisions(this.sessionId),this.kr(),this.it||(Ne(e,"beforeunload",this.Ft),Ne(e,"pagehide",this.$t),Ne(e,"offline",this.Ut),Ne(e,"online",this.zt),Ne(i,"visibilitychange",this.Wt),!this.xt&&k(this.Ne.onSessionId)&&(this.xt=this.Ne.onSessionId(this.Tt)),!this.Ct&&k(this.Ne.on)?this.Ct=this.Ne.on("forcedIdleReset",(()=>{this.At(),this.Ge="unknown",this.stop(),this.Mt=this.Ne.onSessionId(((e,t,r)=>{var i;null==(i=this.Mt)||i.call(this),this.Mt=void 0,this.Tt(e,t,r)}))})):k(this.Ne.on)||en.warn("bundled core has no SessionIdManager.on (requires posthog-js >= 1.268.6); recording will start but skip forced-idle-reset handling"),T(this.St)&&(this.St=this._instance.on("eventCaptured",(e=>{try{if("$pageview"===e.event){var t=null!=e&&e.properties.$current_url?this.er(e.properties.$current_url):"";if(!t)return;this.Le("$pageview",{href:t})}}catch(e){en.error("Could not add $pageview to rrweb session",e)}}))),this.status===Jt&&this.xe(t||"recording_initialized"))}else en.info("remote config must be stored in persistence before recording can start")}_r(){var t,r,n,a,o,s;null==e||e.removeEventListener("beforeunload",this.Ft),null==e||e.removeEventListener("pagehide",this.$t),null==e||e.removeEventListener("offline",this.Ut),null==e||e.removeEventListener("online",this.zt),null==i||i.removeEventListener("visibilitychange",this.Wt),clearInterval(this.vr),this.Sr(),null==(t=this.St)||t.call(this),this.St=void 0,null==(r=this.Ie)||r.call(this),this.Ie=void 0,null==(n=this.xt)||n.call(this),this.xt=void 0,null==(a=this.Ct)||a.call(this),this.Ct=void 0,null==(o=this.Mt)||o.call(this),this.Mt=void 0,null==(s=this.He)||s.stop(),this.Cr(),this.wr()}wr(){this.kt+=1,this.bt=[],this.wt=0,this.Mr=void 0,this._t=!1}Cr(){var e,t,r;null==(e=this.Tr)||e.stop(),this.Ze=[],null==(t=this.sr)||t.stop(),this.sr=void 0,this.ze=!1,null==(r=this.Ue)||r.call(this),this.Ue=void 0}Ir(){if(!this.Mr||0===this.wt)return!1;if(this._t)return!0;this._t=!0;var e=this.kt;return this.Sr(),this.Cr(),this.Mr.catch((()=>{})).then((()=>{e===this.kt&&(this._t=!1,this.Bt(),this.Ht(),this._r(),en.info("stopped"))})).catch((()=>{this._t=!1,this._r(),en.info("stopped")})),!0}stop(){this.Cr(),this.Ir()||(this.Bt(),this.Ht(),this._r(),en.info("stopped"))}Et(e){var t;this.stop(),this.Rr=void 0,this.Ar=void 0,this.Je=0,this.Ye=0,this.Ke=0,null==(t=nn())||null==t.resetSnapshotCostState||t.resetSnapshotCostState(),this.start("session_id_changed"),this.Xe=e,this.et=!1}pr(){this.isStarted||(this.rt=!0),this.Xe&&(this.Xe=!1,this.et=!1,this.tt&&(this.tt=!1,this.Ce()),this.Er())}discard(e){var t=(void 0===e?{}:e).discardProducerEvents;void 0!==t&&t&&(this.Ht(),this.Cr()),this.Ht(),this._r(),en.info("discarded")}Lr(e,t,r,i,n){var a={$snapshot_bytes:r,$snapshot_data:t,$session_id:i,$window_id:n};this.status!==Gt?(this.Or(e,i),this.Dr(a)):this.Ht()}Pr(){try{this.Nr()}catch(e){this.st||(this.st=!0,en.error("could not track full snapshot cost",e))}}Nr(){var e,t=null==(e=nn())||null==e.getLastSnapshotCost?void 0:e.getLastSnapshotCost();t&&t!==this.Ar&&(this.Ar=t,this.Rr&&this.Rr.durationMs>=t.durationMs||(this.Rr=t),500>t.durationMs||en.warn("full snapshot was slow, the page may have been unresponsive while it ran",{durationMs:Math.round(t.durationMs),stylesheetMs:Math.round(t.stylesheetMs),nodeCount:t.nodeCount,cssRuleCount:t.cssRuleCount,nonDeferrableCssRuleCount:t.nonDeferrableCssRuleCount,deferredStylesheetCount:t.deferredStylesheetCount}))}Or(e,t){e.type!==c.FullSnapshot?e.type===c.IncrementalSnapshot&&(S(this.ft)||this.ft===t||this.yt===t||(this.yt=t,en.info("incremental snapshot for a session with no full snapshot - requesting one",{sessionId:t}),this.Ce())):this.ft=t}Fr(e){e.counted&&e.generation===this.kt&&(this.wt=Math.max(0,this.wt-1)),e.counted=!1,this.bt=this.bt.filter((t=>t!==e))}qr(e,t,r){e.processed||e.generation!==this.kt||(e.processed=!0,this.Lr(e.event,t,r,e.targetSessionId,e.targetWindowId))}jr(e){try{var t=e.compressionEnabled?bn(e.event):{event:e.event,size:br(e.event)};this.qr(e,t.event,t.size)}finally{this.Fr(e)}}jt(){[...this.bt].forEach((e=>{this.jr(e)}))}Br(e,t,r,i){var n=this,a={event:e,compressionEnabled:t,targetSessionId:r,targetWindowId:i,generation:this.kt,processed:!1,counted:!0};this.bt.push(a),this.wt+=1;var o=function(){var r=l((function*(){try{if(a.processed)return;var r,i;try{var o=t?pn(e)?yield function(e){return wn.apply(this,arguments)}(e):bn(e):{event:e,size:br(e)};r=o.event,i=o.size}catch(t){en.error("could not process queued compression event - will use uncompressed event",t),r=e,i=br(e)}n.qr(a,r,i)}finally{n.Fr(a)}}));return function(){return r.apply(this,arguments)}}();this.Mr=this.Mr?this.Mr.catch((()=>{})).then(o):o()}onRRwebEmit(e){var t,r,i,n,a,o,s,u,l;if(this._instance.sessionManager&&(this.hr(),e&&_(e))){if(e.type===c.Meta){var h=this.er(e.data.href);if(this.lr=h,!h)return;e.data.href=h}else this.ur();if(null==(t=this.He)||t.checkUrlTriggers(this.sessionId,(()=>this.gr()),(()=>this.mr()),((e,t)=>this.yr(e,t))),!this.X.urlBlocked||function(e){return e.type===c.Custom&&"recording paused"===e.data.tag}(e)){var v,f,p;e.type===c.FullSnapshot&&(null!=(v=nn())&&null!=v.wasMaxDepthReached&&v.wasMaxDepthReached()&&(this.ot=!0),this.Pr(),Promise.resolve().then((()=>this.Pr())),this.dr(),null==(f=this.Tr)||f.reset(),null==(p=this._instance.persistence)||p.register_once({[$t]:e.timestamp},void 0));var g=e.type===c.FullSnapshot&&(null==(r=this.He)?void 0:r.hasPendingTriggers(this.sessionId));g&&this.Hr();var m=this.Tr?this.Tr.throttleMutations(e):e;if(m){var y=function(e){var t=e;if(t&&_(t)&&6===t.type&&_(t.data)&&"rrweb/console@1"===t.data.plugin){t.data.payload.payload.length>10&&(t.data.payload.payload=t.data.payload.payload.slice(0,10),t.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;t.data.payload.payload.length>i;i++)r.push(t.data.payload.payload[i]&&t.data.payload.payload[i].length>2e3?t.data.payload.payload[i].slice(0,2e3)+"...[truncated]":t.data.payload.payload[i]);return t.data.payload.payload=r,e}return e}(m),b=function(e){return Sn(e)?e.data.payload:null}(y),w=function(e){return xn(e)?e.data.payload:null}(y),k=function(e){return _n(e)?e.data.payload:null}(y);b||w?null!=b&&b.lastActivityTimestamp&&(y.timestamp=b.lastActivityTimestamp):null!=k&&k.sessionId||this.$r(y),e.type===c.FullSnapshot&&(this.vt.push([this.Pe,e.timestamp]),this.vt.length>6&&(this.vt=this.vt.slice(-6)));var S=null!==(i=null!==(n=null!==(a=null==b?void 0:b.currentSessionId)&&void 0!==a?a:null==w?void 0:w.nextSessionId)&&void 0!==n?n:null==k?void 0:k.sessionId)&&void 0!==i?i:this.Pe,x=null!==(o=null!==(s=null!==(u=null==b?void 0:b.currentWindowId)&&void 0!==u?u:null==w?void 0:w.nextWindowId)&&void 0!==s?s:null==k?void 0:k.windowId)&&void 0!==o?o:this.It;if(!0!==this.Ge||function(e){return _n(e)||Sn(e)||xn(e)}(y)){y.type===c.FullSnapshot&&(this.Qe=0),k&&(y.timestamp=k.lastActivityTimestamp+k.threshold);var C=this.ze;this.ze=!0,g?this.ar(!0):C||this.ar();var M=null===(l=this._instance.config.session_recording.compress_events)||void 0===l||l;if(this.wt>0||M&&pn(y))this.Br(y,M,S,x);else{var T=M?bn(y):{event:y,size:br(y)};this.Lr(y,T.event,T.size,S,x)}}else(function(e){return e.type===c.FullSnapshot||e.type===c.Meta||e.type===c.IncrementalSnapshot&&e.data.source!==d.CanvasMutation})(y)&&this.Qe++}else!0===this.Ge&&this.Qe++}}}get status(){return this.He?this.He.getStatus({instance:this._instance,sessionId:this.sessionId,isSampled:this.qe,rrwebError:this.it,urlTriggerMatching:this.X,eventTriggerMatching:this.ee,linkedFlagMatching:this.te,remoteConfig:this.je}):Gt}log(e,t){var r;void 0===t&&(t="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.te.linkedFlagSeen=!0,this.Ce(),this.pr(),this.xe("linked_flag_overridden")}overrideSampling(){var e;null==(e=this._instance.persistence)||e.register({[Pt]:this.sessionId,[At]:null}),this.Ce(),this.pr(),this.xe("sampling_overridden")}overrideTrigger(e){this.yr(e),this.pr()}Ur(){try{var t,r=null==e||null==(t=e.location)?void 0:t.href;if(!r)return;var i=this.er(r);if(!i)return;return new URL(i).hostname||void 0}catch(e){return}}Sr(){this.zr&&(clearTimeout(this.zr),this.zr=void 0)}Er(){this.zr||(this.zr=setTimeout((()=>{this.Bt()}),2e3))}Wr(){return this.ft!==this.Dt.sessionId&&0!==this.Dt.data.length&&this.Dt.data.every((e=>(null==e?void 0:e.type)===c.Custom&&!Sn(e)&&!xn(e)))}Vr(){var e,t;return null!==(e=null==(t=this.He)?void 0:t.getPendingTriggerConditions(this.sessionId))&&void 0!==e?e:[]}Zr(e){if(e!==Yt)return S(this.Gr)||this._instance.register_for_session({[Vt]:[]}),void(this.Gr=void 0);var t=this.Vr();if(0===t.length)return S(this.Gr)||this._instance.register_for_session({[Vt]:[]}),void(this.Gr=void 0);var r=t.join(", "),i=this.sessionId+":"+r;i!==this.Gr&&(this.Gr=i,this._instance.register_for_session({[Vt]:t}),en.info("buffering: "+r))}Bt(){var e;if(this.Sr(),this.Xe)return this.Dt;if(this.Wr())return this.Dt.size>Ki?this.Ht():this.Dt;var t=this.Dt;null==(e=this.He)||e.ensureSamplingDecision(this.sessionId);var r=this.Pt(),i=this.status;if(this.Zr(i),i===Yt||i===Kt||i===Gt||r)return this.Er(),this.Dt;if(this.Dt!==t)return this.Dt;if(t.data.length>0){var n,a=this.Ur();kr(t).forEach((e=>{var t;null==(t=this.Rt)||t.trackSize(e.sessionId,e.size),this.Qr({$snapshot_bytes:e.size,$snapshot_data:e.data,$session_id:e.sessionId,$window_id:e.windowId,$lib:Ae.LIB_NAME,$lib_version:Ae.LIB_VERSION,$snapshot_host:a})})),null==(n=this.He)||n.onFlushComplete()}return this.Ht()}Dr(e){var t,r=2+((null==(t=this.Dt)?void 0:t.data.length)||0),i=e.$session_id,n=this.Dt.sessionId!==i;if(n||!0!==this.Ge&&!this.Xe&&this.Dt.size+e.$snapshot_bytes+r>Ki){var a=this.Pe;if(this.Dt=this.Bt(),this.Pe!==a)return;n&&this.Dt.data.length>0&&(this.Dt=this.Ht()),this.Dt.sessionId=i,this.Dt.windowId=e.$window_id}this.Xe&&(this.tt||this.Dt.size+e.$snapshot_bytes+r>Ki)?this.tt||(this.tt=!0,this.Dt=this.Ht()):(this.Dt.size+=e.$snapshot_bytes,this.Dt.data.push(e.$snapshot_data),this.Dt.sizes.push(e.$snapshot_bytes),!0===this.Ge||this.Xe||this.Er())}Qr(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.$e),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Nt(){var e,t,r=null==(e=this.Dt)?void 0:e.data[(null==(t=this.Dt)?void 0:t.data.length)-1],i=this.Ne.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i.sessionStartTimestamp:null}Hr(){if(!this.Dt||0===this.Dt.data.length)return this.Ht();for(var e=-1,t=this.Dt.data.length-1;t>=0;t--)if(this.Dt.data[t].type===c.Meta){e=t;break}return 0>e?this.Ht():(this.Dt.data=this.Dt.data.slice(e),this.Dt.sizes=this.Dt.sizes.slice(e),this.Dt.size=this.Dt.sizes.reduce(((e,t)=>e+t),0),this.Dt)}Ht(){return this.Dt={size:0,data:[],sizes:[],sessionId:this.Pe,windowId:this.It},this.Dt}xe(e,t){this._instance.register_for_session({$session_recording_start_reason:e}),en.info(e.replace("_"," "),t),"session_id_changed"!==e&&this.Le("$recording_started",h({reason:e},t))}Jr(e){var t;return 3===e.type&&-1!==tn.indexOf(null==(t=e.data)?void 0:t.source)}$r(e){var t=this.Jr(e);t||!0===this.Ge||e.timestamp-this.We>this.Fe&&(this.Ge=!0,clearInterval(this.vr),this.Le("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.We,threshold:this.Fe,bufferLength:this.Dt.data.length,bufferSize:this.Dt.size,sessionId:this.Pe,windowId:this.It}),this.Bt());var r=!1;if(t&&(this.We=e.timestamp,this.Ge)){var i="unknown"===this.Ge;this.Ge=!1,i||(this.Le("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)}var n=this.Ne.checkAndGetSessionAndWindowId(!t,e.timestamp),a=n.windowId,o=n.sessionId,s=this.Pe!==o,u=this.It!==a;if(this.It=a,this.Pe=o,s||u){var l=s&&!1!==this.Ge;l&&(this.Ge="unknown"),this.Et(l)}else if(t&&this.pr(),r){var h,c=["sampled","active"].includes(this.status)||(null==(h=this.He)?void 0:h.hasPendingTriggers(this.sessionId));this.Qe>0&&c&&this.Ce(),this.ar(),this.dr()}}At(){var e;null==(e=this.He)||e.clearConditionalRecordingPersistence()}get sdkDebugProperties(){var e,t,r,i,n,a,o,s,u,l=this.Ne.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp,h=null==(e=nn())||null==e.getDeferredStylesheetStats?void 0:e.getDeferredStylesheetStats();return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.Dt.data.length,$sdk_debug_replay_internal_buffer_size:this.Dt.size,$sdk_debug_current_session_duration:this.Nt,$sdk_debug_session_start:l,$sdk_debug_replay_flushed_size:null==(t=this.Rt)?void 0:t.currentTrackedSize(this.sessionId),$sdk_debug_replay_full_snapshots:this.vt,$snapshot_max_depth_exceeded:this.ot,$sdk_debug_replay_slowest_full_snapshot_ms:Gi(null==(r=this.Rr)?void 0:r.durationMs),$sdk_debug_replay_slowest_full_snapshot_stylesheet_ms:Gi(null==(i=this.Rr)?void 0:i.stylesheetMs),$sdk_debug_replay_slowest_full_snapshot_nodes:null==(n=this.Rr)?void 0:n.nodeCount,$sdk_debug_replay_slowest_full_snapshot_css_rules:null==(a=this.Rr)?void 0:a.cssRuleCount,$sdk_debug_replay_slowest_full_snapshot_css_rules_non_deferrable:null==(o=this.Rr)?void 0:o.nonDeferrableCssRuleCount,$sdk_debug_replay_deferred_stylesheets:null==h?void 0:h.deferredCount,$sdk_debug_replay_deferred_stylesheets_failed:null==h?void 0:h.failedCount,$sdk_debug_replay_deferred_stylesheets_abandoned:null==h?void 0:h.abandonedCount,$sdk_debug_replay_deferred_stylesheet_ms:Gi(null==h?void 0:h.totalMs),$sdk_debug_replay_deferred_stylesheet_slowest_slice_ms:Gi(null==h?void 0:h.slowestSliceMs),$sdk_debug_replay_slowest_mutation_batch_ms:Gi(null==(s=nn())||null==s.getMutationCost||null==(s=s.getMutationCost())?void 0:s.slowestBatchMs),$sdk_debug_replay_discarded_duration_samples:null==(u=nn())||null==u.getDiscardedDurationSamples?void 0:u.getDiscardedDurationSamples(),$sdk_debug_replay_throttled_mutations_dropped:this.Je,$sdk_debug_replay_oversized_mutations_dropped:this.Ye,$sdk_debug_replay_oversized_mutation_bytes_dropped:this.Ke,$sdk_debug_replay_rrweb_error:this.it,$sdk_debug_rrweb_attached:!!this.Ue,$sdk_debug_rrweb_start_attempted:this.nt}}kr(){var t;if(!this.Ue){this.nt=!0;var r,n,a,o,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskAllElementAttributes:!1,maskAttributeFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,inlineStylesheetBudgetRules:1e4,recordCrossOriginIframes:!1,sampling:void 0,attributeFilter:void 0},u=this._instance.config.session_recording;for(var l of Object.entries(u||{})){var c=l[0],d=l[1];if(c in s)if("maskInputOptions"===c)s.maskInputOptions=h({password:!0},d);else if("sampling"===c){var v=null!=d?d:{},f={};S(v.mousemove)||(f.mousemove=v.mousemove),S(v.mouseInteraction)||(f.mouseInteraction=v.mouseInteraction),s.sampling=f}else s[c]=d}!0===(null==u?void 0:u.captureJsonLd)&&!0!==s.slimDOMOptions&&"all"!==s.slimDOMOptions&&(s.slimDOMOptions=h({},s.slimDOMOptions,{script:!0})),this.Qt&&this.Qt.enabled&&(s.recordCanvas=!0,s.sampling=h({},s.sampling,{canvas:this.Qt.fps}),s.dataURLOptions={type:"image/webp",quality:this.Qt.quality},s.canvasResolutionScale=this.Gt,s.canvasMasking={configured:()=>{var e;return k(null==(e=this._instance.config.session_recording)||null==(e=e.canvasCapture)?void 0:e.maskRegionsFn)},regionsFn:e=>{var t,r=null==(t=this._instance.config.session_recording)||null==(t=t.canvasCapture)?void 0:t.maskRegionsFn;if(k(r))try{var i;return null!==(i=r(e))&&void 0!==i?i:null}catch(e){return this.ct||(this.ct=!0,en.warn("canvasCapture.maskRegionsFn threw, canvas frames will be skipped",e)),null}}}),this.Vt&&(s.maskAllInputs=null===(r=this.Vt.maskAllInputs)||void 0===r||r,s.maskTextSelector=null!==(n=this.Vt.maskTextSelector)&&void 0!==n?n:void 0,s.blockSelector=null!==(a=this.Vt.blockSelector)&&void 0!==a?a:void 0,s.maskAllElementAttributes=null!==(o=this.Vt.maskAllElementAttributes)&&void 0!==o&&o),s.maskAllElementAttributes&&s.maskAttributeFn&&(s.maskAttributeFn=void 0,this.ht||(this.ht=!0,en.warn('`maskAllElementAttributes` and `maskAttributeFn` are mutually exclusive, and `maskAttributeFn` is being ignored. Remove one of the two. Note that `maskAllElementAttributes` can also come from your project\'s "Privacy and masking" settings. See https://posthog.com/docs/session-replay/privacy'))),this.Zt();var p=an();if(p){this.Tr=null!==(t=this.Tr)&&void 0!==t?t:new ni(p,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(e,t)=>{var r="Too many mutations on node '"+e+"'. Rate limiting. This could be due to SVG animations or something similar";en.info(r,{node:t}),this.log(Xi+" "+r,"warn")},onDroppedAttributeMutations:e=>this.Je+=e,bytesRefillRate:this._instance.config.session_recording.__mutationBytesRefillRate,bytesBucketSize:this._instance.config.session_recording.__mutationBytesBucketSize,resyncIntervalMs:this.cr,onDroppedOversizedMutation:e=>{0===this.Ye&&this.log(Xi+" Dropped an oversized DOM mutation to keep the recording playable. The recording will resync with a full snapshot.","warn"),this.Ye+=1,this.Ke+=e},requestFullSnapshot:()=>this.Ce()});var g=this.Kt();if(this.Ue=p(h({emit:e=>{this.onRRwebEmit(e)},plugins:g,errorHandler:(e,t)=>"rrweb"===t&&(this.dt||(this.dt=!0,en.error("rrweb internal error - recording will continue but may be incomplete",e)),!0)},s)),!this.Ue)return this.it=!0,void en.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.it=!1,!0===(null==u?void 0:u.captureJsonLd)&&i&&null!=e&&e.MutationObserver&&!this.sr&&(this.sr=function(e,t,r){var i=new WeakMap,n=r.getCaptureState||(()=>!0),a=Ii,o=t=>{try{var o=n();if(!a||!1===o||!t.isConnected||t.ownerDocument!==e||function(e,t){for(var r=e;r;){if(Vi(r,t.blockClass,t.blockSelector)||Vi(r,t.maskTextClass,t.maskTextSelector))return!0;var i=r.parentNode;r=r.parentElement||(i&&i.nodeType===i.DOCUMENT_FRAGMENT_NODE?i.host:null)}return!1}(t,r))return;var s=function(e){if(!e||e.length>Ii)return null;try{var t=JSON.parse(e),r=w(t)?t.map(zi):zi(t);if(M(r)||w(r)&&(!r.length||r.some(M)))return null;var i=JSON.stringify(r);return i.length>2e4?null:[r,i]}catch(e){return null}}(t.text);if(!s)return void i.delete(t);var u=s[0],l=s[1];if(M(o))return void i.set(t,l);if(i.get(t)!==l){if(l.length>a)return void(a=0);r.emit(u)&&(i.set(t,l),a-=l.length)}}catch(e){return}};try{var s=new t((e=>{try{if(!a||!1===n())return;var t=e=>{for(var t of Zi(e))o(t)};for(var r of e)if("childList"===r.type)Wi(r.target)&&o(r.target),r.addedNodes.forEach(t);else if("characterData"===r.type){var i=r.target.parentNode;i&&Wi(i)&&o(i)}else"attributes"===r.type&&Wi(r.target)&&o(r.target)}catch(e){return}}));return s.observe(e,{attributes:!0,attributeFilter:["type"],characterData:!0,childList:!0,subtree:!0}),{scan(t){void 0===t&&(t=!1),a&&!1!==n()&&Zi(e.documentElement).forEach((e=>{t&&i.delete(e),o(e)}))},stop(){return s.disconnect()}}}catch(e){return{scan(){},stop(){}}}}(i,e.MutationObserver,{blockClass:s.blockClass,blockSelector:s.blockSelector,maskTextClass:s.maskTextClass,maskTextSelector:s.maskTextSelector,getCaptureState:()=>{var e;return!0!==(null==(e=this._instance.config.session_recording)?void 0:e.captureJsonLd)||this.X.urlBlocked||this.X.isCurrentUrlBlocked()?null:this.ir()},emit:e=>this.nr(e)}),this.X.isCurrentUrlBlocked()&&this.sr.scan()),this.We=Date.now(),this.Ge=R(this.Ge)?this.Ge:"unknown",this.tryAddCustomEvent("$remote_config_received",this.je),this.Le("$session_options",{sessionRecordingOptions:s,activePlugins:g.map((e=>null==e?void 0:e.name))}),this.Le("$posthog_config",{config:this._instance.config})}else en.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(e,t){return this.Le(e,t)}}var Mn,Tn=["type"],In=Object.defineProperty,Rn=(e,t,r)=>((e,t,r)=>t in e?In(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),An=(e=>(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))(An||{}),En=(e=>(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))(En||{}),Ln=(e=>(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))(Ln||{}),On=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(On||{}),Dn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Dn||{}),Pn=(e=>(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))(Pn||{}),Nn=(e=>(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))(Nn||{});function Fn(e,t){return-1!==e.indexOf(t)}var qn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},jn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Bn={};function Hn(e){if(Bn[e])return Bn[e];var t=function(e){var t,r,i=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return i&&globalThis[i]?globalThis[i]:void 0}(e)||globalThis[e],r=t.prototype,i=e in qn?qn[e]:void 0,n=Boolean(i&&i.every((e=>{var t,i;return Boolean(null==(i=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:i.toString().includes("[native code]"))}))),a=e in jn?jn[e]:void 0,o=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&o)return Bn[e]=t.prototype,t.prototype;var s=document.createElement("iframe");s.style.display="none";var u=!1;try{document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var h=l[e].prototype;return h?(function(e){return Fn(e,"AppleWebKit")&&!Fn(e,"Chrome")}(navigator.userAgent)&&(s.classList.add("rr-block","ph-no-capture"),s.setAttribute("__rrwebUntaintedPrototype",e),u=!0),Bn[e]=h):r}catch(e){return r}finally{!u&&s.parentNode&&document.body.removeChild(s)}}var $n={};function Un(e,t,r){var i,n=e+"."+String(r);if($n[n])return $n[n].call(t);var a=Hn(e),o=null==(i=Object.getOwnPropertyDescriptor(a,r))?void 0:i.get;return o?($n[n]=o,o.call(t)):t[r]}var zn={};function Wn(e,t,r){var i=e+"."+String(r);if(zn[i])return zn[i].bind(t);var n=Hn(e)[r];return"function"!=typeof n?t[r]:(zn[i]=n,n.bind(t))}function Vn(){return Hn("MutationObserver").constructor}function Zn(e,t,r){try{if(!(t in e))return()=>{};var i=e[t],n={next:i},a=r((function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];return n.next.apply(this,t)}));return"function"==typeof a&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),e[t]=a,()=>{if(e[t]!==a)for(var r=e=>{var t;return"function"==typeof e?null!==(t=e.__rrweb_layer__)&&void 0!==t?t:e.__posthog_layer__:void 0},i=e[t],o=r(i);o;){if(o.next===a)return void(o.next=n.next);o=r(i=o.next)}else e[t]=n.next}}catch(e){return()=>{}}}var Gn={childNodes:e=>Un("Node",e,"childNodes"),parentNode:e=>Un("Node",e,"parentNode"),parentElement:e=>Un("Node",e,"parentElement"),textContent:e=>Un("Node",e,"textContent"),contains:(e,t)=>Wn("Node",e,"contains")(t),getRootNode:e=>Wn("Node",e,"getRootNode")(),host:e=>e&&"host"in e?Un("ShadowRoot",e,"host"):null,styleSheets:e=>e.styleSheets,shadowRoot:e=>e&&"shadowRoot"in e?Un("Element",e,"shadowRoot"):null,querySelector:(e,t)=>Wn("Element",e,"querySelector")(t),querySelectorAll:(e,t)=>Wn("Element",e,"querySelectorAll")(t),mutationObserver:Vn,patch:Zn},Qn=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0});function Jn(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(e){}return Date.now()}var Yn=0,Kn=6e4;function Xn(){Yn+=1}function ea(){return Yn}function ta(e,t){return t!==Yn||e>Kn}var ra=0,ia=0,na=0,aa=Qn(),oa=null,sa=null,ua=[],la=0,ha=0,ca={slowestBatchMs:0},da={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0},va=e=>e&&e>0?e:null;function fa(e){(ra+=1)>1||(aa=Qn(),ua=[],la=0,sa=va(e),ia=Jn(),na=Yn)}function pa(){return 0===ra?oa||Qn():(ra-=1)>0?aa:(aa.durationMs=Jn()-ia,aa.deferredStylesheetCount=la,da.deferredCount+=la,sa=null,ta(aa.durationMs,na)?aa:oa=aa)}var ga=32;function ma(e,t,r){var i=e.length;if(r>=ga)return i;for(var n=0;e.length>n;n++){var a=e[n];try{var o=a.cssRules;if(o&&o.length)i+=ma(o,t,r+1);else if(t&&a.styleSheet){var s=a.styleSheet;if(!t.has(s)){t.add(s);var u=s.rules||s.cssRules;u&&(i+=ma(u,t,r+1))}}}catch(e){}}return i}function ya(e){if(0!==ra){var t=ma(e,null,0);aa.cssRuleCount+=t,ha>0&&(aa.nonDeferrableCssRuleCount+=t)}}function ba(e){ha+=1;try{return e()}finally{ha-=1}}function wa(e){ra>0&&(aa.stylesheetMs+=e)}function ka(e){if(0===ra||null===sa)return!1;var t=aa.cssRuleCount-aa.nonDeferrableCssRuleCount;return t>=sa||t+function(e){try{var t=e&&(e.rules||e.cssRules);if(!t)return 0;var r=new WeakSet;return r.add(e),ma(t,r,0)}catch(e){return 0}}(e)>sa}function _a(){da.failedCount+=1}function Sa(e){e>0&&(da.abandonedCount+=e)}function xa(e){return e.nodeType===e.ELEMENT_NODE}function Ca(e){var t=e&&"host"in e&&"mode"in e&&Gn.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Gn.shadowRoot(t)===e)}function Ma(e){return"[object ShadowRoot]"==={}.toString.call(e)}function Ta(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 Ia(e){var t=e.cssText;if(3>t.split('"').length)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}var Ra=0;function Aa(e){var t=0===Ra,r=t?Jn():0;Ra+=1;try{var i=e.rules||e.cssRules;if(!i)return null;ya(i);var n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),Ta(Array.from(i,(e=>Ea(e,n))).join(""))}catch(e){return null}finally{Ra-=1,t&&wa(Jn()-r)}}function Ea(e,t){var r;if(Oa(e)){var i;try{i=Aa(e.styleSheet)||Ia(e)}catch(t){i=e.cssText}try{if(i&&(null==(r=e.styleSheet)?void 0:r.href))return Qa(i,e.styleSheet.href)}catch(e){}return i}var n=e.cssText;return Da(e)&&e.selectorText.includes(":")&&(n=La(n)),t?Qa(n,t):n}function La(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Oa(e){return"styleSheet"in e}function Da(e){return"selectorText"in e}var Pa=/^-?[A-Za-z_][\w-]*$/,Na=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function Fa(e){var t=[],r=!1,i=null,n=new Map;function a(e){var n=t.pop();if("group"===n.kind){if(null===e){for(;t.length>0&&"group"===t[t.length-1].kind;)t.pop();return void a(null)}var s=t[t.length-1];return s.parts.push(e),void(s.index+=1)}if(!n.importRule)return r=!0,void(i=e);o(t[t.length-1],n.importRule,e)}function o(e,t,r){var i;try{var n;try{n=r||Ia(t)}catch(e){n=t.cssText}try{n&&(null==(i=t.styleSheet)?void 0:i.href)&&(n=Qa(n,t.styleSheet.href))}catch(e){}n&&e.parts.push(n),e.index+=1}catch(e){a(null)}}function s(e){var r=e.rules[e.index];if("sheet"===e.kind&&Oa(r)){var i=n.get(r);return null===i?(e.parts.push(r.cssText),void(e.index+=1)):i?void t.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(e,r,null)}if(!function(e,r){try{var i=function(e){var t,r=e;if(!r.cssRules||0===r.cssRules.length)return null;if(r.media&&"string"==typeof r.media.mediaText)return"@media "+r.media.mediaText+" {";if(Da(e)){if("number"==typeof r.type&&1!==r.type)return null;var i=r.style?r.style.cssText:"";return e.selectorText+" {"+(i?" "+i:"")}if("containerName"in r)return"string"!=typeof r.containerQuery||r.containerName&&!Pa.test(r.containerName)?null:"@container "+(r.containerName?r.containerName+" ":"")+r.containerQuery+" {";if("string"==typeof r.conditionText){var n="";try{n=(null==(t=e.constructor)?void 0:t.name)||""}catch(e){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?"@supports "+r.conditionText+" {":null}return"string"==typeof r.name?"keyText"in r.cssRules[0]?Pa.test(r.name)?"@keyframes "+r.name+" {":null:""===r.name?"@layer {":Na.test(r.name)?"@layer "+r.name+" {":null:null}(e);if(null===i)return!1;var n=r.sheetHref;return t.push({kind:"group",rules:Array.from(e.cssRules),sheetHref:n,index:0,parts:[],prelude:n?Qa(i,n):i,fixColons:"sheet"===r.kind&&Da(e)&&e.selectorText.includes(":")}),!0}catch(e){return!1}}(r,e)){var a=r.cssText;"sheet"===e.kind&&Da(r)&&r.selectorText.includes(":")&&(a=La(a)),e.parts.push(e.sheetHref?Qa(a,e.sheetHref):a),e.index+=1}}return function(e){try{var r=e.rules||e.cssRules;if(!r)return!1;ya(r);var i=e.href;!i&&e.ownerNode&&(i=e.ownerNode.baseURI);var a=Array.from(r);return t.push({kind:"sheet",sheet:e,rules:a,sheetHref:i,index:0,parts:[],importRule:null}),function(e,t){for(var r=[{sheet:t,rules:e,index:0}],i=function(){var e=r[r.length-1];if(e.index>=e.rules.length)return r.pop(),0;var t=e.rules[e.index];if(e.index+=1,!Oa(t)||n.has(t))return 0;var i=null;try{i=t.styleSheet}catch(e){return n.set(t,null),0}if(!i||r.some((e=>e.sheet===i)))return 0;try{var a=i.rules||i.cssRules;if(!a)return 0;ya(a);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var s=Array.from(a);n.set(t,{sheet:i,rules:s,sheetHref:o}),r.push({sheet:i,rules:s,index:0})}catch(e){}};r.length>0;)i()}(a,e),!0}catch(e){return!1}}(e)||(r=!0),{advance(e){if(r)return!0;var n=Jn(),o=e>0?e:1;try{for(;!r&&o>0;){var u=t[t.length-1];if(u.rules.length>u.index){o-=1;try{s(u)}catch(e){a(null)}}else{var l=null;try{if("group"===u.kind){var h=u.prelude+u.parts.join("")+"}";l=u.fixColons?La(h):h}else l=Ta(u.parts.join(""))}catch(e){}a(l)}}}catch(e){r=!0,i=null}finally{wa(Jn()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var e=0;for(var i of t)e+=i.rules.length-i.index;return e}}}class qa{constructor(){Rn(this,"idNodeMap",new Map),Rn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);if(this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e))),xa(e)){var r=Gn.shadowRoot(e);r&&this.removeNodeFromMap(r),"IFRAME"===e.nodeName&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ja(e){var t=e.element,r=e.maskInputOptions,i=e.tagName,n=e.type,a=e.maskInputFn,o=e.value||"",s=n&&Ba(n);return(r[i.toLowerCase()]||s&&r[s])&&(o=a?a(o,t):"*".repeat(o.length)),o}function Ba(e){return e.toLowerCase()}var Ha=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function $a(e){var t=e.element,r=e.name,i=e.value,n=e.maskAttributeFn,a=e.isGenerated;return i?e.maskAllElementAttributes?void 0!==a&&a&&Ha.has(Ba(r))?i:"*".repeat(i.length):n?n(r,i,t):i:i}var Ua="__rrweb_original__";function za(e){try{var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ba(t):null}catch(e){return null}}var Wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Va=/^(?:[a-z+]+:)?\/\//i,Za=/^www\..*/i,Ga=/^(data:)([^,]*),(.*)/i;function Qa(e,t){return(e||"").replace(Wa,((e,r,i,n,a,o)=>{var s,u=i||a||o,l=r||n||"";if(!u)return e;if(Va.test(u)||Za.test(u))return"url("+l+u+l+")";if(Ga.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var h=t.split("/"),c=u.split("/");for(var d of(h.pop(),c))"."!==d&&(".."===d?h.pop():h.push(d));return"url("+l+h.join("/")+l+")"}))}var Ja,Ya,Ka="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Xa=4096,eo=1e5,to=10,ro=new Map,io=1,no=new RegExp("[^a-z0-9-_:]"),ao=-2;function oo(){return io++}var so=/^[^ \t\n\r\u000c]+/,uo=/^[, \t\n\r\u000c]+/,lo=new WeakMap;function ho(e,t){return t&&""!==t.trim()?co(e,t):t}function co(e,t){var r=lo.get(e);if(r||(r=e.createElement("a"),lo.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function vo(e,t){return(null==t?void 0:t.maxBase64ImageLength)?function(e,t){return t&&e.length>t?Ka:e}(e,t.maxBase64ImageLength):e}function fo(e,t,r,i,n,a){var o;if(!i)return i;if("src"===r||"href"===r&&("use"!==t||"#"!==i[0])){if("link"===t&&n){var s=null==(o=n.sheet)?void 0:o.href;if(s)return s}var u=ho(e,i);if(u.startsWith("data:")){if("img"===t&&n){var l=u;return((null==a?void 0:a.type)||void 0!==(null==a?void 0:a.quality))&&(l=function(e,t,r,i){if(eo>t.length)return t;if(!e.complete||0===e.naturalWidth)return t;if(e.naturalWidth>Xa||e.naturalHeight>Xa)return t;var n=ro.get(t);if(n&&n.type===r&&n.quality===i)return n.result;try{var a=document.createElement("canvas");a.width=e.naturalWidth,a.height=e.naturalHeight;var o=a.getContext("2d");if(!o)return t;o.drawImage(e,0,0);var s=a.toDataURL(r||"image/webp",null!=i?i:.4),u=t.length>s.length?s:t;if(ro.size>=to){var l=ro.keys().next().value;void 0!==l&&ro.delete(l)}return ro.set(t,{type:r,quality:i,result:u}),u}catch(e){return t}}(n,u,a.type,a.quality)),vo(l,a)}if("image"===t)return vo(u,a)}return u}if("xlink:href"===r&&"#"!==i[0]){var h=ho(e,i);return"image"===t&&h.startsWith("data:")?vo(h,a):h}return"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function i(e){var i,n=e.exec(t.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(uo),t.length>r;){var a=i(so);if(","===a.slice(-1))a=ho(e,a.substring(0,a.length-1)),n.push(a);else{var o="";a=ho(e,a);for(var s=!1;;){var u=t.charAt(r);if(""===u){n.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,n.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,r+=1}}}return n.join(", ")}(e,i):"style"===r?Qa(i,co(e)):"object"===t&&"data"===r?ho(e,i):i:ho(e,i)}function po(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function go(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&go(Gn.parentNode(e),t,r);for(var i=e.classList.length;i--;)if(t.test(e.classList[i]))return!0;return!!r&&go(Gn.parentNode(e),t,r)}function mo(e,t,r,i){var n;if(xa(e)){if(!Gn.childNodes(n=e).length)return!1}else{if(null===Gn.parentElement(e))return!1;n=Gn.parentElement(e)}try{if("string"==typeof t){if(i){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(go(n,t,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function yo(e,t,r){var i=e.removeEventListener;"function"==typeof i&&i.call(e,t,r)}var bo=new Map;function wo(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}function ko(e){return null==e?"":e.toLowerCase()}var _o=50,So=!1,xo=!1;function Co(e,t){var r=t.doc,i=t.mirror,n=t.blockClass,a=t.blockSelector,o=t.maskTextClass,s=t.maskTextSelector,u=t.skipChild,l=void 0!==u&&u,h=t.inlineStylesheet,c=void 0===h||h,d=t.maskInputOptions,v=void 0===d?{}:d,f=t.maskTextFn,p=t.maskInputFn,g=t.maskAllElementAttributes,m=void 0!==g&&g,y=t.maskAttributeFn,b=t.slimDOMOptions,w=t.dataURLOptions,k=void 0===w?{}:w,_=t.inlineImages,S=void 0!==_&&_,x=t.recordCanvas,C=void 0!==x&&x,M=t.canvasMaskingConfigured,T=t.onSerialize,I=t.onIframeLoad,R=t.iframeLoadTimeout,A=void 0===R?5e3:R,E=t.onIframeListenerRegistered,L=t.onStylesheetLoad,O=t.stylesheetLoadTimeout,D=void 0===O?5e3:O,P=t.keepIframeSrcFn,N=void 0===P?()=>!1:P,F=t.newlyAddedElement,q=void 0!==F&&F,j=t.depth,B=void 0===j?0:j,H=t.maxDepth,U=void 0===H?_o:H,z=t.needsMask,W=t.preserveWhiteSpace,V=void 0===W||W;if(B>=U)return xo=!0,So||(So=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+U+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;z||(z=mo(e,o,s,void 0===z)),ra>0&&(aa.nodeCount+=1);var Z,G=function(e,t){var r=t.doc,i=t.blockClass,n=t.blockSelector,a=t.needsMask,o=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,h=t.maskInputFn,c=t.maskAllElementAttributes,d=void 0!==c&&c,v=t.maskAttributeFn,f=t.dataURLOptions,p=void 0===f?{}:f,g=t.inlineImages,m=t.recordCanvas,y=t.canvasMaskingConfigured,b=t.keepIframeSrcFn,w=t.newlyAddedElement,k=void 0!==w&&w,_=function(e,t){if(t.hasNode(e)){var r=t.getId(e);return 1===r?void 0:r}}(r,t.mirror);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Nn.Document,childNodes:[],compatMode:e.compatMode}:{type:Nn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Nn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return function(e,t){for(var r,i,n,a=t.doc,o=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskInputFn,h=t.maskAllElementAttributes,c=void 0!==h&&h,d=t.maskAttributeFn,v=t.dataURLOptions,f=void 0===v?{}:v,p=t.inlineImages,g=t.recordCanvas,m=t.canvasMaskingConfigured,y=t.keepIframeSrcFn,b=t.newlyAddedElement,w=void 0!==b&&b,k=t.rootId,_=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var i=e.classList.length;i--;)if(t.test(e.classList[i]))return!0;if(r)return e.matches(r)}catch(e){}return!1}(e,t.blockClass,t.blockSelector),S=function(e){if(e instanceof HTMLFormElement)return"form";var t=Ba(e.tagName);return no.test(t)?"div":t}(e),x=new Set,C={},M=e.attributes.length,T=0;M>T;T++){var I=e.attributes[T];po(S,I.name)||(C[I.name]=fo(a,S,Ba(I.name),I.value,e,f))}if("link"===S&&o&&!_){var R=e.sheet;if(!R){var A=function(e){return e.href}(e);A&&!(R=wo(a,A))&&A.includes(".css")&&(R=wo(a,window.location.origin+"/"+A.replace(window.location.href,"")))}var E=null;R&&(ka(R)?ra>0&&(ua.push(e),la+=1):E=Aa(R)),E&&(delete C.rel,delete C.href,C._cssText=E)}if("style"===S&&e.sheet&&!(e.innerText||Gn.textContent(e)||"").trim().length){var L=ba((()=>Aa(e.sheet)));L&&(C._cssText=L)}if("input"===S||"textarea"===S||"select"===S){var O=e.value,D=e.checked;"radio"!==C.type&&"checkbox"!==C.type&&"submit"!==C.type&&"button"!==C.type&&O?C.value=ja({element:e,type:za(e),tagName:S,value:O,maskInputOptions:u,maskInputFn:l}):D&&(C.checked=D)}if("option"===S&&(e.selected&&!u.select?C.selected=!0:delete C.selected),"dialog"===S&&e.open){try{C.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){C.rr_open_mode="modal",C.ph_rr_could_not_detect_modal=!0}x.add("rr_open_mode")}if("canvas"===S&&g&&!(null==m?void 0:m()))if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;e.width>r;r+=50)for(var i=0;e.height>i;i+=50){var n=t.getImageData;if(new Uint32Array((Ua in n?n[Ua]:n).call(t,r,i,Math.min(50,e.width-r),Math.min(50,e.height-i)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(C.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){var P=e.toDataURL(f.type,f.quality),N=a.createElement("canvas");N.width=e.width,N.height=e.height,P!==N.toDataURL(f.type,f.quality)&&(C.rr_dataURL=P)}var F,q,j=!1;if("img"===S&&p){Ja||(Ja=a.createElement("canvas"),Ya=Ja.getContext("2d"));var B=e,H=B.currentSrc||B.getAttribute("src")||"<unknown-src>",U=B.crossOrigin,z=(t,r)=>j?$a({element:e,name:t,value:r,maskAllElementAttributes:c,maskAttributeFn:d}):r,W=()=>{yo(B,"load",W);try{Ja.width=B.naturalWidth,Ja.height=B.naturalHeight,Ya.drawImage(B,0,0);var e=Ja.toDataURL(f.type,f.quality);C.rr_dataURL=z("rr_dataURL",e)}catch(e){if("anonymous"!==B.crossOrigin)return B.crossOrigin="anonymous",void(B.complete&&0!==B.naturalWidth?W():B.addEventListener("load",W));console.warn("Cannot inline img src="+H+"! Error: "+e)}"anonymous"===B.crossOrigin&&(U?C.crossOrigin=z("crossOrigin",U):B.removeAttribute("crossorigin"))};B.complete&&0!==B.naturalWidth?W():B.addEventListener("load",W)}if("audio"===S||"video"===S){var V=C;V.rr_mediaState=e.paused?"paused":"played",x.add("rr_mediaState"),V.rr_mediaCurrentTime=e.currentTime,V.rr_mediaPlaybackRate=e.playbackRate,V.rr_mediaMuted=e.muted,V.rr_mediaLoop=e.loop,V.rr_mediaVolume=e.volume}if(w||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),_){var Z=e.getBoundingClientRect(),G=Z.width,Q=Z.height,J=Z.left,Y=Z.top,K=null==(r=a.defaultView)?void 0:r.getComputedStyle(e);C={class:C.class,rr_width:G+"px",rr_height:Q+"px",rr_left:Math.floor(J+((null==(i=a.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(Y+((null==(n=a.defaultView)?void 0:n.scrollY)||0))+"px"},x.add("rr_width"),x.add("rr_height"),x.add("rr_left"),x.add("rr_top"),K&&(C.rr_position=K.position||"static",x.add("rr_position"),K.transform&&"none"!==K.transform&&(C.rr_transform=K.transform,x.add("rr_transform")),K.display&&K.display.startsWith("inline")&&(C.rr_display=K.display,x.add("rr_display")))}if("iframe"!==S||y(C.src)||(e.contentDocument||(C.rr_src=C.src),delete C.src),c||d)for(var X of Object.entries(C)){var ee=X[0],te=X[1];"string"!=typeof te&&null!==te||(C[ee]=$a({element:e,name:ee,value:te,maskAllElementAttributes:c,maskAttributeFn:d,isGenerated:x.has(ee)}))}j=!0;try{customElements.get(S)&&(F=!0)}catch(e){}return{type:Nn.Element,tagName:S,attributes:C,childNodes:[],isSVG:(q=e,Boolean("svg"===q.tagName||q.ownerSVGElement)||void 0),needBlock:_,rootId:k,isCustom:F}}(e,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,maskAllElementAttributes:d,maskAttributeFn:v,dataURLOptions:p,inlineImages:g,recordCanvas:m,canvasMaskingConfigured:y,keepIframeSrcFn:b,newlyAddedElement:k,rootId:_});case e.TEXT_NODE:return function(e,t){var r,i=t.needsMask,n=t.maskTextFn,a=t.rootId,o=Gn.parentNode(e),s=o&&o.tagName,u=Gn.textContent(e),l="STYLE"===s||void 0,h="SCRIPT"===s||void 0;if(l&&u){try{if(e.nextSibling||e.previousSibling);else if(ka(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var c=Aa(o.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(u=c)}}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=Qa(u,co(t.doc))}return h&&(u="SCRIPT_PLACEHOLDER"),!l&&!h&&u&&i&&(u=n?n(u,Gn.parentElement(e)):u.replace(/[\S]/g,"*")),{type:Nn.Text,textContent:u||"",isStyle:l,rootId:a}}(e,{doc:r,needsMask:a,maskTextFn:l,rootId:_});case e.CDATA_SECTION_NODE:return{type:Nn.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Nn.Comment,textContent:Gn.textContent(e)||"",rootId:_};default:return!1}}(e,{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:z,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,keepIframeSrcFn:N,newlyAddedElement:q});if(!G)return console.warn(e,"not serialized"),null;Z=i.hasNode(e)?i.getId(e):function(e,t){if(t.comment&&e.type===Nn.Comment)return!0;if(e.type===Nn.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===function(e,t){var r,i;try{i=new URL(e,window.location.href)}catch(e){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ko(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ko(e.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ko(e.attributes.rel)))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ko(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ko(e.attributes.property).match(/^(og|twitter|fb):/)||ko(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ko(e.attributes.name)))return!0;if(t.headMetaRobots&&["robots","googlebot","bingbot"].includes(ko(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(ko(e.attributes.name))||ko(e.attributes.property).match(/^article:/)||ko(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(ko(e.attributes.name)))return!0}}return!1}(G,b)||!V&&G.type===Nn.Text&&!G.isStyle&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?ao:oo();var Q=Object.assign(G,{id:Z});if(i.add(e,Q),Z===ao)return null;T&&T(e);var J=!l;if(Q.type===Nn.Element){J=J&&!Q.needBlock,delete Q.needBlock;var Y=Gn.shadowRoot(e);Y&&Ma(Y)&&(Q.isShadowHost=!0)}if((Q.type===Nn.Document||Q.type===Nn.Element)&&J){b.headWhitespace&&Q.type===Nn.Element&&"head"===Q.tagName&&(V=!1);var K={doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:z,maskTextClass:o,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,slimDOMOptions:b,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:I,iframeLoadTimeout:A,onIframeListenerRegistered:E,onStylesheetLoad:L,stylesheetLoadTimeout:D,keepIframeSrcFn:N,depth:B+1,maxDepth:U};if(Q.type===Nn.Element&&"textarea"===Q.tagName&&void 0!==Q.attributes.value);else for(var X of Array.from(Gn.childNodes(e))){var ee=Co(X,K);ee&&Q.childNodes.push(ee)}var te=null;if(xa(e)&&(te=Gn.shadowRoot(e)))for(var re of Array.from(Gn.childNodes(te))){var ie=Co(re,K);ie&&(Ma(te)&&(ie.isShadow=!0),Q.childNodes.push(ie))}}var ne=Gn.parentNode(e);if(ne&&Ca(ne)&&Ma(ne)&&(Q.isShadow=!0),Q.type===Nn.Element&&"iframe"===Q.tagName){var ae=function(e,t,r){var i,n=()=>{},a=e.contentWindow;if(!a)return n;try{i=a.document.readyState}catch(e){return n}var o=()=>t();if("complete"!==i){var s=!1,u=null,l=()=>{s||(s=!0,null!==u&&(clearTimeout(u),u=null),yo(e,"load",h),e.addEventListener("load",o),t())},h=()=>l();return u=setTimeout(l,r),e.addEventListener("load",h),()=>{null!==u&&(clearTimeout(u),u=null),s?yo(e,"load",o):(s=!0,yo(e,"load",h))}}var c,d="about:blank";try{c=a.location.href}catch(e){return n}if(c!==d||e.src===d||""===e.src){var v=setTimeout(t,0);return e.addEventListener("load",o),()=>{clearTimeout(v),yo(e,"load",o)}}return e.addEventListener("load",o),()=>{yo(e,"load",o)}}(e,(()=>{var t=e.contentDocument;if(t&&I){var r=Co(t,{doc:t,mirror:i,blockClass:n,blockSelector:a,needsMask:z,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,slimDOMOptions:b,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:I,iframeLoadTimeout:A,onIframeListenerRegistered:E,onStylesheetLoad:L,stylesheetLoadTimeout:D,keepIframeSrcFn:N,depth:B+1,maxDepth:U});r&&I(e,r)}}),A);null==E||E(e,ae)}return Q.type===Nn.Element&&"link"===Q.tagName&&"stylesheet"===Q.attributes.rel&&function(t,u,l){if(!bo.has(t)){var h;try{h=t.sheet}catch(e){return}if(!h){var d=new AbortController,g=!1,w=()=>{if(!g){g=!0;try{(()=>{if(L){var t=Co(e,{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:z,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,slimDOMOptions:b,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:L,stylesheetLoadTimeout:D,keepIframeSrcFn:N,depth:B,maxDepth:U});t&&L(e,t)}})()}finally{bo.delete(t),d.abort()}}},_=setTimeout(w,l);d.signal.addEventListener("abort",(()=>clearTimeout(_)),{once:!0}),t.addEventListener("load",w,{signal:d.signal,once:!0}),bo.set(t,d)}}}(e,0,D),Q}function Mo(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:!1===e?{}:e}class To{constructor(){Rn(this,"parentElement",null),Rn(this,"parentNode",null),Rn(this,"ownerDocument"),Rn(this,"firstChild",null),Rn(this,"lastChild",null),Rn(this,"previousSibling",null),Rn(this,"nextSibling",null),Rn(this,"ELEMENT_NODE",1),Rn(this,"TEXT_NODE",3),Rn(this,"nodeType"),Rn(this,"nodeName"),Rn(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof To))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Io(e,t,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>Ro(r,e,t,i)}function Ro(e,t,r,i){Ao((()=>{var n=e.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(e,t,r,i):n.call(e,t,r))}))}function Ao(e){try{e()}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}}var Eo="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Lo={map:{},getId(){return console.error(Eo),-1},getNode(){return console.error(Eo),null},removeNodeFromMap(){console.error(Eo)},has(){return console.error(Eo),!1},reset(){console.error(Eo)}};function Oo(e,t,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var a=arguments.length,o=new Array(a),s=0;a>s;s++)o[s]=arguments[s];var u=Date.now();n||!1!==r.leading||(n=u);var l=t-(u-n),h=this;0>=l||l>t?(i&&(clearTimeout(i),i=null),n=u,e.apply(h,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,e.apply(h,o)}),l))}}function Do(e,t,r,i,n){void 0===n&&(n=window);var a=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(e){if(setTimeout((()=>{try{r.set.call(this,e)}catch(e){}}),0),a&&a.set){if(a.get)try{a.get.call(this)}catch(e){return}a.set.call(this,e)}}}),()=>Do(e,t,a||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Lo=new Proxy(Lo,{get(e,t,r){return"map"===t&&console.error(Eo),Reflect.get(e,t,r)}}));var Po=Date.now;function No(e){var t,r,i,n,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=Gn.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(i=Gn.parentElement(a.body))?void 0:i.scrollTop)||(null==(n=null==a?void 0:a.body)?void 0:n.scrollTop)||0}}function Fo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function jo(e){return e?e.nodeType===e.ELEMENT_NODE?e:Gn.parentElement(e):null}function Bo(e,t,r,i){if(!e)return!1;var n=jo(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(i&&null!==n.closest("."+t))return!0}else if(go(n,t,i))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function Ho(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===ao}function $o(e,t){if(Ca(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var i=Gn.parentNode(e);return(!i||i.nodeType!==e.DOCUMENT_NODE)&&(!i||$o(i,t))}function Uo(e){return Boolean(e.changedTouches)}function zo(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Wo(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Vo(e){return!!e&&(e instanceof To&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Gn.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Po=()=>(new Date).getTime());class Zo{constructor(){Rn(this,"id",1),Rn(this,"styleIDMap",new WeakMap),Rn(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Go(e){var t,r=null;return"getRootNode"in e&&(null==(t=Gn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Gn.host(Gn.getRootNode(e))&&(r=Gn.host(Gn.getRootNode(e))),r}function Qo(e){var t=e.ownerDocument;return!!t&&(Gn.contains(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Go(r);)r=t;return r}(e);return Gn.contains(t,r)}(e))}function Jo(e){return"__ln"in e}class Yo{constructor(){Rn(this,"length",0),Rn(this,"head",null),Rn(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;e>r;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Jo(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Jo(e.nextSibling)&&e.nextSibling.__ln.previous){var i=e.nextSibling.__ln.previous;t.previous=i,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,i&&(i.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var Ko,Xo=(e,t)=>e+"@"+t;class es{constructor(){Rn(this,"frozen",!1),Rn(this,"locked",!1),Rn(this,"texts",[]),Rn(this,"attributes",[]),Rn(this,"attributeMap",new WeakMap),Rn(this,"generatedAttributes",new WeakMap),Rn(this,"removes",[]),Rn(this,"mapRemoves",[]),Rn(this,"movedMap",{}),Rn(this,"addedSet",new Set),Rn(this,"movedSet",new Set),Rn(this,"droppedSet",new Set),Rn(this,"removesSubTreeCache",new Set),Rn(this,"mutationCb"),Rn(this,"blockClass"),Rn(this,"blockSelector"),Rn(this,"maskTextClass"),Rn(this,"maskTextSelector"),Rn(this,"inlineStylesheet"),Rn(this,"maskInputOptions"),Rn(this,"maskTextFn"),Rn(this,"maskInputFn"),Rn(this,"maskAllElementAttributes"),Rn(this,"maskAttributeFn"),Rn(this,"keepIframeSrcFn"),Rn(this,"recordCanvas"),Rn(this,"canvasMaskingConfigured"),Rn(this,"inlineImages"),Rn(this,"slimDOMOptions"),Rn(this,"dataURLOptions"),Rn(this,"doc"),Rn(this,"mirror"),Rn(this,"iframeManager"),Rn(this,"stylesheetManager"),Rn(this,"shadowDomManager"),Rn(this,"canvasManager"),Rn(this,"processedNodeManager"),Rn(this,"unattachedDoc"),Rn(this,"canvasManagerReleased",!1),Rn(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Rn(this,"emit",(()=>{if(!this.frozen&&!this.locked){var e,t,r=Jn(),i=ea();try{this.processBufferedMutations()}finally{e=Jn()-r,t=i,ra>0||ta(e,null!=t?t:Yn)||e>ca.slowestBatchMs&&(ca.slowestBatchMs=e)}}})),Rn(this,"processBufferedMutations",(()=>{for(var e=[],t=new Set,r=new Yo,i=e=>{for(var t=e,r=ao;r===ao;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},n=n=>{var a=Gn.parentNode(n);if(a&&Qo(n)&&"TEXTAREA"!==a.tagName){var o=Ca(a)?this.mirror.getId(Go(n)):this.mirror.getId(a),s=i(n);if(-1===o||-1===s)return r.addNode(n);var u=Co(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:e=>{zo(e,this.mirror)&&this.iframeManager.addIframe(e),Wo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Vo(e)&&!Bo(e,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(Gn.shadowRoot(e),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onIframeListenerRegistered:(e,t)=>{this.iframeManager.registerLoadListenerDisposer(e,t)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});u&&(e.push({parentId:o,nextId:s,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var a of this.movedSet)rs(this.removesSubTreeCache,a)&&!this.movedSet.has(Gn.parentNode(a))||n(a);for(var o of this.addedSet)is(this.droppedSet,o)||rs(this.removesSubTreeCache,o)?is(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var s=null;r.length;){var u=null;if(s){var l=this.mirror.getId(Gn.parentNode(s.value)),h=i(s.value);-1!==l&&-1!==h&&(u=s)}if(!u)for(var c=r.tail;c;){var d=c;if(c=c.previous,d){var v=this.mirror.getId(Gn.parentNode(d.value));if(-1===i(d.value))continue;if(-1!==v){u=d;break}var f=Gn.parentNode(d.value);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=Gn.host(f);if(-1!==this.mirror.getId(p)){u=d;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),n(u.value)}var g={texts:this.texts.map((e=>{var t=e.node,r=Gn.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var t,r=e.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof r.style){var i=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.style.length>i.length&&(i+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var a of Object.entries(r)){var o=a[0],s=a[1];"string"!=typeof s&&null!==s||(r[o]=$a({element:e.node,name:o,value:s,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null==(t=this.generatedAttributes.get(e.node))?void 0:t.has(o)}))}return{id:this.mirror.getId(e.node),attributes:r}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&this.mutationCb(g)})),Rn(this,"bufferBelongsToIframe",(e=>this.doc===e.contentDocument)),Rn(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(this.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e,t));var r=Array.from(Gn.childNodes(e),(e=>Gn.textContent(e)||"")).join("");t.attributes.value=ja({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:za(e),value:r,maskInputFn:this.maskInputFn})})),Rn(this,"processMutation",(e=>{var t;if(!Ho(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var r=Gn.textContent(e.target);Bo(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue||this.texts.push({value:mo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,jo(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var i,n=e.target,a=e.attributeName,o=null!==(i=e.attributeNamespace)&&void 0!==i?i:null,s=function(e,t,r){if(!r)return t;var i=e.getAttributeNodeNS(r,t);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+t;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+t;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===t?t:"xmlns:"+t;var n=e.lookupPrefix(r);return n?n+":"+t:t}(n,a,o),u=o?n.getAttributeNS(o,a):e.target.getAttribute(a);if("value"===s){var l=n,h=za(l);u=ja({element:l,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:h,value:u,maskInputFn:this.maskInputFn})}if(Bo(e.target,this.blockClass,this.blockSelector,!1)||u===e.oldValue)return;var c=this.attributeMap.get(e.target),d="IFRAME"===n.tagName&&"src"===s;if(d&&!this.keepIframeSrcFn(u)&&n.contentDocument)return;if(c||(this.attributes.push(c={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e.target,c)),"type"===s&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!po(n.tagName,s)){var v=fo(this.doc,Ba(n.tagName),Ba(s),u,n,this.dataURLOptions);if(d&&!this.keepIframeSrcFn(u)&&(s="rr_src"),c.attributes[s]=v,null==(t=this.generatedAttributes.get(e.target))||t.delete(s),"style"===s){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var f=this.unattachedDoc.createElement("span"),p=n.style;for(var g of(e.oldValue&&(f.style.cssText=e.oldValue),Array.from(p))){var m=p.getPropertyValue(g),y=p.getPropertyPriority(g);m!==f.style.getPropertyValue(g)||y!==f.style.getPropertyPriority(g)?c.styleDiff[g]=""===y?m:[m,y]:c._unchangedStyles[g]=[m,y]}for(var b of Array.from(f.style))""===p.getPropertyValue(b)&&(c.styleDiff[b]=!1)}else if("open"===s&&"DIALOG"===n.tagName){c.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";var w=this.generatedAttributes.get(e.target);w||this.generatedAttributes.set(e.target,w=new Set),w.add("rr_open_mode")}}break;case"childList":if(Bo(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),i=Ca(e.target)?this.mirror.getId(Gn.host(e.target)):this.mirror.getId(e.target);Bo(e.target,this.blockClass,this.blockSelector,!1)||Ho(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ts(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||$o(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xo(r,i)]?ts(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:!(!Ca(e.target)||!Ma(e.target))||void 0}),function(e,t){for(var r=[e];r.length;){var i=r.pop();t.has(i)||(t.add(i),Gn.childNodes(i).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Rn(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)){if(this.addedSet.has(e))return this.addedSet.delete(e),void this.addedSet.add(e);if(!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ho(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Xo(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Bo(e,this.blockClass,this.blockSelector,!1)||(Gn.childNodes(e).forEach((e=>this.genAdds(e))),Vo(e)&&Gn.childNodes(Gn.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]})),this.canvasManager.acquire()}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function ts(e,t){for(var r=[t];r.length;){var i=r.pop();e.delete(i),Gn.childNodes(i).forEach((e=>r.push(e)))}}function rs(e,t,r){return 0!==e.size&&function(e,t,r){var i=Gn.parentNode(t);return!!i&&e.has(i)}(e,t)}function is(e,t){if(0===e.size)return!1;for(var r=Gn.parentNode(t);r;){if(e.has(r))return!0;r=Gn.parentNode(r)}return!1}var ns=function(e,t){return void 0===t&&(t="rrweb"),Ko?function(){try{return e(...arguments)}catch(e){if(Ko&&!0===Ko(e,t))return;throw e}}:e},as=[];function os(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function ss(e,t){var r,i=new es;i.init(e);try{r=new(Vn())(ns(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return e.attributeFilter&&e.attributeFilter.length>0&&(n.attributeFilter=e.attributeFilter),r.observe(t,n),as.push(i),{observer:r,buffer:i}}catch(e){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(e){}throw e}}function us(e){var t=e.scrollCb,r=e.doc,i=e.mirror,n=e.blockClass,a=e.blockSelector,o=e.sampling,s=new Map,u=e=>{var o=os(e);if(o&&!Bo(o,n,a,!0)){var u,l,h=i.getId(o);if(o===r&&r.defaultView){var c=No(r.defaultView);u=c.left,l=c.top}else u=o.scrollLeft,l=o.scrollTop;var d=u+","+l;s.get(h)!==d&&(s.set(h,d),t({id:h,x:u,y:l}))}},l=[Io("scroll",ns(Oo(ns((e=>u(e))),o.scroll||100)),r)];return"onscrollend"in r&&l.push(Io("scrollend",ns(u),r)),()=>l.forEach((e=>e()))}function ls(e,t){for(var r=as.length-1;r>=0;r--){var i=as[r];if(i){var n=i.bufferBelongsToIframe(e);!n&&t&&t.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),as.splice(r,1))}}}var hs=["INPUT","TEXTAREA","SELECT"],cs=new WeakMap;function ds(e){return function e(t,r){if(ms("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||ms("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||ms("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||ms("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var i=Array.from(t.parentRule.cssRules).indexOf(t);return r.unshift(i),e(t.parentRule,r)}if(t.parentStyleSheet){var n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);r.unshift(n)}return r}(e,[])}function vs(e,t,r){var i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}var fs=5e3;function ps(e,t){var r,i,n,a,o=e.stylesheetManager;a=e.mirror.getId("#document"===t.nodeName?t:Gn.host(t));var s="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(n=null==(i=t.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==s?void 0:s.prototype)?Object.getOwnPropertyDescriptor(null==s?void 0:s.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&s&&u?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var e;return null==(e=u.get)?void 0:e.call(this)},set(e){var t,r;try{r=null==(t=u.set)?void 0:t.call(this,e)}catch(e){if(e&&"object"==typeof e&&"NotAllowedError"===e.name)return;throw e}if(null!==a&&-1!==a)try{o.adoptStyleSheets(e,a)}catch(e){}return r}}),ns((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function gs(e,t){void 0===t&&(t={});var r,i,n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){var r=e.mutationCb,i=e.mousemoveCb,n=e.mouseInteractionCb,a=e.scrollCb,o=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb,h=e.styleDeclarationCb,c=e.canvasMutationCb,d=e.fontCb,v=e.selectionCb,f=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),i(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),n(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),a(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),o(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),u(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),l(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),h(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),c(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),d(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),v(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t);var a,o,s,u,l,c,d,v,f=[],p=ns((()=>{if(i){i.destroy(),i.reset();var t=as.indexOf(i);-1!==t&&as.splice(t,1)}e.shadowDomManager.resetForDoc(e.doc),null==r||r.disconnect(),f.forEach((e=>e()))}));try{if(e.recordDOM){var g=ss(e,e.doc);r=g.observer,i=g.buffer}if(f.push(function(e){var t=e.mousemoveCb,r=e.sampling,i=e.doc,n=e.mirror;if(!1===r.mousemove)return()=>{};var a,o="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,u=[],l=Oo(ns((e=>{var r=Date.now()-a;t(u.map((e=>(e.timeOffset-=r,e))),e),u=[],a=null})),s),h=ns(Oo(ns((e=>{var t=os(e),r=Uo(e)?e.changedTouches[0]:e,i=r.clientX,o=r.clientY;a||(a=Po()),u.push({x:i,y:o,id:n.getId(t),timeOffset:Po()-a}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?En.Drag:e instanceof MouseEvent?En.MouseMove:En.TouchMove)})),o,{trailing:!1})),c=[Io("mousemove",h,i),Io("touchmove",h,i),Io("drag",h,i)];return ns((()=>{c.forEach((e=>e()))}))}(e)),f.push(function(e){var t=e.mouseInteractionCb,r=e.doc,i=e.mirror,n=e.blockClass,a=e.blockSelector,o=e.sampling;if(!1===o.mouseInteraction)return()=>{};var s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,u=[],l=null;return Object.keys(Ln).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((e=>{var o=Ba(e),s=(e=>r=>{var o=os(r);if(!Bo(o,n,a,!0)){var s=null,u=e;if("pointerType"in r){switch(r.pointerType){case"mouse":s=On.Mouse;break;case"touch":s=On.Touch;break;case"pen":s=On.Pen}s===On.Touch&&(Ln[e]===Ln.MouseDown?u="TouchStart":Ln[e]===Ln.MouseUp&&(u="TouchEnd"))}else Uo(r)&&(s=On.Touch);null!==s?(l=s,(u.startsWith("Touch")&&s===On.Touch||u.startsWith("Mouse")&&s===On.Mouse)&&(s=null)):Ln[e]===Ln.Click&&(s=l,l=null);var c=Uo(r)?r.changedTouches[0]:r;if(c){var d=i.getId(o),v=c.clientX,f=c.clientY;ns(t)(h({type:Ln[u],id:d,x:v,y:f},null!==s&&{pointerType:s}))}}})(e);if(window.PointerEvent)switch(Ln[e]){case Ln.MouseDown:case Ln.MouseUp:o=o.replace("mouse","pointer");break;case Ln.TouchStart:case Ln.TouchEnd:return}u.push(Io(o,s,r))})),ns((()=>{u.forEach((e=>e()))}))}(e)),f.push(us(e)),f.push(function(e,t){var r=e.viewportResizeCb,i=t.win,n=-1,a=-1;return Io("resize",ns(Oo(ns((()=>{var e=Fo(),t=qo();n===e&&a===t||(r({width:Number(t),height:Number(e)}),n=e,a=t)})),200)),i)}(e,{win:n})),f.push(function(e){var t=e.inputCb,r=e.doc,i=e.mirror,n=e.blockClass,a=e.blockSelector,o=e.ignoreClass,s=e.ignoreSelector,u=e.maskInputOptions,l=e.maskInputFn,c=e.userTriggeredOnInput;function d(e){var t=os(e),i=e.isTrusted,h=r.defaultView;if(!t||!h||t instanceof h.HTMLElement){var d=t&&t.tagName;if(t&&"OPTION"===d&&(t=Gn.parentElement(t)),t&&d&&hs.indexOf(d)>=0&&!Bo(t,n,a,!0)&&!(t.classList.contains(o)||s&&t.matches(s))){var f=t.value,p=!1,g=za(t)||"";"radio"===g||"checkbox"===g?p=t.checked:(u[d.toLowerCase()]||u[g])&&(f=ja({element:t,maskInputOptions:u,tagName:d,type:g,value:f,maskInputFn:l})),v(t,c?{text:f,isChecked:p,userTriggered:i}:{text:f,isChecked:p});var m=t.name;"radio"===g&&m&&p&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var r=e.value;v(e,c?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function v(e,r){var n=cs.get(e);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){cs.set(e,r);var a=i.getId(e);ns(t)(h({},r,{id:a}))}}var f=("last"===e.sampling.input?["change"]:["input","change"]).map((e=>Io(e,ns(d),r))),p=r.defaultView;if(!p)return()=>{f.forEach((e=>e()))};var g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return g&&g.set&&f.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map((e=>Do(e[0],e[1],{set(){ns(d)({target:this,isTrusted:!1})}},!1,p)))),ns((()=>{f.forEach((e=>e()))}))}(e)),f.push(function(e){var t=e.mediaInteractionCb,r=e.blockClass,i=e.blockSelector,n=e.mirror,a=e.sampling,o=e.doc,s=ns((e=>Oo(ns((a=>{var o=os(a);if(o&&!Bo(o,r,i,!0)){var s=o.currentTime,u=o.volume,l=o.muted,h=o.playbackRate,c=o.loop;t({type:e,id:n.getId(o),currentTime:s,volume:u,muted:l,playbackRate:h,loop:c})}})),a.media||500))),u=[Io("play",s(Pn.Play),o),Io("pause",s(Pn.Pause),o),Io("seeked",s(Pn.Seeked),o),Io("volumechange",s(Pn.VolumeChange),o),Io("ratechange",s(Pn.RateChange),o)];return ns((()=>{u.forEach((e=>e()))}))}(e)),e.recordDOM){var m=function(e){var t=new Map,r=new Set,i=!0,n=e=>{if(i)try{e()}catch(e){}},a=e=>{var r,i=t.get(e);if(i){for(;null==(r=i[0])?void 0:r.ready;){var a=i.shift();(null==a?void 0:a.emit)&&n(a.emit)}0===i.length&&t.delete(e)}};return{queueMutation(e,r){if(e){var i=t.get(e);i?(i.push({emit:r,ready:!0}),a(e)):n(r)}else n(r)},queuePendingMutation(o,s,u){if(!i)return()=>{};var l=t.get(o);l||t.set(o,l=[]);var h={emit:s,ready:!1};l.push(h);var c,d=!1,v=!1,f=()=>{d||v||(d=!0,void 0!==c&&r.delete(c),h.ready=!0,h.emit=void 0,a(o))};try{c=e.setTimeout(f,fs),d||v?e.clearTimeout(c):r.add(c)}catch(e){f()}return t=>{!v&&i&&(v=!0,void 0!==c&&(e.clearTimeout(c),r.delete(c)),d?t&&n(u):(h.ready=!0,t||(h.emit=void 0),a(o)))}},reset(){i=!1,r.forEach((t=>e.clearTimeout(t))),r.clear(),t.clear()}}}(n);f.push(m.reset),f.push(function(e,t){var r=e.styleSheetRuleCb,i=e.mirror,n=e.stylesheetManager,a=t.win,o=t.mutationQueue;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};var s=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t);var l=vs(t,i,n.styleMirror),h=l.id,c=l.styleId;return(h&&-1!==h||c&&-1!==c)&&o.queueMutation(t,(()=>r({id:h,styleId:c,adds:[{rule:s,index:u}]}))),u}),"host")}),a.CSSStyleSheet.prototype.addRule=function(e,t,r){return void 0===r&&(r=this.cssRules.length),a.CSSStyleSheet.prototype.insertRule.apply(this,[e+" { "+t+" }",r])};var u,l,h=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(h,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t);var l=vs(t,i,n.styleMirror),h=l.id,c=l.styleId;return(h&&-1!==h||c&&-1!==c)&&o.queueMutation(t,(()=>r({id:h,styleId:c,removes:[{index:s}]}))),u}),"host")}),a.CSSStyleSheet.prototype.removeRule=function(e){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(u=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);try{var l=null==u?void 0:u.then;if(t.ownerNode||!u||"function"!=typeof l)return u;n.onCssomSheetMutation(t);var h=vs(t,i,n.styleMirror),c=h.id,d=h.styleId;if(!(c&&-1!==c||d&&-1!==d))return u;var v=o.queuePendingMutation(t,(()=>r({id:c,styleId:d,replace:s})),(()=>{var e=Aa(t);null!==e&&r({id:c,styleId:d,replace:e})}));try{l.call(u,(()=>v(!0)),(()=>v(!1)))}catch(e){v(!1)}}catch(e){}return u}),"host")})),a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t);var l=vs(t,i,n.styleMirror),h=l.id,c=l.styleId;return(h&&-1!==h||c&&-1!==c)&&o.queueMutation(t,(()=>r({id:h,styleId:c,replaceSync:s}))),u}),"host")}));var c={};ys("CSSGroupingRule")?c.CSSGroupingRule=a.CSSGroupingRule:(ys("CSSMediaRule")&&(c.CSSMediaRule=a.CSSMediaRule),ys("CSSConditionRule")&&(c.CSSConditionRule=a.CSSConditionRule),ys("CSSSupportsRule")&&(c.CSSSupportsRule=a.CSSSupportsRule));var d={};return Object.entries(c).forEach((e=>{var t=e[0],a=e[1];d[t]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(d[t].insertRule,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t.parentStyleSheet);var l=vs(t.parentStyleSheet,i,n.styleMirror),h=l.id,c=l.styleId;if(t.parentStyleSheet&&(h&&-1!==h||c&&-1!==c)){var d=[...ds(t),u];o.queueMutation(t.parentStyleSheet,(()=>r({id:h,styleId:c,adds:[{rule:s,index:d}]})))}return u}),"host")}),a.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t.parentStyleSheet);var l=vs(t.parentStyleSheet,i,n.styleMirror),h=l.id,c=l.styleId;if(t.parentStyleSheet&&(h&&-1!==h||c&&-1!==c)){var d=[...ds(t),s];o.queueMutation(t.parentStyleSheet,(()=>r({id:h,styleId:c,removes:[{index:d}]})))}return u}),"host")})})),ns((()=>{a.CSSStyleSheet.prototype.insertRule=s,a.CSSStyleSheet.prototype.deleteRule=h,u&&(a.CSSStyleSheet.prototype.replace=u),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach((e=>{var t=e[0],r=e[1];r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:n,mutationQueue:m})),f.push(ps(e,e.doc)),f.push(function(e,t){var r=e.styleDeclarationCb,i=e.mirror,n=e.ignoreCSSAttributes,a=e.stylesheetManager,o=t.win,s=t.mutationQueue,u=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:ns(((e,t,o)=>{var u,l=o[0],h=o[1],c=o[2],d=e.apply(t,o);if(n.has(l))return d;var v=null==(u=t.parentRule)?void 0:u.parentStyleSheet;a.onCssomSheetMutation(v);var f=vs(v,i,a.styleMirror),p=f.id,g=f.styleId;if(p&&-1!==p||g&&-1!==g){var m=ds(t.parentRule);s.queueMutation(v,(()=>r({id:p,styleId:g,set:{property:l,value:h,priority:c},index:m})))}return d}),"host")});var l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ns(((e,t,o)=>{var u,l=o[0],h=e.apply(t,o);if(n.has(l))return h;var c=null==(u=t.parentRule)?void 0:u.parentStyleSheet;a.onCssomSheetMutation(c);var d=vs(c,i,a.styleMirror),v=d.id,f=d.styleId;if(v&&-1!==v||f&&-1!==f){var p=ds(t.parentRule);s.queueMutation(c,(()=>r({id:v,styleId:f,remove:{property:l},index:p})))}return h}),"host")}),ns((()=>{o.CSSStyleDeclaration.prototype.setProperty=u,o.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:n,mutationQueue:m})),e.collectFonts&&f.push(function(e){var t=e.fontCb,r=e.doc,i=r.defaultView;if(!i)return()=>{};var n=[],a=new WeakMap,o=i.FontFace;i.FontFace=function(e,t,r){var i=new o(e,t,r);return a.set(i,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};var s=Zn(r.fonts,"add",(function(e){return function(r){return setTimeout(ns((()=>{var e=a.get(r);e&&(t(e),a.delete(r))})),0),e.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(s),ns((()=>{n.forEach((e=>e()))}))}(e))}for(var y of(f.push((o=(a=e).doc,s=a.mirror,u=a.blockClass,l=a.blockSelector,c=a.selectionCb,d=!0,(v=ns((()=>{var e=o.getSelection();if(!(!e||d&&(null==e?void 0:e.isCollapsed))){d=e.isCollapsed||!1;for(var t=[],r=e.rangeCount||0,i=0;r>i;i++){var n=e.getRangeAt(i),a=n.startContainer,h=n.startOffset,v=n.endContainer,f=n.endOffset;Bo(a,u,l,!0)||Bo(v,u,l,!0)||t.push({start:s.getId(a),startOffset:h,end:s.getId(v),endOffset:f})}c({ranges:t})}})))(),Io("selectionchange",v))),f.push(function(e){var t=e.customElementCb,r=e.doc.defaultView;return r&&r.customElements?Zn(r.customElements,"define",(function(e){return function(r,i,n){try{t({define:{name:r}})}catch(e){console.warn("Custom element callback failed for "+r)}return e.apply(this,[r,i,n])}})):()=>{}}(e)),e.plugins))f.push(y.observer(y.callback,n,y.options))}catch(e){try{p()}catch(e){}throw e}return p}function ms(e){return void 0!==window[e]}function ys(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class bs{constructor(e){Rn(this,"iframeRemoteIdToLocalIdMap",new WeakMap),Rn(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){if(0>t)return t;var n=r||this.getRemoteIdToLocalIdMap(e),a=i||this.getLocalIdToRemoteIdMap(e),o=n.get(t);return void 0===o&&(o=this.generateIdFn(),n.set(t,o),a.set(o,t)),o}getIds(e,t){var r=this.getRemoteIdToLocalIdMap(e),i=this.getLocalIdToRemoteIdMap(e);return t.map((t=>this.getId(e,t,r,i)))}getRemoteId(e,t,r){var i;return"number"!=typeof t||0>t?t:null!==(i=(r||this.getLocalIdToRemoteIdMap(e)).get(t))&&void 0!==i?i:-1}getRemoteIds(e,t){var r=this.getLocalIdToRemoteIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(e),this.iframeLocalIdToRemoteIdMap.delete(e)}getRemoteIdToLocalIdMap(e){var t=this.iframeRemoteIdToLocalIdMap.get(e);return t||this.iframeRemoteIdToLocalIdMap.set(e,t=new Map),t}getLocalIdToRemoteIdMap(e){var t=this.iframeLocalIdToRemoteIdMap.get(e);return t||this.iframeLocalIdToRemoteIdMap.set(e,t=new Map),t}}class ws{constructor(e){Rn(this,"iframes",new WeakMap),Rn(this,"crossOriginIframeMap",new WeakMap),Rn(this,"crossOriginIframeMirror",new bs(oo)),Rn(this,"crossOriginIframeStyleMirror"),Rn(this,"crossOriginIframeRootIdMap",new WeakMap),Rn(this,"mirror"),Rn(this,"mutationCb"),Rn(this,"wrappedEmit"),Rn(this,"loadListener"),Rn(this,"pageHideListener"),Rn(this,"stylesheetManager"),Rn(this,"recordCrossOriginIframes"),Rn(this,"messageHandler"),Rn(this,"nestedIframeListeners",new Map),Rn(this,"attachedWindows",new WeakMap),Rn(this,"attachedDocuments",new WeakMap),Rn(this,"attachedIframes",new Map),Rn(this,"loadListenerDisposers",new WeakMap),Rn(this,"iframeElementsById",new Map),Rn(this,"pageHideHandlers",new WeakMap),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}registerLoadListenerDisposer(e,t){var r=this.loadListenerDisposers.get(e);r||this.loadListenerDisposers.set(e,r=new Set),r.add(t);var i=this.mirror.getId(e);-1!==i&&this.iframeElementsById.set(i,e)}getIframeElementById(e){var t,r,i;return null!==(t=null!==(r=null==(i=this.attachedIframes.get(e))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(e))&&void 0!==t?t:null}forgetIframeId(e){this.attachedIframes.delete(e),this.iframeElementsById.delete(e)}disposeLoadListeners(e){var t=this.loadListenerDisposers.get(e);t&&(t.forEach((e=>Ao(e))),this.loadListenerDisposers.delete(e))}removePageHideListener(e){var t=this.pageHideHandlers.get(e);t&&(t.forEach((e=>{Ro(e.win,"pagehide",e.handler)})),this.pageHideHandlers.delete(e))}addLoadListener(e){this.loadListener=e}addPageHideListener(e){this.pageHideListener=e}removeLoadListener(){this.loadListener=void 0}trackIframeContent(e,t){var r=this.mirror.getId(e);return this.attachedIframes.set(r,{element:e,content:t}),r}attachIframe(e,t){var r,i=this.trackIframeContent(e,t);if(e.contentDocument){var n=this.attachedDocuments.get(e);n||this.attachedDocuments.set(e,n=new Set),n.add(e.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var a=e.contentWindow;if(this.recordCrossOriginIframes&&a&&!this.nestedIframeListeners.has(a)){var o=this.handleMessage.bind(this);Ao((()=>{a.addEventListener("message",o),this.nestedIframeListeners.set(a,o);var t=this.attachedWindows.get(e);t||this.attachedWindows.set(e,t=new Set),t.add(a)}))}Ao((()=>{var t=e.contentWindow;if(t){var r=this.pageHideHandlers.get(e);if(r)for(var i of r)if(i.win===t)return;var n=()=>{var t;null==(t=this.pageHideListener)||t.call(this,e),e.contentDocument&&this.mirror.removeNodeFromMap(e.contentDocument),e.contentWindow&&this.crossOriginIframeMap.delete(e.contentWindow)};t.addEventListener("pagehide",n),r||this.pageHideHandlers.set(e,r=new Set),r.add({win:t,handler:n})}})),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var i=this.transformCrossOriginEvent(r,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case An.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),this.trackIframeContent(e,t.data.node),{timestamp:t.timestamp,type:An.IncrementalSnapshot,data:{source:En.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case An.Meta:case An.Load:case An.DomContentLoaded:return!1;case An.Plugin:return t;case An.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case An.IncrementalSnapshot:switch(t.data.source){case En.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case En.Drag:case En.TouchMove:case En.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case En.ViewportResize:return!1;case En.MediaInteraction:case En.MouseInteraction:case En.Scroll:case En.CanvasMutation:case En.Input:return this.replaceIds(t.data,e,["id"]),t;case En.StyleSheetRule:case En.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case En.Font:return t;case En.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case En.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,i){for(var n of i)(Array.isArray(t[n])||"number"==typeof t[n])&&(t[n]=Array.isArray(t[n])?e.getIds(r,t[n]):e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Nn.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}removeIframeById(e){var t=this.attachedIframes.get(e),r=(null==t?void 0:t.element)||this.iframeElementsById.get(e)||this.mirror.getNode(e);if(this.iframeElementsById.delete(e),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach((e=>{var t=this.nestedIframeListeners.get(e);t&&(Ro(e,"message",t),this.nestedIframeListeners.delete(e)),this.crossOriginIframeMap.delete(e)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(Ro(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var a=this.attachedDocuments.get(r);a&&(a.forEach((e=>{Ao((()=>this.mirror.removeNodeFromMap(e)))})),Ao((()=>ls(r,a))),this.attachedDocuments.delete(r))}t&&this.attachedIframes.delete(e)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var e=[];this.attachedIframes.forEach(((t,r)=>{this.mirror.has(r)||e.push(r)})),e.forEach((e=>this.removeIframeById(e)))}}reattachIframes(){this.attachedIframes.forEach(((e,t)=>{var r=e.content;this.mirror.has(t)?this.mutationCb({adds:[{parentId:t,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(t)}))}destroy(){this.recordCrossOriginIframes&&Ro(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((e,t)=>{Ro(t,"message",e)})),this.nestedIframeListeners.clear();var e=new Set;this.iframeElementsById.forEach((t=>e.add(t))),this.attachedIframes.forEach((t=>e.add(t.element))),e.forEach((e=>{this.disposeLoadListeners(e),this.removePageHideListener(e)})),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}}class ks{constructor(e){Rn(this,"shadowDoms",new WeakSet),Rn(this,"mutationCb"),Rn(this,"scrollCb"),Rn(this,"bypassOptions"),Rn(this,"mirror"),Rn(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){var r,i;if(Ma(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=null!==(r=null==(i=Gn.host(e))?void 0:i.ownerDocument)&&void 0!==r?r:t,a=ss(h({},this.bypassOptions,{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),o=a.observer,s=a.buffer;this.restoreHandlers.push({doc:n,handler(){o.disconnect(),s.destroy(),s.releaseCanvasManager();var e=as.indexOf(s);-1!==e&&as.splice(e,1)}}),this.restoreHandlers.push({doc:n,handler:us(h({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Gn.host(e))),this.restoreHandlers.push({doc:n,handler:ps({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)})}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push({doc:t,handler:Zn(e.prototype,"attachShadow",(function(e){return function(i){var n=e.call(this,i),a=Gn.shadowRoot(this);return a&&Qo(this)&&r.addShadowRoot(a,t),n}}))})}reset(){this.restoreHandlers.forEach((e=>{var t=e.handler;try{t()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(e){var t=[];for(var r of this.restoreHandlers)if(r.doc===e)try{r.handler()}catch(e){}else t.push(r);this.restoreHandlers=t}}var _s="skip-frame";function Ss(e){if("object"!=typeof e||null===e)return!1;var t=e.y,r=e.width,i=e.height;return Number.isFinite(e.x)&&Number.isFinite(t)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var xs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cs="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ms=0;64>Ms;Ms++)Cs[xs.charCodeAt(Ms)]=Ms;var Ts=new Map,Is=(e,t,r)=>{if(e&&(Es(e,t)||"object"==typeof e)){var i=function(e,t){var r=Ts.get(e);return r||Ts.set(e,r=new Map),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),n=i.indexOf(e);return-1===n&&(n=i.length,i.push(e)),n}};function Rs(e,t,r,i){if(e instanceof Array)return e.map((e=>Rs(e,t,r,i)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var n=e.constructor.name,a=function(e){var t,r=new Uint8Array(e),i=r.length,n="";for(t=0;i>t;t+=3)n+=xs[r[t]>>2],n+=xs[(3&r[t])<<4|r[t+1]>>4],n+=xs[(15&r[t+1])<<2|r[t+2]>>6],n+=xs[63&r[t+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e);return{rr_type:n,base64:a}}return e instanceof DataView?{rr_type:e.constructor.name,args:[Rs(e.buffer,t,r,i),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL(i.type,i.quality)}:e instanceof ImageData?{rr_type:e.constructor.name,args:[Rs(e.data,t,r,i),e.width,e.height]}:Es(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Is(e,t,r)}:e}var As=(e,t,r,i)=>e.map((e=>Rs(e,t,r,i))),Es=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))},Ls=["webgl","webgl2"];function Os(e){return"nodeType"in e}function Ds(e,t,r,i){var n=[];try{if(i){var a=function(e,t,r){var i=e.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return Zn(i.prototype,"configure",(function(i){return function(n){var a=function(e){var t=e.canvas;return t&&"object"==typeof t?t:null}(this);if(!a||Os(a)&&Bo(a,t,r,!0))return i.call(this,n);Os(a)&&!("__context"in a)&&(a.__context="webgpu");var o=function(e){var t=e.GPUTextureUsage;return t?t.COPY_SRC|t.RENDER_ATTACHMENT:null}(e);return i.call(this,null!==o&&n?h({},n,{usage:"number"==typeof n.usage?n.usage|o:o}):n)}}))}(e,t,r);a&&n.push(a)}var o=Zn(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var a=function(e){return"experimental-webgl"===e?"webgl":e}(n),o=arguments.length,s=new Array(o>1?o-1:0),u=1;o>u;u++)s[u-1]=arguments[u];if(!Bo(this,t,r,!0)&&("__context"in this||(this.__context=a),i&&Ls.includes(a)))if(s[0]&&"object"==typeof s[0]){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0});return e.apply(this,[n,...s])}}));n.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Ps(e,t,r,i,n,a,o){var s=[],u=Object.getOwnPropertyNames(e),l=function(u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))return 0;try{if("function"!=typeof e[u])return 0;var l=Zn(e,u,(function(e){return function(){for(var s=arguments.length,l=new Array(s),h=0;s>h;h++)l[h]=arguments[h];var c=e.apply(this,l);if(Is(c,a,this),this.canvas&&"tagName"in this.canvas&&!Bo(this.canvas,i,n,!0)){var d=As(l,a,this,o);r(this.canvas,{type:t,property:u,args:d})}return c}}));s.push(l)}catch(a){var h=Do(e,u,{set(e){this.canvas&&"tagName"in this.canvas&&!Bo(this.canvas,i,n,!0)&&r(this.canvas,{type:t,property:u,args:[e],setter:!0})}});s.push(h)}};for(var h of u)l(h);return s}var Ns,Fs,qs,js='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentFingerprintMap = /* @__PURE__ */ new Map();\n const lastSentAtMap = /* @__PURE__ */ new Map();\n const PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n function hashPixels(data) {\n const view = new Uint32Array(\n data.buffer,\n data.byteOffset,\n data.byteLength >>> 2\n );\n let primaryHash = 2166136261;\n let secondaryHash = 2654435769;\n for (let i2 = 0; i2 < view.length; i2++) {\n primaryHash ^= view[i2];\n primaryHash = Math.imul(primaryHash, 16777619);\n secondaryHash ^= view[i2];\n secondaryHash = Math.imul(secondaryHash, 2246822507);\n }\n return `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n }\n function frameFingerprint(width, height, data) {\n return `${width}x${height}:${hashPixels(data)}`;\n }\n function transparentFingerprint(width, height) {\n const pixelCount = width * height;\n let hash = transparentFingerprintMap.get(pixelCount);\n if (hash === void 0) {\n hash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n transparentFingerprintMap.set(pixelCount, hash);\n }\n return `${width}x${height}:${hash}`;\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("resetFrameDedup" in e.data) {\n lastFingerprintMap.clear();\n return;\n }\n if ("OffscreenCanvas" in globalThis) {\n const {\n id,\n bitmap,\n width,\n height,\n displayWidth,\n displayHeight,\n dataURLOptions,\n maskRegions\n } = e.data;\n try {\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d", {\n willReadFrequently: true\n });\n }\n const ctx = reusableCtx;\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n if (maskRegions) {\n ctx.fillStyle = "black";\n for (const region of maskRegions) {\n ctx.fillRect(region.x, region.y, region.width, region.height);\n }\n }\n const fingerprint = frameFingerprint(\n width,\n height,\n ctx.getImageData(0, 0, width, height).data\n );\n const lastFingerprint = lastFingerprintMap.get(id) ?? transparentFingerprint(width, height);\n if (fingerprint === lastFingerprint) {\n const lastSentAt = lastSentAtMap.get(id);\n const keyframeDue = maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS;\n if (!keyframeDue) {\n return worker.postMessage({ id });\n }\n }\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n worker.postMessage({\n id,\n type: blob.type,\n base64: encode(arrayBuffer),\n // cpu intensive\n displayWidth,\n displayHeight\n });\n lastFingerprintMap.set(id, fingerprint);\n lastSentAtMap.set(id, Date.now());\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n',Bs="undefined"!=typeof self&&self.Blob&&new Blob([js],{type:"text/javascript;charset=utf-8"});function Hs(e){var t;try{if(!(t=Bs&&(self.URL||self.webkitURL).createObjectURL(Bs)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(js),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class $s{constructor(e){Rn(this,"pendingCanvasMutations",new Map),Rn(this,"rafStamps",{latestId:0,invokeId:null}),Rn(this,"mirror"),Rn(this,"mutationCb"),Rn(this,"resetObservers"),Rn(this,"frozen",!1),Rn(this,"locked",!1),Rn(this,"rafIdTimestamp",null),Rn(this,"rafIdFlush",null),Rn(this,"refCount",0),Rn(this,"torndown",!1),Rn(this,"resetFrameDedup",null),Rn(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var t=e.sampling,r=void 0===t?"all":t,i=e.win,n=e.blockClass,a=e.blockSelector,o=e.recordCanvas,s=e.dataURLOptions,u=e.resolutionScale,l=e.canvasMasking;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,a,s),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,a,{dataURLOptions:s,resolutionScale:u,canvasMasking:l})}onFullSnapshot(){var e;null==(e=this.resetFrameDedup)||e.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){var a=this;if("OffscreenCanvas"in t){var o,s="number"==typeof n.resolutionScale&&Number.isFinite(n.resolutionScale)?Math.min(1,Math.max(.1,n.resolutionScale)):1,u=Ds(t,r,i,!0),h=new Map;try{o=new Hs}catch(e){return}var c=!1;o.onerror=()=>{var e;c=!0,cancelAnimationFrame(d),null==(e=o.terminate)||e.call(o),this.resetFrameDedup=null},this.resetFrameDedup=()=>{o.postMessage({resetFrameDedup:!0})},o.onmessage=e=>{var t=e.data.id;if(h.set(t,!1),"base64"in e.data){var r=e.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:t,type:Dn["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var d,v=1e3/e,f=0,p=e=>{var u,g;c||(f&&v>e-f||(f=e,(u=[],g=e=>{try{e.querySelectorAll("canvas").forEach((e=>{Bo(e,r,i,!0)||u.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&g(e.shadowRoot)}))}catch(e){}},g(t.document),u).forEach(function(){var e=l((function*(e){var t,r,i=a.mirror.getId(e);if(!h.get(i)&&0!==e.width&&0!==e.height){h.set(i,!0);try{if(["webgl","webgl2"].includes(e.__context)){var u=e.getContext(e.__context);if(null==(t=null==u?void 0:u.isContextLost)?void 0:t.call(u))return void h.set(i,!1);!1===(null==(r=null==u?void 0:u.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&u.clear(u.COLOR_BUFFER_BIT)}var l=e.clientWidth||e.width,c=e.clientHeight||e.height,d=Math.max(1,Math.round(l*s)),v=Math.max(1,Math.round(c*s)),f=function(e,t,r,i,n,a){if(e&&"function"==typeof e.regionsFn){var o;try{o=e.regionsFn(t)}catch(e){return _s}if(void 0!==o){if(!Array.isArray(o)||!o.every(Ss))return _s;var s=r/n,u=i/a;return o.filter((e=>e.width>0&&e.height>0)).map((e=>{var t=Math.floor(e.x*s),r=Math.floor(e.y*u);return{x:t,y:r,width:Math.ceil((e.x+e.width)*s)-t,height:Math.ceil((e.y+e.height)*u)-r}}))}}}(n.canvasMasking,e,d,v,l,c);if(f===_s)return void h.set(i,!1);var p=yield createImageBitmap(e,1>s?{resizeWidth:d,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:d,resizeHeight:v});o.postMessage({id:i,bitmap:p,width:d,height:v,displayWidth:l,displayHeight:c,dataURLOptions:n.dataURLOptions,maskRegions:f},[p])}catch(e){h.set(i,!1)}}}));return function(t){return e.apply(this,arguments)}}())),d=requestAnimationFrame(p))};d=requestAnimationFrame(p),this.resetObservers=()=>{var e;u(),cancelAnimationFrame(d),null==(e=o.terminate)||e.call(o),this.resetFrameDedup=null}}}initCanvasMutationObserver(e,t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ds(e,t,r,!1),a=function(e,t,r,i,n){var a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return 1;var s=Zn(t.CanvasRenderingContext2D.prototype,o,(function(a){return function(){for(var s=arguments.length,u=new Array(s),l=0;s>l;l++)u[l]=arguments[l];return Bo(this.canvas,r,i,!0)||setTimeout((()=>{var r=As(u,t,this,n);e(this.canvas,{type:Dn["2D"],property:o,args:r})}),0),a.apply(this,u)}}));a.push(s)}catch(n){var u=Do(t.CanvasRenderingContext2D.prototype,o,{set(t){Bo(this.canvas,r,i,!0)||e(this.canvas,{type:Dn["2D"],property:o,args:[t],setter:!0})}});a.push(u)}};for(var u of o)s(u);return()=>{a.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,i),o=function(e,t,r,i,n){var a=[];return void 0!==t.WebGLRenderingContext&&a.push(...Ps(t.WebGLRenderingContext.prototype,Dn.WebGL,e,r,i,t,n)),void 0!==t.WebGL2RenderingContext&&a.push(...Ps(t.WebGL2RenderingContext.prototype,Dn.WebGL2,e,r,i,t,n)),()=>{a.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,i);this.resetObservers=()=>{n(),a(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,this.rafIdTimestamp=requestAnimationFrame(e)};this.rafIdTimestamp=requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var i=r.map((e=>{var t=function(e,t){if(null==e)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;r[i]=e[i]}return r}(e,Tn);return t}));this.mutationCb({id:t,type:r[0].type,commands:i}),this.pendingCanvasMutations.delete(e)}}}}class Us{constructor(e){var t;Rn(this,"trackedLinkElements",new WeakSet),Rn(this,"pendingDeferredSheets",new Set),Rn(this,"mutationCb"),Rn(this,"adoptedStyleSheetCb"),Rn(this,"maskAllElementAttributes"),Rn(this,"maskAttributeFn"),Rn(this,"styleMirror",new Zo),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(t=e.maskAllElementAttributes)&&void 0!==t&&t,this.maskAttributeFn=e.maskAttributeFn}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}beginDeferredLinkInlining(e,t){if(-1===t||!e.isConnected)return null;var r=null,i=null;try{(i=e.sheet)&&(r=Fa(i))}catch(e){}if(!r||!i)return _a(),null;var n=r,a=!1,o={sheet:i,invalidate(){a=!0}};this.pendingDeferredSheets.add(o);var s=!1;return{advance:r=>{if(s)return!0;var u,l,h=Jn(),c=ea(),d=!0;try{if(a)return s=!0,_a(),!0;if(!n.advance(r))return d=!1,!1;s=!0;var v=n.text();if(!e.isConnected)return!0;var f=null;try{f=e.sheet}catch(e){}return f!==i?(_a(),!0):v?(this.emitCssTextMutation(e,t,v),!0):(_a(),!0)}finally{d&&this.pendingDeferredSheets.delete(o),ta(u=Jn()-h,null!=(l=c)?l:Yn)||(da.totalMs+=u,u>da.slowestSliceMs&&(da.slowestSliceMs=u))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(e){if(e&&0!==this.pendingDeferredSheets.size)for(var t of this.pendingDeferredSheets)t.sheet===e&&(this.pendingDeferredSheets.delete(t),t.invalidate())}inlineDeferredLinkElement(e,t){var r;null==(r=this.beginDeferredLinkInlining(e,t))||r.advance(1/0)}emitCssTextMutation(e,t,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t,attributes:{_cssText:$a({element:e,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var i={id:t,styleIds:[]},n=[],a=function(e){var t;if(r.styleMirror.has(e))t=r.styleMirror.getId(e);else{var a=r.styleMirror.add(e);t=a;var o=Jn();try{ba((()=>{try{var t=e.rules||e.cssRules;t&&ya(t)}catch(e){}n.push({styleId:a,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:Ea(t,e.href),index:r})))})}))}finally{wa(Jn()-o)}}i.styleIds.push(t)};for(var o of e)a(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),bo.forEach((e=>e.abort())),bo.clear()}trackStylesheetInLinkElement(e){}}class zs{constructor(){Rn(this,"nodeMap",new WeakMap),Rn(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Ws=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Vs=document.createElement("iframe");document.body.appendChild(Vs),Array.from=(null==(Mn=Vs.contentWindow)?void 0:Mn.Array.from)||Array.from,document.body.removeChild(Vs)}}catch(e){console.debug("Unable to override Array.from",e)}var Zs=new qa,Gs=new Set([En.Mutation,En.MediaInteraction,En.StyleSheetRule,En.CanvasMutation,En.Font,En.Log,En.StyleDeclaration,En.AdoptedStyleSheet]);function Qs(e){var t=window;if("function"==typeof t.requestIdleCallback){var r=t.requestIdleCallback(e,{timeout:2e3});return{cancel(){var e;return null==(e=t.cancelIdleCallback)?void 0:e.call(t,r)}}}var i=setTimeout(e,250);return{cancel:()=>clearTimeout(i)}}function Js(e){var t;void 0===e&&(e={});var r=e,i=r.emit,n=r.checkoutEveryNms,a=r.checkoutEveryNth,o=r.blockClass,s=void 0===o?"rr-block":o,u=r.blockSelector,l=void 0===u?null:u,c=r.ignoreClass,d=void 0===c?"rr-ignore":c,v=r.ignoreSelector,f=void 0===v?null:v,p=r.maskTextClass,g=void 0===p?"rr-mask":p,m=r.maskTextSelector,y=void 0===m?null:m,b=r.inlineStylesheet,w=void 0===b||b,k=r.inlineStylesheetBudgetRules,_=r.maskAllInputs,S=r.maskInputOptions,x=r.slimDOMOptions,C=r.maskInputFn,M=r.maskTextFn,T=r.maskAllElementAttributes,I=void 0!==T&&T,R=r.maskAttributeFn,A=r.hooks,E=r.packFn,L=r.sampling,O=void 0===L?{}:L,D=r.dataURLOptions,P=void 0===D?{}:D,N=r.canvasResolutionScale,F=r.canvasMasking,q=r.mousemoveWait,j=r.recordDOM,B=void 0===j||j,H=r.recordCanvas,U=void 0!==H&&H,z=r.recordCrossOriginIframes,W=void 0!==z&&z,V=r.recordAfter,Z=void 0===V?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":V,G=r.userTriggeredOnInput,Q=void 0!==G&&G,J=r.collectFonts,Y=void 0!==J&&J,K=r.inlineImages,X=void 0!==K&&K,ee=r.plugins,te=r.keepIframeSrcFn,re=void 0===te?()=>!1:te,ie=r.ignoreCSSAttributes,ne=void 0===ie?new Set([]):ie,ae=r.attributeFilter;Ko=r.errorHandler;var oe=h({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},P),se=!W||window.parent===window,ue=!1;if(!se)try{window.parent.document&&(ue=!1)}catch(e){ue=!0}if(se&&!i)throw new Error("emit function is required");if(!se&&!ue)return()=>{};void 0!==q&&void 0===O.mousemove&&(O.mousemove=q),Zs.reset();var le,he=!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}:void 0!==S?S:{password:!0},ce=Mo(void 0!==x&&x);!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=[].forEach)}();var de,ve,fe=0,pe=new Map,ge=e=>{for(var t of ee||[])t.eventProcessor&&(e=t.eventProcessor(e));return E&&!ue&&(e=E(e)),e};Ns=(e,t)=>{var r,o=e;if(o.timestamp=Po(),!(null==(r=as[0])?void 0:r.isFrozen())||o.type===An.FullSnapshot||o.type===An.IncrementalSnapshot&&Gs.has(o.data.source)||as.forEach((e=>e.unfreeze())),se)null==i||i(ge(o),t);else if(ue){var s={type:"rrweb",event:ge(o),origin:window.location.origin,isCheckout:t};window.parent.postMessage(s,"*")}if(o.type===An.FullSnapshot)le=o,fe=0;else if(o.type===An.IncrementalSnapshot){if(o.data.source===En.Mutation&&o.data.isAttachIframe)return;fe++,(a&&fe>=a||n&&o.timestamp-le.timestamp>n)&&Fs(!0)}};var me=e=>{if(e.removes&&e.removes.length>0){var t=e.adds.length>0?new Set(e.adds.map((e=>e.node.id))):null,r=new Set;if(e.adds.length>0)for(var i of e.adds){var n=Zs.getNode(i.node.id);n&&"IFRAME"===n.nodeName&&r.add(n)}e.removes.forEach((e=>{var i=e.id;if(!t||!t.has(i)){var n=ke.getIframeElementById(i);n&&r.has(n)?ke.forgetIframeId(i):(null==de||de(i),ke.removeIframeById(i))}})),null==ve||ve(),ke.cleanupDetachedIframes()}Ns({type:An.IncrementalSnapshot,data:h({source:En.Mutation},e)})},ye=e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.Scroll},e)}),be=e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.CanvasMutation},e)}),we=new Us({mutationCb:me,adoptedStyleSheetCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.AdoptedStyleSheet},e)}),maskAllElementAttributes:I,maskAttributeFn:R}),ke=new ws({mirror:Zs,mutationCb:me,stylesheetManager:we,recordCrossOriginIframes:W,wrappedEmit:Ns});for(var _e of ee||[])_e.getMirror&&_e.getMirror({nodeMirror:Zs,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});var Se=new zs,xe=null==F?void 0:F.configured;qs=new $s({recordCanvas:U,mutationCb:be,win:window,blockClass:s,blockSelector:l,mirror:Zs,sampling:O.canvas,dataURLOptions:oe,resolutionScale:N,canvasMasking:F});var Ce=new ks({mutationCb:me,scrollCb:ye,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:g,maskTextSelector:y,inlineStylesheet:w,maskInputOptions:he,dataURLOptions:oe,maskTextFn:M,maskInputFn:C,maskAllElementAttributes:I,maskAttributeFn:R,recordCanvas:U,canvasMaskingConfigured:xe,inlineImages:X,sampling:O,slimDOMOptions:ce,iframeManager:ke,stylesheetManager:we,canvasManager:qs,keepIframeSrcFn:re,processedNodeManager:Se,attributeFilter:ae},mirror:Zs});Fs=function(e){if(void 0===e&&(e=!1),B){fa(k);try{Ns({type:An.Meta,data:{href:window.location.href,width:qo(),height:Fo()}},e),null==t||t.cancel(),t=void 0,we.reset(),Ce.init(),as.forEach((e=>e.lock()));var r,i=null;try{i=function(e,t){var r=t||{},i=r.mirror,n=void 0===i?new qa:i,a=r.blockClass,o=void 0===a?"rr-block":a,s=r.blockSelector,u=void 0===s?null:s,l=r.maskTextClass,h=void 0===l?"rr-mask":l,c=r.maskTextSelector,d=void 0===c?null:c,v=r.inlineStylesheet,f=void 0===v||v,p=r.inlineImages,g=void 0!==p&&p,m=r.recordCanvas,y=void 0!==m&&m,b=r.canvasMaskingConfigured,w=r.maskAllInputs,k=void 0!==w&&w,_=r.maskTextFn,S=r.maskInputFn,x=r.maskAllElementAttributes,C=void 0!==x&&x,M=r.maskAttributeFn,T=r.slimDOM,I=r.dataURLOptions,R=r.preserveWhiteSpace,A=r.onSerialize,E=r.onIframeLoad,L=r.iframeLoadTimeout,O=r.onIframeListenerRegistered,D=r.onStylesheetLoad,P=r.stylesheetLoadTimeout,N=r.keepIframeSrcFn,F=void 0===N?()=>!1:N,q=r.maxDepth,j=r.inlineStylesheetBudgetRules,B=!0===k?{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}:!1===k?{password:!0}:k,H=Mo(void 0!==T&&T);fa(j);try{return Co(e,{doc:e,mirror:n,blockClass:o,blockSelector:u,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:B,maskTextFn:_,maskInputFn:S,maskAllElementAttributes:C,maskAttributeFn:M,slimDOMOptions:H,dataURLOptions:I,inlineImages:g,recordCanvas:y,canvasMaskingConfigured:b,preserveWhiteSpace:R,onSerialize:A,onIframeLoad:E,iframeLoadTimeout:L,onIframeListenerRegistered:O,onStylesheetLoad:D,stylesheetLoadTimeout:P,keepIframeSrcFn:F,newlyAddedElement:!1,maxDepth:q})}finally{pa()}}(document,{mirror:Zs,blockClass:s,blockSelector:l,maskTextClass:g,maskTextSelector:y,inlineStylesheet:w,maskAllInputs:he,inlineStylesheetBudgetRules:k,maskTextFn:M,maskInputFn:C,maskAllElementAttributes:I,maskAttributeFn:R,slimDOM:ce,dataURLOptions:oe,recordCanvas:U,canvasMaskingConfigured:xe,inlineImages:X,onSerialize(e){zo(e,Zs)&&ke.addIframe(e),Wo(e,Zs)&&we.trackLinkElement(e),Vo(e)&&Ce.addShadowRoot(Gn.shadowRoot(e),document)},onIframeLoad(e,t){ke.attachIframe(e,t),Ce.observeAttachShadow(e)},onIframeListenerRegistered(e,t){ke.registerLoadListenerDisposer(e,t)},onStylesheetLoad(e,t){we.attachLinkElement(e,t)},keepIframeSrcFn:re})}finally{a=ua,ua=[],r=a}if(!i)return console.warn("Failed to snapshot the document");if(Ns({type:An.FullSnapshot,data:{node:i,initialOffset:No(window)}},e),as.forEach((e=>e.unlock())),qs.onFullSnapshot(),r.length){var n=function(e,t,r){var i=!1,n=null,a=0,o=null,s=()=>null!==o||e.length>a,u=()=>{var r=e[a];e[a]=null,a+=1,r&&Ao((()=>{o=t.beginDeferredLinkInlining(r,Zs.getId(r))}))},l=()=>{if(o){var e=o,t=!0;Ao((()=>{t=e.advance(200)})),t&&(o=null)}},h=e=>{if(n=null,!i){var t=0;do{try{o||u(),l()}catch(e){null==o||o.discard(),o=null,Sa(1)}t+=1}while(!i&&s()&&(e?!e.didTimeout&&e.timeRemaining()>5:10>t));i||(s()?n=Qs(h):r())}};return n=Qs(h),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var t=0,h=0;s()&&50>t;){o||u();var c=o;if(c)if(Math.floor(c.remainingRules()/200)+1>50-t)c.discard(),o=null,h+=1;else{try{l()}catch(e){null==o||o.discard(),o=null,h+=1}t+=1}}if(s()||h>0){for(var d=h+(null!==o?1:0),v=a;e.length>v;v++)null!==e[v]&&(d+=1);Sa(d),null==o||o.discard(),o=null}r()}}}}(r,we,(()=>{t===n&&(t=void 0)}));t=n}W&&ke.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,Zs.getId(document))}finally{pa()}var a}};try{var Me=[];for(var Te of(Me.push(Io("pagehide",(()=>{try{null==t||t.flush()}catch(e){}t=void 0}),window)),["visibilitychange","freeze","resume"]))Me.push(Io(Te,Xn,document));de=e=>{var t=pe.get(e);t&&(t.forEach((e=>{Ao(e);var t=Me.indexOf(e);-1!==t&&Me.splice(t,1)})),pe.delete(e))},ve=()=>{for(var e of pe){var t=e[0],r=Zs.getNode(t);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==de||de(t)}catch(e){null==de||de(t)}else null==de||de(t)}};var Ie=e=>{var t;return ns(gs)({mutationCb:me,mousemoveCb:(e,t)=>Ns({type:An.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.MouseInteraction},e)}),scrollCb:ye,viewportResizeCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.ViewportResize},e)}),inputCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.Input},e)}),mediaInteractionCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.MediaInteraction},e)}),styleSheetRuleCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.StyleSheetRule},e)}),styleDeclarationCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.StyleDeclaration},e)}),canvasMutationCb:be,fontCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.Font},e)}),selectionCb(e){Ns({type:An.IncrementalSnapshot,data:h({source:En.Selection},e)})},customElementCb(e){Ns({type:An.IncrementalSnapshot,data:h({source:En.CustomElement},e)})},blockClass:s,ignoreClass:d,ignoreSelector:f,maskTextClass:g,maskTextSelector:y,maskInputOptions:he,inlineStylesheet:w,sampling:O,recordDOM:B,recordCanvas:U,canvasMaskingConfigured:xe,inlineImages:X,userTriggeredOnInput:Q,collectFonts:Y,doc:e,maskInputFn:C,maskTextFn:M,maskAllElementAttributes:I,maskAttributeFn:R,keepIframeSrcFn:re,blockSelector:l,slimDOMOptions:ce,dataURLOptions:oe,mirror:Zs,iframeManager:ke,stylesheetManager:we,shadowDomManager:Ce,processedNodeManager:Se,canvasManager:qs,ignoreCSSAttributes:ne,attributeFilter:ae,plugins:(null==(t=null==ee?void 0:ee.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>Ns({type:An.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},A)};ke.addLoadListener((e=>{try{var t=Zs.getId(e),r=Ie(e.contentDocument);if("function"==typeof r&&(Me.push(r),-1!==t)){var i=pe.get(t);i||pe.set(t,i=new Set),i.add(r)}}catch(e){console.warn(e)}})),ke.addPageHideListener((e=>{var t=Zs.getId(e);null==de||de(t),ls(e)}));var Re=-1,Ae=e=>Ns({type:An.Custom,data:{tag:"rrweb/fullscreen",payload:e}}),Ee=()=>{var e,t,r,i,n=document,a=null!==(e=null!==(t=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==t?t:n.msFullscreenElement)&&void 0!==e?e:null,o=a?Zs.getId(a):-1;o!==Re&&(-1!==Re&&Ae({id:Re,enter:!1}),Re=o,-1!==o&&Ae({id:o,enter:!0}))},Le=()=>{Fs();var e=Ie(document);"function"==typeof e&&Me.push(e),Me.push(Io("fullscreenchange",Ee)),Me.push(Io("webkitfullscreenchange",Ee)),Me.push(Io("mozfullscreenchange",Ee)),Me.push(Io("MSFullscreenChange",Ee)),Ws=!0};return["interactive","complete"].includes(document.readyState)?Le():(Me.push(Io("DOMContentLoaded",(()=>{Ns({type:An.DomContentLoaded,data:{}}),"DOMContentLoaded"===Z&&Le()}))),Me.push(Io("load",(()=>{Ns({type:An.Load,data:{}}),"load"===Z&&Le()}),window))),()=>{try{null==t||t.flush()}catch(e){}t=void 0,Me.forEach((e=>Ao(e))),Se.destroy(),ke.removeLoadListener(),ke.destroy(),pe.clear(),Ce.reset(),Zs.reset(),Ws=!1,Ko=void 0}}catch(e){console.warn(e)}}Js.addCustomEvent=(e,t)=>{if(!Ws)throw new Error("please add custom event after start recording");Ns({type:An.Custom,data:{tag:e,payload:t}})},Js.freezePage=()=>{as.forEach((e=>e.freeze()))},Js.takeFullSnapshot=e=>{if(!Ws)throw new Error("please take full snapshot after start recording");Fs(e)},Js.mirror=Zs;var Ys=Object.defineProperty,Ks=(e,t,r)=>((e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Xs{constructor(e){Ks(this,"fileName"),Ks(this,"functionName"),Ks(this,"lineNumber"),Ks(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var eu=/(^|@)\S+:\d+/,tu=/^\s*at .*(\S+:\d+|\(native\))/m,ru=/^(eval@)?(\[native code])?$/,iu={parse(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(tu)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):[]:[]},extractLocation(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE(e){return e.stack.split("\n").filter((function(e){return!!e.match(tu)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),a=i.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Xs({functionName:a,fileName:o,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari(e){return e.stack.split("\n").filter((function(e){return!e.match(ru)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Xs({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Xs({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),i=[],n=2,a=r.length;a>n;n+=2){var o=t.exec(r[n]);o&&i.push(new Xs({fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera10(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),i=[],n=0,a=r.length;a>n;n+=2){var o=t.exec(r[n]);o&&i.push(new Xs({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera11(e){return e.stack.split("\n").filter((function(e){return!!e.match(eu)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),i=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Xs({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function nu(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var i=e.parentElement,n=[];if(i.children&&i.children.length>0)for(var a=0;i.children.length>a;a++){var o=i.children[a];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&n.push(o)}n.length>1&&(r+=":eq("+n.indexOf(e)+")"),t=r+(t?">"+t:""),e=i}return t}function au(e){return Array.isArray(e)}function ou(e){return"object"==typeof e&&null!==e&&!au(e)}function su(e,t){if(0===t)return!0;var r=Object.keys(e);for(var i of r)if(ou(e[i])&&su(e[i],t-1))return!0;return!1}function uu(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var i=[],n=[];return JSON.stringify(e,(function(e,t){if(i.length>0){var a=i.indexOf(this);~a?i.splice(a+1):i.push(this),~a?n.splice(a,1/0,e):n.push(e),~i.indexOf(t)&&(t=i[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(t)).join(".")+"]")}else i.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(ou(o=t)&&Object.keys(o).length>r.numOfKeysLimit||"function"==typeof o||ou(o)&&su(o,r.depthOfLimit))return function(e){var t=e.toString();return r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"..."),t}(t);var o;if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var s={};for(var u in t){var l=t[u];s[u]=au(l)?nu(l.length?l[0]:null):l}return s}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var lu={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function hu(e,t,r){var i,n=r?Object.assign({},lu,r):lu,a=n.logger;if(!a)return()=>{};i="string"==typeof a?t[a]:a;var o=0,s=!1,u=[];if(n.level.includes("error")){var l=t=>{var r=t.message,i=iu.parse(t.error).map((e=>e.toString())),a=[uu(r,n.stringifyOptions)];e({level:"error",trace:i,payload:a})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var h=t=>{var r,i;t.reason instanceof Error?i=[uu("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[uu("Uncaught (in promise)",n.stringifyOptions),uu(t.reason,n.stringifyOptions)]);var a=iu.parse(r).map((e=>e.toString()));e({level:"error",trace:a,payload:i})};t.addEventListener("unhandledrejection",h),u.push((()=>{t.removeEventListener("unhandledrejection",h)}))}for(var c of n.level)u.push(d(i,c));return()=>{u.forEach((e=>e()))};function d(t,r){var i=this;return t[r]?function(t,a,u){try{if(!(a in t))return()=>{};var l=t[a],h={next:l},c=(t=>function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];if(t.apply(i,u),!("assert"===r&&u[0]||s)){s=!0;try{var h=iu.parse(new Error).map((e=>e.toString())).splice(1),c=("assert"===r?u.slice(1):u).map((e=>uu(e,n.stringifyOptions)));o++,n.lengthThreshold>o?e({level:r,trace:h,payload:c}):o===n.lengthThreshold&&e({level:"warn",trace:[],payload:[uu("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})((function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];return h.next.apply(this,t)}));return"function"==typeof c&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:l},__rrweb_layer__:{enumerable:!1,value:h}})),t[a]=c,()=>{if(t[a]!==c)for(var e=e=>{var t;return"function"==typeof e?null!==(t=e.__rrweb_layer__)&&void 0!==t?t:e.__posthog_layer__:void 0},r=t[a],i=e(r);i;){if(i.next===c)return void(i.next=h.next);i=e(r=i.next)}else t[a]=h.next}}catch(e){return()=>{}}}(t,r):()=>{}}}var cu=e=>({name:"rrweb/console@1",observer:hu,options:e}),du=e=>"undefined"!=typeof Document&&e instanceof Document,vu=()=>{},fu=e=>{var t;if(k(e))return null!==(t=e.__posthog_layer__)&&void 0!==t?t:e.__rrweb_layer__};function pu(e,t,r){try{if(!(t in e))return vu;var i={next:e[t]},n=r((function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];return i.next.apply(this,t)}));return k(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:i}})),e[t]=n,()=>{if(e[t]!==n)for(var r=e[t],a=fu(r);a;){if(a.next===n)return void(a.next=i.next);a=fu(r=a.next)}else e[t]=i.next}}catch(e){return vu}}function gu(e,t){var r,i=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),n={hostname:i,isHostDenied:!1};if(null==(r=t.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var a of t.payloadHostDenyList)if(i.endsWith(a))return{hostname:i,isHostDenied:!0};return n}var mu=Oe("[Recorder]"),yu=e=>"navigation"===e.entryType,bu=e=>"resource"===e.entryType;function wu(e,t){return!!t&&(R(t)||t[e])}function ku(e){if("undefined"==typeof Request)return!1;if(e instanceof Request)return!0;try{return"[object Request]"==={}.toString.call(e)}catch(e){return!1}}var _u=["image/","video/","audio/","font/","application/octet-stream","application/pdf","application/zip","application/wasm"];function Su(e){var t=e.type,r=e.recordBody,i=e.headers;function n(e){var t=Object.keys(i).find((e=>"content-type"===e.toLowerCase())),r=t&&i[t];return e.some((e=>null==r?void 0:r.toLowerCase().includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:!!ku(t)&&e(t.url)}catch(e){return!1}}(e.url))return!1;if(n(_u))return!1;if(R(r))return!0;if(w(r))return n(r);var a=r[t];return R(a)?a:n(a)}function xu(e,t,r,i,n,a){return Cu.apply(this,arguments)}function Cu(){return Cu=l((function*(e,t,r,i,n,a){if(void 0===a&&(a=0),a>10)return mu.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var o=function(e,r){for(var a=e.length-1;a>=0;a-=1)if(bu(o=e[a])&&o.initiatorType===t&&(S(i)||o.startTime>=i)&&(S(n)||n>=o.startTime))return e[a];var o}(e.performance.getEntriesByName(r));return o||(yield new Promise((e=>setTimeout(e,50*a))),xu(e,t,r,i,n,a+1))})),Cu.apply(this,arguments)}function Mu(e){var t=e.body,r=e.options,i=e.url;if(T(t))return null;var n=gu(i,r);if(n.isHostDenied)return n.hostname+" is in deny list";if(x(t))return t;if(du(t))return t.textContent;if(A(t))return je(t);if(_(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var Tu=e=>!M(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Iu(e){var t=e.entry,r=e.method,i=e.status,n=e.networkRequest,a=e.isInitial,o=e.start,s=e.end,u=e.url,l=e.initiatorType;o=t?t.startTime:o,s=t?t.responseEnd:s;var c=Math.floor(Date.now()-performance.now()),d=Math.floor(c+(o||0)),v=[h({},t?t.toJSON():{name:u},{startTime:S(o)?void 0:Math.round(o),endTime:S(s)?void 0:Math.round(s),timeOrigin:c,timestamp:d,method:r,initiatorType:l||(t?t.initiatorType:void 0),status:i,requestHeaders:n.requestHeaders,requestBody:n.requestBody,responseHeaders:n.responseHeaders,responseBody:n.responseBody,isInitial:a})];if(Tu(t))for(var f of t.serverTiming||[])v.push({timeOrigin:c,timestamp:d,startTime:Math.round(t.startTime),name:f.name,duration:f.duration,entryType:"serverTiming"});return v}var Ru=["video/","audio/"];function Au(e){return _(e)&&k(e.getReader)&&k(e.tee)}var Eu=500,Lu="[SessionReplay] Timeout while trying to read body",Ou="[SessionReplay] Failed to read body";function Du(e){return Ou+": "+e}function Pu(e){return"[SessionReplay] Body too large to record (> "+e+" bytes)"}function Nu(e,t){if(!t.streamNetworkBody)return function(e){return new Promise((t=>{var r=setTimeout((()=>t(Lu)),Eu);try{e.clone().text().then((e=>t(e)),(e=>t(Du(e)))).finally((()=>clearTimeout(r)))}catch(e){clearTimeout(r),t(Ou)}}))}(e);var r=bt(t);return function(e,t){try{var r,i=null==(r=e.headers)||null==r.get?void 0:r.get("content-length");if(!i)return!1;var n=parseInt(i,10);return Number.isFinite(n)&&n>t}catch(e){return!1}}(e,r)?Promise.resolve(Pu(r)):function(e,t){return new Promise((r=>{var i,n=!1;function a(){try{var e;null==(e=i)||e.cancel()}catch(e){}}function o(e){n||(n=!0,clearTimeout(u),a(),r(e))}var s,u=setTimeout((()=>o(Lu)),Eu);try{s=e.clone()}catch(e){return void o(Ou)}var l=s.body;if(Au(l)&&"undefined"!=typeof TextDecoder){try{i=l.getReader()}catch(e){return void o(Ou)}var h=[],c=0;!function e(){i.read().then((r=>{var i=r.done,s=r.value;if(n)a();else if(i)o((new TextDecoder).decode(function(e,t){var r=new Uint8Array(t),i=0;for(var n of e)r.set(n,i),i+=n.byteLength;return r}(h,c)));else{if(s){if(c+s.byteLength>t)return void o(Pu(t));c+=s.byteLength,h.push(s)}e()}}),(e=>o(Du(e))))}()}else try{s.text().then((e=>o(e)),(e=>o(Du(e))))}catch(e){o(Ou)}}))}(e,r)}function Fu(){return Fu=l((function*(e){var t=e.r,r=e.options,i=gu(e.url,r);return i.isHostDenied?Promise.resolve(i.hostname+" is in deny list"):Nu(t,r)})),Fu.apply(this,arguments)}function qu(){return qu=l((function*(e){var t=e.r,r=e.options,i=function(e){var t,r=e.r,i=e.options,n=e.url;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var a=null==(t=r.headers.get("Content-Type"))?void 0:t.toLowerCase(),o=Ru.some((e=>null==a?void 0:a.startsWith(e)));if(a&&o)return"Content-Type "+a+" is not supported";var s=gu(n,i);return s.isHostDenied?s.hostname+" is in deny list":null}({r:t,options:r,url:e.url});return M(i)?Nu(t,r):Promise.resolve(i)})),qu.apply(this,arguments)}var ju=null;function Bu(e,t,r){if(!("performance"in t))return()=>{};if(ju)return mu.warn("Network observer already initialised, doing nothing"),()=>{};var i=r?Object.assign({},wt,r):wt,n=t=>{var r=[],n=!1;t.requests.forEach((e=>{var t="serverTiming"===e.entryType;if(!t||!n){var a=i.maskRequestFn(e);t||(n=!a||(e=>!!e&&It.has(e))(a)),a&&r.push(a)}})),r.length>0&&e(h({},t,{requests:r}))},a=function(e,t,r){if(r.recordInitialRequests){var i=t.performance.getEntries().filter((e=>yu(e)||bu(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:i.flatMap((e=>Iu({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new t.PerformanceObserver((t=>{var i=t.getEntries().filter((e=>yu(e)||bu(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:i.flatMap((e=>Iu({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),a=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return n.observe({entryTypes:a}),()=>{n.disconnect()}}(n,t,i),o=()=>{},s=()=>{};return(i.recordHeaders||i.recordBody)&&(o=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=wu("request",r.recordHeaders),n=wu("response",r.recordHeaders),a=pu(t.XMLHttpRequest.prototype,"open",(a=>function(o,s,u,l,h){void 0===u&&(u=!0);var c=this;try{var d,v,f=new Request(s),p={},g={},m=c.setRequestHeader.bind(c);c.setRequestHeader=(e,t)=>(g[e]=t,m(e,t)),i&&(p.requestHeaders=g);var y=c.send.bind(c);c.send=e=>(Su({type:"request",headers:g,url:s,recordBody:r.recordBody})&&(p.requestBody=Mu({body:e,options:r,url:s})),d=t.performance.now(),y(e));var b=()=>{c.removeEventListener("readystatechange",w),c.removeEventListener("error",b),c.removeEventListener("abort",b),c.removeEventListener("timeout",b)},w=()=>{if(c.readyState===c.DONE){b(),v=t.performance.now();var i={};c.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),n=t.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),Su({type:"response",headers:i,url:s,recordBody:r.recordBody})&&(p.responseBody=Mu({body:c.response,options:r,url:s})),xu(t,"xmlhttprequest",f.url,d,v).then((t=>{var r=Iu({entry:t,method:o,status:null==c?void 0:c.status,networkRequest:p,start:d,end:v,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}};c.addEventListener("readystatechange",w),c.addEventListener("error",b),c.addEventListener("abort",b),c.addEventListener("timeout",b)}catch(e){mu.error("Failed to instrument XHR for network capture",e)}a.call(c,o,s.toString(),u,l,h)}));return()=>{a()}}(n,t,i),s=function(e,t,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var i=wu("request",r.recordHeaders),n=wu("response",r.recordHeaders),a=pu(t,"fetch",(a=>function(){var o=l((function*(o,s){var u,l;try{u=new Request(o,s)}catch(e){return mu.error("Failed to instrument fetch for network capture",e),a(o,s)}var h,c,d={};try{try{var v={};u.headers.forEach(((e,t)=>{v[t]=e})),i&&(d.requestHeaders=v),!Au(null==s?void 0:s.body)&&Su({type:"request",headers:v,url:o,recordBody:r.recordBody})&&(d.requestBody=yield function(e){return Fu.apply(this,arguments)}({r:u,options:r,url:o}))}catch(e){mu.error("Failed to record fetch request for network capture",e)}h=t.performance.now(),l=ku(o)?yield a(u):yield a(o,s),c=t.performance.now();var f={};return l.headers.forEach(((e,t)=>{f[t]=e})),n&&(d.responseHeaders=f),Su({type:"response",headers:f,url:o,recordBody:r.recordBody})&&(d.responseBody=yield function(e){return qu.apply(this,arguments)}({r:l,options:r,url:o})),l}finally{xu(t,"fetch",u.url,h,c).then((t=>{var r,i=Iu({entry:t,method:u.method,status:null==(r=l)?void 0:r.status,networkRequest:d,start:h,end:c,url:u.url,initiatorType:"fetch"});e({requests:i})})).catch((()=>{}))}}));return function(e,t){return o.apply(this,arguments)}}()));return()=>{a()}}(n,t,i)),ju=()=>{a(),o(),s(),ju=null}}var Hu=e=>({name:"rrweb/network@1",observer:Bu,options:e});s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:cu,getRecordNetworkPlugin:Hu},s.__PosthogExtensions__.rrweb={record:Js,version:"v2",wasMaxDepthReached:()=>xo,resetMaxDepthState(){xo=!1,So=!1},getLastSnapshotCost:()=>oa,getMutationCost:()=>h({},ca),resetSnapshotCostState(){ra=0,ia=0,na=0,Yn=0,aa=Qn(),oa=null,sa=null,ua=[],la=0,ha=0,ca={slowestBatchMs:0},da={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}},s.rrweb={record:Js,version:"v2"},s.rrwebConsoleRecord={getRecordConsolePlugin:cu},s.getRecordNetworkPlugin=Hu,s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.initSessionRecording=(e,t)=>new Cn(e,t);var $u,Uu,zu,Wu,Vu,Zu,Gu,Qu,Ju,Yu,Ku,Xu,el,tl,rl,il={},nl=[],al=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ol=Array.isArray;function sl(e,t){for(var r in t)e[r]=t[r];return e}function ul(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ll(e,t,r){var i,n,a,o={};for(a in t)"key"==a?i=t[a]:"ref"==a?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?$u.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===o[a]&&(o[a]=e.defaultProps[a]);return hl(e,o,i,n,null)}function hl(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==n?++zu:n,__i:-1,__u:0};return null==n&&null!=Uu.vnode&&Uu.vnode(a),a}function cl(e){return e.children}function dl(e,t){this.props=e,this.context=t}function vl(e,t){if(null==t)return e.__?vl(e.__,e.__i+1):null;for(var r;e.__k.length>t;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?vl(e):null}function fl(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,i=[],n=[],a=sl({},t);a.__v=t.__v+1,Uu.vnode&&Uu.vnode(a),xl(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,i,null==r?vl(t):r,!!(32&t.__u),n),a.__v=t.__v,a.__.__k[a.__i]=a,Ml(i,a,n),t.__e=t.__=null,a.__e!=r&&pl(a)}}function pl(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some((function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e})),pl(e)}function gl(e){(!e.__d&&(e.__d=!0)&&Wu.push(e)&&!ml.__r++||Vu!=Uu.debounceRendering)&&((Vu=Uu.debounceRendering)||Zu)(ml)}function ml(){try{for(var e,t=1;Wu.length;)Wu.length>t&&Wu.sort(Gu),e=Wu.shift(),t=Wu.length,fl(e)}finally{Wu.length=ml.__r=0}}function yl(e,t,r,i,n,a,o,s,u,l,h){var c,d,v,f,p,g,m,y=i&&i.__k||nl,b=t.length;for(u=function(e,t,r,i,n){var a,o,s,u,l,h=r.length,c=h,d=0;for(e.__k=new Array(n),a=0;n>a;a++)null!=(o=t[a])&&"boolean"!=typeof o&&"function"!=typeof o?("string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?o=e.__k[a]=hl(null,o,null,null,null):ol(o)?o=e.__k[a]=hl(cl,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=e.__k[a]=hl(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,u=a+d,o.__=e,o.__b=e.__b+1,s=null,-1!=(l=o.__i=wl(o,r,u,c))&&(c--,(s=r[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(n>h?d--:h>n&&d++),"function"!=typeof o.type&&(o.__u|=4)):l!=u&&(l==u-1?d--:l==u+1?d++:(l>u?d--:d++,o.__u|=4))):e.__k[a]=null;if(c)for(a=0;h>a;a++)null!=(s=r[a])&&0==(2&s.__u)&&(s.__e==i&&(i=vl(s)),Rl(s,s));return i}(r,t,y,u,b),c=0;b>c;c++)null!=(v=r.__k[c])&&(d=-1!=v.__i&&y[v.__i]||il,v.__i=c,g=xl(e,v,d,n,a,o,s,u,l,h),f=v.__e,v.ref&&d.ref!=v.ref&&(d.ref&&Il(d.ref,null,v),h.push(v.ref,v.__c||f,v)),null==p&&null!=f&&(p=f),(m=!!(4&v.__u))||d.__k===v.__k?(u=bl(v,u,e,m),m&&d.__e&&(d.__e=null)):"function"==typeof v.type&&void 0!==g?u=g:f&&(u=f.nextSibling),v.__u&=-7);return r.__e=p,u}function bl(e,t,r,i){var n,a;if("function"==typeof e.type){for(n=e.__k,a=0;n&&n.length>a;a++)n[a]&&(n[a].__=e,t=bl(n[a],t,r,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=vl(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function wl(e,t,r,i){var n,a,o,s=e.key,u=e.type,l=t[r],h=null!=l&&0==(2&l.__u);if(null===l&&null==s||h&&s==l.key&&u==l.type)return r;if(i>(h?1:0))for(n=r-1,a=r+1;n>=0||t.length>a;)if(null!=(l=t[o=0>n?a++:n--])&&0==(2&l.__u)&&s==l.key&&u==l.type)return o;return-1}function kl(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||al.test(t)?r:r+"px"}function _l(e,t,r,i,n){var a,o;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||kl(e.style,t,"");if(r)for(t in r)i&&r[t]==i[t]||kl(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(Ku,"$1")),o=t.toLowerCase(),t=o in e||"onFocusOut"==t||"onFocusIn"==t?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?i?r[Yu]=i[Yu]:(r[Yu]=Xu,e.addEventListener(t,a?tl:el,a)):e.removeEventListener(t,a?tl:el,a);else{if("http://www.w3.org/2000/svg"==n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function Sl(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t[Ju])t[Ju]=Xu++;else if(r[Yu]>t[Ju])return;return r(Uu.event?Uu.event(t):t)}}}function xl(e,t,r,i,n,a,o,s,u,l){var h,c,d,v,f,p,g,m,y,b,$,w,k,_,S,x,C=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),a=[s=t.__e=r.__e]),(h=Uu.__b)&&h(t);e:if("function"==typeof C){c=o.length;try{if(y=t.props,b=C.prototype&&C.prototype.render,$=(h=C.contextType)&&i[h.__c],w=h?$?$.props.value:h.__:i,r.__c?m=(d=t.__c=r.__c).__=d.__E:(b?t.__c=d=new C(y,w):(t.__c=d=new dl(y,w),d.constructor=C,d.render=Al),$&&$.sub(d),d.state||(d.state={}),d.__n=i,v=d.__d=!0,d.__h=[],d._sb=[]),b&&null==d.__s&&(d.__s=d.state),b&&null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=sl({},d.__s)),sl(d.__s,C.getDerivedStateFromProps(y,d.__s))),f=d.props,p=d.state,d.__v=t,v)b&&null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),b&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(b&&null==C.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,w),t.__v==r.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,w)){t.__v!=r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some((function(e){e&&(e.__=t)})),nl.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,w),b&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,p,g)}))}if(d.context=w,d.props=y,d.__P=e,d.__e=!1,k=Uu.__r,_=0,b)d.state=d.__s,d.__d=!1,k&&k(t),h=d.render(d.props,d.state,d.context),nl.push.apply(d.__h,d._sb),d._sb=[];else do{d.__d=!1,k&&k(t),h=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&25>++_);d.state=d.__s,null!=d.getChildContext&&(i=sl(sl({},i),d.getChildContext())),b&&!v&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(f,p)),S=null!=h&&h.type===cl&&null==h.key?Tl(h.props.children):h,s=yl(e,ol(S)?S:[S],t,r,i,n,a,o,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),m&&(d.__E=d.__=null)}catch(e){if(o.length=c,t.__v=null,u||null!=a)if(e.then){for(t.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;null!=a&&(a[a.indexOf(s)]=null),t.__e=s}else{if(null!=a)for(x=a.length;x--;)ul(a[x]);Cl(t)}else t.__e=r.__e,!t.__k&&r.__k&&(t.__k=r.__k),e.then||Cl(t);Uu.__e(e,t,r)}}else null==a&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=function(e,t,r,i,n,a,o,s,u){var l,h,c,d,v,f,p,g=r.props||il,m=t.props,y=t.type;if("svg"==y?n="http://www.w3.org/2000/svg":"math"==y?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),null!=a)for(l=0;a.length>l;l++)if((v=a[l])&&"setAttribute"in v==!!y&&(y?v.localName==y:3==v.nodeType)){e=v,a[l]=null;break}if(null==e){if(null==y)return document.createTextNode(m);e=document.createElementNS(n,y,m.is&&m),s&&(Uu.__m&&Uu.__m(t,a),s=!1),a=null}if(null==y)g===m||s&&e.data==m||(e.data=m);else{if(a="textarea"==y&&null!=m.defaultValue?null:a&&$u.call(e.childNodes),!s&&null!=a)for(g={},l=0;e.attributes.length>l;l++)g[(v=e.attributes[l]).name]=v.value;for(l in g)v=g[l],"dangerouslySetInnerHTML"==l?c=v:"children"==l||l in m||"value"==l&&"defaultValue"in m||"checked"==l&&"defaultChecked"in m||_l(e,l,null,v,n);for(l in m)v=m[l],"children"==l?d=v:"dangerouslySetInnerHTML"==l?h=v:"value"==l?f=v:"checked"==l?p=v:s&&"function"!=typeof v||g[l]===v||_l(e,l,v,g[l],n);if(h)s||c&&(h.__html==c.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(c&&(e.innerHTML=""),yl("template"==t.type?e.content:e,ol(d)?d:[d],t,r,i,"foreignObject"==y?"http://www.w3.org/1999/xhtml":n,a,o,a?a[0]:r.__k&&vl(r,0),s,u),null!=a)for(l=a.length;l--;)ul(a[l]);s&&"textarea"!=y||(l="value","progress"==y&&null==f?e.removeAttribute("value"):null!=f&&(f!==e[l]||"progress"==y&&!f||"option"==y&&f!=g[l])&&_l(e,l,f,g[l],n),l="checked",null!=p&&p!=e[l]&&_l(e,l,p,g[l],n))}return e}(r.__e,t,r,i,n,a,o,u,l);return(h=Uu.diffed)&&h(t),128&t.__u?void 0:s}function Cl(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Cl))}function Ml(e,t,r){for(var i=0;r.length>i;i++)Il(r[i],r[++i],r[++i]);Uu.__c&&Uu.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Uu.__e(e,t.__v)}}))}function Tl(e){return"object"!=typeof e||null==e||e.__b>0?e:ol(e)?e.map(Tl):void 0!==e.constructor?null:sl({},e)}function Il(e,t,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Uu.__e(e,r)}}function Rl(e,t,r){var i,n;if(Uu.unmount&&Uu.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Il(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){Uu.__e(e,t)}i.base=i.__P=i.__n=null}if(i=e.__k)for(n=0;i.length>n;n++)i[n]&&Rl(i[n],t,r||"function"!=typeof e.type);r||ul(e.__e),e.__c=e.__=e.__e=void 0}function Al(e,t,r){return this.constructor(e,r)}function El(e,t,r){var i,n,a;t==document&&(t=document.documentElement),Uu.__&&Uu.__(e,t),i=t.__k,n=[],a=[],xl(t,e=t.__k=ll(cl,null,[e]),i||il,il,t.namespaceURI,i?null:t.firstChild?$u.call(t.childNodes):null,n,i?i.__e:t.firstChild,!1,a),Ml(n,e,a),e.props.children=null}$u=nl.slice,Uu={__e(e,t,r,i){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&null!=a.getDerivedStateFromError&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,i||{}),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},zu=0,dl.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=sl({},this.state),"function"==typeof e&&(e=e(sl({},r),this.props)),e&&sl(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),gl(this))},dl.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gl(this))},dl.prototype.render=cl,Wu=[],Zu="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gu=function(e,t){return e.__v.__b-t.__v.__b},ml.__r=0,Qu=Math.random().toString(8),Ju="__d"+Qu,Yu="__a"+Qu,Ku=/(PointerCapture)$|Capture$/i,Xu=0,el=Sl(!1),tl=Sl(!0),rl=0;var Ll,Ol,Dl,Pl,Nl=0,Fl=[],ql=Uu,jl=ql.__b,Bl=ql.__r,Hl=ql.diffed,$l=ql.__c,Ul=ql.unmount,zl=ql.__;function Wl(e,t){ql.__h&&ql.__h(Ol,e,Nl||t),Nl=0;var r=Ol.__H||(Ol.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Vl(e){return Nl=1,function(e,t,r){var i=Wl(Ll++,2);if(i.t=e,!i.__c&&(i.__=[ih(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],r=i.t(t,e);t!==r&&(i.__N=[r,i.__[1]],i.__c.setState({}))}],i.__c=Ol,!Ol.__f)){var n=function(e,t,r){if(!i.__c.__H)return!0;var n=!1,o=i.__c.props!==e;if(i.__c.__H.__.some((function(e){if(e.__N){n=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),a){var s=a.call(this,e,t,r);return n?s||o:s}return!n||o};Ol.__f=!0;var a=Ol.shouldComponentUpdate,o=Ol.componentWillUpdate;Ol.componentWillUpdate=function(e,t,r){if(this.__e){var i=a;a=void 0,n(e,t,r),a=i}o&&o.call(this,e,t,r)},Ol.shouldComponentUpdate=n}return i.__N||i.__}(ih,e)}function Zl(e,t){var r=Wl(Ll++,3);!ql.__s&&rh(r.__H,t)&&(r.__=e,r.u=t,Ol.__H.__h.push(r))}function Gl(e){return Nl=5,Ql((function(){return{current:e}}),[])}function Ql(e,t){var r=Wl(Ll++,7);return rh(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Jl(e){var t=Ol.context[e.__c],r=Wl(Ll++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(Ol)),t.props.value):e.__}function Yl(){for(var e;e=Fl.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(eh),t.__h.some(th),t.__h=[]}catch(r){t.__h=[],ql.__e(r,e.__v)}}}ql.__b=function(e){Ol=null,jl&&jl(e)},ql.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zl&&zl(e,t)},ql.__r=function(e){Bl&&Bl(e),Ll=0;var t=(Ol=e.__c).__H;t&&(Dl===Ol?(t.__h=[],Ol.__h=[],t.__.some((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.length&&Yl(),Ll=0)),Dl=Ol},ql.diffed=function(e){Hl&&Hl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Fl.push(t)&&Pl===ql.requestAnimationFrame||((Pl=ql.requestAnimationFrame)||Xl)(Yl)),t.__H.__.some((function(e){e.u&&(e.__H=e.u,e.u=void 0)}))),Dl=Ol=null},ql.__c=function(e,t){t.some((function(e){try{e.__h.some(eh),e.__h=e.__h.filter((function(e){return!e.__||th(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],ql.__e(r,e.__v)}})),$l&&$l(e,t)},ql.unmount=function(e){Ul&&Ul(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some((function(e){try{eh(e)}catch(e){t=e}})),r.__H=void 0,t&&ql.__e(t,r.__v))};var Kl="function"==typeof requestAnimationFrame;function Xl(e){var t,r=function(){clearTimeout(i),Kl&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,35);Kl&&(t=requestAnimationFrame(r))}function eh(e){var t=Ol,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Ol=t}function th(e){var t=Ol;e.__c=e.__(),Ol=t}function rh(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function ih(e,t){return"function"==typeof t?t(e):t}var nh={Tab:"tab",Selector:"selector"},ah={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},oh={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},sh={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},uh={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},lh={End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},hh="always",ch={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},dh={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_COMPLETED:"$survey_completed",SURVEY_LANGUAGE:"$survey_language"},vh=Oe("[Surveys]"),fh=(e,t)=>""+e+function(e){return e.current_iteration&&e.current_iteration>0?e.id+"_"+e.current_iteration:e.id}(t),ph=e=>fh("seenSurvey_",e),gh=e=>{try{var t=ph(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){vh.error("Failed to persist survey seen state",e)}},mh=[sh.Popover,sh.Widget,sh.API];Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return I(e)&&isFinite(e)&&Math.floor(e)===e});class yh{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(i)||0>e||0>t||0>r||0>i||e>0xffffffffffff||t>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var n=new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/256,n[5]=e,n[6]=112|t>>>8,n[7]=t,n[8]=128|r>>>24,n[9]=r>>>16,n[10]=r>>>8,n[11]=r,n[12]=i>>>24,n[13]=i>>>16,n[14]=i>>>8,n[15]=i,new yh(n)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new yh(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class bh{generate(){var e=this.generateOrAbort();if(!S(e))return e;this.Yr=0;var t=this.generateOrAbort();if(S(t))throw new Error("Could not generate UUID after timestamp reset");return t}generateOrAbort(){var e=Date.now();if(e>this.Yr)this.Yr=e,this.Kr();else{if(this.Yr>=e+1e4)return;this.Xr++,this.Xr>4398046511103&&(this.Yr++,this.Kr())}return yh.fromFieldsV7(this.Yr,Math.trunc(this.Xr/Math.pow(2,30)),this.Xr&Math.pow(2,30)-1,this.ei.nextUint32())}Kr(){this.Xr=1024*this.ei.nextUint32()+(1023&this.ei.nextUint32())}constructor(){this.Yr=0,this.Xr=0,this.ei=new _h}}var wh,kh=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};e&&!S(e.crypto)&&crypto.getRandomValues&&(kh=e=>crypto.getRandomValues(e));class _h{nextUint32(){return this.Dt.length>this.ti||(kh(this.Dt),this.ti=0),this.Dt[this.ti++]}constructor(){this.Dt=new Uint32Array(8),this.ti=1/0}}var Sh=()=>xh().toString(),xh=()=>(wh||(wh=new bh)).generate(),Ch=null,Mh={ri(){if(!M(Ch))return Ch;var t=!0;if(S(e))t=!1;else try{var r="__mplssupport__";Mh.ii(r,"xyz"),'"xyz"'!==Mh.ni(r)&&(t=!1),Mh.ai(r)}catch(e){t=!1}return t||Le.error("localStorage unsupported; falling back to cookie store"),Ch=t,t},oi(e){Le.error("localStorage error: "+e)},ni(t){try{return null==e?void 0:e.localStorage.getItem(t)}catch(e){Mh.oi(e)}return null},si(e){try{return JSON.parse(Mh.ni(e))||{}}catch(e){}return null},ii(t,r){try{return null==e||e.localStorage.setItem(t,JSON.stringify(r)),!0}catch(e){Mh.oi(e)}return!1},ai(t){try{null==e||e.localStorage.removeItem(t)}catch(e){Mh.oi(e)}}},Th=Oe("[Stylesheet Loader]"),Ih=e,Rh=i,Ah="#020617",Eh={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:ah.Right,widgetType:nh.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:Ah,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},Lh=[ah.Center,ah.Left,ah.Right];function Oh(e){if(e.startsWith("#")){var t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function Dh(e){var t;void 0===e&&(e=Eh.backgroundColor),"#"===e[0]&&(t=Oh(e)),e.startsWith("rgb")&&(t=e);var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(r&&(t=Oh(r)),!t)return Ah;var i=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(i){var n=parseInt(i[1]),a=parseInt(i[2]),o=parseInt(i[3]);return Math.sqrt(n*n*.299+a*a*.587+o*o*.114)>127.5?Ah:"white"}return Ah}var Ph=(e,t,r)=>{var i=tc(e),n=Rh.querySelector("."+i);if(n&&n.shadowRoot)return{shadow:n.shadowRoot,isNewlyCreated:!1};var a=Rh.createElement("div");((e,t,r)=>{var i=h({},Eh,r),n=e.style,a=!Lh.includes(i.position)||t===sh.Widget&&(null==r?void 0:r.widgetType)===nh.Tab;n.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(i.fontFamily)),n.setProperty("--ph-survey-box-padding",i.boxPadding),n.setProperty("--ph-survey-max-width",i.maxWidth),n.setProperty("--ph-survey-z-index",i.zIndex),n.setProperty("--ph-survey-border-color",i.borderColor),a?(n.setProperty("--ph-survey-border-radius",i.borderRadius),n.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(n.setProperty("--ph-survey-border-bottom","none"),n.setProperty("--ph-survey-border-radius",i.borderRadius+" "+i.borderRadius+" 0 0")),n.setProperty("--ph-survey-background-color",i.backgroundColor),n.setProperty("--ph-survey-box-shadow",i.boxShadow),n.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),n.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),n.setProperty("--ph-survey-submit-button-text-color",(null==r?void 0:r.submitButtonTextColor)||Dh(i.submitButtonColor)),n.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),n.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),n.setProperty("--ph-survey-rating-active-text-color",Dh(i.ratingButtonActiveColor)),n.setProperty("--ph-survey-text-primary-color",(null==r?void 0:r.textColor)||Dh(i.backgroundColor)),n.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),n.setProperty("--ph-widget-color",i.widgetColor),n.setProperty("--ph-widget-text-color",Dh(i.widgetColor)),n.setProperty("--ph-widget-z-index",i.zIndex);var o=(null==r?void 0:r.inputBackground)||(null==r?void 0:r.inputBackgroundColor),s=o||i.inputBackground;o||"white"!==i.backgroundColor||(s="#f8f8f8"),n.setProperty("--ph-survey-input-background",s);var u=(null==r?void 0:r.inputTextColor)||Dh(s);n.setProperty("--ph-survey-input-text-color",u),n.setProperty("--ph-survey-rating-text-color",u),n.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),n.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),n.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,e.type,e.appearance),a.className=i;var o=a.attachShadow({mode:"open"}),s=function(e){var t=((e,t,r)=>{var i=e.createElement("style");i.innerText=t;var n=(e=>{var t;return k(e)?e:null==e||null==(t=e.config)?void 0:t.prepare_external_dependency_stylesheet})(r);return n&&(i=n(i)),i||(Th.error("prepare_external_dependency_stylesheet returned null"),null)})(Rh,':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483645;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.intro-screen-header~.bottom-section,.thank-you-message-header~.bottom-section{padding-top:16px}.intro-screen,.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.intro-screen-body,.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) embed,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) iframe,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) img,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) object,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.intro-screen,.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}:is(.survey-box .question-header--empty)~.multiple-choice-options,:is(.survey-box .question-header--empty)~textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb,var(--ph-survey-rating-active-bg-color) 14%,var(--ph-survey-rating-bg-color))}}.rating-text{font-size:11px;justify-content:space-between;opacity:.7}.form-buttons,.rating-text{display:flex;flex-direction:row}.form-buttons{gap:8px;width:100%}.form-buttons-with-back>.form-submit{flex:1 1 auto;min-width:0}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.form-back{background:transparent;border:1.5px solid var(--ph-survey-border-color);border-radius:6px;color:var(--ph-survey-text-primary-color);cursor:pointer;flex:0 0 auto;font-weight:600;padding:12px 16px;text-align:center;user-select:none}.form-back:hover{transform:scale(1.02)}.form-back:active{transform:scale(.98)}.validation-hint{font-size:12px;margin-top:4px;opacity:.7}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.intro-screen{animation:ph-survey-fade-in .3s ease-out forwards;text-align:center}.intro-screen-header{margin:10px 0 0}.intro-screen-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}(t);if(s){var u=o.querySelector("style");u&&o.removeChild(u),o.appendChild(s)}return Rh.body.appendChild(a),{shadow:o,isNewlyCreated:!0}},Nh=e=>{var t=e.responses,r=e.survey,i=e.surveySubmissionId,n=e.posthog,a=e.isSurveyCompleted,o=e.properties,s=e.surveyLanguage,u=e.questionSnapshots;n?(gh(r),n.capture(ch.SENT,h({[dh.SURVEY_NAME]:r.name,[dh.SURVEY_ID]:r.id,[dh.SURVEY_ITERATION]:r.current_iteration,[dh.SURVEY_ITERATION_START_DATE]:r.current_iteration_start_date,[dh.SURVEY_SUBMISSION_ID]:i,[dh.SURVEY_COMPLETED]:a},s&&{[dh.SURVEY_LANGUAGE]:s},{sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url()},li(t,r,u),o,{$set:{[hi(r,"responded")]:!0}})),a&&(Ih.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:r.id}})),ec(r),n.reloadFeatureFlags())):vh.error("[survey sent] event not captured, PostHog instance not found.")},Fh=(e,t,r)=>{return h({[dh.SURVEY_NAME]:e.name,[dh.SURVEY_ID]:e.id,[dh.SURVEY_ITERATION]:e.current_iteration,[dh.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,[dh.SURVEY_PARTIALLY_COMPLETED]:(i=null==t?void 0:t.responses,void 0===i&&(i={}),Object.values(i).some((e=>!T(e))))},(null==t?void 0:t.surveyLanguage)&&{[dh.SURVEY_LANGUAGE]:t.surveyLanguage},{sessionRecordingUrl:null==r.get_session_replay_url?void 0:r.get_session_replay_url(),[dh.SURVEY_SUBMISSION_ID]:null==t?void 0:t.surveySubmissionId},li(null==t?void 0:t.responses,e,null==t?void 0:t.questionSnapshots));var i},qh=(e,t,r,i)=>{if(t){if(!r){var n=Kh(e),a=n?n.surveyLanguage:i;t.capture(ch.DISMISSED,h({},Fh(e,n,t),a&&{[dh.SURVEY_LANGUAGE]:a},{$set:{[hi(e,"dismissed")]:!0}})),ec(e),gh(e),Ih.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else vh.error("[survey dismissed] event not captured, PostHog instance not found.")},jh=(e,t)=>{if(t){var r=(e=>fh("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(r))return}catch(e){return}var i=Kh(e);if(i){try{localStorage.setItem(r,"true")}catch(e){}t.capture(ch.ABANDONED,Fh(e,i,t),{transport:"sendBeacon"})}}else vh.error("[survey abandoned] event not captured, PostHog instance not found.")},Bh=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),Hh=(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r]))?t.reverse():t,$h=e=>{var t=e.map((e=>e.id));return t.every((e=>!!e))?t:void 0},Uh=(e,t)=>{return(e=>e.questions.some((e=>{var t;return!(null==(t=e.branching)||!t.type)})))(e)?e.questions:t?null!==(r=((e,t)=>{if(!t||t.length!==e.questions.length)return null;var r=new Map(e.questions.map((e=>[e.id,e]))),i=[];for(var n of t){var a=r.get(n);if(!a)return null;i.push(a)}return i})(e,t.questionOrder))&&void 0!==r?r:e.questions:e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?Hh(e.questions,Bh(e.questions)):e.questions;var r},zh=e=>function(e){var t;return gi(e)&&!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation)||"always"===e.schedule}(e)||Xh(e),Wh=function(e){function t(e){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach((function(e){e.__e=!0,gl(e)}))},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+rl++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},onPreviewBack(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),Vh=()=>Jl(Wh),Zh=e=>{var t=e.children,r=e.style;return function(e,t,r){var i,n,a,o,s=sl({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)"key"==a?i=t[a]:"ref"==a?n=t[a]:s[a]=void 0===t[a]&&null!=o?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?$u.call(arguments,2):r),hl(e.type,s,i||e.key,n||e.ref,null)}(e.component,e.renderAsHtml?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})};function Gh(e,t){var r,i;if(null==(r=e.conditions)||!r.url)return!0;var n=Be(t);if(!n)return!1;var a=[e.conditions.url],o=function(e){return null!=e?e:"icontains"}(null==(i=e.conditions)?void 0:i.urlMatchType);return bi[o](a,[n])}function Qh(t){var i,n;return function(t,i){var n,o,s;if(!t||0===t.length)return!0;if(!a)return!1;var u,l,h,c,d,v,f=(u={userAgentDataPlatform:null==r||null==(n=r.userAgentData)?void 0:n.platform,maxTouchPoints:null==r?void 0:r.maxTouchPoints,screenWidth:null==e||null==(o=e.screen)?void 0:o.width,screenHeight:null==e||null==(s=e.screen)?void 0:s.height,devicePixelRatio:null==e?void 0:e.devicePixelRatio},(v=function(e){return ie.test(e)?V:re.test(e)?Z:te.test(e)?G:new RegExp(Y,"i").test(e)?Y:new RegExp("("+Q+"|WPDesktop)","i").test(e)?Q:/iPad/.test(e)?U:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?z:ne.test(e)?W:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(J,"i").test(e)?J:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(q).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?j:H:new RegExp("(pda|"+q+")","i").test(e)?X:new RegExp(B,"i").test(e)&&!new RegExp(B+" pc","i").test(e)?ee:""}(a))===U||v===H||"Kobo"===v||"Kindle Fire"===v||v===ee?B:v===V||v===G||v===Z||v===Y?"Console":v===z?"Wearable":v?q:"Android"===(null==u?void 0:u.userAgentDataPlatform)&&(null!==(l=null==u?void 0:u.maxTouchPoints)&&void 0!==l?l:0)>0?600>Math.min(null!==(h=null==u?void 0:u.screenWidth)&&void 0!==h?h:0,null!==(c=null==u?void 0:u.screenHeight)&&void 0!==c?c:0)/(null!==(d=null==u?void 0:u.devicePixelRatio)&&void 0!==d?d:1)?q:B:"Desktop");return bi[null!=i?i:"icontains"](t,[f])}(null==(i=t.conditions)?void 0:i.deviceTypes,null==(n=t.conditions)?void 0:n.deviceTypesMatchType)}var Jh=e=>fh("inProgressSurvey_",e),Yh=(e,t)=>{try{localStorage.setItem(Jh(e),JSON.stringify(t))}catch(e){vh.error("Error setting in-progress survey state in localStorage",e)}},Kh=e=>{try{var t=localStorage.getItem(Jh(e));if(t)return JSON.parse(t)}catch(e){vh.error("Error getting in-progress survey state from localStorage",e)}return null},Xh=e=>{var t=Kh(e);return!T(null==t?void 0:t.surveySubmissionId)},ec=e=>{try{localStorage.removeItem(Jh(e))}catch(e){vh.error("Error clearing in-progress survey state from localStorage",e)}};function tc(e,t){void 0===t&&(t=!1);var r="PostHogSurvey-"+e.id;return t?"."+r:r}function rc(e,t,r){if(void 0===t&&(t=ah.Right),e===sh.ExternalSurvey)return{};switch(t){case ah.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case ah.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case ah.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case ah.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case ah.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case ah.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case ah.Left:return{left:"30px"};case ah.Center:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===sh.Widget&&r===nh.Tab?"60px":"30px"}}}var ic=0;function nc(e,t,r,i,n,a){t||(t={});var o,s,u=t;if("ref"in u)for(s in u={},t)"ref"==s?o=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ic,__i:-1,__u:0,__source:n,__self:a};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===u[s]&&(u[s]=o[s]);return Uu.vnode&&Uu.vnode(l),l}var ac=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),oc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),sc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),uc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),lc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),hc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:nc("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),cc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:nc("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),dc=function(e){var t=(void 0===e?{}:e).fill,r=void 0===t?"currentColor":t;return nc("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:r,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[nc("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),nc("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:r})]})},vc=nc("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[nc("g",{"clip-path":"url(#clip0_2415_6911)",children:[nc("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:nc("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),nc("g",{mask:"url(#mask0_2415_6911)",children:[nc("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),nc("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),nc("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),nc("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),nc("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),nc("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),nc("defs",{children:nc("clipPath",{id:"clip0_2415_6911",children:nc("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function fc(e){var t=e.urlParams,r=t?Object.entries(t).map((e=>{var t=e[1];return encodeURIComponent(e[0])+"="+encodeURIComponent(t)})).join("&"):"";return nc("a",{href:"https://posthog.com/surveys"+(r?"?"+r:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",vc]})}function pc(t){var r=t.text,i=t.submitDisabled,n=t.appearance,a=t.onSubmit,o=t.link,s=t.onPreviewSubmit,u=t.skipSubmitButton,l=t.canGoBack,h=t.onBack,c=Jl(Wh).isPreviewMode,d=!!l&&!!h,v=!u&&nc("button",{className:"form-submit",disabled:i,"aria-label":"Submit survey",type:"button",onClick(){o&&(null==e||e.open(o)),c?null==s||s():a()},children:r});return nc("div",{className:"bottom-section",children:[d?nc("div",{className:"form-buttons form-buttons-with-back",children:[nc("button",{className:"form-back",type:"button","aria-label":"Go to previous question",onClick:h,children:n.backButtonText||"Back"}),v]}):v,!n.whiteLabel&&nc(fc,{urlParams:{utm_source:"survey-footer"}})]})}function gc(e){var t=e.question,r=e.forceDisableHtml;return nc("div",{class:t.question||t.description?"question-header":"question-header question-header--empty",children:[nc(t.type===uh.Open?"label":"h3",{className:"survey-question",htmlFor:e.htmlFor,children:t.question}),t.description&&Zh({component:ll("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!r&&"text"!==t.descriptionContentType})]})}function mc(e){return nc("button",{className:"form-cancel",onClick:e.onClick,disabled:Jl(Wh).isPreviewMode,"aria-label":"Close survey",type:"button",children:dc({fill:"black"})})}nc("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:nc("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var yc=e;function bc(e){var t=e.header,r=e.description,i=e.contentType,n=e.forceDisableHtml,a=e.appearance,o=e.onClose,s=Jl(Wh).isPopup;return Zl((()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),o())};return Ne(yc,"keydown",e),()=>{yc.removeEventListener("keydown",e)}}),[o]),nc("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==a.hideCancelButton&&nc(mc,{onClick:()=>o()}),nc("h3",{className:"thank-you-message-header",children:t}),r&&Zh({component:ll("p",{className:"thank-you-message-body"}),children:r,renderAsHtml:!n&&"text"!==i}),s&&nc(pc,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>o()})]})}function wc(e){var t=e.header,r=e.description,i=e.contentType,n=e.forceDisableHtml,a=e.appearance,o=e.onStart,s=Jl(Wh),u=s.onPreviewSubmit,l=s.onPopupSurveyDismissed;return nc("div",{className:"intro-screen",role:"status",tabIndex:0,"aria-atomic":"true",children:[s.isPopup&&!0!==a.hideCancelButton&&nc(mc,{onClick:()=>l()}),t&&nc("h3",{className:"intro-screen-header",children:t}),r&&Zh({component:ll("p",{className:"intro-screen-body"}),children:r,renderAsHtml:!n&&"text"!==i}),nc(pc,{text:a.introScreenButtonText||"Get started",submitDisabled:!1,appearance:a,onSubmit:o,onPreviewSubmit:()=>u(null)})]})}var kc=e=>w(e)&&e.every((e=>x(e)));function _c(e){var t=e.question,r=e.forceDisableHtml,i=e.appearance,n=e.onSubmit,a=e.onPreviewSubmit,o=e.displayQuestionIndex,s=e.initialValue,u=e.canGoBack,l=e.onBack,h=Vh().isPreviewMode,c=Gl(null),d=Vl((()=>x(s)?s:"")),p=d[0],g=d[1],m=null==i?void 0:i.disableAutofocus;Zl((()=>{m||setTimeout((()=>{var e;h||null==(e=c.current)||e.focus()}),100)}),[h,m]);var y="surveyQuestion"+o,b=Ql((()=>function(e,t,r){var i,n,a=e.trim();if(!r&&""===a)return"This field is required";if(""===a)return!1;if(t&&t.length>0)for(var o of t)switch(o.type){case v:if(void 0!==o.value&&o.value>a.length)return null!==(i=o.errorMessage)&&void 0!==i?i:"Please enter at least "+o.value+" characters";break;case f:if(void 0!==o.value&&a.length>o.value)return null!==(n=o.errorMessage)&&void 0!==n?n:"Please enter no more than "+o.value+" characters"}return!1}(p,t.validation,t.optional)),[p,t.validation,t.optional]),w=fe(t.validation,v),k=fe(t.validation,f),_=Ql((()=>function(e,t){var r=1===e?void 0:e;return r&&t?"Enter "+r+"-"+t+" characters":r?"Enter at least "+r+" "+(1===r?"character":"characters"):t?"Maximum "+t+" "+(1===t?"character":"characters"):void 0}(w,k)),[w,k]),S=()=>{b||n(p.trim())},C=()=>{b||a(p.trim())};return nc(cl,{children:[nc("div",{className:"question-container",children:[nc(gc,{question:t,forceDisableHtml:r,htmlFor:y}),nc("textarea",{ref:c,id:y,rows:4,placeholder:null==i?void 0:i.placeholder,minLength:w,maxLength:k,onInput(e){g(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||b||(e.preventDefault(),h?C():S())},value:p}),_&&nc("div",{className:"validation-hint",children:_})]}),nc(pc,{text:t.buttonText||"Submit",submitDisabled:!!b,appearance:i,onSubmit:S,onPreviewSubmit:C,canGoBack:u,onBack:l})]})}function Sc(e){var t=e.question,r=e.appearance,i=e.onSubmit,n=e.onPreviewSubmit,a=e.canGoBack,o=e.onBack;return nc(cl,{children:[nc("div",{className:"question-container",children:nc(gc,{question:t,forceDisableHtml:e.forceDisableHtml})}),nc(pc,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>n("link clicked"),canGoBack:a,onBack:o})]})}function xc(e){var t,r=e.question,i=e.forceDisableHtml,n=e.displayQuestionIndex,a=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,u=e.initialValue,l=e.canGoBack,h=e.onBack,c=r.scale,d=10===r.scale?0:1,v=Vl((()=>I(u)?u:w(u)&&u.length>0&&I(parseInt(u[0]))?parseInt(u[0]):x(u)&&I(parseInt(u))?parseInt(u):null)),f=v[0],p=v[1],g="emoji"===r.display&&2===r.scale,m=Vh().isPreviewMode,y=e=>m?s(e):o(e);return nc(cl,{children:[nc("div",{className:"question-container",children:[nc(gc,{question:r,forceDisableHtml:i}),nc("div",{className:"rating-section",children:[nc("div",{className:"rating-options",children:["emoji"===r.display&&nc("div",{className:"rating-options-emoji"+(g?" rating-options-emoji-2":""),children:null==(t=Ac[r.scale])?void 0:t.map(((e,t)=>nc("button",{"aria-label":"Rate "+(t+1),className:"ratings-emoji question-"+n+"-rating-"+t+" "+(t+1===f?"rating-active":""),value:t+1,type:"button",onClick(){var e=t+1;p(e),r.skipSubmitButton&&y(e)},children:e},t)))}),"number"===r.display&&nc("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(c-d+1)+", minmax(0, 1fr))"},children:Ec(r.scale).map(((e,t)=>nc(Cc,{displayQuestionIndex:n,active:f===e,appearance:a,num:e,setActiveNumber(e){p(e),r.skipSubmitButton&&y(e)}},t)))})]}),!g&&nc("div",{className:"rating-text",children:[nc("div",{children:r.lowerBoundLabel}),nc("div",{children:r.upperBoundLabel})]})]})]}),nc(pc,{text:r.buttonText||(null==a?void 0:a.submitButtonText)||"Submit",submitDisabled:M(f)&&!r.optional,appearance:a,onSubmit:()=>o(f),onPreviewSubmit:()=>s(f),skipSubmitButton:r.skipSubmitButton,canGoBack:l,onBack:h})]})}function Cc(e){var t=e.num,r=e.setActiveNumber;return nc("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+e.displayQuestionIndex+"-rating-"+t+" "+(e.active?"rating-active":""),type:"button",onClick(){r(t)},children:t})}function Mc(e){var t=e.question,r=e.forceDisableHtml,i=e.displayQuestionIndex,n=e.appearance,a=e.onSubmit,o=e.onPreviewSubmit,s=e.initialValue,u=e.canGoBack,l=e.onBack,c=Gl(null),d=Ql((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,r="";e.hasOpenChoice&&(r=t.pop());var i=Hh(t,Bh(t));return e.hasOpenChoice&&(e.choices.push(r),i.push(r)),i})(t)),[t]),v=Vl((()=>((e,t)=>x(e)||kc(e)?e:t===uh.SingleChoice?null:[])(s,t.type))),f=v[0],p=v[1],g=Vl((()=>((e,t)=>{if(x(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(kc(e)){var r=e.find((e=>!t.includes(e)));if(r)return{isSelected:!0,inputValue:r}}return{isSelected:!1,inputValue:""}})(s,d))),m=g[0],y=g[1],b=Vh().isPreviewMode,k=t.type===uh.SingleChoice,_=t.type===uh.MultipleChoice,S=t.skipSubmitButton&&k&&!t.hasOpenChoice,C=(e,t)=>{if(t){var r=!m.isSelected;return y((e=>h({},e,{isSelected:r,inputValue:r?e.inputValue:""}))),k&&p(""),void(r&&setTimeout((()=>{var e;return null==(e=c.current)?void 0:e.focus()}),75))}if(k)return p(e),y((e=>h({},e,{isSelected:!1,inputValue:""}))),void(S&&(a(e),b&&o(e)));_&&w(f)&&(f.includes(e)?p(f.filter((t=>t!==e))):p([...f,e]))},T=e=>{e.stopPropagation();var t=e.currentTarget.value;y((e=>h({},e,{inputValue:t}))),k&&p(t)},I=e=>{e.stopPropagation(),"Enter"!==e.key||R()||(e.preventDefault(),A()),"Escape"===e.key&&(e.preventDefault(),y((e=>h({},e,{isSelected:!1,inputValue:""}))),k&&p(null))},R=()=>!(t.optional||!M(f)&&(!w(f)||m.isSelected||0!==f.length)&&(!m.isSelected||""!==m.inputValue.trim())),A=()=>{m.isSelected&&_?w(f)&&(b?o([...f,m.inputValue]):a([...f,m.inputValue])):b?o(f):a(f)};return nc(cl,{children:[nc("div",{className:"question-container",children:[nc(gc,{question:t,forceDisableHtml:r}),nc("fieldset",{className:"multiple-choice-options limit-height",children:[nc("legend",{className:"sr-only",children:_?" Select all that apply":" Select one"}),d.map(((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,a="surveyQuestion"+i+"Choice"+r,o=a+"Open",s=n?m.isSelected:k?f===e:w(f)&&f.includes(e);return nc("label",{className:n?"choice-option-open":"",children:[nc("div",{className:"response-choice",children:[nc("input",{type:k?"radio":"checkbox",name:a,checked:s,onChange:()=>C(e,n),id:a,"aria-controls":o}),nc("span",{children:n?e+":":e})]}),n&&nc("input",{type:"text",ref:c,id:o,name:"question"+i+"Open",value:m.inputValue,onKeyDown:I,onInput:T,onClick(t){m.isSelected||C(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},r)}))]})]}),nc(pc,{text:t.buttonText||"Submit",submitDisabled:R(),appearance:n,onSubmit:A,onPreviewSubmit:A,skipSubmitButton:S,canGoBack:u,onBack:l})]})}var Tc=[1,2,3,4,5],Ic=[1,2,3,4,5,6,7],Rc=[0,1,2,3,4,5,6,7,8,9,10],Ac={2:[hc,cc],3:[sc,oc,ac],5:[uc,sc,oc,ac,lc]};function Ec(e){switch(e){case 5:default:return Tc;case 7:return Ic;case 10:return Rc}}var Lc=Oe("[Surveys]");function Oc(e,t,r){var i,n=e.questions[t],a=t+1;if(null==(i=n.branching)||!i.type)return t===e.questions.length-1?lh.End:a;if(n.branching.type===lh.End)return lh.End;if(n.branching.type===lh.SpecificQuestion){if(Number.isInteger(n.branching.index))return n.branching.index}else if(n.branching.type===lh.ResponseBased){if(n.type===uh.SingleChoice){var o,s=n.choices.indexOf(""+r);if(-1===s&&n.hasOpenChoice&&(s=n.choices.length-1),null!=(o=n.branching)&&null!=(o=o.responseValues)&&o.hasOwnProperty(s)){var u=n.branching.responseValues[s];return Number.isInteger(u)?u:u===lh.End?lh.End:a}}else if(n.type===uh.Rating){var l;if("number"!=typeof r||!Number.isInteger(r))throw new Error("The response type must be an integer");var h=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(r,n.scale);if(null!=(l=n.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(h)){var c=n.branching.responseValues[h];return Number.isInteger(c)?c:c===lh.End?lh.End:a}}return a}return Lc.warn("Falling back to next question index due to unexpected branching type"),a}var Dc=Oe("[SurveyTranslations]");function Pc(e,t){var r=function(e){return function(e,t){var r=e.storedPersonProperties,i=e.locale,n=ci(e.overrideLanguage);if(n)return null==t||t.info("Using override display language: "+n),n;var a=function(e){return e&&"object"==typeof e&&"language"in e?ci(e.language):null}(r);if(a)return null==t||t.info("Using person property language: "+a),a;var o=ci(i);return o?(null==t||t.info("Using detected locale: "+o),o):(null==t||t.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:k(e.get_property)?e.get_property(zt):void 0,locale:navigator.language||navigator.userLanguage},Dc)}(t);if(!r)return Dc.info("No user language detected"),{survey:e,language:null};var i=pi(e,r,Dc);return{survey:i.survey,language:i.matchedKey}}var Nc=-1,Fc=e,qc=i,jc="ph:show_survey_widget",Bc="PHWidgetSurveyClickListener";function Hc(e,t){try{var r=e.getBoundingClientRect(),i=Fc.innerHeight,n=Fc.innerWidth,a=r.left+r.width/2-t/2;a+t>n-20&&(a=n-t-20),20>a&&(a=20);var o=i-r.bottom,s=250>o&&r.top>o;return{position:"fixed",top:s?"auto":r.bottom+12+"px",left:a+"px",right:"auto",bottom:s?i-r.top+12+"px":"auto",zIndex:Eh.zIndex}}catch(e){return vh.warn("Failed to calculate trigger position:",e),null}}class $c{constructor(e){var t=this;this.ui=new Map,this.li=new Map,this.hi=new Map,this.ci=new Set,this.di=null,this.vi=!1,this.fi=null,this.pi=null,this.gi=null,this.handlePageUnload=()=>{var e=this._posthog.get_property(Wt);if(e)for(var t of e)Xh(t)&&jh(t,this._posthog)},this.handlePopoverSurvey=function(e,r,i){var n,a,o,s,u,l=(void 0===i?{}:i).resumeDelayFromActivation,c=void 0!==l&&l,d=t.mi(e),v=d.survey,f=d.language;t.di=f,t.gi=null,t.yi=r;var p=t.bi(v,r);t.wi(p.id);var g=null!=r?r:{},m=g.properties,y=g.initialResponses,b=!(!y||0>=Object.keys(y).length)&&t.ki(p,y,m,f);if(!b||null!=(n=p.appearance)&&n.displayThankYouMessage){t.Si(p);var w={};if((null==(a=p.appearance)?void 0:a.position)===ah.NextToTrigger&&null!=(o=p.appearance)&&o.widgetSelector){var k,_=qc.querySelector(p.appearance.widgetSelector);_&&(w=Hc(_,parseInt((null==(k=p.appearance)?void 0:k.maxWidth)||Eh.maxWidth))||{})}var S=(null==(s=p.appearance)?void 0:s.surveyPopupDelaySeconds)||0,x=Ph(p,t._posthog).shadow;t.hi.set(x,x.host);var C={posthog:t._posthog,survey:p,removeSurveyFromFocus:t.xi,properties:m,style:w,isSurveyCompleted:b,skipShownEvent:null==r?void 0:r.skipShownEvent,surveyLanguage:f};if(t.gi=C,0>=S)return t.vi=!0,El(nc(Zc,h({},C)),x);var M=()=>{if(!t.Ci(p))return vh.info("Survey "+p.id+" no longer eligible when its display delay elapsed; not displaying"),t.xi(p);(()=>{t.vi=!0;var i=t.mi(e),n=i.survey,a=i.language;t.di=a;var o=t.bi(n,r),s=h({},C,{survey:o,surveyLanguage:a});t.gi=s,El(nc(Zc,h({},s,{survey:h({},o,{appearance:h({},o.appearance,{surveyPopupDelaySeconds:0})})})),x)})()},T=c?null==(u=t._posthog.surveys)||null==(u=u._surveyEventReceiver)||null==u.getActivationTimestamp?void 0:u.getActivationTimestamp(p.id):void 0,R=I(T)?Math.max(0,Date.now()-T):0,A=Math.max(0,1e3*S-R);if(0>=A)return M();var E=Fc.setTimeout((()=>{t.ui.delete(p.id),M()}),A);t.ui.set(p.id,E)}},this.Mi=e=>{var t=this.mi(e),r=t.survey,i=t.language,n=Ph(r,this._posthog),a=n.shadow,o=n.isNewlyCreated;this.hi.set(a,a.host),o&&El(nc(Qc,{posthog:this._posthog,survey:r,surveyLanguage:i},e.id),a)},this.Ti=e=>{var t=this.li.get(e);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute(Bc),this.li.delete(e),vh.info("Removed click listener for survey "+e))},this.Ii=e=>{this.Ri(e)||(this.Ai(e),this.Ti(e.id))},this.Ri=e=>{try{var t,r=qc.querySelector(tc(e,!0));return!(null==r||null==(t=r.shadowRoot)||!t.querySelector(".ph-survey"))}catch(e){return!1}},this.Ei=(e,t)=>{var r=qc.querySelector(t),i=this.li.get(e.id);if(r){if(this.Mi(e),i){if(r===i.element)return;vh.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.Ti(e.id)}if(!r.hasAttribute(Bc)){var n=t=>{var r,i;t.stopPropagation();var n=(null==(r=e.appearance)?void 0:r.position)===ah.NextToTrigger?Hc(t.currentTarget,parseInt((null==(i=e.appearance)?void 0:i.maxWidth)||Eh.maxWidth)):{};Fc.dispatchEvent(new CustomEvent(jc,{detail:{surveyId:e.id,position:n}}))};Ne(r,"click",n),r.setAttribute(Bc,"true"),this.li.set(e.id,{element:r,listener:n,survey:e}),vh.info("Attached click listener for feedback button survey "+e.id)}}else i&&this.Ii(e)},this.renderPopover=e=>{var t=this.mi(e),r=t.survey,i=t.language,n=Ph(r,this._posthog).shadow;this.hi.set(n,n.host),El(nc(Zc,{posthog:this._posthog,survey:r,removeSurveyFromFocus:this.xi,surveyLanguage:i}),n)},this.renderSurvey=(e,t,r)=>{var i,n=this.mi(e),a=n.survey,o=n.language,s=!1;null!=(i=this._posthog.config)&&null!=(i=i.surveys)&&i.prefillFromUrl&&(s=this.Li(a,o,r)),El(nc(Zc,{posthog:this._posthog,survey:a,removeSurveyFromFocus:this.xi,isPopup:!1,properties:r,isSurveyCompleted:s,surveyLanguage:o}),t)},this.getActiveMatchingSurveys=function(e,r){var i;void 0===r&&(r=!1),null==(i=t._posthog)||null==(i=i.surveys)||i.getSurveys((r=>{var i=r.filter((e=>t.Ci(e)));e(i)}),r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var r=e.filter((e=>e.type===sh.Popover||e.type===sh.Widget)),i=new Set(r.map((e=>e.id)));for(var n of Array.from(t.ui.keys()))i.has(n)||t.cancelSurvey(n);var a=t.Oi(r),o=new Set;a.forEach((e=>{if(e.type===sh.Widget){var r,i,n,a;if((null==(r=e.appearance)?void 0:r.widgetType)===nh.Tab)return void t.Mi(e);(null==(i=e.appearance)?void 0:i.widgetType)===nh.Selector&&null!=(n=e.appearance)&&n.widgetSelector&&(o.add(e.id),t.Ei(e,null==(a=e.appearance)?void 0:a.widgetSelector))}M(t.Di)&&e.type===sh.Popover&&t.handlePopoverSurvey(e,void 0,{resumeDelayFromActivation:!0})})),t.li.forEach((e=>{var r=e.survey;o.has(r.id)||t.Ii(r)}))}),e)},this.Si=e=>{M(this.Di)||vh.error("Survey "+this.Di+" already in focus. Cannot add survey "+e.id+"."),this.Di=e.id},this.xi=e=>{this.Di!==e.id&&vh.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.wi(e.id),this.Di=null,this.di=null,this.vi=!1,this.gi=null,this.yi=void 0,this.Ai(e)},this._posthog=e,this.Di=null,this.fi=()=>this.Pi(),Ne(Fc,"languagechange",this.fi),this.pi=e.onFeatureFlags((()=>this.Pi()))}Pi(){if(!M(this.Di)){var e=this._posthog.get_property(Wt),t=null==e?void 0:e.find((e=>e.id===this.Di));if(t){var r=this.mi(t),i=r.survey,n=r.language;if(n!==this.di&&(this.di=n,this.vi)){var a=this.bi(i,this.yi),o=Ph(a,this._posthog).shadow;El(nc(Zc,h({},this.gi,{posthog:this._posthog,survey:a,removeSurveyFromFocus:this.xi,surveyLanguage:n})),o)}}}}get Ni(){var e,t,r;return null!==(e=null==(t=(r=this._posthog).getExtension)?void 0:t.call(r,"featureFlags"))&&void 0!==e?e:this._posthog.featureFlags}bi(e,t){return null!=t&&t.position||null!=t&&t.selector?h({},e,{appearance:h({},e.appearance,t.position&&{position:t.position},t.selector&&{widgetSelector:t.selector})}):e}wi(e){var t=this.ui.get(e);t&&(clearTimeout(t),this.ui.delete(e))}cancelSurvey(e){this.ui.has(e)&&(vh.info("Cancelled pending survey "+e),this.wi(e),this.Di===e&&(this.Di=null,this.di=null,this.vi=!1,this.gi=null,this.yi=void 0))}setAutomaticDisplayDispose(e){this.Fi=e}dispose(){var e;null==(e=this.Fi)||e.call(this),this.Fi=void 0,this.fi&&(Fc.removeEventListener("languagechange",this.fi),this.fi=null),this.pi&&(this.pi(),this.pi=null),this.ui.forEach(((e,t)=>this.wi(t))),this.li.forEach(((e,t)=>this.Ti(t))),this.hi.forEach(((e,t)=>{El(null,t),null==e||e.remove()})),this.hi.clear(),this.Di=null}Oi(e){return e.sort(((e,t)=>{var r,i,n=Xh(e),a=Xh(t);if(n&&!a)return-1;if(!n&&a)return 1;var o=e.schedule===hh,s=t.schedule===hh;return o&&!s?1:!o&&s?-1:((null==(r=e.appearance)?void 0:r.surveyPopupDelaySeconds)||0)-((null==(i=t.appearance)?void 0:i.surveyPopupDelaySeconds)||0)}))}mi(e){return Pc(e,this._posthog)}Li(e,t,r){if(this.ci.has(e.id))return!1;var i=function(e){var t={},r=!1,i=e.replace(/^\?/,"");if(!i)return{params:t,autoSubmit:r};var n=i.split("&");for(var a of n){var o=a.split("="),s=o[0],u=o[1];if(s&&!S(u)){var l=decodeURIComponent(s),h=decodeURIComponent(u);if("auto_submit"!==l||"true"!==h){var c=l.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);t[d]||(t[d]=[]),t[d].push(h)}}else r=!0}}return{params:t,autoSubmit:r}}(Fc.location.search),n=i.params;if(0===Object.keys(n).length)return!1;vh.info("[Survey Prefill] Detected URL prefill parameters");var a=this.qi(e,n,t);return!!a&&(this.ji(e,a,r,t),this.ci.add(e.id),a.isSurveyCompleted)}ji(e,t,r,i){var n=t.responses,a=t.submissionId,o=t.isSurveyCompleted,s=t.skippedResponses;(Object.keys(s).length>0&&e.enable_partial_responses||o)&&Nh({responses:o?n:s,survey:e,surveySubmissionId:a,posthog:this._posthog,isSurveyCompleted:o,properties:r,surveyLanguage:i})}ki(e,t,r,i){var n={};for(var a of Object.entries(t)){var o=a[1];n[parseInt(a[0])]=w(o)?o.map(String):[String(o)]}vh.info("[Survey] Processing initial responses");var s=this.qi(e,n,i);return!!s&&(this.ji(e,s,r,i),s.isSurveyCompleted)}qi(e,t,r){try{var i=function(e,t){var r={};return e.questions.forEach(((e,i)=>{if(t[i]&&e.id){var n=t[i],a=si(e.id);try{switch(e.type){case uh.SingleChoice:if(!e.choices||0===e.choices.length)return void Le.warn("[Survey Prefill] Question "+i+" has no choices");var o=parseInt(n[0],10);if(isNaN(o)||0>o||o>=e.choices.length)return void Le.warn("[Survey Prefill] Invalid choice index for q"+i+": "+n[0]);r[a]=e.choices[o];break;case uh.MultipleChoice:if(!e.choices||0===e.choices.length)return void Le.warn("[Survey Prefill] Question "+i+" has no choices");var s=n.map((e=>parseInt(e,10))).filter((t=>!isNaN(t)&&t>=0&&e.choices.length>t));if(0===s.length)return void Le.warn("[Survey Prefill] No valid choices for q"+i);var u=[...new Set(s.map((t=>e.choices[t])))];s.length>u.length&&Le.warn("[Survey Prefill] Removed duplicate choices for q"+i),r[a]=u;break;case uh.Rating:var l=parseInt(n[0],10),h=e.scale||10;if(isNaN(l)||0>l||l>h)return void Le.warn("[Survey Prefill] Invalid rating for q"+i+": "+n[0]+" (scale: 0-"+h+")");r[a]=l;break;default:Le.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){Le.error("[Survey Prefill] Error converting q"+i+":",e)}}})),r}(e,t);if(0===Object.keys(i).length)return vh.warn("[Survey Prefill] No valid responses after conversion"),null;var n=Sh(),a=Object.keys(t).map((e=>parseInt(e,10))),o=function(e,t,r){for(var i=0,n={},a=[],o=e.questions.length+1,s=0;e.questions.length>i&&o>s&&(s++,t.includes(i));){var u=e.questions[i];if(!u||!("skipSubmitButton"in u)||!u.skipSubmitButton)break;if(u.id){var l=si(u.id);S(r[l])||(n[l]=r[l])}a.push(i);var h=Oc(e,i,u.id?r[si(u.id)]:null);if(h===lh.End)return{startQuestionIndex:e.questions.length,skippedResponses:n,skippedIndices:a};i=h}return{startQuestionIndex:i,skippedResponses:n,skippedIndices:a}}(e,a,i),s=o.startQuestionIndex,u=o.skippedResponses,l=o.skippedIndices,h=s>=e.questions.length;return Yh(e,{surveySubmissionId:n,responses:i,lastQuestionIndex:s,questionOrder:$h(e.questions),visitedIndices:l,surveyLanguage:r}),vh.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:i,submissionId:n,startQuestionIndex:s,isSurveyCompleted:h,skippedResponses:u}}catch(e){return vh.error("[Survey Prefill] Error handling prefill:",e),null}}Bi(e,t){if(void 0===t&&(t=void 0),!e)return!0;var r=this.Ni,i=!(null==r||!r.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),n=!0;return t&&(n=(null==r?void 0:r.getFeatureFlag(e,{send_event:!1}))===t||"any"===t),i&&n}Hi(e){return!e.conditions||Gh(e,this._posthog)&&Qh(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==Rh||!Rh.querySelector(e.conditions.selector))}(e)}$i(e){var t;return zh(e)?{satisfied:!0}:!e.internal_targeting_flag_key||!function(e){var t;return"recurring"===e.schedule||(null!==(t=e.current_iteration)&&void 0!==t?t:0)>0}(e)||null!=(t=this.Ni)&&t.hasLoadedFlags?{satisfied:this.Bi(e.internal_targeting_flag_key)}:{satisfied:!1,reason:"Feature flags have not loaded yet; deferring internal targeting flag check"}}checkSurveyEligibility(e){var t,r,i={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return i.eligible=!1,i.reason="Survey is not running. It was completed on "+e.end_date,i;if(!mh.includes(e.type))return i.eligible=!1,i.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",i;var n=null==(t=e.conditions)?void 0:t.linkedFlagVariant;if(!this.Bi(e.linked_flag_key,n))return i.eligible=!1,i.reason=n?"Survey linked feature flag is not enabled for variant "+n:"Survey linked feature flag is not enabled",i;if(!this.Bi(e.targeting_flag_key))return i.eligible=!1,i.reason="Survey targeting feature flag is not enabled",i;var a,o=this.$i(e);return o.satisfied?function(e,t){if(!e||!t)return!0;var r="string"==typeof t?new Date(t):t,i=new Date,n=Math.abs(i.getTime()-r.getTime());return Math.ceil(n/864e5)>e}(null==(r=e.conditions)?void 0:r.seenSurveyWaitPeriodInDays,Mh.ni("lastSeenSurveyDate"))?(e=>!!Mh.ni(ph(e))&&!zh(e))(e)?(i.eligible=!1,i.reason="Survey has already been seen and it can't be activated again",i):i:(i.eligible=!1,i.reason="Survey wait period has not passed",i):(i.eligible=!1,i.reason=null!==(a=o.reason)&&void 0!==a?a:"Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",i)}checkSurveyRenderability(e){var t=this.checkSurveyEligibility(e);return t.eligible&&!this.Ui(e)?{eligible:!1,reason:"Survey event/action trigger has not been fired yet"}:t}Ui(e){var t;if(!gi(e)&&!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))return!0;var r=null==(t=this._posthog.surveys)||null==(t=t._surveyEventReceiver)?void 0:t.getSurveys();return!(null==r||!r.includes(e.id))}zi(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var t=e.value;return!e.key||!t||this.Bi(t)}))}Ci(e){return this.checkSurveyEligibility(e).eligible&&this.Hi(e)&&this.Ui(e)&&this.zi(e)}Ai(e){try{var t=qc.querySelector(tc(e,!0));null!=t&&t.shadowRoot&&(El(null,t.shadowRoot),this.hi.delete(t.shadowRoot)),null==t||t.remove()}catch(t){vh.warn("Failed to remove survey "+e.id+" from DOM:",t)}}getTestAPI(){return{addSurveyToFocus:this.Si,removeSurveyFromFocus:this.xi,surveyInFocus:this.Di,surveyTimeouts:this.ui,handleWidget:this.Mi,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.Ei,sortSurveysByAppearanceDelay:this.Oi,checkFlags:this.zi.bind(this),isSurveyFeatureFlagEnabled:this.Bi.bind(this),onLanguageChange:this.Pi.bind(this),currentLanguage:this.di,surveyIsRendered:this.vi}}}function Uc(e,t){if(qc&&Fc){var r,i=new $c(e);if(e.config.disable_surveys_automatic_display)return vh.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),i;if(!1===t)return vh.info("There are no surveys to load or Surveys is disabled in the project settings."),i;i.callSurveysAndEvaluateDisplayLogic(!0);var n=()=>{S(r)&&(r=setInterval((()=>{i.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))},a=()=>{S(r)||(clearInterval(r),r=void 0)};n();var o=()=>{qc.hidden?a():(i.callSurveysAndEvaluateDisplayLogic(!1),n())};return Ne(qc,"visibilitychange",o),i.setAutomaticDisplayDispose((()=>{a(),qc.removeEventListener("visibilitychange",o)})),i}}function zc(e){var t=e.survey,r=e.removeSurveyFromFocus,i=void 0===r?()=>{}:r,n=e.setSurveyVisible,a=e.isPreviewMode,o=void 0!==a&&a,s=e.posthog;Zl((()=>{var e;if(!o&&null!=(e=t.conditions)&&e.url){var r=()=>{var e,r=t.type===sh.Widget,a=Gh(t,s),o=(null==(e=t.appearance)?void 0:e.widgetType)===nh.Tab&&r;if(!a)return vh.info("Hiding survey "+t.id+" because URL does not match"),n(!1),i(t);o&&(vh.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),n(!0))};Ne(Fc,"popstate",r),Ne(Fc,"hashchange",r);var a=Fc.history.pushState,u=Fc.history.replaceState;return Fc.history.pushState=function(){for(var e=arguments.length,t=new Array(e),i=0;e>i;i++)t[i]=arguments[i];a.apply(this,t),r()},Fc.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),i=0;e>i;i++)t[i]=arguments[i];u.apply(this,t),r()},()=>{Fc.removeEventListener("popstate",r),Fc.removeEventListener("hashchange",r),Fc.history.pushState=a,Fc.history.replaceState=u}}}),[o,t,i,n,s])}var Wc=200;function Vc(e){switch(void 0===e&&(e=oh.Right),e){case oh.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case oh.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case oh.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function Zc(e){var t,r,i,n,a,o,s,u,l,c,d,v,f=e.survey,p=e.forceDisableHtml,g=e.posthog,m=e.style,y=void 0===m?{}:m,b=e.previewPageIndex,w=e.removeSurveyFromFocus,k=void 0===w?()=>{}:w,_=e.isPopup,x=void 0===_||_,C=e.onPreviewSubmit,M=void 0===C?()=>{}:C,T=e.onPreviewBack,I=void 0===T?()=>{}:T,R=e.onPopupSurveyDismissed,A=void 0===R?()=>{}:R,E=e.onCloseConfirmationMessage,L=void 0===E?()=>{}:E,O=e.properties,D=e.isSurveyCompleted,P=e.skipShownEvent,N=e.surveyLanguage,F=Gl(null),q=Number.isInteger(b),j=null!=(t=f.appearance)&&t.surveyPopupDelaySeconds?1e3*f.appearance.surveyPopupDelaySeconds:0,B=function(e,t,r,i,n,a,o,s,u){var l=Vl(i||0===r||e.type===sh.ExternalSurvey),c=l[0],d=l[1],v=Vl(!1),f=v[0],p=v[1],g=Gl(!1),m=()=>{var t=()=>{a&&n(e),d(!1)};if(!g.current){var r=null==o?void 0:o.current;r?(g.current=!0,r.style.transition="opacity "+Wc+"ms ease-out",r.style.opacity="0",setTimeout((()=>{g.current=!1,t()}),Wc+50)):t()}},y=t=>{t.detail.surveyId===e.id&&m()};return Zl((()=>{if(t){if(!i){var n,a=t=>{var r,i;if(t.detail.surveyId===e.id){if(null==(r=e.appearance)||!r.displayThankYouMessage)return m();p(!0),null!=(i=e.appearance)&&i.autoDisappear&&(n&&clearTimeout(n),n=setTimeout(m,5e3))}},o=()=>{if(Gh(e,t)){d(!0),Fc.dispatchEvent(new Event("PHSurveyShown")),s||t.capture(ch.SHOWN,h({[dh.SURVEY_NAME]:e.name,[dh.SURVEY_ID]:e.id,[dh.SURVEY_ITERATION]:e.current_iteration,[dh.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date},u&&{[dh.SURVEY_LANGUAGE]:u},{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()}));try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}}};Ne(Fc,"PHSurveyClosed",y),Ne(Fc,"PHSurveySent",a);var l=r>0?setTimeout(o,r):void 0;return S(l)&&o(),()=>{S(l)||clearTimeout(l),S(n)||clearTimeout(n),Fc.removeEventListener("PHSurveyClosed",y),Fc.removeEventListener("PHSurveySent",a)}}}else vh.error("usePopupVisibility hook called without a PostHog instance.")}),[]),zc({survey:e,removeSurveyFromFocus:n,setSurveyVisible:d,isPreviewMode:i,posthog:t}),{isPopupVisible:c,isSurveySent:f,setIsPopupVisible:d,hidePopupWithAnimation:m}}(f,g,j,q,k,x,F,P,N),H=B.isPopupVisible,U=B.hidePopupWithAnimation,z=B.isSurveySent||b===f.questions.length||!0===D,W=Vl(!1),V=W[0],Z=W[1],G=Ql((()=>!!Kh(f)),[f]),Q=!!(null!=(r=f.appearance)&&r.introScreenHeader||null!=(i=f.appearance)&&i.introScreenDescription),J=q?b===Nc:!(null==(n=f.appearance)||!n.displayIntroScreen)&&Q&&!V&&!G,Y=Ql((()=>{var e=Kh(f),t=(null==e?void 0:e.surveySubmissionId)||Sh();return{isPreviewMode:q,previewPageIndex:b,onPopupSurveyDismissed(){N?qh(f,g,q,N):qh(f,g,q),A()},isPopup:x||!1,surveySubmissionId:t,onPreviewSubmit:M,onPreviewBack:I,posthog:g,properties:O,surveyLanguage:N}}),[q,b,x,g,f,A,M,I,O,N]);return H?nc(Wh.Provider,{value:Y,children:nc("div",{className:"ph-survey",style:h({},rc(f.type,null==(a=f.appearance)?void 0:a.position,null==(o=f.appearance)?void 0:o.widgetType),y),ref:F,children:z?nc(bc,{header:(null==(s=f.appearance)?void 0:s.thankYouMessageHeader)||"Thank you!",description:(null==(u=f.appearance)?void 0:u.thankYouMessageDescription)||"",forceDisableHtml:!!p,contentType:null==(l=f.appearance)?void 0:l.thankYouMessageDescriptionContentType,appearance:f.appearance||Eh,onClose(){U(),L()}}):J?nc(wc,{header:(null==(c=f.appearance)?void 0:c.introScreenHeader)||"",description:(null==(d=f.appearance)?void 0:d.introScreenDescription)||"",forceDisableHtml:!!p,contentType:null==(v=f.appearance)?void 0:v.introScreenDescriptionContentType,appearance:f.appearance||Eh,onStart:()=>Z(!0)}):nc(Gc,{survey:f,forceDisableHtml:!!p,posthog:g})})}):null}function Gc(e){var t,r,i=e.survey,n=e.forceDisableHtml,a=e.posthog,o=Ql((()=>{var e=Kh(i);if(!e)return null;var t=I(e.lastQuestionIndex);return!t||t&&e.lastQuestionIndex>=0&&i.questions.length>e.lastQuestionIndex?e:(ec(i),null)}),[i]),s=Vl((()=>(null!=o&&o.responses&&vh.info("Survey is already in progress, filling in initial responses"),(null==o?void 0:o.responses)||{}))),u=s[0],l=s[1],c=Jl(Wh),d=c.previewPageIndex,v=c.onPopupSurveyDismissed,f=c.isPopup,p=c.onPreviewSubmit,g=c.onPreviewBack,m=c.surveySubmissionId,y=c.isPreviewMode,b=c.properties,w=c.surveyLanguage,k=Vl((()=>{var e=null==o?void 0:o.lastQuestionIndex,t=I(e)&&e>=0&&i.questions.length>e?e:0;return I(d)&&d>=0?d:t})),_=k[0],x=k[1],C=Vl((()=>{var e;return(null!==(e=null==o?void 0:o.visitedIndices)&&void 0!==e?e:[]).filter((e=>e>=0&&i.questions.length>e))})),M=C[0],T=C[1],R=Vl((()=>{var e,t=Kh(i);return null!==(e=null==t?void 0:t.questionSnapshots)&&void 0!==e?e:{}})),A=R[0],E=R[1],L=Ql((()=>$h(Uh(i,o))),[i.id,o]),O=Ql((()=>{if(!L||new Set(L).size!==L.length)return Uh(i,o);var e=new Map(i.questions.map((e=>[e.id,e]))),t=L.map((t=>e.get(t))).filter((e=>!!e));return t.length===L.length?t:i.questions}),[L,i.questions,i,o]);Zl((()=>{!y||S(d)||0>d||x(d)}),[d,y]);var D=!(null==(t=i.appearance)||!t.allowGoBack)&&(y?(null!=d?d:0)>0:M.length>0),P=O.at(_);return P?nc("form",{className:"survey-form",name:"surveyForm",children:[f&&!0!==(null==(r=i.appearance)?void 0:r.hideCancelButton)&&nc(mc,{onClick(){v()}}),nc("div",{className:"survey-box","data-question-index":_,children:Jc({question:P,forceDisableHtml:n,displayQuestionIndex:_,appearance:i.appearance||Eh,onSubmit:e=>(e=>{var t=e.res,r=e.displayQuestionIndex,n=e.questionId;if(a)if(n){var o=si(n),s=h({},u,{[o]:t});l(s);var c=O[r],d=null!=c&&c.id?h({},A,{[c.id]:c.question}):A;E(d);var v=Oc(i,r,t),f=v===lh.End,p=[...M,r];if(f||(T(p),x(v),Yh(i,{surveySubmissionId:m,responses:s,lastQuestionIndex:v,questionOrder:$h(O),visitedIndices:p,surveyLanguage:w,questionSnapshots:d})),i.enable_partial_responses||f){var g=new Set(p.map((e=>{var t;return null==(t=O[e])?void 0:t.id})).filter((e=>!!e)).map((e=>si(e)))),y=Object.fromEntries(Object.entries(s).filter((e=>g.has(e[0]))));Nh({responses:y,survey:i,surveySubmissionId:m,isSurveyCompleted:f,posthog:a,properties:b,surveyLanguage:w,questionSnapshots:d})}}else vh.error("onNextButtonClick called without a questionId.");else vh.error("onNextButtonClick called without a PostHog instance.")})({res:e,displayQuestionIndex:_,questionId:P.id}),onPreviewSubmit:p,initialValue:P.id?u[si(P.id)]:void 0,canGoBack:D,onBack(){if(y)g();else if(0!==M.length){var e=M[M.length-1],t=M.slice(0,-1);T(t),x(e),Yh(i,{surveySubmissionId:m,responses:u,lastQuestionIndex:e,questionOrder:$h(O),visitedIndices:t,surveyLanguage:w,questionSnapshots:A})}}})})]}):null}function Qc(e){var t,r,i,n,a,o,s,u=e.survey,l=e.forceDisableHtml,h=e.posthog,c=e.readOnly,d=e.surveyLanguage,v=Vl(!0),f=v[0],p=v[1],g=Vl(!1),m=g[0],y=g[1],b=Vl({}),w=b[0],k=b[1],_=Gl(void 0),x=()=>{y(!m)};if(Zl((()=>{var e;if(h){if(!c){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&k({top:"50%",bottom:"auto"});var t=e=>{var t,r=e;(null==(t=r.detail)?void 0:t.surveyId)===u.id&&(vh.info("Received show event for feedback button survey "+u.id),k(r.detail.position||{}),x())};return Ne(Fc,jc,t),()=>{S(_.current)||(clearTimeout(_.current),_.current=void 0),Fc.removeEventListener(jc,t)}}}else vh.error("FeedbackWidget called without a PostHog instance.")}),[h,c,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(r=u.appearance)?void 0:r.widgetSelector,null==(i=u.appearance)?void 0:i.borderColor]),zc({survey:u,setSurveyVisible:p,posthog:h}),!f)return null;var C=()=>{u.schedule!==hh&&p(!1),S(_.current)||clearTimeout(_.current),_.current=setTimeout((()=>{_.current=void 0,y(!1)}),200)};return nc(cl,{children:["tab"===(null==(n=u.appearance)?void 0:n.widgetType)&&nc("button",{className:"ph-survey-widget-tab "+((null==(a=u.appearance)?void 0:a.tabPosition)===oh.Top?"widget-tab-top":""),onClick:x,disabled:c,style:Vc(null==(o=u.appearance)?void 0:o.tabPosition),children:(null==(s=u.appearance)?void 0:s.widgetLabel)||""}),m&&nc(Zc,{posthog:h,survey:u,forceDisableHtml:l,style:w,onPopupSurveyDismissed:C,onCloseConfirmationMessage:C,surveyLanguage:d})]})}var Jc=e=>{var t=e.question,r=e.onSubmit,i=e.onPreviewSubmit,n={forceDisableHtml:e.forceDisableHtml,appearance:e.appearance,onPreviewSubmit(e){i(e)},onSubmit(e){r(e)},initialValue:e.initialValue,displayQuestionIndex:e.displayQuestionIndex,canGoBack:e.canGoBack,onBack:e.onBack};switch(t.type){case uh.Open:return ll(_c,h({},n,{question:t,key:t.id}));case uh.Link:return ll(Sc,h({},n,{question:t,key:t.id}));case uh.Rating:return ll(xc,h({},n,{question:t,key:t.id}));case uh.SingleChoice:case uh.MultipleChoice:return ll(Mc,h({},n,{question:t,key:t.id}));default:return vh.error("Unsupported question type: "+t.type),null}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.generateSurveys=Uc,s.extendPostHogWithSurveys=Uc;var Yc=1e4,Kc=(e,t,r)=>r.remaining>0?t.length>r.remaining?(e.push(t.slice(0,r.remaining)),r.remaining=0,r.truncated=!0,!1):(e.push(t),r.remaining-=t.length,!0):(r.truncated=!0,!1),Xc=(e,t,r)=>{var i=JSON.stringify(e);if(r.remaining>=i.length)return Kc(t,i,r);if(r.truncated=!0,2>r.remaining)return!1;for(var n=0,a=Math.min(e.length,r.remaining-2);a>n;){var o=Math.ceil((n+a)/2);JSON.stringify(e.slice(0,o)).length>r.remaining?a=o-1:n=o}return Kc(t,JSON.stringify(e.slice(0,n)),r)},ed=e=>void 0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e,td=(e,t,r)=>{if(!r.truncated){if(r.keysRemaining-=1,r.sizeRemaining-=String(t).length+e.length,0>=r.keysRemaining||0>=r.sizeRemaining)return r.truncated=!0,void(r.result.attributes_truncated=!0);r.result[e]=t}},rd=(e,t,r)=>{if(!r.truncated)if(_(e)){if(r.seen.has(e))return void td(t||"circular","[Circular]",r);r.seen.add(e);try{for(var i in e)try{if(!{}.hasOwnProperty.call(e,i))continue;if(rd(e[i],t?t+"."+i:i,r),r.truncated)return}catch(e){continue}}catch(e){}}else td(t,e,r)},id=function(e,t,r,i,n,a){if(void 0===n&&(n=!1),!ed(e))return!n||Kc(t,"null",r);if(M(e)||(e=>{try{return I(e)||R(e)}catch(e){return!1}})(e))return Kc(t,JSON.stringify(e),r);if("string"==typeof e)return Xc(e,t,r);if(!_(e)&&!w(e))return Kc(t,JSON.stringify(e),r);if(i.has(e))return Xc("[Circular]",t,r);i.add(e);try{var o=e.toJSON;if(k(o))return id(o.call(e),t,r,i,n)}catch(e){}try{var s={}.toString.call(e);if("[object String]"===s)return Xc(String(e.valueOf()),t,r);if("[object Number]"===s||"[object Boolean]"===s)return Kc(t,JSON.stringify(e.valueOf()),r)}catch(e){}if(e instanceof Error){var u={};try{for(var l in e)({}).hasOwnProperty.call(e,l)&&(u[l]=e[l])}catch(e){}try{u.name=e.name}catch(e){}try{u.message=e.message}catch(e){}try{u.stack=e.stack}catch(e){}return id(u,t,r,i,n,a)}if(w(e)){if(!Kc(t,"[",r))return!1;for(var h=0;e.length>h;h++){if(h>0&&!Kc(t,",",r))return!1;var c=void 0;try{c=e[h]}catch(e){c=void 0}if(!id(c,t,r,i,!0))return!1}return Kc(t,"]",r)}if(!Kc(t,"{",r))return!1;var d=!0;try{for(var v in e)if({}.hasOwnProperty.call(e,v)){if(0>=r.remaining)return r.truncated=!0,!1;var f=void 0;try{f=e[v]}catch(e){continue}if(a)try{rd(f,v,a)}catch(e){}if(ed(f)){var p=(d?"":",")+JSON.stringify(v)+":";if(p.length>=r.remaining)return r.truncated=!0,!1;var g=t.length,m=r.remaining,y=r.truncated;if(!Kc(t,p,r))return!1;var b=t.length,S=id(f,t,r,i,!1),x=r.truncated;if(t.length!==b){if(d=!1,!S)return!1}else if(t.length=g,r.remaining=m,r.truncated=S?y:x,!S)return!1}}}catch(e){}return Kc(t,"}",r)},nd=(e,t)=>{for(var r=[],i={remaining:t,truncated:!1},n=_(e[0])?{result:{},keysRemaining:50,sizeRemaining:Yc,truncated:!1,seen:new WeakSet([e[0]])}:void 0,a=0;e.length>a&&(0>=a||Kc(r," ",i))&&id(e[a],r,i,new WeakSet,!1,0===a?n:void 0);a++);return{body:r.join("")+(i.truncated?"...":""),truncated:i.truncated,attributes:(null==n?void 0:n.result)||{}}},ad={debug:"debug",log:"info",warn:"warn",error:"error",info:"info"},od=e=>"canCapture"in e,sd=e=>od(e)?e.canCapture?e.getExtension("logs"):void 0:e.is_capturing()?e.logs:void 0;s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.logs={initializeLogs(e){var t=e,r=[],i={host:s.location.host},n=!1,a=function(e){var a=s.console[e];r.push(pu(s.console,e,(r=>{var o=(r=>function(){for(var a=!1,o=arguments.length,u=new Array(o),l=0;o>l;l++)u[l]=arguments[l];try{var c=t;if(u.length>0&&!n&&c){var d=sd(c);if(d){n=!0,a=!0;var v=nd(u,Yc),f=v.body,p=v.attributes,g=h({},i,v.truncated?{body_truncated:"true"}:{});((e,t,r)=>{if(od(e))t.captureConsoleLog(r);else{var i=(e=>{var t=/^1\.(\d+)\.(\d+)$/.exec(e);if(t){var r=Number(t[1]),i=Number(t[2]);if(r>=392&&419>=r)return 410===r?i>4?i>10?void 0:"de":"le":418===r?i>3?i>10?i>14?i>17?void 0:"vi":"ci":"ui":"he":419===r?i>2?void 0:"vi":410>r?"le":"he"}})(e.version),n=i?t[i]:void 0;k(n)&&n.call(t,r)}})(c,d,{level:ad[e],body:f,attributes:h({"log.source":"console."+e},g,p)})}}}catch(e){}finally{a&&(n=!1),r.apply(s.console,u)}})(r);return o.__rrweb_original__=(e=>{for(;null!=(t=e)&&t.__rrweb_original__;){var t;e=e.__rrweb_original__}return e})(a),o})))};for(var o of Object.keys(ad))a(o);return()=>{t=void 0,r.forEach((e=>e()))}},replayConsoleBuffer(e,t){var r=sd(e);if(r)for(var i of t)try{var n=nd(i.args,Yc);null==r.captureBufferedConsoleLog||r.captureBufferedConsoleLog({level:ad[i.level],body:n.body,attributes:h({"log.source":"console."+i.level,host:s.location.host},n.truncated?{body_truncated:"true"}:{},n.attributes)},i.context,i.occurredAtMs)}catch(e){}}},Oe("[Error tracking]");var ud=Oe("[ExceptionAutocapture]"),ld=new class{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,t,0).apply(e),n=this.buildParsingContext(t),a=this.parseStacktrace(i,n);return{$exception_list:this.convertToExceptionList(a,r),$exception_level:"error"}}modifyFrames(e){var t=this;return l((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&w(r.stacktrace.frames)&&(r.stacktrace.frames=yield t.applyModifiers(r.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var r,i;return null!=e.cause&&(r=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),h({},e,{cause:r,stack:i})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return l((function*(){var r=e;for(var i of t.modifiers)r=yield i(r);return r}))()}convertToExceptionList(e,t){var r,i,n,a={type:e.type,value:e.value,mechanism:{type:null!==(r=t.type)&&void 0!==r?r:"generic",handled:null===(i=t.handled)||void 0===i||i,synthetic:null!==(n=e.synthetic)&&void 0!==n&&n}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var o=[a];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,h({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:pe(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,r){void 0===r&&(r=0);var i=(r,i)=>{if(4>=i){var n=this.buildCoercingContext(e,t,i);return this.applyCoercers(r,n)}};return h({},t,{syntheticException:0==r?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,r),next:e=>i(e,r+1)})}}([new class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=x(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return L(e,"DOMException")}isDOMError(e){return L(e,"DOMError")}},new class{match(e){return L(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!D(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var r,i=this.getUnhandledRejectionReason(e);return E(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(i)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}},new class{constructor(){}match(e){return!!L(e,"ErrorEvent")&&(null!=e.error||this.Wi(e))}coerce(e,t){var r;if(null!=e.error)return t.apply(e.error);var i=t.apply(e.message);return h({},i,{stack:null!==(r=this.Vi(e))&&void 0!==r?r:i.stack,synthetic:!0})}Wi(e){return x(e.message)&&e.message.length>0}Vi(e){var t,r,i=e,n=null!==(t=i.lineno)&&void 0!==t?t:0,a=null!==(r=i.colno)&&void 0!==r?r:0;if(x(i.filename)&&0!==i.filename.length&&0!==n)return"Error\n at "+i.filename+":"+n+":"+a}},new class{match(e){return O(e)}coerce(e,t){var r,i=this.getStack(e),n=void 0===i;return{type:this.getType(e),value:this.getMessage(e,t),stack:null!=i?i:null==(r=t.syntheticException)?void 0:r.stack,cause:e.cause?t.next(e.cause):void 0,synthetic:n}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return String(r.error&&"string"==typeof r.error.message?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}},new class{match(e){return D(e)}coerce(e,t){var r,i=e.constructor.name;return{type:i,value:i+" captured as exception with keys: "+Re(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}},new class{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,i,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null!==(r=this.getStack(e))&&void 0!==r?r:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(D(e))return e.constructor.name;var t="name"in e?e.name:void 0;return x(t)&&!C(t)?t:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+Re(e)}isSeverityLevel(e){return x(e)&&!C(e)&&Ie.indexOf(e)>=0}getStack(e){try{return x(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:x(e.stack)&&e.stack.length>0?e.stack:void 0}catch(e){return}}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var r=e[t];if(O(r))return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}},new class{match(e){return"string"==typeof e}coerce(e,t){var r,i=this.getInfos(e),n=i[0],a=i[1];return{type:null!=n?n:"Error",value:null!=a?a:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,i=e.match(Te);return i&&(t=i[1],r=i[2]),[t,r]}},new class{match(e){return E(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}],function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;t>i;i++)r[i-1]=arguments[i];return function(t,i){void 0===i&&(i=0);for(var n=[],a=t.split("\n"),o=i;a.length>o;o++){var s=a[o];if(1024>=s.length){var u=Me.test(s)?s.replace(Me,"$1"):s;if(!u.match(/\S*Error: /)){for(var l of r){var c=l(u,e);if(c){n.push(c);break}}if(n.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return h({},e,{filename:e.filename||(r=t,r[r.length-1]||{}).filename,function:e.function||ge});var r}))}(n)}}("web:javascript",_e,Ce)),hd=t=>{var r=e;r||ud.info("window not available, cannot wrap onerror");var i=r.onerror;return r.onerror=function(){for(var e,r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];var o=ld.buildFromUnknown((e=>{var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4];if(null!=a)return a;if(x(t)&&x(r)&&r.length>0&&"undefined"!=typeof ErrorEvent)try{return new ErrorEvent("error",{message:t,filename:r,lineno:i,colno:n})}catch(e){return t}return t})(n),{mechanism:{handled:!1}});return t(o),!!k(i)&&null!==(e=i(...n))&&void 0!==e&&e},r.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=r.onerror)||delete e.__POSTHOG_INSTRUMENTED__,r.onerror=i}},cd=function(t,r){void 0===r&&(r=!1);var i=e;i||ud.info("window not available, cannot wrap onUnhandledRejection");var n=i.onunhandledrejection;return i.onunhandledrejection=function(e){var i,a=ld.buildFromUnknown(e,{mechanism:{handled:!1}});return t(a),k(n)?null!==(i=n(e))&&void 0!==i&&i:r},i.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=i.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,i.onunhandledrejection=n}},dd={wrapOnError:hd,wrapUnhandledRejection:cd,wrapConsoleError(e){var t=console;t||ud.info("console not available, cannot wrap console.error");var r=t.error;return t.error=function(){for(var t,i=arguments.length,n=new Array(i),a=0;i>a;a++)n[a]=arguments[a];t=1==n.length?n[0]:n.join(" ");var o=n.find((e=>e instanceof Error)),s=ld.buildFromUnknown(o||t,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2});e(s),k(r)&&r(...n)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=r}}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.errorWrappingFunctions=dd,s.posthogErrorWrappingFunctions=dd;var vd=(e,t)=>{if(k(null==e?void 0:e.capture)){var r=null==t?void 0:t.autocaptureExceptions,i=!M(r)&&"object"==typeof r&&w(r.errors_to_ignore)?r.errors_to_ignore.reduce(((e,t)=>{try{e.push(new RegExp(t))}catch(e){ud.error("Ignoring invalid legacy exception exclusion rule",t,e)}return e}),[]):[],n=t=>{try{null==e.capture||e.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent",_noHeatmaps:!0})}catch(e){ud.error("Failed to capture exception for a legacy client",e)}};hd((e=>{i.some((t=>e.$exception_list.some((e=>t.test(e.value||"")))))||n(e)})),cd(n,!0)}};s.extendPostHogWithExceptionAutoCapture=vd,s.extendPostHogWithExceptionAutocapture=vd;var fd="X-POSTHOG-SESSION-ID",pd="X-POSTHOG-WINDOW-ID",gd="X-POSTHOG-DISTINCT-ID",md=[fd,pd,gd],yd=["attributionReporting","body","browsingTopics","cache","credentials","dispatcher","duplex","integrity","keepalive","method","mode","priority","redirect","referrer","referrerPolicy","signal","window"],bd=(e,t)=>({}.hasOwnProperty.call(e,t)),wd=e=>"object"==typeof e&&!M(e)||k(e),kd=e=>"undefined"!=typeof Request&&(e instanceof Request||"[object Request]"==={}.toString.call(e)),_d=t=>{try{var r;return kd(t)?t.url:new URL(t instanceof URL?t.toString():String(t),null==e||null==(r=e.location)?void 0:r.href).toString()}catch(e){return}},Sd=(e,t,r,i,n)=>{var a;try{a=new URL(i).hostname}catch(e){return!1}if(!e)return!1;if(w(e)&&!e.includes(a))return!1;var o=!1;if(r){var s=r.checkAndGetSessionAndWindowId(!0),u=s.windowId;n.set(fd,s.sessionId),n.set(pd,u),o=!0}var l=(e=>k(e)?e():e)(t);return l&&"$posthog_cookieless"!==l&&(n.set(gd,l),o=!0),o};s.__PosthogExtensions__=s.__PosthogExtensions__||{};var xd={_patchFetch:(t,r,i)=>pu(e,"fetch",(e=>function(n,a){var o=arguments.length>1?[n,a]:[n],s=o;try{var u=_d(n);if(u)if(kd(n)){var l=new Request(n,a);Sd(t,r,i,l.url,l.headers),s=[l]}else{var c=new Headers(wd(a)?a.headers:void 0);if(Sd(t,r,i,u,c)){var d=((e,t)=>{if(S(e)||M(e))return{headers:t};if(wd(e)){var r=e;if("undefined"==typeof Proxy||"undefined"==typeof Reflect){var i=Object.create(r);return Object.defineProperty(i,"headers",{configurable:!0,enumerable:!0,value:t,writable:!0}),i}return new Proxy({headers:t},{get:(e,t)=>bd(e,t)?Reflect.get(e,t):Reflect.get(r,t,r),has:(e,t)=>bd(e,t)||t in r,ownKeys(e){var t=new Set(Reflect.ownKeys(e));return Reflect.ownKeys(r).forEach((e=>t.add(e))),yd.forEach((e=>{e in r&&t.add(e)})),Array.from(t)},getOwnPropertyDescriptor(e,t){var i=Reflect.getOwnPropertyDescriptor(e,t);if(i)return i;if("string"==typeof t&&yd.includes(t)&&t in r)return{configurable:!0,enumerable:!0,get(){return Reflect.get(r,t,r)}};var n=Reflect.getOwnPropertyDescriptor(r,t);return n?h({},n,{configurable:!0}):void 0},getPrototypeOf:()=>Object.getPrototypeOf(r)})}})(a,c);d&&(s=[n,d])}}}catch(e){s=o}return e.apply(this,s)})),_patchXHR:(t,r,i)=>pu(e.XMLHttpRequest.prototype,"open",(e=>function(n,a,o,s,u){void 0===o&&(o=!0);var l=this,h=new Headers,c=_d(a);c&&Sd(t,r,i,c,h);var d=e.call(l,n,a,o,s,u);return md.forEach((e=>{var t=h.get(e);if(t)try{l.setRequestHeader(e,t)}catch(e){}})),d}))};s.__PosthogExtensions__.tracingHeadersPatchFns=xd,s.postHogTracingHeadersPatchFns=xd,"function"!=typeof[].at&&Object.defineProperty(Array.prototype,"at",{value(e){var t=this.length,r=Math.trunc(e)||0;return 0>r&&(r+=t),0>r||r>=t?void 0:this[r]},writable:!0,enumerable:!1,configurable:!0});let Cd=class{constructor(){this.t=void 0,this.o=0,this.i=[]}l(e){var t;if(!e.hadRecentInput){var r=this.i[0],i=this.i.at(-1);this.o&&r&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-r.startTime?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),null==(t=this.t)||t.call(this,e)}}};var Md=()=>{var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Td=e=>{if("loading"===document.readyState)return"loading";var t=Md();if(t){if(t.domInteractive>e)return"loading";if(0===t.domContentLoadedEventStart||t.domContentLoadedEventStart>e)return"dom-interactive";if(0===t.domComplete||t.domComplete>e)return"dom-content-loaded"}return"complete"},Id=e=>{var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Rd=e=>{var t="";try{for(;9!==(null==(r=e)?void 0:r.nodeType);){var r,i,n=e,a=n.id?"#"+n.id:[Id(n),...Array.from(null!==(i=n.classList)&&void 0!==i?i:[]).sort()].join(".");if(t.length+a.length>99)return t||a;if(t=t?a+">"+t:a,n.id)break;e=n.parentNode}}catch(e){}return t},Ad=new WeakMap;function Ed(e,t){var r=Ad.get(t);return r||(r=new WeakMap,Ad.set(t,r)),r.get(e)||r.set(e,new t),r.get(e)}var Ld=-1,Od=()=>Ld,Dd=e=>{addEventListener("pageshow",(t=>{t.persisted&&(Ld=t.timeStamp,e(t))}),!0)},Pd=(e,t,r,i)=>{var n,a;return o=>{t.value>=0&&(o||i)&&((a=t.value-(null!=n?n:0))||void 0===n)&&(n=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t))}},Nd=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Fd=()=>{var e,t;return null!==(e=null==(t=Md())?void 0:t.activationStart)&&void 0!==e?e:0},qd=-1,jd=new Set,Bd=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Hd=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(var t of jd)t();isFinite(qd)||(qd="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Hd,!0))}},$d=function(e){if(void 0===e&&(e=!1),e&&(qd=1/0),0>qd){var t,r=Fd(),i=document.prerendering||null==(t=globalThis.performance.getEntriesByType("visibility-state").find((e=>"hidden"===e.name&&e.startTime>=r)))?void 0:t.startTime;qd=null!=i?i:Bd(),addEventListener("visibilitychange",Hd,!0),addEventListener("prerenderingchange",Hd,!0),Dd((()=>{setTimeout((()=>{qd=Bd()}))}))}return{get firstHiddenTime(){return qd},onHidden(e){jd.add(e)}}},Ud=function(e,t,r,i,n,a,o){void 0===t&&(t=-1),void 0===i&&(i=0);var s=Md(),u=(null==s?void 0:s.navigationId)||0,l="navigate";return r?l=r:0>Od()?s&&(document.prerendering||Fd()>0?l="prerender":document.wasDiscarded?l="restore":s.type&&(l=s.type.replace(/_/g,"-"))):l="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:"v6-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12),navigationType:l,navigationId:i||u,navigationInteractionId:n,navigationURL:a||(null==s?void 0:s.name),navigationStartTime:o||0}},zd=function(e,t,r){void 0===r&&(r={});try{var i=e.filter((e=>PerformanceObserver.supportedEntryTypes.includes(e)));if(i.length>0){var n=new PerformanceObserver((e=>{queueMicrotask((()=>{var r=e.getEntries();i.length>1&&r.sort(((e,t)=>e.startTime+e.duration-(t.startTime+t.duration))),t(r)}))}));for(var a of i)n.observe(h({type:a,buffered:!0},r));return n}}catch(e){}},Wd=e=>{var t,r;return(null==(t=globalThis.PerformanceObserver)||null==(t=t.supportedEntryTypes)?void 0:t.includes("soft-navigation"))&&"function"==typeof(null==(r=globalThis.PerformanceSoftNavigation)||null==(r=r.prototype)?void 0:r.getLargestInteractionContentfulPaint)&&e&&e.reportSoftNavs},Vd=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){var r=e.keys().next().value;void 0!==r&&e.delete(r)}},Zd=e=>{var t=!1;return()=>{t||(e(),t=!0)}};class Gd{constructor(){this.u=void 0}}var Qd,Jd=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},Yd=[1800,3e3],Kd=function(e,t){void 0===t&&(t={});var r=Wd(t);Jd((()=>{var i,n=Ed(t,Gd),a=$d(),o=Ud("FCP"),s=zd(["paint"],(e=>{for(var t of e)"first-contentful-paint"===t.name&&(s.disconnect(),a.firstHiddenTime>t.startTime&&(o.value=Math.max(t.startTime-Fd(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,i(!0)))}));s&&(i=Pd(e,o,Yd,t.reportAllChanges),Dd((r=>{o=Ud("FCP",-1,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Od()),i=Pd(e,o,Yd,t.reportAllChanges),Nd((()=>{o.value=performance.now()-r.timeStamp,i(!0)}))}))),r&&zd(["soft-navigation"],(r=>{r.forEach((r=>{n.u&&r.navigationId&&Vd(n.u,r);var a=Math.max((r.presentationTime||r.paintTime||0)-r.startTime,0);o=Ud("FCP",a,"soft-navigation",r.navigationId,r.interactionId,r.name,r.startTime),(i=Pd(e,o,Yd,t.reportAllChanges))(!0)}))}),t)}))},Xd=[.1,.25],ev=e=>e.find((e=>{var t;return 1===(null==(t=e.node)?void 0:t.nodeType)}))||e[0],tv=function(e,t){void 0===t&&(t={});var r=Ed(t=Object.assign({},t),Cd),i=new WeakMap;r.t=e=>{var r;if(null!=e&&null!=(r=e.sources)&&r.length){var n=ev(e.sources),a=null==n?void 0:n.node;if(a){var o,s=null!==(o=null==t.generateTarget?void 0:t.generateTarget(a))&&void 0!==o?o:Rd(a);i.set(n,s)}}},function(e,t){void 0===t&&(t={});var r=$d();Kd(Zd((()=>{var i,n=Ud("CLS",0),a=Ed(t,Cd),o=(r,o,s,u,l)=>{n=Ud("CLS",0,r,o,s,u,l),a.o=0,i=Pd(e,n,Xd,t.reportAllChanges)},s=function(e){void 0===e&&(e=!1),a.o>n.value&&(n.value=a.o,n.entries=a.i),i(e)},u=e=>{s(!0),o("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(var t of e)"soft-navigation"!==t.entryType?a.l(t):u(t);s()},h=["layout-shift"];Wd(t)&&h.push("soft-navigation");var c=zd(h,l);c&&(i=Pd(e,n,Xd,t.reportAllChanges),r.onHidden((()=>{l(c.takeRecords()),i(!0)})),Dd((()=>{o("back-forward-cache",n.navigationId,n.navigationInteractionId,n.navigationURL,Od()),Nd(i)})),setTimeout(i))})))}((t=>{e((e=>{var t={};if(e.entries.length){var r,n=e.entries.reduce(((e,t)=>e.value>t.value?e:t));if(null!=n&&null!=(r=n.sources)&&r.length){var a=ev(n.sources);a&&(t={largestShiftTarget:i.get(a),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:a,largestShiftEntry:n,loadState:Td(n.startTime)})}}return Object.assign(e,{attribution:t})})(t))}),t)},rv=function(e,t){void 0===t&&(t={});var r=Ed(t=Object.assign({},t),Gd);Wd(t)&&(r.u=new Map),Kd((t=>{e((e=>{var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:Td(Od())};if("soft-navigation"!==e.navigationType){if(e.entries.length){var i=Md(),n=e.entries.at(-1);if(i){var a=Math.max(0,i.responseStart-(i.activationStart||0));t={timeToFirstByte:a,firstByteToFCP:e.value-a,loadState:Td(e.entries[0].startTime),navigationEntry:i,fcpEntry:n}}}}else{var o,s=null==(o=r.u)?void 0:o.get(e.navigationId);s&&(t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:"complete",navigationEntry:s})}return Object.assign(e,{attribution:t})})(t))}),t)},iv=0,nv=1/0,av=0,ov=e=>{for(var t of e)t.interactionId&&(nv=Math.min(nv,t.interactionId),av=Math.max(av,t.interactionId),iv=av?(av-nv)/7+1:0)},sv=()=>{var e;return Qd?iv:null!==(e=performance.interactionCount)&&void 0!==e?e:0};let uv=class{constructor(){this.h=0,this.v=[],this.p=new Map,this.m=void 0,this.M=void 0}T(){return sv()-this.h}D(){this.h=sv(),this.v.length=0,this.p.clear()}S(e){var t=this.T(),r=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==r||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[r]:{k:8,id:-1,entries:[]}}l(e){var t;if(null!=(t=this.m)&&t.call(this,e),e.interactionId){var r=this.v.at(-1),i=this.p.get(e.interactionId);if(i||10>this.v.length||e.duration>r.k){var n;if(i?e.duration>i.k?(i.entries=[e],i.k=e.duration):e.duration===i.k&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(this.p.set((i={id:e.interactionId,entries:[e],k:e.duration}).id,i),this.v.push(i)),this.v.sort(((e,t)=>t.k-e.k)),this.v.length>10){var a=this.v.splice(10);for(var o of a)this.p.delete(o.id)}null==(n=this.M)||n.call(this,i)}}}};var lv=e=>{var t="requestIdleCallback"in globalThis?1e3:0,r=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{var n=Zd(e),a=-1,o=()=>{i(a),n()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),a=r((()=>{removeEventListener("visibilitychange",o,{capture:!0}),n()}),{timeout:t})}},hv=[200,500],cv=function(e,t){void 0===t&&(t={});var r=Ed(t=Object.assign({},t),uv),i=[],n=[],a=0,o=new WeakMap,s=new WeakMap,u=!1,l=()=>{u||(lv(c),u=!0)},c=()=>{var e=new Set(r.v.map((e=>o.get(e.entries[0])))),t=n.length-10;n=n.filter(((r,i)=>i>=t||e.has(r)));var s=new Set;for(var l of n){var h=d(l.startTime,l.processingEnd);for(var c of h)s.add(c)}i=i.filter((e=>e.startTime>a||s.has(e))),u=!1};r.m=e=>{var r,i=e.startTime+e.duration;a=Math.max(a,e.processingEnd);for(var s=n.length-1;s>=0;s--){var u=n[s];if(8>=Math.abs(i-u.renderTime)){(r=u).startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),t.includeProcessedEventEntries&&r.entries.push(e);break}}r||n.push(r={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:i,entries:t.includeProcessedEventEntries?[e]:[]}),e.interactionId&&o.set(e,r),l()},r.M=e=>{if(!s.get(e)){var r,i=null==(r=e.entries.find((e=>e.target)))?void 0:r.target;if(i){var n,a=null!==(n=null==t.generateTarget?void 0:t.generateTarget(i))&&void 0!==n?n:Rd(i);s.set(e,a)}else{var o,u=null==(o=e.entries.find((e=>e.targetSelector)))?void 0:o.targetSelector;u&&s.set(e,u)}}};var d=(e,t)=>{var r=[];for(var n of i)if(n.startTime+n.duration>=e){if(n.startTime>t)break;r.push(n)}return r};zd(["long-animation-frame"],(e=>{i=i.concat(e),l()}),t),function(e,t){if(void 0===t&&(t={}),globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=$d();Jd((()=>{var i;"interactionCount"in performance||Qd||(Qd=zd(["event"],ov,{durationThreshold:0}));var n,a=Ud("INP"),o=Ed(t,uv),s=(r,i,s,u,l)=>{o.D(),a=Ud("INP",-1,r,i,s,u,l),n=Pd(e,a,hv,t.reportAllChanges)},u=()=>{var e=o.S(a.navigationType);e&&e.k!==a.value&&(a.value=e.k,a.entries=e.entries,n())},l=e=>{u(),n(!0),s("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},c=function(e,t){void 0===t&&(t=!1),lv((()=>{for(var r of e)"soft-navigation"!==r.entryType?o.l(r):l(r);u(),t&&n(!0)}))},d=["event","first-input"];Wd(t)&&d.push("soft-navigation");var v=zd(d,c,h({},t,{durationThreshold:null!==(i=t.durationThreshold)&&void 0!==i?i:40}));n=Pd(e,a,hv,t.reportAllChanges),v&&(r.onHidden((()=>{c(v.takeRecords(),!0)})),Dd((()=>{s("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,Od())})))}))}}((t=>{e((e=>{if(0===e.entries.length){var t={processedEventEntries:[],longAnimationFrameEntries:[],inputDelay:0,processingDuration:0,presentationDelay:e.value,loadState:Td(e.navigationStartTime||0)};return Object.assign(e,{attribution:t})}var i=e.entries[0],n=o.get(i),a=Math.max(n.processingStart,i.startTime),u=Math.max(i.startTime+i.duration,a),l=Math.min(n.processingEnd,u),h=n.entries.sort(((e,t)=>e.processingStart-t.processingStart)),c=d(i.startTime,l),v=r.p.get(i.interactionId),f={interactionTarget:s.get(v),interactionType:i.name.startsWith("key")?"keyboard":"pointer",interactionTime:i.startTime,nextPaintTime:u,processedEventEntries:h,longAnimationFrameEntries:c,inputDelay:a-i.startTime,processingDuration:l-a,presentationDelay:u-l,loadState:Td(i.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return((e,t)=>{var r=e.interactionTime,i=e.nextPaintTime;if(null!=(t=e.longAnimationFrameEntries)&&t.length&&r&&i){var n,a,o=e.inputDelay,s=e.processingDuration,u=0,l=0,h=0,c=0;for(var d of e.longAnimationFrameEntries)for(var v of(l=l+d.startTime+d.duration-d.styleAndLayoutStart,d.scripts)){var f=v.startTime+v.duration;if(f>=r){var p=f-Math.max(r,v.startTime),g=v.duration?p/v.duration*v.forcedStyleAndLayoutDuration:0;u+=p-g,l+=g,p>c&&(a=r+o>v.startTime?"input-delay":r+o+s>v.startTime?"processing-duration":"presentation-delay",n=v,c=p)}}var m=e.longAnimationFrameEntries.at(-1),y=m?m.startTime+m.duration:0;y>=r+o+s&&(h=i-y),n&&a&&(e.longestScript={entry:n,subpart:a,intersectingDuration:c}),e.totalScriptDuration=u,e.totalStyleAndLayoutDuration=l,e.totalPaintDuration=h,e.totalUnattributedDuration=i-r-u-l-h}})(f),Object.assign(e,{attribution:f})})(t))}),t)};let dv=class{constructor(){this.m=void 0,this.u=void 0}l(e){var t;null==(t=this.m)||t.call(this,e)}};var $=[2500,4e3],vv=50,fv=[];zd(["resource"],(e=>{for(var t of e)fv.push(t),fv.length>vv&&fv.shift()}));var pv=function(e,t){void 0===t&&(t={}),null!=(t=Object.assign({},t)).resourceBufferSize&&(vv=t.resourceBufferSize);var r=Ed(t,dv),i=new WeakMap;Wd(t)&&(r.u=new Map),r.m=e=>{var r=e.element;if(r){var n,a=null!==(n=null==t.generateTarget?void 0:t.generateTarget(r))&&void 0!==n?n:Rd(r);i.set(e,a)}else e.id&&i.set(e,"#"+e.id)},function(e,t){void 0===t&&(t={});var r=!1,i=Wd(t);Jd((()=>{var n,a=$d(),o=Ud("LCP"),s=Ed(t,dv),u=(i,s,u,l,h)=>{o=Ud("LCP",-1,i,s,u,l,h),n=Pd(e,o,$,t.reportAllChanges),r=!1,"soft-navigation"===i&&(a=$d(!0))},l=e=>{s.u&&e.navigationId&&Vd(s.u,e),r||n(!0),u("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);var t=null==e.getLargestInteractionContentfulPaint?void 0:e.getLargestInteractionContentfulPaint();t&&h([t])},h=e=>{for(var r of(t.reportAllChanges||i||(e=e.slice(-1)),e))if(r)if("soft-navigation"!==r.entryType){var u=0,h=[],c=r.startTime;if("largest-contentful-paint"===r.entryType)u=Math.max(r.startTime-Fd(),0),s.l(r),h=[r];else if("interaction-contentful-paint"===r.entryType){var d,v=r;if(!o.navigationId)continue;if("interactionId"in v&&v.interactionId!=o.navigationInteractionId)continue;c=(null==(d=v.largestContentfulPaint)?void 0:d.renderTime)||0,u=Math.max(c-r.startTime,0),v.largestContentfulPaint&&(s.l(v.largestContentfulPaint),h=[v.largestContentfulPaint])}a.firstHiddenTime>c&&(o.value=u,o.entries=h,n())}else l(r)},c=["largest-contentful-paint"];i&&c.push("interaction-contentful-paint","soft-navigation");var d=zd(c,h);if(d){n=Pd(e,o,$,t.reportAllChanges);var v=["keydown","click","visibilitychange"],f=e=>{if(e.isTrusted&&!r){var t=o.id;lv((()=>{if(!r){if(!i)for(var e of(d.disconnect(),v))removeEventListener(e,f,{capture:!0});t===o.id&&(r=!0,n(!0))}}))}};for(var p of v)addEventListener(p,f,{capture:!0});Dd((i=>{u("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Od()),n=Pd(e,o,$,t.reportAllChanges),Nd((()=>{o.value=performance.now()-i.timeStamp,r=!0,n(!0)}))}))}}))}((t=>{e((e=>{var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n,a,o,s,u,l,c=e.entries.at(-1),d=c.url&&(fv.findLast((e=>e.name===c.url))||performance.getEntriesByType("resource").findLast((e=>e.name===c.url)));t.target=i.get(c),t.lcpEntry=c,c.url&&(t.url=c.url),d&&(t.lcpResourceEntry=d);var v=0,f=0;if("soft-navigation"!==e.navigationType?(v=null!==(n=null==(a=l=Md())?void 0:a.activationStart)&&void 0!==n?n:0,f=null!==(o=null==(s=l)?void 0:s.responseStart)&&void 0!==o?o:0):(v=e.navigationStartTime||0,l=null==(u=r.u)?void 0:u.get(e.navigationId)),l){var p=Math.max(0,f-v),g=Math.max(p,d?(d.requestStart||d.startTime)-v:0),m=Math.min(e.value,Math.max(g,d?d.responseEnd-v:0));t=h({},t,{timeToFirstByte:p,resourceLoadDelay:g-p,resourceLoadDuration:m-g,elementRenderDelay:e.value-m,navigationEntry:l})}}return Object.assign(e,{attribution:t})})(t))}),t)},gv=-1,mv=()=>gv,yv=e=>{addEventListener("pageshow",(t=>{t.persisted&&(gv=t.timeStamp,e(t))}),!0)},bv=(e,t,r,i)=>{var n,a;return o=>{t.value>=0&&(o||i)&&((a=t.value-(null!=n?n:0))||void 0===n)&&(n=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t))}},wv=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},kv=()=>{var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},_v=()=>{var e,t;return null!==(e=null==(t=kv())?void 0:t.activationStart)&&void 0!==e?e:0},Sv=-1,xv=new Set,Cv=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Mv=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(var t of xv)t();isFinite(Sv)||(Sv="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Mv,!0))}},Tv=function(e){if(void 0===e&&(e=!1),e&&(Sv=1/0),0>Sv){var t,r=_v(),i=document.prerendering||null==(t=globalThis.performance.getEntriesByType("visibility-state").find((e=>"hidden"===e.name&&e.startTime>=r)))?void 0:t.startTime;Sv=null!=i?i:Cv(),addEventListener("visibilitychange",Mv,!0),addEventListener("prerenderingchange",Mv,!0),yv((()=>{setTimeout((()=>{Sv=Cv()}))}))}return{get firstHiddenTime(){return Sv},onHidden(e){xv.add(e)}}},Iv=function(e,t,r,i,n,a,o){void 0===t&&(t=-1),void 0===i&&(i=0);var s=kv(),u=(null==s?void 0:s.navigationId)||0,l="navigate";return r?l=r:0>mv()?s&&(document.prerendering||_v()>0?l="prerender":document.wasDiscarded?l="restore":s.type&&(l=s.type.replace(/_/g,"-"))):l="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:"v6-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12),navigationType:l,navigationId:i||u,navigationInteractionId:n,navigationURL:a||(null==s?void 0:s.name),navigationStartTime:o||0}},Rv=new WeakMap;function Av(e,t){var r=Rv.get(t);return r||(r=new WeakMap,Rv.set(t,r)),r.get(e)||r.set(e,new t),r.get(e)}class Ev{constructor(){this.t=void 0,this.i=0,this.o=[]}h(e){var t;if(!e.hadRecentInput){var r=this.o[0],i=this.o.at(-1);this.i&&r&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-r.startTime?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null==(t=this.t)||t.call(this,e)}}}var Lv=function(e,t,r){void 0===r&&(r={});try{var i=e.filter((e=>PerformanceObserver.supportedEntryTypes.includes(e)));if(i.length>0){var n=new PerformanceObserver((e=>{queueMicrotask((()=>{var r=e.getEntries();i.length>1&&r.sort(((e,t)=>e.startTime+e.duration-(t.startTime+t.duration))),t(r)}))}));for(var a of i)n.observe(h({type:a,buffered:!0},r));return n}}catch(e){}},Ov=e=>{var t,r;return(null==(t=globalThis.PerformanceObserver)||null==(t=t.supportedEntryTypes)?void 0:t.includes("soft-navigation"))&&"function"==typeof(null==(r=globalThis.PerformanceSoftNavigation)||null==(r=r.prototype)?void 0:r.getLargestInteractionContentfulPaint)&&e&&e.reportSoftNavs},Dv=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){var r=e.keys().next().value;void 0!==r&&e.delete(r)}},Pv=e=>{var t=!1;return()=>{t||(e(),t=!0)}};class Nv{constructor(){this.l=void 0}}var Fv,qv=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},jv=[1800,3e3],Bv=function(e,t){void 0===t&&(t={});var r=Ov(t);qv((()=>{var i,n=Av(t,Nv),a=Tv(),o=Iv("FCP"),s=Lv(["paint"],(e=>{for(var t of e)"first-contentful-paint"===t.name&&(s.disconnect(),a.firstHiddenTime>t.startTime&&(o.value=Math.max(t.startTime-_v(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,i(!0)))}));s&&(i=bv(e,o,jv,t.reportAllChanges),yv((r=>{o=Iv("FCP",-1,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,mv()),i=bv(e,o,jv,t.reportAllChanges),wv((()=>{o.value=performance.now()-r.timeStamp,i(!0)}))}))),r&&Lv(["soft-navigation"],(r=>{r.forEach((r=>{n.l&&r.navigationId&&Dv(n.l,r);var a=Math.max((r.presentationTime||r.paintTime||0)-r.startTime,0);o=Iv("FCP",a,"soft-navigation",r.navigationId,r.interactionId,r.name,r.startTime),(i=bv(e,o,jv,t.reportAllChanges))(!0)}))}),t)}))},Hv=[.1,.25],$v=function(e,t){void 0===t&&(t={});var r=Tv();Bv(Pv((()=>{var i,n=Iv("CLS",0),a=Av(t,Ev),o=(r,o,s,u,l)=>{n=Iv("CLS",0,r,o,s,u,l),a.i=0,i=bv(e,n,Hv,t.reportAllChanges)},s=function(e){void 0===e&&(e=!1),a.i>n.value&&(n.value=a.i,n.entries=a.o),i(e)},u=e=>{s(!0),o("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(var t of e)"soft-navigation"!==t.entryType?a.h(t):u(t);s()},h=["layout-shift"];Ov(t)&&h.push("soft-navigation");var c=Lv(h,l);c&&(i=bv(e,n,Hv,t.reportAllChanges),r.onHidden((()=>{l(c.takeRecords()),i(!0)})),yv((()=>{o("back-forward-cache",n.navigationId,n.navigationInteractionId,n.navigationURL,mv()),wv(i)})),setTimeout(i))})))},Uv=0,zv=1/0,Wv=0,Vv=e=>{for(var t of e)t.interactionId&&(zv=Math.min(zv,t.interactionId),Wv=Math.max(Wv,t.interactionId),Uv=Wv?(Wv-zv)/7+1:0)},Zv=()=>{var e;return Fv?Uv:null!==(e=performance.interactionCount)&&void 0!==e?e:0};class Gv{constructor(){this.u=0,this.v=[],this.m=new Map,this.p=void 0,this.T=void 0}_(){return Zv()-this.u}M(){this.u=Zv(),this.v.length=0,this.m.clear()}L(e){var t=this._(),r=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==r||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[r]:{P:8,id:-1,entries:[]}}h(e){var t;if(null!=(t=this.p)&&t.call(this,e),e.interactionId){var r=this.v.at(-1),i=this.m.get(e.interactionId);if(i||10>this.v.length||e.duration>r.P){var n;if(i?e.duration>i.P?(i.entries=[e],i.P=e.duration):e.duration===i.P&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(this.m.set((i={id:e.interactionId,entries:[e],P:e.duration}).id,i),this.v.push(i)),this.v.sort(((e,t)=>t.P-e.P)),this.v.length>10){var a=this.v.splice(10);for(var o of a)this.m.delete(o.id)}null==(n=this.T)||n.call(this,i)}}}}var Qv=e=>{var t="requestIdleCallback"in globalThis?1e3:0,r=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{var n=Pv(e),a=-1,o=()=>{i(a),n()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),a=r((()=>{removeEventListener("visibilitychange",o,{capture:!0}),n()}),{timeout:t})}},Jv=[200,500],Yv=function(e,t){if(void 0===t&&(t={}),globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=Tv();qv((()=>{var i;"interactionCount"in performance||Fv||(Fv=Lv(["event"],Vv,{durationThreshold:0}));var n,a=Iv("INP"),o=Av(t,Gv),s=(r,i,s,u,l)=>{o.M(),a=Iv("INP",-1,r,i,s,u,l),n=bv(e,a,Jv,t.reportAllChanges)},u=()=>{var e=o.L(a.navigationType);e&&e.P!==a.value&&(a.value=e.P,a.entries=e.entries,n())},l=e=>{u(),n(!0),s("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},c=function(e,t){void 0===t&&(t=!1),Qv((()=>{for(var r of e)"soft-navigation"!==r.entryType?o.h(r):l(r);u(),t&&n(!0)}))},d=["event","first-input"];Ov(t)&&d.push("soft-navigation");var v=Lv(d,c,h({},t,{durationThreshold:null!==(i=t.durationThreshold)&&void 0!==i?i:40}));n=bv(e,a,Jv,t.reportAllChanges),v&&(r.onHidden((()=>{c(v.takeRecords(),!0)})),yv((()=>{s("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,mv())})))}))}};class Kv{constructor(){this.p=void 0,this.l=void 0}h(e){var t;null==(t=this.p)||t.call(this,e)}}var Xv=[2500,4e3],ef=function(e,t){void 0===t&&(t={});var r=!1,i=Ov(t);qv((()=>{var n,a=Tv(),o=Iv("LCP"),s=Av(t,Kv),u=(i,s,u,l,h)=>{o=Iv("LCP",-1,i,s,u,l,h),n=bv(e,o,Xv,t.reportAllChanges),r=!1,"soft-navigation"===i&&(a=Tv(!0))},l=e=>{s.l&&e.navigationId&&Dv(s.l,e),r||n(!0),u("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);var t=null==e.getLargestInteractionContentfulPaint?void 0:e.getLargestInteractionContentfulPaint();t&&h([t])},h=e=>{for(var r of(t.reportAllChanges||i||(e=e.slice(-1)),e))if(r)if("soft-navigation"!==r.entryType){var u=0,h=[],c=r.startTime;if("largest-contentful-paint"===r.entryType)u=Math.max(r.startTime-_v(),0),s.h(r),h=[r];else if("interaction-contentful-paint"===r.entryType){var d,v=r;if(!o.navigationId)continue;if("interactionId"in v&&v.interactionId!=o.navigationInteractionId)continue;c=(null==(d=v.largestContentfulPaint)?void 0:d.renderTime)||0,u=Math.max(c-r.startTime,0),v.largestContentfulPaint&&(s.h(v.largestContentfulPaint),h=[v.largestContentfulPaint])}a.firstHiddenTime>c&&(o.value=u,o.entries=h,n())}else l(r)},c=["largest-contentful-paint"];i&&c.push("interaction-contentful-paint","soft-navigation");var d=Lv(c,h);if(d){n=bv(e,o,Xv,t.reportAllChanges);var v=["keydown","click","visibilitychange"],f=e=>{if(e.isTrusted&&!r){var t=o.id;Qv((()=>{if(!r){if(!i)for(var e of(d.disconnect(),v))removeEventListener(e,f,{capture:!0});t===o.id&&(r=!0,n(!0))}}))}};for(var p of v)addEventListener(p,f,{capture:!0});yv((i=>{u("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,mv()),n=bv(e,o,Xv,t.reportAllChanges),wv((()=>{o.value=performance.now()-i.timeStamp,r=!0,n(!0)}))}))}}))},tf={onLCP:pv,onCLS:tv,onFCP:rv,onINP:cv,withoutAttribution:{onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals-with-attribution-soft-navs"]=tf,s.__PosthogExtensions__.postHogWebVitalsCallbacks=tf,s.postHogWebVitalsCallbacks=tf;var rf={onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals-soft-navs"]=rf,s.__PosthogExtensions__.postHogWebVitalsCallbacks=rf,s.postHogWebVitalsCallbacks=rf,s.__PosthogExtensions__.loadWebVitalsCallbacks=()=>rf;var nf={onLCP:pv,onCLS:tv,onFCP:rv,onINP:cv,withoutAttribution:{onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals-with-attribution"]=nf,s.__PosthogExtensions__.postHogWebVitalsCallbacks=nf,s.postHogWebVitalsCallbacks=nf;var af={onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv};function of(e,t){return t.length>e?t.slice(0,e)+"...":t}function sf(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!ze(t));return t}function uf(t,r){var i,n,a=r.e,o=r.maskAllElementAttributes,s=r.maskAllText,u=r.elementAttributeIgnoreList,l=r.disableCaptureUrlHashes;if(!ze(t))return{props:{}};for(var c=[t],d=new Set([t]),v=t;v.parentNode&&!We(v,"body")&&Ze>c.length;)if(Ve(v.parentNode)){var f=v.parentNode.host;if(d.has(f))break;d.add(f),c.push(f),v=f}else{if(!ze(v.parentNode))break;if(d.has(v.parentNode))break;d.add(v.parentNode),c.push(v.parentNode),v=v.parentNode}var g,m=[],y={},b=!1,k=!1;if(De(c,(e=>{var t=rt(e);if(We(e,"a")){var r=e.getAttribute("href");b=!!(t&&r&&ct(r))&&(l?ae(r):r)}p(Qe(e),"ph-no-capture")&&(k=!0),m.push(function(e,t,r,i,n){void 0===n&&(n=!1);var a=e.tagName.toLowerCase(),o={tag_name:a};Ye.indexOf(a)>-1&&!r&&(o.$el_text="a"===a.toLowerCase()||"button"===a.toLowerCase()?of(1024,dt(e)):of(1024,Je(e)));var s=Qe(e);s.length>0&&(o.classes=s.filter((function(e){return""!==e}))),De(e.attributes,(function(r){var a;if((!it(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&(null==i||!i.includes(r.name))&&!t&&ct(r.value)&&(!x(a=r.name)||"_ngcontent"!==a.substring(0,10)&&"_nghost"!==a.substring(0,7))){var s=r.value;"class"===r.name&&(s=Ge(s).join(" ")),o["attr__"+r.name]=of(1024,"href"===r.name&&n?ae(s):s)}}));for(var u=1,l=1,h=e;h=sf(h);)u++,h.tagName===e.tagName&&l++;return o.nth_child=u,o.nth_of_type=l,o}(e,o,s,u,l));var i=function(e){if(!rt(e))return{};var t={};return De(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),i=e.value;r&&i&&ct(i)&&(t[r]=i)}})),t}(e);De(i,((e,t)=>{({}).hasOwnProperty.call(y,t)||(y[t]=e)}))})),k)return{props:{},explicitNoCapture:k};if(s||(m[0].$el_text=We(t,"a")||We(t,"button")?dt(t):Je(t)),b){var _,S;m[0].attr__href=b;var C=null==(_=qe(b))?void 0:_.host,M=null==e||null==(S=e.location)?void 0:S.host;C&&M&&C!==M&&(g=b)}var T,I=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;t>i;i++)r[i-1]=arguments[i];for(var n of r)for(var a in n)void 0!==n[a]&&(e[a]=n[a]);return e}({$event_type:a.type,$ce_version:1},{$elements:m},{$elements_chain:(T=m,w(T)?function(e){var t=e.map((e=>{var t,r,i="";if(e.tag_name&&(i+=e.tag_name),e.attr_class)for(var n of(e.attr_class.sort(),e.attr_class))i+="."+n.replace(/"/g,"");var a=h({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(r=e.nth_of_type)&&void 0!==r?r:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return Pe(a).sort(((e,t)=>function(e,t){return t>e?-1:e>t?1:0}(e[0],t[0]))).forEach((e=>{var t=e[1];return o[ft(e[0].toString())]=ft(t.toString())})),(i+=":")+Pe(o).map((e=>e[0]+'="'+e[1]+'"')).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,r,i={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:pt(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Pe(e).filter((e=>0===e[0].indexOf("attr__"))).forEach((e=>i.attributes[e[0]]=e[1])),i}))}(T)):"")},null!=(i=m[0])&&i.$el_text?{$el_text:null==(n=m[0])?void 0:n.$el_text}:{},g&&"click"===a.type?{$external_click_url:g}:{},y);return{props:I}}s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals"]=af,s.__PosthogExtensions__.postHogWebVitalsCallbacks=af,s.postHogWebVitalsCallbacks=af,s.__PosthogExtensions__.loadWebVitalsCallbacks=()=>af,Oe("[AutoCapture]");var lf={};function hf(t,r){var i=lf[t];if(i)return i;var n=r[t];if((e=>k(e)&&-1!==e.toString().indexOf("[native code]"))(n)&&(null==e||!e.Zone))return lf[t]=n.bind(r);var a=r.document;if(a&&k(a.createElement)){var o,s=!1;try{(o=a.createElement("iframe")).hidden=!0,a.head.appendChild(o);var u,l,h=o.contentWindow;h&&h[t]&&(n=h[t],"MutationObserver"===t&&function(e){return p(e,"AppleWebKit")&&!p(e,"Chrome")}(null!==(u=null==(l=r.navigator)?void 0:l.userAgent)&&void 0!==u?u:"")&&(o.classList.add("rr-block","ph-no-capture"),s=!0))}catch(e){Le.warn("Could not create sandbox iframe for "+t+" check, bailing to assignableWindow."+t+": ",e)}finally{var c;!s&&null!=(c=o)&&c.parentNode&&o.parentNode.removeChild(o)}}return n&&k(n)?lf[t]=n.bind(r):n}function cf(e,t){var r=function(e){var t;return S(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}(e);return r?h({node:r,originalEvent:e,timestamp:Date.now()},t):null}function df(e,t){return Math.abs(e)<Math.abs(t)?0>t?"up":"down":0>e?"left":"right"}function vf(e){return"swipe"===e.type?"$dead_swipe":"$dead_click"}var ff="canvas,video,audio,embed,object",pf=1e3;function gf(e,t){return I(e)&&e>=t}function mf(e){return e>=0&&pf>e?e:void 0}function yf(e,t){return t?mf(e-t):void 0}class bf{Zi(e){var t,r,i,n,a,o,s,u,l=this.Gi((null==e?void 0:e.__onCapture)||this.Qi.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:l.element_attribute_ignorelist,scroll_threshold_ms:null!==(r=null==e?void 0:e.scroll_threshold_ms)&&void 0!==r?r:l.scroll_threshold_ms,selection_change_threshold_ms:null!==(i=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==i?i:l.selection_change_threshold_ms,mutation_threshold_ms:null!==(n=null==e?void 0:e.mutation_threshold_ms)&&void 0!==n?n:l.mutation_threshold_ms,capture_clicks_with_modifier_keys:null!==(a=null==e?void 0:e.capture_clicks_with_modifier_keys)&&void 0!==a?a:l.capture_clicks_with_modifier_keys,capture_dead_swipes:null!==(o=null==e?void 0:e.capture_dead_swipes)&&void 0!==o?o:l.capture_dead_swipes,swipe_threshold_px:null!==(s=null==e?void 0:e.swipe_threshold_px)&&void 0!==s?s:l.swipe_threshold_px,max_dead_swipes_per_page_load:null!==(u=null==e?void 0:e.max_dead_swipes_per_page_load)&&void 0!==u?u:l.max_dead_swipes_per_page_load,css_selector_ignorelist:null==e?void 0:e.css_selector_ignorelist,__onCapture:l.__onCapture}}constructor(e,t){this.Ji=[],this.Yi=0,this.Gi=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,capture_dead_swipes:!0,swipe_threshold_px:30,max_dead_swipes_per_page_load:10,__onCapture:e}),this.Ki=e=>{var t=cf(e,{type:"click"});M(t)||this.Xi(t)||this.en(t),this.tn()},this.rn=()=>{var e=Date.now();this.nn=e,e%50==0&&this.Ji.forEach((t=>{S(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.an=()=>{this.sn=Date.now()},this.Wt=()=>{var e=Date.now();this.un=e,this.ln("visibilityChangedDelayMs",e)},this.hn=()=>{var e=Date.now();this.cn=e,this.ln("focusChangedDelayMs",e)},this.dn=e=>{var t=e.touches,r=1===(null==t?void 0:t.length)?t[0]:void 0;this.vn=r?{x:r.clientX,y:r.clientY,timestamp:Date.now()}:void 0},this.fn=()=>{this.vn=void 0},this.pn=e=>{var t,r=this.vn;if(this.vn=void 0,!S(r)&&this.gn.max_dead_swipes_per_page_load>this.Yi){var n=e,a=null==(t=n.changedTouches)?void 0:t[0];if(a){var o=a.clientX-r.x,s=a.clientY-r.y,u=o*o+s*s,l=this.gn.swipe_threshold_px;if(u>=l*l&&![this.nn,this.mn,this.sn].some((e=>I(e)&&e>=r.timestamp))){var h;if(this.yn()&&(null!==(h=null==i||null==i.elementsFromPoint?void 0:i.elementsFromPoint(r.x,r.y))&&void 0!==h?h:[]).some((e=>null==e.matches?void 0:e.matches(ff))))return;var c=cf(n,{type:"swipe",swipeDirection:df(o,s),swipeDistancePx:Math.round(Math.sqrt(u))});M(c)||this.Xi(c)||this.en(c),this.tn()}}}},this.instance=e,this.gn=this.Zi(t),this._onCapture=this.gn.__onCapture}start(e){this.bn(),this.wn(),this.kn(),this._n(),this.Sn(),this.xn(e),this.gn.capture_dead_swipes&&this.Cn()}xn(e){if(!this.Mn){var t=function(e){return hf("MutationObserver",e)}(s);this.Mn=new t((e=>{this.Tn(e)})),this.Mn.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.Mn)||e.disconnect(),this.Mn=void 0,s.removeEventListener("click",this.Ki),s.removeEventListener("scroll",this.rn,{capture:!0}),s.removeEventListener("selectionchange",this.an),s.removeEventListener("touchstart",this.dn,{capture:!0}),s.removeEventListener("touchend",this.pn,{capture:!0}),s.removeEventListener("touchcancel",this.fn,{capture:!0}),null==i||i.removeEventListener("visibilitychange",this.Wt),s.removeEventListener("blur",this.hn),s.removeEventListener("focus",this.hn),this.vn=void 0}Tn(e){this.mn=Date.now()}bn(){Ne(s,"click",this.Ki)}en(e){e.visibilityChangedDelayMs=yf(e.timestamp,this.un),e.focusChangedDelayMs=yf(e.timestamp,this.cn),this.Ji.push(e)}tn(){this.Ji.length&&S(this.In)&&(this.In=s.setTimeout((()=>{this.Rn()}),1e3))}wn(){Ne(s,"scroll",this.rn,{capture:!0})}kn(){Ne(s,"selectionchange",this.an)}_n(){Ne(i,"visibilitychange",this.Wt)}Sn(){Ne(s,"blur",this.hn),Ne(s,"focus",this.hn)}ln(e,t){this.Ji.forEach((r=>{var i=mf(t-r.timestamp);I(i)&&(S(r[e])||r[e]>i)&&(r[e]=i)}))}Cn(){Ne(s,"touchstart",this.dn,{capture:!0,passive:!0}),Ne(s,"touchend",this.pn,{capture:!0,passive:!0}),Ne(s,"touchcancel",this.fn,{capture:!0,passive:!0})}yn(){var e=S(this.An)||I(this.mn)&&this.mn>this.An;return(S(this.En)||e)&&(this.An=Date.now(),this.En=!(null==i||!i.querySelector(ff))),!!this.En}Xi(e){return!e||("swipe"===e.type?this.Ln(e):this.On(e))}Ln(t){if((r=t.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===r.id||null!=r.closest&&r.closest(".toolbar-global-fade-container")))return!0;var r,i=this.Ji.some((e=>e.type===t.type&&e.node===t.node&&1e3>Math.abs(e.timestamp-t.timestamp)));return!(!i&&!We(t.node,"html")&&ze(t.node)&&function(t,r){var i;if(!e||et(t))return!1;var n=R(r)?Xe:null!==(i=null==r?void 0:r.css_selector_ignorelist)&&void 0!==i?i:Xe;return!function(e,t){if(S(t))return!0;var r,i=function(e){if(t.some((t=>function(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!r&&r.call(e,t)}catch(e){return!1}}(e,t))))return{v:!0}};for(var n of e)if(r=i(n))return r.v;return!1}(tt(t).targetElementList,n)}(t.node,{css_selector_ignorelist:this.gn.css_selector_ignorelist}))}On(t){return!(this.gn.capture_clicks_with_modifier_keys||(r=t.originalEvent,!(r.ctrlKey||r.metaKey||r.altKey||r.shiftKey)))||!!this.Ln(t)||(i=t.node,!(!e||et(i))&&tt(i).targetElementList.some((e=>We(e,"a"))));var r,i}Rn(){if(this.Ji.length){clearTimeout(this.In),this.In=void 0;var e=this.Ji;for(var t of(this.Ji=[],e)){var r;t.mutationDelayMs=null!==(r=t.mutationDelayMs)&&void 0!==r?r:this.mn&&this.mn>=t.timestamp?this.mn-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.sn&&this.sn>=t.timestamp?this.sn-t.timestamp:void 0;var i=gf(t.scrollDelayMs,this.gn.scroll_threshold_ms),n=gf(t.selectionChangedDelayMs,this.gn.selection_change_threshold_ms),a=gf(t.mutationDelayMs,this.gn.mutation_threshold_ms),o=gf(t.absoluteDelayMs,1.1*this.gn.mutation_threshold_ms),s=I(t.scrollDelayMs)&&this.gn.scroll_threshold_ms>t.scrollDelayMs,u=I(t.mutationDelayMs)&&this.gn.mutation_threshold_ms>t.mutationDelayMs,l=I(t.selectionChangedDelayMs)&&this.gn.selection_change_threshold_ms>t.selectionChangedDelayMs,h=I(t.visibilityChangedDelayMs),c=I(t.focusChangedDelayMs);if(!(s||u||l||h||c))if(i||a||o||n){var d=vf(t);if("$dead_swipe"===d){if(this.Yi>=this.gn.max_dead_swipes_per_page_load)continue;this.Yi++}this._onCapture(t,{[d+"_last_mutation_timestamp"]:this.mn,[d+"_event_timestamp"]:t.timestamp,[d+"_scroll_timeout"]:i,[d+"_mutation_timeout"]:a,[d+"_absolute_timeout"]:o,[d+"_selection_changed_timeout"]:n,[d+"_visibility_changed_timeout"]:!1})}else this.gn.mutation_threshold_ms>t.absoluteDelayMs&&this.Ji.push(t)}this.tn()}}Qi(e,t){var r=vf(e);this.instance.capture(r,h({},t,uf(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.gn.element_attribute_ignorelist,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}).props,{[r+"_scroll_delay_ms"]:e.scrollDelayMs,[r+"_mutation_delay_ms"]:e.mutationDelayMs,[r+"_absolute_delay_ms"]:e.absoluteDelayMs,[r+"_selection_changed_delay_ms"]:e.selectionChangedDelayMs,[r+"_visibility_changed_delay_ms"]:e.visibilityChangedDelayMs,[r+"_focus_changed_delay_ms"]:e.focusChangedDelayMs,$dead_swipe_direction:e.swipeDirection,$dead_swipe_distance_px:e.swipeDistancePx}),{timestamp:new Date(e.timestamp)})}}s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new bf(e,t)}();
1
+ !function(){"use strict";var e="undefined"!=typeof window?window:void 0,t="undefined"!=typeof globalThis?globalThis:e,r=null==t?void 0:t.navigator,i=null==t?void 0:t.document,n=null==t?void 0:t.location;null!=t&&t.XMLHttpRequest&&new t.XMLHttpRequest;var a=null==r?void 0:r.userAgent,o="undefined"!=typeof globalThis?globalThis:e;o&&"undefined"==typeof self&&(o.self=o),o&&"undefined"==typeof File&&(o.File=function(){});var s=null!=e?e:{};function u(e,t,r,i,n,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(i,n)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(i,n){var a=e.apply(t,r);function o(e){u(a,i,n,o,s,"next",e)}function s(e){u(a,i,n,o,s,"throw",e)}o(void 0)}))}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},h.apply(null,arguments)}var c={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5,Plugin:6},d={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8,CanvasMutation:9,Font:10,Log:11,Drag:12,StyleDeclaration:13,Selection:14,AdoptedStyleSheet:15,CustomElement:16},v="min_length",f="max_length";function p(e,t){return-1!==e.indexOf(t)}var g=function(e){return e.trim()},m=Object.prototype,y=m.hasOwnProperty,b=m.toString,w=Array.isArray||function(e){return"[object Array]"===b.call(e)},k=e=>"function"==typeof e,_=e=>e===Object(e)&&!w(e),S=e=>void 0===e,x=e=>"[object String]"==b.call(e),C=e=>x(e)&&0===e.trim().length,M=e=>null===e,T=e=>S(e)||M(e),I=e=>"[object Number]"==b.call(e)&&e==e,R=e=>"[object Boolean]"===b.call(e),A=e=>e instanceof FormData;function E(e){return null===e||"object"!=typeof e}function L(e,t){return{}.toString.call(e)==="[object "+t+"]"}function O(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return P(e,Error)}}function D(e){return"undefined"!=typeof Event&&P(e,Event)}function P(e,t){try{return e instanceof t}catch(e){return!1}}function N(e,t,r,i,n){return t>r&&(i.warn("min cannot be greater than max."),t=r),I(e)?e>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):t>e?(i.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),N(n||r,t,r,i))}class F{constructor(e){this.C={},this.I=e.I,this.R=N(e.bucketSize,0,100,e.A),this.O=N(e.refillRate,0,this.R,e.A),this.N=N(e.refillInterval,0,864e5,e.A)}F(e,t){var r=Math.floor((t-e.lastAccess)/this.N);r>0&&(e.tokens=Math.min(e.tokens+r*this.O,this.R),e.lastAccess=e.lastAccess+r*this.N)}consumeRateLimit(e){var t,r=Date.now(),i=String(e),n=this.C[i];return n?this.F(n,r):this.C[i]=n={tokens:this.R,lastAccess:r},0===n.tokens||(n.tokens--,0===n.tokens&&(null==(t=this.I)||t.call(this,e)),0===n.tokens)}stop(){this.C={}}}var q="Mobile",j="Android",B="Tablet",H=j+" "+B,U="iPad",z="Apple Watch",W="BlackBerry",V="Nintendo",Z="PlayStation",G="Xbox",Q="Windows Phone",J="Nokia",Y="Ouya",K="Generic",X=K+" "+q.toLowerCase(),ee=K+" "+B.toLowerCase(),te=new RegExp(G,"i"),re=new RegExp(Z+" \\w+","i"),ie=new RegExp(V+" \\w+","i"),ne=new RegExp(W+"|PlayBook|BB10","i");function ae(e){return e?e.split("#")[0]:e}var oe,se,ue,le,he="NativeGzipValidationError",ce=e=>{throw function(e,t){var r=new Error(t);try{Object.defineProperty(r,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch(e){}return r}(he,"Native gzip produced invalid output: "+e)},de=function(){var e=l((function*(e,t){18>e.size&&ce("too-short");var r,i=new Uint8Array(yield e.slice(0,10).arrayBuffer());(2>(r=i).length||31!==r[0]||139!==r[1]||8!==i[2])&&ce("invalid-header");var n=new DataView(yield e.slice(e.size-8).arrayBuffer());n.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(oe)return oe;oe=[];for(var e=0;256>e;e++){for(var t=e,r=0;8>r;r++)t=1&t?3988292384^t>>>1:t>>>1;oe[e]=t>>>0}return oe})(),r=4294967295,i=0;e.length>i;i++)r=t[255&(r^e[i])]^r>>>8;return(4294967295^r)>>>0})(t)&&ce("invalid-crc");var a=t.length>>>0;n.getUint32(4,!0)!==a&&ce("invalid-size")}));return function(t,r){return e.apply(this,arguments)}}();function ve(){return ve=l((function*(e,t,r){void 0===t&&(t=!0);try{var i=(new TextEncoder).encode(e),n=new globalThis.CompressionStream("gzip"),a=n.writable.getWriter(),o=a.write(i).then((()=>a.close())).catch(function(){var e=l((function*(e){try{yield a.abort(e)}catch(e){}throw e}));return function(t){return e.apply(this,arguments)}}()),s=new Response(n.readable).blob(),u=(yield Promise.all([s,o]))[0];return yield de(u,i),u}catch(e){if(null!=r&&r.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})),ve.apply(this,arguments)}function fe(e,t){if(e){var r=e.find((e=>e.type===t));return null==r?void 0:r.value}}function pe(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return le&&r.length===ue||(ue=r.length,le=r.reduce(((r,i)=>{se||(se={});var n=se[i];if(n)r[n[0]]=n[1];else for(var a=e(i),o=a.length-1;o>=0;o--){var s=a[o],u=null==s?void 0:s.filename,l=t[i];if(u&&l){r[u]=l,se[i]=[u,l];break}}return r}),{})),le}}var ge="?";function me(e,t,r,i,n){var a={platform:e,filename:t,function:"<anonymous>"===r?ge:r,in_app:!(null!=t&&t.startsWith("webkit-masked-url://"))&&"<anonymous>"!==t};return S(i)||(a.lineno=i),S(n)||(a.colno=n),a}var ye=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return r||i?[-1!==e.indexOf("@")?e.split("@")[0]:ge,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},be=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,we=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ke=/\((\S*)(?::(\d+))(?::(\d+))\)/,_e=(e,t)=>{var r=be.exec(e);if(r)return me(t,r[1],ge,+r[2],+r[3]);var i=we.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var n=ke.exec(i[2]);n&&(i[2]=n[1],i[3]=n[2],i[4]=n[3])}var a=ye(i[1]||ge,i[2]);return me(t,a[1],a[0],i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},Se=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ce=(e,t)=>{var r=Se.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var i=xe.exec(r[3]);i&&(r[1]=r[1]||"eval",r[3]=i[1],r[4]=i[2],r[5]="")}var n=r[3],a=r[1]||ge,o=ye(a,n);return me(t,n=o[1],a=o[0],r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Me=/\(error: (.*)\)/;var Te=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var Ie=["fatal","error","warning","log","info","debug"];function Re(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var i=r.length;i>0;i--){var n=r.slice(0,i).join(", ");if(t>=n.length)return i===r.length?n:n.length>t?n.slice(0,t)+"...":n}return""}var Ae={DEBUG:!1,LIB_VERSION:"0.7.1",LIB_NAME:"browser-common"},Ee=function(t,r){var i=(void 0===r?{}:r).debugEnabled,n={q(r){if(e&&(Ae.DEBUG||e.POSTHOG_DEBUG||i)&&!S(e.console)&&e.console){for(var n=("__rrweb_original__"in e.console[r]?e.console[r].__rrweb_original__:e.console[r]),a=arguments.length,o=new Array(a>1?a-1:0),s=1;a>s;s++)o[s-1]=arguments[s];n(t,...o)}},debug(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.q("error",...t)},critical(){for(var e=arguments.length,r=new Array(e),i=0;e>i;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(e,r)=>Ee(t+" "+e,r)};return n},Le=Ee("[PostHog.js]"),Oe=Le.createLogger;function De(e,t){if(!T(e))if(w(e))e.forEach(t);else if(A(e))e.forEach(((e,r)=>t(e,r)));else for(var r in e)y.call(e,r)&&t(e[r],r)}function Pe(e){for(var t=Object.keys(e),r=t.length,i=new Array(r);r--;)i[r]=[t[r],e[t[r]]];return i}function Ne(e,t,r,i){var n=null!=i?i:{},a=n.capture,o=n.passive;null==e||e.addEventListener(t,r,{capture:void 0!==a&&a,passive:void 0===o||o})}var Fe=["localhost","127.0.0.1"],qe=e=>{var t=null==i?void 0:i.createElement("a");return S(t)?null:(t.href=e,t)},je=function(e,t){var r,i;void 0===t&&(t="&");var n=[];return De(e,(function(e,t){S(e)||S(t)||"undefined"===t||(r=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),i=encodeURIComponent(t),n[n.length]=i+"="+r)})),n.join(t)};function Be(t){var r,i=null==e||null==(r=e.location)?void 0:r.href;return S(i)?void 0:function(e,t){var r,i=null==e||null==(r=e.config)?void 0:r.get_current_url;if(!k(i))return t;try{var n=i(t);return x(n)&&n?n:t}catch(e){return Le.error("Error in get_current_url, falling back to window.location.href",e),t}}(t,i)}var He=1,$e=3,Ue=11;function ze(e){return!!e&&e.nodeType===He}function We(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Ve(e){return!!e&&e.nodeType===Ue&&ze(e.host)}var Ze=1e3;function Ge(e){return e?g(e).split(/\s+/):[]}function Qe(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Ge(t)}function Je(e){var t="";return rt(e)&&!it(e)&&e.childNodes&&e.childNodes.length&&De(e.childNodes,(function(e){var r;(function(e){return!!e&&e.nodeType===$e})(e)&&e.textContent&&(t+=null!==(r=function(e){return T(e)?null:g(e).split(/(\s+)/).filter((e=>ct(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==r?r:"")})),g(t)}var Ye=["a","button","form","input","select","textarea","label"];function Ke(e){var t=e.parentNode;return!(!t||!ze(t))&&t}var Xe=[".ph-no-deadclick",".ph-no-capture"];var et=e=>!e||We(e,"html")||!ze(e),tt=(t,r)=>{if(!e||et(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,n=[t],a=t;a.parentNode&&!We(a,"body");)if(Ve(a.parentNode))n.push(a.parentNode.host),a=a.parentNode.host;else{var o=Ke(a);if(!o)break;if(Ye.indexOf(o.tagName.toLowerCase())>-1)i=!0;else try{var s=e.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(i=!0)}catch(e){}n.push(o),a=o}return{parentIsUsefulElement:i,targetElementList:n}};function rt(e){for(var t=new Set,r=0,i=e;i.parentNode&&!We(i,"body");i=i.parentNode){if(r++>=Ze||t.has(i))return!1;t.add(i);var n=Qe(i);if(p(n,"ph-sensitive")||p(n,"ph-no-capture"))return!1}if(p(Qe(e),"ph-include"))return!0;var a=e.type||"";if(x(a))switch(a.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";return!x(o)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,""))}function it(e){return!!(We(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||We(e,"select")||We(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var nt=new RegExp("^(?:(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}))$"),at=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,ot=[16,15,14,13],st=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),ut=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),lt=/[0-9A-Za-z_]/;function ht(e){for(var t=0,r=!1,i=e.length-1;i>=0;i--){var n=e.charCodeAt(i)-48;r&&(n*=2)>9&&(n-=9),t+=n,r=!r}return t%10==0}function ct(e,t){if(void 0===t&&(t=!0),T(e))return!1;if(x(e)){e=g(e);var r=t?nt.test((e||"").replace(/[- ]/g,"")):function(e){var t;for(at.lastIndex=0;t=at.exec(e);){var r=t[2];if(r)for(var i=r.replace(/[- ]/g,""),n=0;i.length>n;n++)for(var a of ot){var o=n+a;if(i.length>=o){var s=i.slice(n,o);if(nt.test(s)&&ht(s))return!0}}}return!1}(e);if(r)return!1;var i=t?st.test(e):function(e){var t;for(ut.lastIndex=0;t=ut.exec(e);){var r=t[1],i=t[3];if(!(r&&i&&lt.test(r)&&lt.test(i)))return!0}return!1}(e);if(i)return!1}return!0}function dt(e){var t=Je(e);return ct(t=(t+" "+vt(e)).trim())?t:""}function vt(e){var t="";return e&&e.childNodes&&e.childNodes.length&&De(e.childNodes,(function(e){var r;if(e&&"span"===(null==(r=e.tagName)?void 0:r.toLowerCase()))try{var i=Je(e);t=(t+" "+i).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+vt(e)).trim())}catch(e){Le.error("[AutoCapture]",e)}})),t}function ft(e){return e.replace(/"|\\"/g,'\\"')}function pt(e){var t=e.attr__class;if(t)return w(t)?t:Ge(t)}var gt="[SessionRecording]",mt="redacted",yt=1e6;function bt(e){var t;return Math.min(yt,null!==(t=e.payloadSizeLimitBytes)&&void 0!==t?t:yt)}var wt={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:yt,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","google-analytics.com","analytics.google.com","nr-data.net","datadoghq.com","datadoghq.eu","ddog-gov.com","segment.io","rudderstack.com","amplitude.com","mixpanel.com","hotjar.com","hotjar.io","fullstory.com"],streamNetworkBody:!1},kt=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],_t=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],St=["auth","token","secret","session","api-key","apikey","api_key","credential","password","passwd","cookie","csrf","xsrf"],xt=e=>{T(e)||De(Object.keys(e),(t=>{(e=>{var t=e.toLowerCase();return kt.includes(t)||St.some((e=>t.includes(e)))})(t)&&(e[t]=mt)}))},Ct=["/s/","/e/","/i/"];function Mt(e,t,r,i){if(T(e))return e;var n=(null==t?void 0:t["content-length"])||function(e){return new Blob([e]).size}(e);return x(n)&&(n=parseInt(n)),n>r?gt+" "+i+" body too large to record ("+n+" bytes)":e}function Tt(e,t){if(T(e))return e;var r=e;return ct(r,!1)||(r=gt+" "+t+" body "+mt),De(_t,(e=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(e))&&(r=gt+" "+t+" body "+mt+" as might contain: "+e)})),r}var It=new WeakSet,Rt="$session_recording_remote_config",At="$replay_sample_rate",Et="$replay_override_sampling",Lt="$replay_override_linked_flag",Ot="$replay_override_url_trigger",Dt="$replay_override_event_trigger",Pt="$session_is_sampled",Nt="$session_past_minimum_duration",Ft="$session_recording_url_trigger_activated_session",qt="$session_recording_event_trigger_activated_session",jt="$posthog_sr_group_event_trigger_",Bt="$posthog_sr_group_url_trigger_",Ht="$posthog_sr_group_sampling_",$t="$debug_first_full_snapshot_timestamp",Ut="$sess_rec_flush_size",zt="$stored_person_properties",Wt="$surveys",Vt="$sdk_debug_replay_pending_trigger_conditions",Zt="$sdk_debug_replay_remote_trigger_matching_config",Gt="disabled",Qt="sampled",Jt="active",Yt="buffering",Kt="paused",Xt="rrweb_error",er="trigger",tr=er+"_activated",rr=er+"_pending",ir=er+"_"+Gt;function nr(e,t,r,i,n,a){return 0===t?ir:(null==e?void 0:e.get_property(r?i+r:n))===a?tr:rr}function ar(e,t,r){return t.some((t=>{var i;return"regex"===t.matching&&(null!==(i=null==r?void 0:r.get(t.url))&&void 0!==i?i:new RegExp(t.url)).test(e)}))}function or(e){return e.includes(tr)?tr:e.includes(rr)?rr:ir}function sr(e){var t=new Set(e);switch(t.delete(ir),t.size){case 0:return ir;case 1:return Array.from(t)[0];default:return rr}}class ur{constructor(e){this.j=e}triggerStatus(e){return or(this.j.map((t=>t.triggerStatus(e))))}triggerStatusNoSideEffects(e){return or(this.j.map((t=>t.triggerStatusNoSideEffects(e))))}stop(){this.j.forEach((e=>e.stop()))}}class lr{constructor(e){this.j=e}triggerStatus(e){return sr(this.j.map((t=>t.triggerStatus(e))))}triggerStatusNoSideEffects(e){return sr(this.j.map((t=>t.triggerStatusNoSideEffects(e))))}stop(){this.j.forEach((e=>e.stop()))}}class hr{triggerStatus(){return this.triggerStatusNoSideEffects()}triggerStatusNoSideEffects(){return tr}stop(){}}var cr=e=>"sessionRecording"in e;class dr{constructor(e,t){this.B=[],this.H=[],this.$=new Map,this.U=new Map,this.W="",this.urlBlocked=!1,this._instance=e,this.V=t}onConfig(e){var t,r;this.B=(cr(e)?_(e.sessionRecording)?null==(t=e.sessionRecording)?void 0:t.urlTriggers:[]:null==e?void 0:e.urlTriggers)||[],this.H=(cr(e)?_(e.sessionRecording)?null==(r=e.sessionRecording)?void 0:r.urlBlocklist:[]:null==e?void 0:e.urlBlocklist)||[],this.Z()}Z(){for(var e of(this.$.clear(),this.U.clear(),this.B))if("regex"===e.matching&&!this.$.has(e.url))try{this.$.set(e.url,new RegExp(e.url))}catch(t){Le.error("Invalid URL trigger regex pattern:",e.url,t)}for(var t of this.H)if("regex"===t.matching&&!this.U.has(t.url))try{this.U.set(t.url,new RegExp(t.url))}catch(e){Le.error("Invalid URL blocklist regex pattern:",t.url,e)}}onRemoteConfig(e){this.onConfig(e)}G(e){return nr(this._instance,this.B.length,this.V,Bt,Ft,e)}triggerStatus(e){var t=this.triggerStatusNoSideEffects(e);return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:t}),t}triggerStatusNoSideEffects(e){return this.G(e)}isCurrentUrlBlocked(){var e=Be(this._instance);if(!e)return!1;try{return ar(e,this.H,this.U)}catch(e){return!0}}checkUrlBlocklist(e,t){var r=Be(this._instance);if(r&&r!==this.W){this.W=r;var i=this.urlBlocked,n=ar(r,this.H,this.U);i&&n||(n&&!i?e():!n&&i&&t())}}checkUrlTriggerConditions(e,t,r,i){var n=Be(this._instance);if(n&&n!==this.W){this.W=n;var a=this.urlBlocked,o=ar(n,this.H,this.U);o&&!a?e():!o&&a&&t();var s=this.G(i)===tr,u=ar(n,this.B,this.$);!s&&u&&r("url",n)}}stop(){this.W=""}}class vr{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.J=()=>{},this._instance=e}triggerStatus(){var e=this.triggerStatusNoSideEffects();return this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}triggerStatusNoSideEffects(){var e=rr;return T(this.linkedFlag)&&(e=ir),this.linkedFlagSeen&&(e=tr),e}onConfig(e,t){var r;if(this.linkedFlag=(cr(e)?_(e.sessionRecording)?null==(r=e.sessionRecording)?void 0:r.linkedFlag:null:null==e?void 0:e.linkedFlag)||null,!T(this.linkedFlag)&&!this.linkedFlagSeen){var i=x(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=x(this.linkedFlag)?null:this.linkedFlag.variant;this.J=this._instance.onFeatureFlags(((e,r)=>{var a=!1;if(_(r)&&i in r){var o=r[i];a=R(o)?!0===o:n?o===n:!!o}var s=a&&!this.linkedFlagSeen;this.linkedFlagSeen=a,s&&t(i,n)}))}}onRemoteConfig(e,t){this.onConfig(e,t)}stop(){this.J()}}class fr{constructor(e,t){this.Y=[],this._instance=e,this.V=t}onConfig(e){var t;this.Y=(cr(e)?_(e.sessionRecording)?null==(t=e.sessionRecording)?void 0:t.eventTriggers:[]:null==e?void 0:e.eventTriggers)||[]}onRemoteConfig(e){this.onConfig(e)}K(e){return nr(this._instance,this.Y.length,this.V,jt,qt,e)}triggerStatus(e){var t=this.triggerStatusNoSideEffects(e);return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:t}),t}triggerStatusNoSideEffects(e){return this.K(e)}checkEventTriggerConditions(e,t,r){if(0!==this.Y.length){var i=this.K(r)===tr,n=this.Y.includes(e);!i&&n&&t("event",e)}}stop(){}}class pr{constructor(e,t,r){if(this._instance=e,this.group=t,this.X=new dr(e,t.id),this.ee=new fr(e,t.id),this.te=new vr(e),t.conditions.events&&t.conditions.events.length>0||t.conditions.urls&&t.conditions.urls.length>0||t.conditions.flag){var i=(t.conditions.events||[]).map((e=>e.name)),n={urlTriggers:t.conditions.urls||[],eventTriggers:i,linkedFlag:t.conditions.flag||null,urlBlocklist:[]};this.X.onConfig(n),this.ee.onConfig(n),this.te.onConfig(n,r);var a=[this.ee,this.X,this.te];this.re="any"===t.conditions.matchType?new ur(a):new lr(a)}else this.re=new hr}triggerStatus(e){return this.re.triggerStatus(e)}triggerStatusNoSideEffects(e){return this.re.triggerStatusNoSideEffects(e)}getPendingTriggerConditions(e){return this.triggerStatusNoSideEffects(e)!==rr?[]:[{label:"URL condition not matched",status:this.X.triggerStatusNoSideEffects(e)},{label:"event condition not matched",status:this.ee.triggerStatusNoSideEffects(e)},{label:"linked flag condition not matched",status:this.te.triggerStatusNoSideEffects()}].filter((e=>e.status===rr)).map((e=>e.label))}checkEventTriggerConditions(e,t,r){this.ee.checkEventTriggerConditions(e,t,r)}checkUrlTriggerConditions(e,t,r,i){this.X.checkUrlTriggerConditions(e,t,r,i)}activateTrigger(e,t){var r;null==(r=this._instance.persistence)||r.register({["url"===e?Bt+this.group.id:jt+this.group.id]:t})}stop(){this.X.stop(),this.ee.stop(),this.te.stop()}}function gr(e){if(e.rrwebError)return Xt;if(!e.receivedFlags)return Yt;if(!e.isRecordingEnabled)return Gt;if(e.urlTriggerMatching.urlBlocked)return Kt;var t=!0===e.isSampled,r=new ur([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId);return t?Qt:r===tr?Jt:r===rr?Yt:!1===e.isSampled?Gt:Jt}function mr(e){if(e.rrwebError)return Xt;if(!e.receivedFlags)return Yt;if(!e.isRecordingEnabled)return Gt;if(e.urlTriggerMatching.urlBlocked)return Kt;var t=new lr([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId),r=t!==ir,i=R(e.isSampled);return r&&t===rr?Yt:r&&t===ir||i&&!e.isSampled?Gt:!0===e.isSampled?Qt:Jt}function yr(){var e=[];return function(t,r){if(_(r)||w(r)){for(;e.length>0&&e[e.length-1]!==this;)e.pop();return e.includes(r)?"[Circular]":(e.push(r),r)}return r}}function br(e){var t=JSON.stringify(e,yr());return t?new Blob([t]).size:0}function wr(e){if(M(e))return 4;if(S(e))return 0;switch(typeof e){case"string":return e.length+2;case"number":return String(e).length;case"boolean":return e?4:5;case"object":if(w(e)){for(var t=2,r=0;e.length>r;r++){r>0&&(t+=1);var i=e[r];t+=S(i)||M(i)?4:wr(i)}return t}var n=e,a=2,o=!0;for(var s in n)if({}.hasOwnProperty.call(n,s)){var u=n[s];S(u)||(o||(a+=1),o=!1,a+=s.length+3+wr(u))}return a;default:return 0}}function kr(e,t){if(void 0===t&&(t=6606028.8),e.size>=t&&e.data.length>1){var r=Math.floor(e.data.length/2),i=e.sizes.slice(0,r),n=e.sizes.slice(r);return[kr({size:i.reduce(((e,t)=>e+t),0),data:e.data.slice(0,r),sizes:i,sessionId:e.sessionId,windowId:e.windowId}),kr({size:n.reduce(((e,t)=>e+t),0),data:e.data.slice(r),sizes:n,sessionId:e.sessionId,windowId:e.windowId})].flatMap((e=>e))}return[e]}var _r=Uint8Array,Sr=Uint16Array,xr=Uint32Array,Cr=new _r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Mr=new _r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Tr=new _r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ir=function(e,t){for(var r=new Sr(31),i=0;31>i;++i)r[i]=t+=1<<e[i-1];var n=new xr(r[30]);for(i=1;30>i;++i)for(var a=r[i];r[i+1]>a;++a)n[a]=a-r[i]<<5|i;return[r,n]},Rr=Ir(Cr,2),Ar=Rr[1];Rr[0][28]=258,Ar[258]=28;for(var Er=Ir(Mr,0)[1],Lr=new Sr(32768),Or=0;32768>Or;++Or){var Dr=(43690&Or)>>>1|(21845&Or)<<1;Lr[Or]=((65280&(Dr=(61680&(Dr=(52428&Dr)>>>2|(13107&Dr)<<2))>>>4|(3855&Dr)<<4))>>>8|(255&Dr)<<8)>>>1}var Pr=function(e,t,r){for(var i=e.length,n=0,a=new Sr(t);i>n;++n)++a[e[n]-1];var o,s=new Sr(t);for(n=0;t>n;++n)s[n]=s[n-1]+a[n-1]<<1;if(r){o=new Sr(1<<t);var u=15-t;for(n=0;i>n;++n)if(e[n])for(var l=n<<4|e[n],h=t-e[n],c=s[e[n]-1]++<<h,d=c|(1<<h)-1;d>=c;++c)o[Lr[c]>>>u]=l}else for(o=new Sr(i),n=0;i>n;++n)o[n]=Lr[s[e[n]-1]++]>>>15-e[n];return o},Nr=new _r(288);for(Or=0;144>Or;++Or)Nr[Or]=8;for(Or=144;256>Or;++Or)Nr[Or]=9;for(Or=256;280>Or;++Or)Nr[Or]=7;for(Or=280;288>Or;++Or)Nr[Or]=8;var Fr=new _r(32);for(Or=0;32>Or;++Or)Fr[Or]=5;var qr=Pr(Nr,9,0),jr=Pr(Fr,5,0),Br=function(e){return(e/8>>0)+(7&e&&1)},Hr=function(e,t,r){(null==r||r>e.length)&&(r=e.length);var i=new(e instanceof Sr?Sr:e instanceof xr?xr:_r)(r-t);return i.set(e.subarray(t,r)),i},$r=function(e,t,r){var i=t/8>>0;e[i]|=r<<=7&t,e[i+1]|=r>>>8},Ur=function(e,t,r){var i=t/8>>0;e[i]|=r<<=7&t,e[i+1]|=r>>>8,e[i+2]|=r>>>16},zr=function(e,t){for(var r=[],i=0;e.length>i;++i)e[i]&&r.push({s:i,f:e[i]});var n=r.length,a=r.slice();if(!n)return[new _r(0),0];if(1==n){var o=new _r(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var s=r[0],u=r[1],l=0,h=1,c=2;for(r[0]={s:-1,f:s.f+u.f,l:s,r:u};h!=n-1;)s=r[r[c].f>r[l].f?l++:c++],u=r[l!=h&&r[c].f>r[l].f?l++:c++],r[h++]={s:-1,f:s.f+u.f,l:s,r:u};var d=a[0].s;for(i=1;n>i;++i)a[i].s>d&&(d=a[i].s);var v=new Sr(d+1),f=Wr(r[h-1],v,0);if(f>t){i=0;var p=0,g=f-t,m=1<<g;for(a.sort((function(e,t){return v[t.s]-v[e.s]||e.f-t.f}));n>i;++i){var y=a[i].s;if(t>=v[y])break;p+=m-(1<<f-v[y]),v[y]=t}for(p>>>=g;p>0;){var b=a[i].s;t>v[b]?p-=1<<t-v[b]++-1:++i}for(;i>=0&&p;--i){var w=a[i].s;v[w]==t&&(--v[w],++p)}f=t}return[new _r(v),f]},Wr=function(e,t,r){return-1==e.s?Math.max(Wr(e.l,t,r+1),Wr(e.r,t,r+1)):t[e.s]=r},Vr=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Sr(++t),i=0,n=e[0],a=1,o=function(e){r[i++]=e},s=1;t>=s;++s)if(e[s]==n&&s!=t)++a;else{if(!n&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(n),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(n);a=1,n=e[s]}return[r.subarray(0,i),t]},Zr=function(e,t){for(var r=0,i=0;t.length>i;++i)r+=e[i]*t[i];return r},Gr=function(e,t,r){var i=r.length,n=Br(t+2);e[n]=255&i,e[n+1]=i>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var a=0;i>a;++a)e[n+a+4]=r[a];return 8*(n+4+i)},Qr=function(e,t,r,i,n,a,o,s,u,l,h){$r(t,h++,r),++n[256];for(var c=zr(n,15),d=c[0],v=c[1],f=zr(a,15),p=f[0],g=f[1],m=Vr(d),y=m[0],b=m[1],w=Vr(p),k=w[0],_=w[1],S=new Sr(19),x=0;y.length>x;++x)S[31&y[x]]++;for(x=0;k.length>x;++x)S[31&k[x]]++;for(var C=zr(S,7),M=C[0],T=C[1],I=19;I>4&&!M[Tr[I-1]];--I);var R,A,E,L,O=l+5<<3,D=Zr(n,Nr)+Zr(a,Fr)+o,P=Zr(n,d)+Zr(a,p)+o+14+3*I+Zr(S,M)+(2*S[16]+3*S[17]+7*S[18]);if(D>=O&&P>=O)return Gr(t,h,e.subarray(u,u+l));if($r(t,h,1+(D>P)),h+=2,D>P){R=Pr(d,v,0),A=d,E=Pr(p,g,0),L=p;var N=Pr(M,T,0);for($r(t,h,b-257),$r(t,h+5,_-1),$r(t,h+10,I-4),h+=14,x=0;I>x;++x)$r(t,h+3*x,M[Tr[x]]);h+=3*I;for(var F=[y,k],q=0;2>q;++q){var j=F[q];for(x=0;j.length>x;++x)$r(t,h,N[B=31&j[x]]),h+=M[B],B>15&&($r(t,h,j[x]>>>5&127),h+=j[x]>>>12)}}else R=qr,A=Nr,E=jr,L=Fr;for(x=0;s>x;++x)if(i[x]>255){var B;Ur(t,h,R[257+(B=i[x]>>>18&31)]),h+=A[B+257],B>7&&($r(t,h,i[x]>>>23&31),h+=Cr[B]);var H=31&i[x];Ur(t,h,E[H]),h+=L[H],H>3&&(Ur(t,h,i[x]>>>5&8191),h+=Mr[H])}else Ur(t,h,R[i[x]]),h+=A[i[x]];return Ur(t,h,R[256]),h+A[256]},Jr=new xr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Yr=function(){for(var e=new xr(256),t=0;256>t;++t){for(var r=t,i=9;--i;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e}(),Kr=function(){var e=4294967295;return{p(t){for(var r=e,i=0;t.length>i;++i)r=Yr[255&r^t[i]]^r>>>8;e=r},d:()=>4294967295^e}},Xr=function(e,t,r,i,n){return function(e,t,r,i,n,a){var o=e.length,s=new _r(i+o+5*(1+Math.floor(o/7e3))+n),u=s.subarray(i,s.length-n),l=0;if(!t||8>o)for(var h=0;o>=h;h+=65535){var c=h+65535;o>c?l=Gr(u,l,e.subarray(h,c)):(u[h]=true,l=Gr(u,l,e.subarray(h,o)))}else{for(var d=Jr[t-1],v=d>>>13,f=8191&d,p=(1<<r)-1,g=new Sr(32768),m=new Sr(p+1),y=Math.ceil(r/3),b=2*y,w=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&p},k=new xr(25e3),_=new Sr(288),S=new Sr(32),x=0,C=0,M=(h=0,0),T=0,I=0;o>h;++h){var R=w(h),A=32767&h,E=m[R];if(g[A]=E,m[R]=A,h>=T){var L=o-h;if((x>7e3||M>24576)&&L>423){l=Qr(e,u,0,k,_,S,C,M,I,h-I,l),M=x=C=0,I=h;for(var O=0;286>O;++O)_[O]=0;for(O=0;30>O;++O)S[O]=0}var D=2,P=0,N=f,F=A-E&32767;if(L>2&&R==w(h-F))for(var q=Math.min(v,L)-1,j=Math.min(32767,h),B=Math.min(258,L);j>=F&&--N&&A!=E;){if(e[h+D]==e[h+D-F]){for(var H=0;B>H&&e[h+H]==e[h+H-F];++H);if(H>D){if(D=H,P=F,H>q)break;var U=Math.min(F,H-2),z=0;for(O=0;U>O;++O){var W=h-F+O+32768&32767,V=W-g[W]+32768&32767;V>z&&(z=V,E=W)}}}F+=(A=E)-(E=g[A])+32768&32767}if(P){k[M++]=268435456|Ar[D]<<18|Er[P];var Z=31&Ar[D],G=31&Er[P];C+=Cr[Z]+Mr[G],++_[257+Z],++S[G],T=h+D,++x}else k[M++]=e[h],++_[e[h]]}}l=Qr(e,u,true,k,_,S,C,M,I,h-I,l)}return Hr(s,0,i+Br(l)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,i)},ei=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ti=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ei(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var i=0;r.length>=i;++i)e[i+10]=r.charCodeAt(i)}},ri=function(e){return 10+(e.filename&&e.filename.length+1||0)};function ii(e,t){for(var r="",i=0;e.length>i;){var n=e[i++];r+=String.fromCharCode(n)}return r}class ni{constructor(e,t){var r,i,n,a;void 0===t&&(t={}),this.ie={},this.ne=Date.now(),this.ae=-1/0,this.oe=()=>{var e=Date.now(),t=e-this.ne;t>0?(this.se=Math.min(this.ue,this.se+t/1e3*this.le),this.ne=e):this.ne=e},this.he=e=>{if(!this.ie[e]){var t,r;this.ie[e]=!0;var i=this.ce(e);null==(t=(r=this.de).onBlockedNode)||t.call(r,e,i)}},this.ve=e=>{var t=this.ce(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){var r=t.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[e,t]},this.ce=e=>this._rrweb.mirror.getNode(e),this.fe=e=>{var t,r,i,n,a,o,s,u;return(null!==(t=null==(r=e.removes)?void 0:r.length)&&void 0!==t?t:0)+(null!==(i=null==(n=e.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(a=null==(o=e.texts)?void 0:o.length)&&void 0!==a?a:0)+(null!==(s=null==(u=e.adds)?void 0:u.length)&&void 0!==s?s:0)},this.throttleMutations=e=>{if(3!==e.type||0!==e.data.source)return e;var t=e.data,r=this.fe(t);if(t.attributes){var i=t.attributes.length;t.attributes=t.attributes.filter((e=>{var t=this.ve(e.id);return!this.pe.consumeRateLimit(t[0])&&e}));var n,a,o=i-t.attributes.length;o>0&&(null==(n=(a=this.de).onDroppedAttributeMutations)||n.call(a,o))}var s=this.fe(t);if(0!==s||r===s){if(this.ge)return e;this.oe();var u,l,h=wr(e);return h>this.se?(null==(u=(l=this.de).onDroppedOversizedMutation)||u.call(l,h),void this.me()):(this.se-=h,e)}},this.me=()=>{if(!this.ye){var e=Math.max(0,this.be-(Date.now()-this.ae));this.ye=setTimeout((()=>{var e,t;this.ye=void 0,this.ae=Date.now(),null==(e=(t=this.de).requestFullSnapshot)||e.call(t)}),e)}},this._rrweb=e,this.de=t,this.pe=new F({bucketSize:null!==(r=this.de.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.de.refillRate)&&void 0!==i?i:10,refillInterval:1e3,I:this.he,A:Le}),this.ue=null!==(n=this.de.bytesBucketSize)&&void 0!==n?n:0,this.le=null!==(a=this.de.bytesRefillRate)&&void 0!==a?a:25600,this.ge=!Number.isFinite(this.ue)||0>=this.ue,this.se=this.ue;var o=this.de.resyncIntervalMs;this.be=I(o)&&Number.isFinite(o)&&o>0?o:3e5}reset(){this.ie={},this.ye&&(clearTimeout(this.ye),this.ye=void 0),this.ae=Date.now()}stop(){this.pe.stop(),this.reset(),this.se=this.ue,this.ne=Date.now(),this.ae=-1/0}}Ae.DEBUG=!1,Ae.LIB_VERSION="1.425.0",Ae.LIB_NAME="web";class ai{constructor(e){if(!e.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.we=e.get_property.bind(e),this.ke=e.persistence.set_property.bind(e.persistence)}trackSize(e,t){this.ke(Ut,{sessionId:e,size:this.currentTrackedSize(e)+t})}currentTrackedSize(e){var t,r=this.we(Ut);return _(t=r)&&x(t.sessionId)&&I(t.size)&&r.sessionId===e?r.size:0}}function oi(e,t){return function(e){for(var t=0,r=0;e.length>r;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Math.abs(t)}(e)%100<N(100*t,0,100,Le)}function si(e){return"$survey_response_"+e}function ui(e,t){if(!t)return null;var r=e[si(t)];return w(r)?[...r]:r}function li(e,t,r){void 0===e&&(e={});var i={};return t.questions.forEach((t=>{if(!S(t.originalQuestionIndex)){var r,n=0===(r=t.originalQuestionIndex)?"$survey_response":"$survey_response_"+r,a=ui(e,t.id);S(a)||(i[n]=a)}})),h({$survey_questions:t.questions.map((t=>{var i,n;return{id:t.id,question:null!==(i=null==r?void 0:r[null!==(n=t.id)&&void 0!==n?n:""])&&void 0!==i?i:t.question,response:ui(e,t.id)}}))},e,i)}function hi(e,t){var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r}function ci(e){return"string"==typeof e&&e.trim()?e.trim():null}function di(e){return e.toLowerCase()}function vi(e,t,r){if(!e||!t)return null;var i=di(t),n=Object.keys(e).find((e=>di(e)===i));if(n)return null==r||r.debug("Found exact translation match: "+n),n;if(i.includes("-")){var a=i.split("-")[0],o=Object.keys(e).find((e=>di(e)===a));if(o)return null==r||r.debug("Found base language translation match: "+o+" (from "+t+")"),o}return null}var fi=["thankYouMessageHeader","thankYouMessageDescription","thankYouMessageCloseButtonText","introScreenHeader","introScreenDescription","introScreenButtonText","submitButtonText","backButtonText"];function pi(e,t,r){var i,n=vi(e.translations,t,r),a=h({},e),o=!1;if(n){var s,u=null==(s=e.translations)?void 0:s[n];if(u)if(null==r||r.info("Applying survey-level translation for language: "+n),S(u.name)||(a.name=u.name,o=!0),a.appearance){var l=h({},a.appearance);for(var c of fi){var d=u[c];S(d)||(l[c]=d,o=!0)}a.appearance=l}else(function(e){return fi.some((t=>!S(e[t])))})(u)&&(o=!0)}var v=e.questions.map((e=>function(e,t,r){var i,n=vi(e.translations,t,r);if(!n)return{question:e,matchedKey:null,hasChanges:!1};var a=null==(i=e.translations)?void 0:i[n];if(!a)return{question:e,matchedKey:null,hasChanges:!1};var o=h({},e),s=!1;return S(a.question)||(o.question=a.question,s=!0),S(a.description)||(o.description=a.description,s=!0),S(a.buttonText)||(o.buttonText=a.buttonText,s=!0),"link"in o&&!S(a.link)&&(o.link=a.link,s=!0),"lowerBoundLabel"in o&&!S(a.lowerBoundLabel)&&(o.lowerBoundLabel=a.lowerBoundLabel,s=!0),"upperBoundLabel"in o&&!S(a.upperBoundLabel)&&(o.upperBoundLabel=a.upperBoundLabel,s=!0),"choices"in o&&function(e){return w(e.choices)}(a)&&(o.choices=a.choices,s=!0),{question:s?o:e,matchedKey:s?n:null,hasChanges:s}}(e,t,r))),f=v.map((e=>e.question)),p=v.some((e=>e.hasChanges)),g=null;return n||(g=(null==(i=v.find((e=>e.matchedKey)))?void 0:i.matchedKey)||null),p&&(a.questions=f,o=!0,null==r||r.info("Applied question-level translations for language: "+t)),{survey:a,matchedKey:o?n||g:null}}function gi(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}var mi=(e,t)=>{if(!(e=>{try{new RegExp(e)}catch(e){return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},yi=e=>e.toLowerCase(),bi={exact:(e,t)=>t.some((t=>e.some((e=>t===e)))),is_not:(e,t)=>t.every((t=>e.every((e=>t!==e)))),regex:(e,t)=>t.some((t=>e.some((e=>mi(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!mi(t,e))))),icontains:(e,t)=>t.map(yi).some((t=>e.map(yi).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(yi).every((t=>e.map(yi).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r<parseFloat(e)))}))},wi=new Set(["is_not","not_icontains","not_regex"]);function ki(e,t,r){return!e||0===e.length||e.every((e=>{var i="person"===e.type?r:t,n=null==i?void 0:i[e.key],a=e.operator||"exact";if(S(n)||M(n))return wi.has(a);var o=bi[a];return!!o&&!S(e.value)&&!M(e.value)&&o(w(e.value)?e.value.map(String):[String(e.value)],w(n)?n.map(String):[String(n)])}))}var _i=Oe("[SessionRecording]");function Si(e,t){return t?e:"!"+e}function xi(e,t){return e===t||e!=="!"+t&&null}class Ci{constructor(e,t,r,i,n,a,o){this._e=null,this.Se=mr,this._instance=e,this.X=t,this.ee=r,this.te=i,this.xe=n,this.Ce=a,this.Me=o}onRemoteConfig(e){this._e=I(e.sampleRate)?e.sampleRate:null,"any"===e.triggerMatchType?(this.Te=new ur([this.ee,this.X]),this.Se=gr):(this.Te=new lr([this.ee,this.X]),this.Se=mr),this._instance.register_for_session({[Zt]:e.triggerMatchType}),this.X.onConfig(e),this.ee.onConfig(e),this.te.onConfig(e,((e,t)=>{this.xe("linked_flag_matched",{flag:e,variant:t}),this.Me()}))}getStatus(e){return this.Se({receivedFlags:!0,isRecordingEnabled:!0,isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId})}getMinimumDuration(e){var t=this._instance.get_property("$session_recording_remote_config"),r=null==t?void 0:t.minimumDurationMilliseconds;return I(r)?r:null}checkUrlTriggers(e,t,r,i){this.X.checkUrlTriggerConditions(t,r,i,e)}setupEventTriggerListeners(e,t,r){if(0!==this.ee.Y.length&&T(this.Ie))return this.Ie=e((e=>{try{this.ee.checkEventTriggerConditions(e.event,r,t)}catch(e){_i.error("Could not activate event trigger",e)}})),this.Ie}makeSamplingDecisions(e){var t,r,i,n=this._e;if(!I(n))return null==(r=this._instance.persistence)||r.unregister(Pt),void(null==(i=this._instance.persistence)||i.unregister(At));var a=this._instance.get_property(Pt),o=this._instance.get_property(At),s=xi(a,e),u=I(o)&&o!==n,l=S(o)&&a===e,h=u||l||!R(s),c=h?oi(e,n):s;h&&(c?this.xe("sampled"):_i.warn("Sample rate ("+n+") has determined that this sessionId ("+e+") will not be sent to the server.")),null==(t=this._instance.persistence)||t.register({[Pt]:Si(e,c),[At]:M(o)&&a===e?null:n})}ensureSamplingDecision(e){if(I(this._e)){var t=this._instance.get_property(Pt);R(xi(t,e))||this.makeSamplingDecisions(e)}}onFlushComplete(){}clearConditionalRecordingPersistence(){var e,t,r,i,n;null==(e=this._instance.persistence)||e.unregister(qt),null==(t=this._instance.persistence)||t.unregister(Ft),null==(r=this._instance.persistence)||r.unregister(Pt),null==(i=this._instance.persistence)||i.unregister(At),null==(n=this._instance.persistence)||n.unregister(Nt)}updateActiveTriggers(e){}hasPendingTriggers(e){var t;return(null==(t=this.Te)?void 0:t.triggerStatus(e))===rr}getPendingTriggerConditions(e){return[{label:"URL condition not matched",status:this.X.triggerStatusNoSideEffects(e)},{label:"event condition not matched",status:this.ee.triggerStatusNoSideEffects(e)},{label:"linked flag condition not matched",status:this.te.triggerStatusNoSideEffects()}].filter((e=>e.status===rr)).map((e=>e.label))}stop(){var e;null==(e=this.Ie)||e.call(this),this.Ie=void 0,this.ee.stop(),this.X.stop(),this.te.stop()}}class Mi{constructor(e,t,r,i,n){this.Re=[],this.Ae=new Map,this.Ee=!1,this._instance=e,this.X=t,this.xe=r,this.Le=i,this.Me=n}onRemoteConfig(e){e.triggerGroups&&0!==e.triggerGroups.length?(this.Oe(e.triggerGroups),this._instance.register_for_session({[Zt]:"v2_trigger_groups",$sdk_debug_replay_trigger_groups_count:e.triggerGroups.length}),this.X.onConfig(e)):_i.warn("[V2Strategy] No trigger groups configured")}getStatus(e){return function(e){if(e.rrwebError)return Xt;if(e.urlTriggerMatching.urlBlocked)return Kt;var t=e.triggerGroupMatchers,r=e.triggerGroupSamplingResults;if(0===t.length)return Gt;var i=!1,n=!1;for(var a of t){var o=a.triggerStatus(e.sessionId);if(o===tr){var s=a.group.id,u=r.get(s);S(u)?Le.warn("[V2 Triggers] Group activated but no sampling decision found",{groupId:s}):!0===u&&(n=!0)}else o===rr&&(i=!0)}return n?Qt:i?Yt:Gt}({isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId,triggerGroupMatchers:this.Re,triggerGroupSamplingResults:this.Ae,minimumDuration:this.getMinimumDuration(e.sessionId)})}getMinimumDuration(e){var t=null;for(var r of this.Re)if("trigger_activated"===r.triggerStatus(e)){var i=r.group.minDurationMs;I(i)&&(M(t)||t>i)&&(t=i)}return t}checkUrlTriggers(e,t,r,i){var n=this;this.X.checkUrlBlocklist(t,r);var a=function(i){i.checkUrlTriggerConditions(t,r,(t=>{n.De(i,void 0)&&(i.activateTrigger(t,e),n.updateActiveTriggers(e),n.Me(t))}),e)};for(var o of this.Re)a(o)}setupEventTriggerListeners(e,t,r){var i=this;return this.Ie=e((e=>{var r;if(this.Ee)return _i.info("[SessionRecorder] Stopping trigger checks - initial buffer flushed"),null==(r=this.Ie)||r.call(this),void(this.Ie=void 0);try{var n=function(r){r.checkEventTriggerConditions(e.event,(n=>{if(i.De(r,e.properties)){var a=(r.group.conditions.events||[]).filter((t=>t.name===e.event)),o=i._instance.get_property(zt),s=a.some((t=>!t.properties||0===t.properties.length||ki(t.properties,e.properties,o)));s&&(r.activateTrigger(n,t),i.updateActiveTriggers(t),i.Me(n))}}),t)};for(var a of this.Re)n(a)}catch(e){_i.error("Could not activate event trigger for trigger groups",e)}})),this.Ie}makeSamplingDecisions(e){for(var t of this.Re){var r,i=t.group,n=i.id,a=i.sampleRate,o=Ht+n,s=this._instance.get_property(o),u=null,l=!1,h=!1,c=!1;if(_(s)){var d=s.sessionId,v=s.sampleRate,f=s.sampled;l="string"==typeof d&&d!==e,h=I(v)&&v!==a,u=d===e&&I(v)&&v===a&&R(f)?f:null}else u=s===e||null,l="string"==typeof s&&s!==e,c=s===e;var p=l||h||c||!R(u),g=p?oi(e+n,a):u;p&&this.Le("triggerGroupSamplingDecisionMade",{group_id:n,group_name:i.name,sampleRate:a,isSampled:g}),this.Ae.set(n,g),null==(r=this._instance.persistence)||r.register({[o]:{sessionId:e,sampleRate:a,sampled:g}})}this.updateActiveTriggers(e)}ensureSamplingDecision(e){}onFlushComplete(){this.Ee=!0}clearConditionalRecordingPersistence(){var e,t,r;for(var i of(null==(e=this._instance.persistence)||e.unregister(Pt),null==(t=this._instance.persistence)||t.unregister(At),null==(r=this._instance.persistence)||r.unregister(Nt),this.Re)){var n,a,o,s=i.group.id;null==(n=this._instance.persistence)||n.unregister(jt+s),null==(a=this._instance.persistence)||a.unregister(Bt+s),null==(o=this._instance.persistence)||o.unregister(Ht+s)}}updateActiveTriggers(e){var t=[];for(var r of this.Re){var i=r.group,n=i.id,a="trigger_activated"===r.triggerStatus(e),o=!0===this.Ae.get(n);a&&t.push({id:n,name:i.name,matched:!0,sampled:o})}this._instance.register_for_session({$sdk_debug_replay_matched_recording_trigger_groups:t})}hasPendingTriggers(e){for(var t of this.Re)if(t.triggerStatus(e)===rr)return!0;return!1}getPendingTriggerConditions(e){return this.Re.flatMap((t=>t.triggerStatusNoSideEffects(e)!==rr?[]:t.getPendingTriggerConditions(e).map((e=>'trigger group "'+t.group.name+'": '+e))))}stop(){var e;null==(e=this.Ie)||e.call(this),this.Ie=void 0,this.Re.forEach((e=>e.stop())),this.Re=[],this.Ae.clear(),this.X.stop()}De(e,t){var r=e.group.conditions.properties;return!r||0===r.length||ki(r,t,this._instance.get_property(zt))}Oe(e){var t=this;this.Re.forEach((e=>e.stop())),this.Re=[],this.Ae.clear();var r=function(e){var r=new pr(t._instance,e,((r,i)=>{t.xe("linked_flag_matched",{flag:r,variant:i,group_id:e.id,group_name:e.name}),t.Me()}));t.Re.push(r)};for(var i of e)r(i)}}var Ti=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ii=1e5,Ri="https://schema.org",Ai=[],Ei="actionStatus availability bestRating contentRating encodingFormat eventAttendanceMode eventStatus highPrice inLanguage isAccessibleForFree isFamilyFriendly itemCondition itemListOrder lowPrice maximumAttendeeCapacity nonprofitStatus numberOfItems offerCount position price priceCurrency priceValidUntil publicAccess ratingCount ratingValue reviewCount smokingAllowed worstRating".split(" "),Li="Action BorrowAction ReadAction SearchAction SeekToAction SolveMathAction WatchAction".split(" "),Oi="AutoDealer Bakery BarOrPub CafeOrCoffeeShop CollegeOrUniversity Corporation DaySpa Dentist EducationalOrganization Electrician FoodEstablishment GovernmentOrganization HealthClub Hotel LegalService Library LibrarySystem LocalBusiness Locksmith LodgingBusiness MedicalBusiness NGO OnlineStore Organization PerformingGroup Pharmacy Physician Plumber RealEstateAgent Restaurant School SportsOrganization Store".split(" "),Di="Accommodation AdministrativeArea Country Place State".split(" "),Pi={AggregateOffer:{offers:["Offer"]},Brand:{name:!0},BreadcrumbList:{itemListElement:["ListItem"]},CreativeWork:{genre:!0,dateCreated:!0,dateModified:!0,datePublished:!0,expires:!0,learningResourceType:!0,educationalLevel:!0,educationalUse:!0,interactivityType:!0,aggregateRating:["AggregateRating"],potentialAction:Li,publisher:Oi},Event:{startDate:!0,endDate:!0,previousStartDate:!0,aggregateRating:["AggregateRating"],offers:["AggregateOffer","Offer"]},ItemList:{itemListElement:["ListItem"]},ListItem:{item:Ai},Offer:{seller:Oi},Organization:{name:!0,legalName:!0,foundingDate:!0,dissolutionDate:!0,aggregateRating:["AggregateRating"],brand:["Brand"]},Person:{},Place:{aggregateRating:["AggregateRating"]},Product:{name:!0,sku:!0,mpn:!0,gtin:!0,gtin8:!0,gtin12:!0,gtin13:!0,gtin14:!0,productID:!0,productGroupID:!0,asin:!0,model:!0,category:!0,color:!0,material:!0,pattern:!0,size:!0,productionDate:!0,releaseDate:!0,brand:["Brand","Organization"],manufacturer:Oi,offers:["Offer","AggregateOffer"],aggregateRating:["AggregateRating"]},Service:{name:!0,serviceType:!0,category:!0,provider:Oi,areaServed:Di,offers:["AggregateOffer","Offer"],aggregateRating:["AggregateRating"]},OfferCatalog:{name:!0,itemListElement:Ai}},Ni={},Fi=[[Li,Ni],["3DModel AboutPage Answer Article AudioObject Blog BlogPosting Book Clip CollectionPage Comment ContactPage Course CreativeWorkSeason CreativeWorkSeries DataCatalog DataDownload DataFeed Dataset DiscussionForumPosting Episode FAQPage Game HowTo HowToDirection HowToSection HowToStep HowToTip ImageObject LearningResource MediaObject Message MobileApplication Movie MusicPlaylist MusicRecording NewsArticle Photograph PodcastEpisode PodcastSeries ProfilePage QAPage Question Quiz Recipe Review ScholarlyArticle SearchResultsPage SiteNavigationElement SocialMediaPosting SoftwareApplication TVEpisode TVSeries TechArticle VacationRental VideoGame VideoObject WebApplication WebPage WebPageElement WebSite".split(" "),Pi.CreativeWork],["BroadcastEvent BusinessEvent EducationEvent Festival MusicEvent SportsEvent TheaterEvent".split(" "),Pi.Event],[Oi,Pi.Organization],[Di,Pi.Place],["Car IndividualProduct ProductGroup ProductModel".split(" "),Pi.Product],["AggregateRating EmployerAggregateRating Rating".split(" "),Ni]],qi="AlignmentObject BedDetails Certification ContactPoint CreditCard DefinedRegion EducationalOccupationalCredential EntryPoint GeoCoordinates GeoShape InteractionCounter JobPosting LocationFeatureSpecification MathSolver MemberProgram MemberProgramTier MerchantReturnPolicy MerchantReturnPolicySeasonalOverride MonetaryAmount NutritionInformation OccupationalExperienceRequirements OfferShippingDetails OpeningHoursSpecification PeopleAudience PostalAddress PriceSpecification PropertyValue QuantitativeValue ServicePeriod ShippingConditions ShippingDeliveryTime ShippingRateSettings ShippingService SpeakableSpecification Thing UnitPriceSpecification".split(" ");function ji(e,t){return y.call(e,t)?e[t]:void 0}function Bi(e){var t=typeof e;return M(e)||"string"===t||"number"===t||"boolean"===t}function Hi(e){return Bi(e)||w(e)&&e.every(Bi)?e:void 0}function $i(e){if(y.call(Pi,e))return Pi[e];for(var t of Fi){var r=t[1];if(t[0].includes(e))return r}return qi.includes(e)?Ni:void 0}function Ui(e,t){if(!_(e))return null;var r=ji(e,"@type"),i=function(e){return("string"==typeof e?[e]:w(e)?e:[]).filter((e=>"string"==typeof e)).map((e=>e.replace(/^https?:\/\/schema\.org\//,""))).filter((e=>!!$i(e)))}(r).filter((e=>!t||!t.length||t.includes(e)));if(!i.length)return null;var n={"@type":"string"==typeof r?i[0]:i},a=Hi(ji(e,"@id"));for(var o of(S(a)||(n["@id"]=a),Ei)){var s=Hi(ji(e,o));S(s)||(n[o]=s)}for(var u of i){var l=$i(u),h=function(){var t=ji(e,c),r=l[c];if(!0===r){var i=Hi(t);S(i)||(n[c]=i)}else if(w(t)){var a=t.map((e=>Ui(e,r))).filter(_);a.length&&(n[c]=a)}else{var o=Ui(t,r);o&&(n[c]=o)}};for(var c of Object.keys(l))h()}return n}function zi(e){if(!_(e))return null;var t=ji(e,"@context");if("string"!=typeof t||!/^https?:\/\/schema\.org\/?$/.test(t))return null;var r=Ui(e);if(r)return h({"@context":Ri},r);var i=ji(e,"@graph");if(!w(i))return null;var n=i.map((e=>Ui(e))).filter(_);return n.length?{"@context":Ri,"@graph":n}:null}function Wi(e){var t;return"SCRIPT"===e.nodeName&&"application/ld+json"===(null==(t=e.getAttribute("type"))?void 0:t.trim().toLowerCase())}function Vi(e,t,r){if("string"==typeof t?e.classList.contains(t):t&&Array.from(e.classList).some((e=>(t.lastIndex=0,t.test(e)))))return!0;try{return!!r&&e.matches(r)}catch(e){return!1}}function Zi(e){return Wi(e)?[e]:e.nodeType!==e.ELEMENT_NODE?[]:Array.from(e.querySelectorAll("script")).filter(Wi)}function Gi(e){return S(e)?void 0:Math.round(e)}function Qi(e){return _(e)?e.network_timing:e}var Ji,Yi,Ki=943718.4,Xi="[SessionRecording]",en=Oe(Xi),tn=[d.MouseMove,d.MouseInteraction,d.Scroll,d.ViewportResize,d.Input,d.TouchMove,d.MediaInteraction,d.Drag],rn=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function nn(){var e;return null==s||null==(e=s.__PosthogExtensions__)?void 0:e.rrweb}function an(){var e;return null==(e=nn())?void 0:e.record}function on(e){try{return JSON.stringify(e)}catch(t){return JSON.stringify(e,yr())}}function sn(e){return ii(function(e,t){void 0===t&&(t={});var r=Kr(),i=e.length;r.p(e);var n=Xr(e,t,ri(t),8),a=n.length;return ti(n,t),ei(n,a-8,r.d()),ei(n,a-4,i),n}(function(e,t){var r=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new _r(e.length+(e.length>>>1)),n=0,a=function(e){i[n++]=e},o=0;r>o;++o){if(n+5>i.length){var s=new _r(n+8+(r-o<<1));s.set(i),i=s}var u=e.charCodeAt(o);128>u?a(u):2048>u?(a(192|u>>>6),a(128|63&u)):u>55295&&57344>u?(a(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++o))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return Hr(i,0,n)}(on(e))))}function un(e){return ln.apply(this,arguments)}function ln(){return ln=l((function*(e){var t=on(e),r=yield function(e,t,r){return ve.apply(this,arguments)}(t,Ae.DEBUG,{rethrow:!0});return ii(new Uint8Array(yield r.arrayBuffer()))})),ln.apply(this,arguments)}var hn="undefined"!=typeof globalThis&&"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&"function"==typeof Response.prototype.blob,cn=!1;function dn(e){return w(e)&&0===e.length?Ji=null!=Ji?Ji:sn([]):sn(e)}function vn(e){return fn.apply(this,arguments)}function fn(){return(fn=l((function*(e){return w(e)&&0===e.length?Ji||(Yi=null!=Yi?Yi:un([]).then((e=>(Ji=e,e))).catch((e=>{throw Ji=void 0,Yi=void 0,e}))):un(e)}))).apply(this,arguments)}function pn(e){return hn&&!cn&&function(e){return e.type===c.FullSnapshot||e.type===c.IncrementalSnapshot&&(e.data.source===d.Mutation||e.data.source===d.StyleSheetRule)}(e)}function gn(e){return{event:e,size:wr(e)}}function mn(e,t){return h({},e,{data:t,cv:"2024-10"})}function yn(e,t){return h({},e,{cv:"2024-10",data:h({},e.data,t)})}function bn(e){try{if(e.type===c.FullSnapshot)return gn(mn(e,sn(e.data)));if(e.type===c.IncrementalSnapshot&&e.data.source===d.Mutation)return gn(yn(e,{texts:dn(e.data.texts),attributes:dn(e.data.attributes),removes:dn(e.data.removes),adds:dn(e.data.adds)}));if(e.type===c.IncrementalSnapshot&&e.data.source===d.StyleSheetRule)return gn(yn(e,{adds:e.data.adds?sn(e.data.adds):void 0,removes:e.data.removes?sn(e.data.removes):void 0}))}catch(e){en.error("could not compress event - will use uncompressed event",e)}return{event:e,size:br(e)}}function wn(){return wn=l((function*(e){try{if(e.type===c.FullSnapshot)return gn(mn(e,yield un(e.data)));if(e.type===c.IncrementalSnapshot&&e.data.source===d.Mutation){var t=yield Promise.all([vn(e.data.texts),vn(e.data.attributes),vn(e.data.removes),vn(e.data.adds)]);return gn(yn(e,{texts:t[0],attributes:t[1],removes:t[2],adds:t[3]}))}if(e.type===c.IncrementalSnapshot&&e.data.source===d.StyleSheetRule){var r=yield Promise.all([e.data.adds?un(e.data.adds):void 0,e.data.removes?un(e.data.removes):void 0]);return gn(yn(e,{adds:r[0],removes:r[1]}))}}catch(t){return(e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return(e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""))(e)||t===he})(t)&&(cn=!0),en.error("could not compress event asynchronously - trying synchronous compression",t),bn(e)}return{event:e,size:br(e)}})),wn.apply(this,arguments)}function kn(e,t){return e.type===c.Custom&&e.data.tag===t}function _n(e){return kn(e,"sessionIdle")}function Sn(e){return kn(e,"$session_ending")}function xn(e){return kn(e,"$session_starting")}class Cn{get sessionId(){return this.Pe}get Ne(){if(!this._instance.sessionManager)throw new Error(Xi+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Fe(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get qe(){return xi(this._instance.get_property(Pt),this.sessionId)}get _e(){var e,t=null==(e=this.je)?void 0:e.sampleRate;return I(t)?t:null}get Be(){var e,t;return null!==(e=null==(t=this.He)?void 0:t.getMinimumDuration(this.sessionId))&&void 0!==e?e:null}constructor(e,t){this.$e="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.Ue=void 0,this.ze=!1,this.We=Date.now(),this.Ve=!1,this.Ze=[],this.Ge="unknown",this.Qe=0,this.Je=0,this.Ye=0,this.Ke=0,this.Xe=!1,this.et=!1,this.tt=!1,this.rt=!1,this.it=!1,this.nt=!1,this.ot=!1,this.st=!1,this.ut=!1,this.ht=!1,this.ct=!1,this.dt=!1,this.vt=[],this.ft=void 0,this.yt=void 0,this.bt=[],this.wt=0,this.kt=0,this._t=!1,this.St=void 0,this.Ie=void 0,this.xt=void 0,this.Ct=void 0,this.Mt=void 0,this.Tt=(e,t,r)=>{var i,n,a;if(r&&(e!==this.Pe||t!==this.It)){var o,s=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),u=this.Pe,l=this.It;if(s&&this.Le("$session_ending",{currentSessionId:u,currentWindowId:l,nextSessionId:e,nextWindowId:t,changeReason:r,lastActivityTimestamp:this.We,flushed_size:null==(o=this.Rt)?void 0:o.currentTrackedSize(u)}),null==(i=this._instance.persistence)||i.unregister($t),this.ot=!1,null==(n=nn())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.Le("$session_id_change",{sessionId:e,windowId:t,changeReason:r}),this.At(),!(!1===this.Ge&&this.isStarted||this.Pe===e&&this.It===t)){var h=this.Pe!==e&&!1!==this.Ge;this.Ge="unknown",this.Et(h)}s&&this.Le("$session_starting",{previousSessionId:u,previousWindowId:l,nextSessionId:e,nextWindowId:t,changeReason:r,lastActivityTimestamp:this.We}),null==(a=this.He)||a.makeSamplingDecisions(e)}},this.Lt=()=>{var e;return(null==(e=this._instance.persistence)?void 0:e.props[Nt])===this.Pe},this.Ot=()=>{var e,t;if(0===this.Dt.data.length)return null;var r=null==(e=this.Dt.data[0])?void 0:e.timestamp,i=null==(t=this.Dt.data[this.Dt.data.length-1])?void 0:t.timestamp;return I(r)&&I(i)?i-r:null},this.Pt=()=>{var e,t,r=this.Be;if(!I(r))return!1;if(null===(e=null==(t=this._instance.config.session_recording)?void 0:t.strictMinimumDuration)||void 0===e||!e){var i=this.Nt;return I(i)&&i>=0&&r>i}if(this.Lt())return!1;var n,a=this.Ot();return!!M(a)||r>a||(null==(n=this._instance.persistence)||n.register({[Nt]:this.Pe}),!1)},this.Ft=()=>{this.status!==Yt?(this.Xe&&this.et&&this.qt&&!this.tt&&(this.Xe=!1),this.jt(),this.Bt()):this.Ht()},this.$t=()=>{this.Ft()},this.Ut=()=>{this.Le("browser offline",{})},this.zt=()=>{this.Le("browser online",{})},this.Wt=()=>{null!=i&&i.visibilityState&&("visible"===i.visibilityState&&(this.qt=!0),this.Le("window "+i.visibilityState,{}))},this._instance=e,this.qt=null==t||t;var r=this.Ne.checkAndGetSessionAndWindowId(),n=r.windowId;this.Pe=r.sessionId,this.It=n,this.te=new vr(this._instance),this.X=new dr(this._instance),this.ee=new fr(this._instance),this.Dt=this.Ht(),this.Ne.sessionTimeoutMs>this.Fe||en.warn("session_idle_threshold_ms ("+this.Fe+") is greater than the session timeout ("+this.Ne.sessionTimeoutMs+"). Session will never be detected as idle"),this.Rt=new ai(this._instance)}setDocumentWasEverVisible(e){e&&(this.qt=!0)}get Vt(){var e,t,r,i,n,a,o,s,u,l=null==(e=this.je)?void 0:e.masking,h={maskAllInputs:null==(t=this._instance.config.session_recording)?void 0:t.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector,maskAllElementAttributes:null==(n=this._instance.config.session_recording)?void 0:n.maskAllElementAttributes},c=null!==(a=null==h?void 0:h.maskAllInputs)&&void 0!==a?a:null==l?void 0:l.maskAllInputs,d=null!==(o=null==h?void 0:h.maskTextSelector)&&void 0!==o?o:null==l?void 0:l.maskTextSelector,v=null!==(s=null==h?void 0:h.blockSelector)&&void 0!==s?s:null==l?void 0:l.blockSelector,f=null!==(u=null==h?void 0:h.maskAllElementAttributes)&&void 0!==u?u:null==l?void 0:l.maskAllElementAttributes;return S(c)&&S(d)&&S(v)&&S(f)?void 0:{maskAllInputs:null==c||c,maskTextSelector:d,blockSelector:v,maskAllElementAttributes:f}}Zt(){var e;if(!this.ut){var t=null==(e=this.je)?void 0:e.masking;if(!T(t)){var r=this._instance.config.session_recording,i=["maskAllInputs","maskTextSelector","blockSelector","maskAllElementAttributes"].filter((e=>{var i=null==r?void 0:r[e],n=t[e];return!S(i)&&i!==n}));0!==i.length&&(this.ut=!0,en.warn('Session recording masking is configured both in `posthog.init` and in your project settings, and they differ. The `session_recording` options in `posthog.init` take precedence, so the project ("Privacy and masking") setting is ignored for: '+i.join(", ")+". Remove these masking options from `posthog.init` to use the project setting instead. See https://posthog.com/docs/session-replay/privacy",{client:{maskAllInputs:null==r?void 0:r.maskAllInputs,maskTextSelector:null==r?void 0:r.maskTextSelector,blockSelector:null==r?void 0:r.blockSelector,maskAllElementAttributes:null==r?void 0:r.maskAllElementAttributes},project:t}))}}}get Gt(){var e;return N(null==(e=this._instance.config.session_recording.canvasCapture)?void 0:e.resolutionScale,.1,1,Oe("canvas recording resolution scale"),1)}get Qt(){var e,t,r,i,n,a,o,s=this._instance.config.session_recording.captureCanvas,u=null==(e=this.je)?void 0:e.canvasRecording,l=null!==(t=null!==(r=null==s?void 0:s.recordCanvas)&&void 0!==r?r:null==u?void 0:u.enabled)&&void 0!==t&&t,h=null!==(i=null!==(n=null==s?void 0:s.canvasFps)&&void 0!==n?n:null==u?void 0:u.fps)&&void 0!==i?i:4,c=null!==(a=null!==(o=null==s?void 0:s.canvasQuality)&&void 0!==o?o:null==u?void 0:u.quality)&&void 0!==a?a:.4;if("string"==typeof c){var d=parseFloat(c);c=isNaN(d)?.4:d}return{enabled:l,fps:N(h,0,12,Oe("canvas recording fps"),4),quality:N(c,0,1,Oe("canvas recording quality"),.4)}}get Jt(){var e,t=!(null==(e=this.je)||!e.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:t}get Yt(){var e,t,r,i=null==(e=this.je)?void 0:e.networkPayloadCapture,n={recordHeaders:null==(t=this._instance.config.session_recording)?void 0:t.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},a=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),o=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),s=Qi(this._instance.config.capture_performance),u=Qi(null==i?void 0:i.capturePerformance),l=!!(R(s)?s:u);return a||o||l?{recordHeaders:a,recordBody:o,recordPerformance:l}:void 0}Kt(){var e,t,r=[],i=null==(e=s.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordConsolePlugin;i&&this.Jt&&r.push(i());var a=null==(t=s.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordNetworkPlugin;if(this.Yt&&k(a))if(!Fe.includes(n.hostname)||this._forceAllowLocalhostNetworkCapture){var o=k(this._instance.requestRouter.isIngestionEndpoint)?this._instance.requestRouter.isIngestionEndpoint.bind(this._instance.requestRouter):void 0;r.push(a(((e,t,r)=>{var i,n={payloadSizeLimitBytes:wt.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...wt.performanceEntryTypeToObserve],payloadHostDenyList:[...t.payloadHostDenyList||[],...wt.payloadHostDenyList]},a=!1!==e.session_recording.recordHeaders&&t.recordHeaders,o=!1!==e.session_recording.recordBody&&t.recordBody,s=!1!==e.capture_performance&&t.recordPerformance,u=(i=bt(n),e=>(null!=e&&e.requestBody&&(e.requestBody=Mt(e.requestBody,e.requestHeaders,i,"Request")),null!=e&&e.responseBody&&(e.responseBody=Mt(e.responseBody,e.responseHeaders,i,"Response")),e)),l=t=>{return u(((e,t,r)=>{var i;if(null==r||!r(e.name)){var n=qe(e.name),a=0===t.indexOf("http")?null==(i=qe(t))?void 0:i.pathname:t;"/"===a&&(a="");var o=null==n?void 0:n.pathname.replace(a||"","");if(!(n&&o&&Ct.some((e=>0===o.indexOf(e)))))return e}})((xt((i=t).requestHeaders),xt(i.responseHeaders),i),e.api_host,r));var i},c=k(e.session_recording.maskNetworkRequestFn);return c&&k(e.session_recording.maskCapturedNetworkRequestFn)&&Le.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),c&&(e.session_recording.maskCapturedNetworkRequestFn=t=>{var r=e.session_recording.maskNetworkRequestFn({url:t.name});return!r&&t.isInitial?r:h({},t,{name:null==r?void 0:r.url})}),n.maskRequestFn=k(e.session_recording.maskCapturedNetworkRequestFn)?t=>{var r=l(t);if(r){var i=r.isInitial?{name:"",entryType:r.entryType,startTime:r.startTime,duration:r.duration,endTime:r.endTime,timeOrigin:r.timeOrigin,timestamp:r.timestamp,isInitial:!0}:void 0,n=null==e.session_recording.maskCapturedNetworkRequestFn?void 0:e.session_recording.maskCapturedNetworkRequestFn(r);return T(n)&&i?(It.add(i),i):null!=n?n:void 0}}:e=>function(e){if(!S(e))return e.requestBody=Tt(e.requestBody,"Request"),e.responseBody=Tt(e.responseBody,"Response"),e}(l(e)),h({},wt,n,{recordHeaders:a,recordBody:o,recordPerformance:s,recordInitialRequests:s,streamNetworkBody:!0===e.session_recording.streamNetworkBody})})(this._instance.config,this.Yt,o)))}else en.info("NetworkCapture not started because we are on localhost.");return r}Xt(e){return this._instance.config.disable_capture_url_hashes?ae(e):e}er(e,t){void 0===t&&(t=!1);var r=t?ae(e):this.Xt(e),i=this._instance.config.mask_personal_data_properties?[...Ti,...this._instance.config.custom_personal_data_properties||[]]:[];return this.tr(function(e,t,r){if(!e||!t||!t.length)return e;for(var i=e.split("#"),n=i[1],a=(i[0]||"").split("?"),o=a[1],s=a[0],u=(o||"").split("&"),l=[],h=0;u.length>h;h++){var c=u[h].split("=");w(c)&&(t.includes(c[0])?l.push(c[0]+"=<masked>"):l.push(u[h]))}var d=s;return null!=o&&(d+="?"+l.join("&")),null!=n&&(d+="#"+n),d}(r,i))}tr(e){var t=this._instance.config.session_recording;if(t.maskCapturedNetworkRequestFn){var r,i=t.maskCapturedNetworkRequestFn({name:e});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(t.maskNetworkRequestFn){var n=t.maskNetworkRequestFn({url:e});return null==n?void 0:n.url}return e}rr(e){try{return e.rrwebMethod(),!0}catch(t){return 10>this.Ze.length?this.Ze.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt+1,rrwebMethod:e.rrwebMethod}):en.warn("could not emit queued rrweb event.",t,e),!1}}Le(e,t){return this.rr(rn((()=>an().addCustomEvent(e,t))))}ir(){var e;return this.ze&&!0===(null==(e=this._instance.config.session_recording)?void 0:e.captureJsonLd)&&!this.X.urlBlocked&&!0!==this.Ge}nr(e){if(!this.ir())return!1;try{var t=an();return!!t&&(t.addCustomEvent("$json_ld",e),this.ir())}catch(e){return!1}}ar(e){void 0===e&&(e=!1),Promise.resolve().then((()=>{var t;return null==(t=this.sr)?void 0:t.scan(e)}))}ur(){try{if(this._instance.config.capture_pageview||!e)return;var t=new URL(e.location.href),r=this.er(t.origin+t.pathname+t.search);this.lr!==r&&(this.lr=r,this.Le("$url_changed",{href:r}))}catch(e){}}hr(){if(this.Ze.length){var e=[...this.Ze];this.Ze=[],e.forEach((e=>{Date.now()-e.enqueuedAt>2e3||this.rr(e)}))}}Ce(){return this.rr(rn((()=>an().takeFullSnapshot())))}get cr(){var e,t,r;if(null!=(e=this.He)&&e.hasPendingTriggers(this.sessionId)&&!["sampled","active"].includes(this.status)){var i,n=null==(i=this._instance.config.session_recording)?void 0:i.trigger_pending_buffer_interval_millis;return I(n)&&Number.isFinite(n)&&n>=1e3&&36e5>=n?n:6e4}return null!==(t=null==(r=this._instance.config.session_recording)?void 0:r.full_snapshot_interval_millis)&&void 0!==t?t:3e5}dr(){if(this.vr&&clearInterval(this.vr),!0!==this.Ge){var e=this.cr;e&&(this.vr=setInterval((()=>{this.Ce()}),e))}}Me(e){"event"===e&&this.pr(),!this.X.urlBlocked&&["sampled","active"].includes(this.status)&&this.dr()}gr(){var e;this.X.urlBlocked||(this.X.urlBlocked=!0,null==(e=this.sr)||e.scan(),clearInterval(this.vr),en.info("recording paused due to URL blocker"),this.Le("recording paused",{reason:"url blocker"}))}mr(){var e;this.X.urlBlocked&&(null==(e=this.sr)||e.scan(),this.X.urlBlocked=!1,this.Ce(),this.ar(),this.dr(),this.Le("recording resumed",{reason:"left blocked url"}),en.info("recording resumed"))}yr(e,t){var r;if("event"===e&&this.pr(),!this.Ve&&null!=(r=this.He)&&r.hasPendingTriggers(this.sessionId)){this.Ve=!0;try{var i,n;null==(i=this._instance.persistence)||i.register({["url"===e?Ft:qt]:this.sessionId}),null==(n=this.He)||n.updateActiveTriggers(this.sessionId),this.Me(),this.Bt(),this.xe(e+"_trigger_matched",{["url"===e?"matchedUrl":"matchedEvent"]:t})}finally{this.Ve=!1}}}get isStarted(){return!!this.Ue}get je(){var e=this._instance.get_property(Rt);if(e){var t;try{t=_(e)?e:JSON.parse(e)}catch(e){return void en.warn("persisted remote config for session recording is invalid and will be ignored",e)}if(!this.isStarted){var r,i,n=null!==(r=t.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>36e5)return en.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:e}),void(null==(i=this._instance.persistence)||i.unregister(Rt))}return t}}br(e,t,r){this._instance.get_property(e)&&(t(),r())}start(t){var r,n,a=this.je;if(a){this.isStarted||(this.Xe=!1!==this.Ge&&!this.rt,this.rt=!1,this.et=this.Xe,this.tt=!1),this._t&&(this.wr(),this.Ht());var o=this.Ne.checkAndGetSessionAndWindowId(),s=o.windowId;this.Pe=o.sessionId,this.It=s,null==(r=this._instance.persistence)||r.unregister($t),null!=a&&a.endpoint&&(this.$e=null==a?void 0:a.endpoint),this.He=2===(null==a?void 0:a.version)&&(null==a?void 0:a.triggerGroups)&&a.triggerGroups.length>0?new Mi(this._instance,this.X,this.xe.bind(this),this.Le.bind(this),this.Me.bind(this)):new Ci(this._instance,this.X,this.ee,this.te,this.xe.bind(this),this.Ce.bind(this),this.Me.bind(this)),this.He.onRemoteConfig(a),null==(n=this.Ie)||n.call(this),this.Ie=this.He.setupEventTriggerListeners(this._instance.on.bind(this._instance,"eventCaptured"),this.sessionId,((e,t)=>this.yr(e,t))),this.br(Et,(()=>{this.overrideSampling()}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Et)})),this.br(Lt,(()=>{this.overrideLinkedFlag()}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Lt)})),this.br(Dt,(()=>{this.overrideTrigger("event")}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Dt)})),this.br(Ot,(()=>{this.overrideTrigger("url")}),(()=>{var e;return null==(e=this._instance.persistence)?void 0:e.unregister(Ot)})),this.He.makeSamplingDecisions(this.sessionId),this.kr(),this.it||(Ne(e,"beforeunload",this.Ft),Ne(e,"pagehide",this.$t),Ne(e,"offline",this.Ut),Ne(e,"online",this.zt),Ne(i,"visibilitychange",this.Wt),!this.xt&&k(this.Ne.onSessionId)&&(this.xt=this.Ne.onSessionId(this.Tt)),!this.Ct&&k(this.Ne.on)?this.Ct=this.Ne.on("forcedIdleReset",(()=>{this.At(),this.Ge="unknown",this.stop(),this.Mt=this.Ne.onSessionId(((e,t,r)=>{var i;null==(i=this.Mt)||i.call(this),this.Mt=void 0,this.Tt(e,t,r)}))})):k(this.Ne.on)||en.warn("bundled core has no SessionIdManager.on (requires posthog-js >= 1.268.6); recording will start but skip forced-idle-reset handling"),T(this.St)&&(this.St=this._instance.on("eventCaptured",(e=>{try{if("$pageview"===e.event){var t=null!=e&&e.properties.$current_url?this.er(e.properties.$current_url):"";if(!t)return;this.Le("$pageview",{href:t})}}catch(e){en.error("Could not add $pageview to rrweb session",e)}}))),this.status===Jt&&this.xe(t||"recording_initialized"))}else en.info("remote config must be stored in persistence before recording can start")}_r(){var t,r,n,a,o,s;null==e||e.removeEventListener("beforeunload",this.Ft),null==e||e.removeEventListener("pagehide",this.$t),null==e||e.removeEventListener("offline",this.Ut),null==e||e.removeEventListener("online",this.zt),null==i||i.removeEventListener("visibilitychange",this.Wt),clearInterval(this.vr),this.Sr(),null==(t=this.St)||t.call(this),this.St=void 0,null==(r=this.Ie)||r.call(this),this.Ie=void 0,null==(n=this.xt)||n.call(this),this.xt=void 0,null==(a=this.Ct)||a.call(this),this.Ct=void 0,null==(o=this.Mt)||o.call(this),this.Mt=void 0,null==(s=this.He)||s.stop(),this.Cr(),this.wr()}wr(){this.kt+=1,this.bt=[],this.wt=0,this.Mr=void 0,this._t=!1}Cr(){var e,t,r;null==(e=this.Tr)||e.stop(),this.Ze=[],null==(t=this.sr)||t.stop(),this.sr=void 0,this.ze=!1,null==(r=this.Ue)||r.call(this),this.Ue=void 0}Ir(){if(!this.Mr||0===this.wt)return!1;if(this._t)return!0;this._t=!0;var e=this.kt;return this.Sr(),this.Cr(),this.Mr.catch((()=>{})).then((()=>{e===this.kt&&(this._t=!1,this.Bt(),this.Ht(),this._r(),en.info("stopped"))})).catch((()=>{this._t=!1,this._r(),en.info("stopped")})),!0}stop(){this.Cr(),this.Ir()||(this.Bt(),this.Ht(),this._r(),en.info("stopped"))}Et(e){var t;this.stop(),this.Rr=void 0,this.Ar=void 0,this.Je=0,this.Ye=0,this.Ke=0,null==(t=nn())||null==t.resetSnapshotCostState||t.resetSnapshotCostState(),this.start("session_id_changed"),this.Xe=e,this.et=!1}pr(){this.isStarted||(this.rt=!0),this.Xe&&(this.Xe=!1,this.et=!1,this.tt&&(this.tt=!1,this.Ce()),this.Er())}discard(e){var t=(void 0===e?{}:e).discardProducerEvents;void 0!==t&&t&&(this.Ht(),this.Cr()),this.Ht(),this._r(),en.info("discarded")}Lr(e,t,r,i,n){var a={$snapshot_bytes:r,$snapshot_data:t,$session_id:i,$window_id:n};this.status!==Gt?(this.Or(e,i),this.Dr(a)):this.Ht()}Pr(){try{this.Nr()}catch(e){this.st||(this.st=!0,en.error("could not track full snapshot cost",e))}}Nr(){var e,t=null==(e=nn())||null==e.getLastSnapshotCost?void 0:e.getLastSnapshotCost();t&&t!==this.Ar&&(this.Ar=t,this.Rr&&this.Rr.durationMs>=t.durationMs||(this.Rr=t),500>t.durationMs||en.warn("full snapshot was slow, the page may have been unresponsive while it ran",{durationMs:Math.round(t.durationMs),stylesheetMs:Math.round(t.stylesheetMs),nodeCount:t.nodeCount,cssRuleCount:t.cssRuleCount,nonDeferrableCssRuleCount:t.nonDeferrableCssRuleCount,deferredStylesheetCount:t.deferredStylesheetCount}))}Or(e,t){e.type!==c.FullSnapshot?e.type===c.IncrementalSnapshot&&(S(this.ft)||this.ft===t||this.yt===t||(this.yt=t,en.info("incremental snapshot for a session with no full snapshot - requesting one",{sessionId:t}),this.Ce())):this.ft=t}Fr(e){e.counted&&e.generation===this.kt&&(this.wt=Math.max(0,this.wt-1)),e.counted=!1,this.bt=this.bt.filter((t=>t!==e))}qr(e,t,r){e.processed||e.generation!==this.kt||(e.processed=!0,this.Lr(e.event,t,r,e.targetSessionId,e.targetWindowId))}jr(e){try{var t=e.compressionEnabled?bn(e.event):{event:e.event,size:br(e.event)};this.qr(e,t.event,t.size)}finally{this.Fr(e)}}jt(){[...this.bt].forEach((e=>{this.jr(e)}))}Br(e,t,r,i){var n=this,a={event:e,compressionEnabled:t,targetSessionId:r,targetWindowId:i,generation:this.kt,processed:!1,counted:!0};this.bt.push(a),this.wt+=1;var o=function(){var r=l((function*(){try{if(a.processed)return;var r,i;try{var o=t?pn(e)?yield function(e){return wn.apply(this,arguments)}(e):bn(e):{event:e,size:br(e)};r=o.event,i=o.size}catch(t){en.error("could not process queued compression event - will use uncompressed event",t),r=e,i=br(e)}n.qr(a,r,i)}finally{n.Fr(a)}}));return function(){return r.apply(this,arguments)}}();this.Mr=this.Mr?this.Mr.catch((()=>{})).then(o):o()}onRRwebEmit(e){var t,r,i,n,a,o,s,u,l;if(this._instance.sessionManager&&(this.hr(),e&&_(e))){if(e.type===c.Meta){var h=this.er(e.data.href);if(this.lr=h,!h)return;e.data.href=h}else this.ur();if(null==(t=this.He)||t.checkUrlTriggers(this.sessionId,(()=>this.gr()),(()=>this.mr()),((e,t)=>this.yr(e,t))),!this.X.urlBlocked||function(e){return e.type===c.Custom&&"recording paused"===e.data.tag}(e)){var v,f,p;e.type===c.FullSnapshot&&(null!=(v=nn())&&null!=v.wasMaxDepthReached&&v.wasMaxDepthReached()&&(this.ot=!0),this.Pr(),Promise.resolve().then((()=>this.Pr())),this.dr(),null==(f=this.Tr)||f.reset(),null==(p=this._instance.persistence)||p.register_once({[$t]:e.timestamp},void 0));var g=e.type===c.FullSnapshot&&(null==(r=this.He)?void 0:r.hasPendingTriggers(this.sessionId));g&&this.Hr();var m=this.Tr?this.Tr.throttleMutations(e):e;if(m){var y=function(e){var t=e;if(t&&_(t)&&6===t.type&&_(t.data)&&"rrweb/console@1"===t.data.plugin){t.data.payload.payload.length>10&&(t.data.payload.payload=t.data.payload.payload.slice(0,10),t.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;t.data.payload.payload.length>i;i++)r.push(t.data.payload.payload[i]&&t.data.payload.payload[i].length>2e3?t.data.payload.payload[i].slice(0,2e3)+"...[truncated]":t.data.payload.payload[i]);return t.data.payload.payload=r,e}return e}(m),b=function(e){return Sn(e)?e.data.payload:null}(y),w=function(e){return xn(e)?e.data.payload:null}(y),k=function(e){return _n(e)?e.data.payload:null}(y);b||w?null!=b&&b.lastActivityTimestamp&&(y.timestamp=b.lastActivityTimestamp):null!=k&&k.sessionId||this.$r(y),e.type===c.FullSnapshot&&(this.vt.push([this.Pe,e.timestamp]),this.vt.length>6&&(this.vt=this.vt.slice(-6)));var S=null!==(i=null!==(n=null!==(a=null==b?void 0:b.currentSessionId)&&void 0!==a?a:null==w?void 0:w.nextSessionId)&&void 0!==n?n:null==k?void 0:k.sessionId)&&void 0!==i?i:this.Pe,x=null!==(o=null!==(s=null!==(u=null==b?void 0:b.currentWindowId)&&void 0!==u?u:null==w?void 0:w.nextWindowId)&&void 0!==s?s:null==k?void 0:k.windowId)&&void 0!==o?o:this.It;if(!0!==this.Ge||function(e){return _n(e)||Sn(e)||xn(e)}(y)){y.type===c.FullSnapshot&&(this.Qe=0),k&&(y.timestamp=k.lastActivityTimestamp+k.threshold);var C=this.ze;this.ze=!0,g?this.ar(!0):C||this.ar();var M=null===(l=this._instance.config.session_recording.compress_events)||void 0===l||l;if(this.wt>0||M&&pn(y))this.Br(y,M,S,x);else{var T=M?bn(y):{event:y,size:br(y)};this.Lr(y,T.event,T.size,S,x)}}else(function(e){return e.type===c.FullSnapshot||e.type===c.Meta||e.type===c.IncrementalSnapshot&&e.data.source!==d.CanvasMutation})(y)&&this.Qe++}else!0===this.Ge&&this.Qe++}}}get status(){return this.He?this.He.getStatus({instance:this._instance,sessionId:this.sessionId,isSampled:this.qe,rrwebError:this.it,urlTriggerMatching:this.X,eventTriggerMatching:this.ee,linkedFlagMatching:this.te,remoteConfig:this.je}):Gt}log(e,t){var r;void 0===t&&(t="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.te.linkedFlagSeen=!0,this.Ce(),this.pr(),this.xe("linked_flag_overridden")}overrideSampling(){var e;null==(e=this._instance.persistence)||e.register({[Pt]:this.sessionId,[At]:null}),this.Ce(),this.pr(),this.xe("sampling_overridden")}overrideTrigger(e){this.yr(e),this.pr()}Ur(){try{var t,r=null==e||null==(t=e.location)?void 0:t.href;if(!r)return;var i=this.er(r);if(!i)return;return new URL(i).hostname||void 0}catch(e){return}}Sr(){this.zr&&(clearTimeout(this.zr),this.zr=void 0)}Er(){this.zr||(this.zr=setTimeout((()=>{this.Bt()}),2e3))}Wr(){return this.ft!==this.Dt.sessionId&&0!==this.Dt.data.length&&this.Dt.data.every((e=>(null==e?void 0:e.type)===c.Custom&&!Sn(e)&&!xn(e)))}Vr(){var e,t;return null!==(e=null==(t=this.He)?void 0:t.getPendingTriggerConditions(this.sessionId))&&void 0!==e?e:[]}Zr(e){if(e!==Yt)return S(this.Gr)||this._instance.register_for_session({[Vt]:[]}),void(this.Gr=void 0);var t=this.Vr();if(0===t.length)return S(this.Gr)||this._instance.register_for_session({[Vt]:[]}),void(this.Gr=void 0);var r=t.join(", "),i=this.sessionId+":"+r;i!==this.Gr&&(this.Gr=i,this._instance.register_for_session({[Vt]:t}),en.info("buffering: "+r))}Bt(){var e;if(this.Sr(),this.Xe)return this.Dt;if(this.Wr())return this.Dt.size>Ki?this.Ht():this.Dt;var t=this.Dt;null==(e=this.He)||e.ensureSamplingDecision(this.sessionId);var r=this.Pt(),i=this.status;if(this.Zr(i),i===Yt||i===Kt||i===Gt||r)return this.Er(),this.Dt;if(this.Dt!==t)return this.Dt;if(t.data.length>0){var n,a=this.Ur();kr(t).forEach((e=>{var t;null==(t=this.Rt)||t.trackSize(e.sessionId,e.size),this.Qr({$snapshot_bytes:e.size,$snapshot_data:e.data,$session_id:e.sessionId,$window_id:e.windowId,$lib:Ae.LIB_NAME,$lib_version:Ae.LIB_VERSION,$snapshot_host:a})})),null==(n=this.He)||n.onFlushComplete()}return this.Ht()}Dr(e){var t,r=2+((null==(t=this.Dt)?void 0:t.data.length)||0),i=e.$session_id,n=this.Dt.sessionId!==i;if(n||!0!==this.Ge&&!this.Xe&&this.Dt.size+e.$snapshot_bytes+r>Ki){var a=this.Pe;if(this.Dt=this.Bt(),this.Pe!==a)return;n&&this.Dt.data.length>0&&(this.Dt=this.Ht()),this.Dt.sessionId=i,this.Dt.windowId=e.$window_id}this.Xe&&(this.tt||this.Dt.size+e.$snapshot_bytes+r>Ki)?this.tt||(this.tt=!0,this.Dt=this.Ht()):(this.Dt.size+=e.$snapshot_bytes,this.Dt.data.push(e.$snapshot_data),this.Dt.sizes.push(e.$snapshot_bytes),!0===this.Ge||this.Xe||this.Er())}Qr(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.$e),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Nt(){var e,t,r=null==(e=this.Dt)?void 0:e.data[(null==(t=this.Dt)?void 0:t.data.length)-1],i=this.Ne.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i.sessionStartTimestamp:null}Hr(){if(!this.Dt||0===this.Dt.data.length)return this.Ht();for(var e=-1,t=this.Dt.data.length-1;t>=0;t--)if(this.Dt.data[t].type===c.Meta){e=t;break}return 0>e?this.Ht():(this.Dt.data=this.Dt.data.slice(e),this.Dt.sizes=this.Dt.sizes.slice(e),this.Dt.size=this.Dt.sizes.reduce(((e,t)=>e+t),0),this.Dt)}Ht(){return this.Dt={size:0,data:[],sizes:[],sessionId:this.Pe,windowId:this.It},this.Dt}xe(e,t){this._instance.register_for_session({$session_recording_start_reason:e}),en.info(e.replace("_"," "),t),"session_id_changed"!==e&&this.Le("$recording_started",h({reason:e},t))}Jr(e){var t;return 3===e.type&&-1!==tn.indexOf(null==(t=e.data)?void 0:t.source)}$r(e){var t=this.Jr(e);t||!0===this.Ge||e.timestamp-this.We>this.Fe&&(this.Ge=!0,clearInterval(this.vr),this.Le("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.We,threshold:this.Fe,bufferLength:this.Dt.data.length,bufferSize:this.Dt.size,sessionId:this.Pe,windowId:this.It}),this.Bt());var r=!1;if(t&&(this.We=e.timestamp,this.Ge)){var i="unknown"===this.Ge;this.Ge=!1,i||(this.Le("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)}var n=this.Ne.checkAndGetSessionAndWindowId(!t,e.timestamp),a=n.windowId,o=n.sessionId,s=this.Pe!==o,u=this.It!==a;if(this.It=a,this.Pe=o,s||u){var l=s&&!1!==this.Ge;l&&(this.Ge="unknown"),this.Et(l)}else if(t&&this.pr(),r){var h,c=["sampled","active"].includes(this.status)||(null==(h=this.He)?void 0:h.hasPendingTriggers(this.sessionId));this.Qe>0&&c&&this.Ce(),this.ar(),this.dr()}}At(){var e;null==(e=this.He)||e.clearConditionalRecordingPersistence()}get sdkDebugProperties(){var e,t,r,i,n,a,o,s,u,l=this.Ne.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp,h=null==(e=nn())||null==e.getDeferredStylesheetStats?void 0:e.getDeferredStylesheetStats();return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.Dt.data.length,$sdk_debug_replay_internal_buffer_size:this.Dt.size,$sdk_debug_current_session_duration:this.Nt,$sdk_debug_session_start:l,$sdk_debug_replay_flushed_size:null==(t=this.Rt)?void 0:t.currentTrackedSize(this.sessionId),$sdk_debug_replay_full_snapshots:this.vt,$snapshot_max_depth_exceeded:this.ot,$sdk_debug_replay_slowest_full_snapshot_ms:Gi(null==(r=this.Rr)?void 0:r.durationMs),$sdk_debug_replay_slowest_full_snapshot_stylesheet_ms:Gi(null==(i=this.Rr)?void 0:i.stylesheetMs),$sdk_debug_replay_slowest_full_snapshot_nodes:null==(n=this.Rr)?void 0:n.nodeCount,$sdk_debug_replay_slowest_full_snapshot_css_rules:null==(a=this.Rr)?void 0:a.cssRuleCount,$sdk_debug_replay_slowest_full_snapshot_css_rules_non_deferrable:null==(o=this.Rr)?void 0:o.nonDeferrableCssRuleCount,$sdk_debug_replay_deferred_stylesheets:null==h?void 0:h.deferredCount,$sdk_debug_replay_deferred_stylesheets_failed:null==h?void 0:h.failedCount,$sdk_debug_replay_deferred_stylesheets_abandoned:null==h?void 0:h.abandonedCount,$sdk_debug_replay_deferred_stylesheet_ms:Gi(null==h?void 0:h.totalMs),$sdk_debug_replay_deferred_stylesheet_slowest_slice_ms:Gi(null==h?void 0:h.slowestSliceMs),$sdk_debug_replay_slowest_mutation_batch_ms:Gi(null==(s=nn())||null==s.getMutationCost||null==(s=s.getMutationCost())?void 0:s.slowestBatchMs),$sdk_debug_replay_discarded_duration_samples:null==(u=nn())||null==u.getDiscardedDurationSamples?void 0:u.getDiscardedDurationSamples(),$sdk_debug_replay_throttled_mutations_dropped:this.Je,$sdk_debug_replay_oversized_mutations_dropped:this.Ye,$sdk_debug_replay_oversized_mutation_bytes_dropped:this.Ke,$sdk_debug_replay_rrweb_error:this.it,$sdk_debug_rrweb_attached:!!this.Ue,$sdk_debug_rrweb_start_attempted:this.nt}}kr(){var t;if(!this.Ue){this.nt=!0;var r,n,a,o,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskAllElementAttributes:!1,maskAttributeFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,inlineStylesheetBudgetRules:1e4,recordCrossOriginIframes:!1,sampling:void 0,attributeFilter:void 0},u=this._instance.config.session_recording;for(var l of Object.entries(u||{})){var c=l[0],d=l[1];if(c in s)if("maskInputOptions"===c)s.maskInputOptions=h({password:!0},d);else if("sampling"===c){var v=null!=d?d:{},f={};S(v.mousemove)||(f.mousemove=v.mousemove),S(v.mouseInteraction)||(f.mouseInteraction=v.mouseInteraction),s.sampling=f}else s[c]=d}!0===(null==u?void 0:u.captureJsonLd)&&!0!==s.slimDOMOptions&&"all"!==s.slimDOMOptions&&(s.slimDOMOptions=h({},s.slimDOMOptions,{script:!0})),this.Qt&&this.Qt.enabled&&(s.recordCanvas=!0,s.sampling=h({},s.sampling,{canvas:this.Qt.fps}),s.dataURLOptions={type:"image/webp",quality:this.Qt.quality},s.canvasResolutionScale=this.Gt,s.canvasMasking={configured:()=>{var e;return k(null==(e=this._instance.config.session_recording)||null==(e=e.canvasCapture)?void 0:e.maskRegionsFn)},regionsFn:e=>{var t,r=null==(t=this._instance.config.session_recording)||null==(t=t.canvasCapture)?void 0:t.maskRegionsFn;if(k(r))try{var i;return null!==(i=r(e))&&void 0!==i?i:null}catch(e){return this.ct||(this.ct=!0,en.warn("canvasCapture.maskRegionsFn threw, canvas frames will be skipped",e)),null}}}),this.Vt&&(s.maskAllInputs=null===(r=this.Vt.maskAllInputs)||void 0===r||r,s.maskTextSelector=null!==(n=this.Vt.maskTextSelector)&&void 0!==n?n:void 0,s.blockSelector=null!==(a=this.Vt.blockSelector)&&void 0!==a?a:void 0,s.maskAllElementAttributes=null!==(o=this.Vt.maskAllElementAttributes)&&void 0!==o&&o),s.maskAllElementAttributes&&s.maskAttributeFn&&(s.maskAttributeFn=void 0,this.ht||(this.ht=!0,en.warn('`maskAllElementAttributes` and `maskAttributeFn` are mutually exclusive, and `maskAttributeFn` is being ignored. Remove one of the two. Note that `maskAllElementAttributes` can also come from your project\'s "Privacy and masking" settings. See https://posthog.com/docs/session-replay/privacy'))),this.Zt();var p=an();if(p){this.Tr=null!==(t=this.Tr)&&void 0!==t?t:new ni(p,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(e,t)=>{var r="Too many mutations on node '"+e+"'. Rate limiting. This could be due to SVG animations or something similar";en.info(r,{node:t}),this.log(Xi+" "+r,"warn")},onDroppedAttributeMutations:e=>this.Je+=e,bytesRefillRate:this._instance.config.session_recording.__mutationBytesRefillRate,bytesBucketSize:this._instance.config.session_recording.__mutationBytesBucketSize,resyncIntervalMs:this.cr,onDroppedOversizedMutation:e=>{0===this.Ye&&this.log(Xi+" Dropped an oversized DOM mutation to keep the recording playable. The recording will resync with a full snapshot.","warn"),this.Ye+=1,this.Ke+=e},requestFullSnapshot:()=>this.Ce()});var g=this.Kt();if(this.Ue=p(h({emit:e=>{this.onRRwebEmit(e)},plugins:g,errorHandler:(e,t)=>"rrweb"===t&&(this.dt||(this.dt=!0,en.error("rrweb internal error - recording will continue but may be incomplete",e)),!0)},s)),!this.Ue)return this.it=!0,void en.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.it=!1,!0===(null==u?void 0:u.captureJsonLd)&&i&&null!=e&&e.MutationObserver&&!this.sr&&(this.sr=function(e,t,r){var i=new WeakMap,n=r.getCaptureState||(()=>!0),a=Ii,o=t=>{try{var o=n();if(!a||!1===o||!t.isConnected||t.ownerDocument!==e||function(e,t){for(var r=e;r;){if(Vi(r,t.blockClass,t.blockSelector)||Vi(r,t.maskTextClass,t.maskTextSelector))return!0;var i=r.parentNode;r=r.parentElement||(i&&i.nodeType===i.DOCUMENT_FRAGMENT_NODE?i.host:null)}return!1}(t,r))return;var s=function(e){if(!e||e.length>Ii)return null;try{var t=JSON.parse(e),r=w(t)?t.map(zi):zi(t);if(M(r)||w(r)&&(!r.length||r.some(M)))return null;var i=JSON.stringify(r);return i.length>2e4?null:[r,i]}catch(e){return null}}(t.text);if(!s)return void i.delete(t);var u=s[0],l=s[1];if(M(o))return void i.set(t,l);if(i.get(t)!==l){if(l.length>a)return void(a=0);r.emit(u)&&(i.set(t,l),a-=l.length)}}catch(e){return}};try{var s=new t((e=>{try{if(!a||!1===n())return;var t=e=>{for(var t of Zi(e))o(t)};for(var r of e)if("childList"===r.type)Wi(r.target)&&o(r.target),r.addedNodes.forEach(t);else if("characterData"===r.type){var i=r.target.parentNode;i&&Wi(i)&&o(i)}else"attributes"===r.type&&Wi(r.target)&&o(r.target)}catch(e){return}}));return s.observe(e,{attributes:!0,attributeFilter:["type"],characterData:!0,childList:!0,subtree:!0}),{scan(t){void 0===t&&(t=!1),a&&!1!==n()&&Zi(e.documentElement).forEach((e=>{t&&i.delete(e),o(e)}))},stop(){return s.disconnect()}}}catch(e){return{scan(){},stop(){}}}}(i,e.MutationObserver,{blockClass:s.blockClass,blockSelector:s.blockSelector,maskTextClass:s.maskTextClass,maskTextSelector:s.maskTextSelector,getCaptureState:()=>{var e;return!0!==(null==(e=this._instance.config.session_recording)?void 0:e.captureJsonLd)||this.X.urlBlocked||this.X.isCurrentUrlBlocked()?null:this.ir()},emit:e=>this.nr(e)}),this.X.isCurrentUrlBlocked()&&this.sr.scan()),this.We=Date.now(),this.Ge=R(this.Ge)?this.Ge:"unknown",this.tryAddCustomEvent("$remote_config_received",this.je),this.Le("$session_options",{sessionRecordingOptions:s,activePlugins:g.map((e=>null==e?void 0:e.name))}),this.Le("$posthog_config",{config:this._instance.config})}else en.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(e,t){return this.Le(e,t)}}var Mn,Tn=["type"],In=Object.defineProperty,Rn=(e,t,r)=>((e,t,r)=>t in e?In(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),An=(e=>(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))(An||{}),En=(e=>(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))(En||{}),Ln=(e=>(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))(Ln||{}),On=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(On||{}),Dn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Dn||{}),Pn=(e=>(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))(Pn||{}),Nn=(e=>(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))(Nn||{});function Fn(e,t){return-1!==e.indexOf(t)}var qn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},jn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Bn={};function Hn(e){if(Bn[e])return Bn[e];var t=function(e){var t,r,i=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return i&&globalThis[i]?globalThis[i]:void 0}(e)||globalThis[e],r=t.prototype,i=e in qn?qn[e]:void 0,n=Boolean(i&&i.every((e=>{var t,i;return Boolean(null==(i=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:i.toString().includes("[native code]"))}))),a=e in jn?jn[e]:void 0,o=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(n&&o)return Bn[e]=t.prototype,t.prototype;var s=document.createElement("iframe");s.style.display="none";var u=!1;try{document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var h=l[e].prototype;return h?(function(e){return Fn(e,"AppleWebKit")&&!Fn(e,"Chrome")}(navigator.userAgent)&&(s.classList.add("rr-block","ph-no-capture"),s.setAttribute("__rrwebUntaintedPrototype",e),u=!0),Bn[e]=h):r}catch(e){return r}finally{!u&&s.parentNode&&document.body.removeChild(s)}}var $n={};function Un(e,t,r){var i,n=e+"."+String(r);if($n[n])return $n[n].call(t);var a=Hn(e),o=null==(i=Object.getOwnPropertyDescriptor(a,r))?void 0:i.get;return o?($n[n]=o,o.call(t)):t[r]}var zn={};function Wn(e,t,r){var i=e+"."+String(r);if(zn[i])return zn[i].bind(t);var n=Hn(e)[r];return"function"!=typeof n?t[r]:(zn[i]=n,n.bind(t))}function Vn(){return Hn("MutationObserver").constructor}function Zn(e,t,r){try{if(!(t in e))return()=>{};var i=e[t],n={next:i},a=r((function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];return n.next.apply(this,t)}));return"function"==typeof a&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),e[t]=a,()=>{if(e[t]!==a)for(var r=e=>{var t;return"function"==typeof e?null!==(t=e.__rrweb_layer__)&&void 0!==t?t:e.__posthog_layer__:void 0},i=e[t],o=r(i);o;){if(o.next===a)return void(o.next=n.next);o=r(i=o.next)}else e[t]=n.next}}catch(e){return()=>{}}}var Gn={childNodes:e=>Un("Node",e,"childNodes"),parentNode:e=>Un("Node",e,"parentNode"),parentElement:e=>Un("Node",e,"parentElement"),textContent:e=>Un("Node",e,"textContent"),contains:(e,t)=>Wn("Node",e,"contains")(t),getRootNode:e=>Wn("Node",e,"getRootNode")(),host:e=>e&&"host"in e?Un("ShadowRoot",e,"host"):null,styleSheets:e=>e.styleSheets,shadowRoot:e=>e&&"shadowRoot"in e?Un("Element",e,"shadowRoot"):null,querySelector:(e,t)=>Wn("Element",e,"querySelector")(t),querySelectorAll:(e,t)=>Wn("Element",e,"querySelectorAll")(t),mutationObserver:Vn,patch:Zn},Qn=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0});function Jn(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(e){}return Date.now()}var Yn=0,Kn=6e4;function Xn(){Yn+=1}function ea(){return Yn}function ta(e,t){return t!==Yn||e>Kn}var ra=0,ia=0,na=0,aa=Qn(),oa=null,sa=null,ua=[],la=0,ha=0,ca={slowestBatchMs:0},da={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0},va=e=>e&&e>0?e:null;function fa(e){(ra+=1)>1||(aa=Qn(),ua=[],la=0,sa=va(e),ia=Jn(),na=Yn)}function pa(){return 0===ra?oa||Qn():(ra-=1)>0?aa:(aa.durationMs=Jn()-ia,aa.deferredStylesheetCount=la,da.deferredCount+=la,sa=null,ta(aa.durationMs,na)?aa:oa=aa)}var ga=32;function ma(e,t,r){var i=e.length;if(r>=ga)return i;for(var n=0;e.length>n;n++){var a=e[n];try{var o=a.cssRules;if(o&&o.length)i+=ma(o,t,r+1);else if(t&&a.styleSheet){var s=a.styleSheet;if(!t.has(s)){t.add(s);var u=s.rules||s.cssRules;u&&(i+=ma(u,t,r+1))}}}catch(e){}}return i}function ya(e){if(0!==ra){var t=ma(e,null,0);aa.cssRuleCount+=t,ha>0&&(aa.nonDeferrableCssRuleCount+=t)}}function ba(e){ha+=1;try{return e()}finally{ha-=1}}function wa(e){ra>0&&(aa.stylesheetMs+=e)}function ka(e){if(0===ra||null===sa)return!1;var t=aa.cssRuleCount-aa.nonDeferrableCssRuleCount;return t>=sa||t+function(e){try{var t=e&&(e.rules||e.cssRules);if(!t)return 0;var r=new WeakSet;return r.add(e),ma(t,r,0)}catch(e){return 0}}(e)>sa}function _a(){da.failedCount+=1}function Sa(e){e>0&&(da.abandonedCount+=e)}function xa(e){return e.nodeType===e.ELEMENT_NODE}function Ca(e){var t=e&&"host"in e&&"mode"in e&&Gn.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Gn.shadowRoot(t)===e)}function Ma(e){return"[object ShadowRoot]"==={}.toString.call(e)}function Ta(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 Ia(e){var t=e.cssText;if(3>t.split('"').length)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}var Ra=0;function Aa(e){var t=0===Ra,r=t?Jn():0;Ra+=1;try{var i=e.rules||e.cssRules;if(!i)return null;ya(i);var n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),Ta(Array.from(i,(e=>Ea(e,n))).join(""))}catch(e){return null}finally{Ra-=1,t&&wa(Jn()-r)}}function Ea(e,t){var r;if(Oa(e)){var i;try{i=Aa(e.styleSheet)||Ia(e)}catch(t){i=e.cssText}try{if(i&&(null==(r=e.styleSheet)?void 0:r.href))return Qa(i,e.styleSheet.href)}catch(e){}return i}var n=e.cssText;return Da(e)&&e.selectorText.includes(":")&&(n=La(n)),t?Qa(n,t):n}function La(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Oa(e){return"styleSheet"in e}function Da(e){return"selectorText"in e}var Pa=/^-?[A-Za-z_][\w-]*$/,Na=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function Fa(e){var t=[],r=!1,i=null,n=new Map;function a(e){var n=t.pop();if("group"===n.kind){if(null===e){for(;t.length>0&&"group"===t[t.length-1].kind;)t.pop();return void a(null)}var s=t[t.length-1];return s.parts.push(e),void(s.index+=1)}if(!n.importRule)return r=!0,void(i=e);o(t[t.length-1],n.importRule,e)}function o(e,t,r){var i;try{var n;try{n=r||Ia(t)}catch(e){n=t.cssText}try{n&&(null==(i=t.styleSheet)?void 0:i.href)&&(n=Qa(n,t.styleSheet.href))}catch(e){}n&&e.parts.push(n),e.index+=1}catch(e){a(null)}}function s(e){var r=e.rules[e.index];if("sheet"===e.kind&&Oa(r)){var i=n.get(r);return null===i?(e.parts.push(r.cssText),void(e.index+=1)):i?void t.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(e,r,null)}if(!function(e,r){try{var i=function(e){var t,r=e;if(!r.cssRules||0===r.cssRules.length)return null;if(r.media&&"string"==typeof r.media.mediaText)return"@media "+r.media.mediaText+" {";if(Da(e)){if("number"==typeof r.type&&1!==r.type)return null;var i=r.style?r.style.cssText:"";return e.selectorText+" {"+(i?" "+i:"")}if("containerName"in r)return"string"!=typeof r.containerQuery||r.containerName&&!Pa.test(r.containerName)?null:"@container "+(r.containerName?r.containerName+" ":"")+r.containerQuery+" {";if("string"==typeof r.conditionText){var n="";try{n=(null==(t=e.constructor)?void 0:t.name)||""}catch(e){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?"@supports "+r.conditionText+" {":null}return"string"==typeof r.name?"keyText"in r.cssRules[0]?Pa.test(r.name)?"@keyframes "+r.name+" {":null:""===r.name?"@layer {":Na.test(r.name)?"@layer "+r.name+" {":null:null}(e);if(null===i)return!1;var n=r.sheetHref;return t.push({kind:"group",rules:Array.from(e.cssRules),sheetHref:n,index:0,parts:[],prelude:n?Qa(i,n):i,fixColons:"sheet"===r.kind&&Da(e)&&e.selectorText.includes(":")}),!0}catch(e){return!1}}(r,e)){var a=r.cssText;"sheet"===e.kind&&Da(r)&&r.selectorText.includes(":")&&(a=La(a)),e.parts.push(e.sheetHref?Qa(a,e.sheetHref):a),e.index+=1}}return function(e){try{var r=e.rules||e.cssRules;if(!r)return!1;ya(r);var i=e.href;!i&&e.ownerNode&&(i=e.ownerNode.baseURI);var a=Array.from(r);return t.push({kind:"sheet",sheet:e,rules:a,sheetHref:i,index:0,parts:[],importRule:null}),function(e,t){for(var r=[{sheet:t,rules:e,index:0}],i=function(){var e=r[r.length-1];if(e.index>=e.rules.length)return r.pop(),0;var t=e.rules[e.index];if(e.index+=1,!Oa(t)||n.has(t))return 0;var i=null;try{i=t.styleSheet}catch(e){return n.set(t,null),0}if(!i||r.some((e=>e.sheet===i)))return 0;try{var a=i.rules||i.cssRules;if(!a)return 0;ya(a);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var s=Array.from(a);n.set(t,{sheet:i,rules:s,sheetHref:o}),r.push({sheet:i,rules:s,index:0})}catch(e){}};r.length>0;)i()}(a,e),!0}catch(e){return!1}}(e)||(r=!0),{advance(e){if(r)return!0;var n=Jn(),o=e>0?e:1;try{for(;!r&&o>0;){var u=t[t.length-1];if(u.rules.length>u.index){o-=1;try{s(u)}catch(e){a(null)}}else{var l=null;try{if("group"===u.kind){var h=u.prelude+u.parts.join("")+"}";l=u.fixColons?La(h):h}else l=Ta(u.parts.join(""))}catch(e){}a(l)}}}catch(e){r=!0,i=null}finally{wa(Jn()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var e=0;for(var i of t)e+=i.rules.length-i.index;return e}}}class qa{constructor(){Rn(this,"idNodeMap",new Map),Rn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);if(this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e))),xa(e)){var r=Gn.shadowRoot(e);r&&this.removeNodeFromMap(r),"IFRAME"===e.nodeName&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ja(e){var t=e.element,r=e.maskInputOptions,i=e.tagName,n=e.type,a=e.maskInputFn,o=e.value||"",s=n&&Ba(n);return(r[i.toLowerCase()]||s&&r[s])&&(o=a?a(o,t):"*".repeat(o.length)),o}function Ba(e){return e.toLowerCase()}var Ha=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function $a(e){var t=e.element,r=e.name,i=e.value,n=e.maskAttributeFn,a=e.isGenerated;return i?e.maskAllElementAttributes?void 0!==a&&a&&Ha.has(Ba(r))?i:"*".repeat(i.length):n?n(r,i,t):i:i}var Ua="__rrweb_original__";function za(e){try{var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ba(t):null}catch(e){return null}}var Wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Va=/^(?:[a-z+]+:)?\/\//i,Za=/^www\..*/i,Ga=/^(data:)([^,]*),(.*)/i;function Qa(e,t){return(e||"").replace(Wa,((e,r,i,n,a,o)=>{var s,u=i||a||o,l=r||n||"";if(!u)return e;if(Va.test(u)||Za.test(u))return"url("+l+u+l+")";if(Ga.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var h=t.split("/"),c=u.split("/");for(var d of(h.pop(),c))"."!==d&&(".."===d?h.pop():h.push(d));return"url("+l+h.join("/")+l+")"}))}var Ja,Ya,Ka="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Xa=4096,eo=1e5,to=10,ro=new Map,io=1,no=new RegExp("[^a-z0-9-_:]"),ao=-2;function oo(){return io++}var so=/^[^ \t\n\r\u000c]+/,uo=/^[, \t\n\r\u000c]+/,lo=new WeakMap;function ho(e,t){return t&&""!==t.trim()?co(e,t):t}function co(e,t){var r=lo.get(e);if(r||(r=e.createElement("a"),lo.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function vo(e,t){return(null==t?void 0:t.maxBase64ImageLength)?function(e,t){return t&&e.length>t?Ka:e}(e,t.maxBase64ImageLength):e}function fo(e,t,r,i,n,a){var o;if(!i)return i;if("src"===r||"href"===r&&("use"!==t||"#"!==i[0])){if("link"===t&&n){var s=null==(o=n.sheet)?void 0:o.href;if(s)return s}var u=ho(e,i);if(u.startsWith("data:")){if("img"===t&&n){var l=u;return((null==a?void 0:a.type)||void 0!==(null==a?void 0:a.quality))&&(l=function(e,t,r,i){if(eo>t.length)return t;if(!e.complete||0===e.naturalWidth)return t;if(e.naturalWidth>Xa||e.naturalHeight>Xa)return t;var n=ro.get(t);if(n&&n.type===r&&n.quality===i)return n.result;try{var a=document.createElement("canvas");a.width=e.naturalWidth,a.height=e.naturalHeight;var o=a.getContext("2d");if(!o)return t;o.drawImage(e,0,0);var s=a.toDataURL(r||"image/webp",null!=i?i:.4),u=t.length>s.length?s:t;if(ro.size>=to){var l=ro.keys().next().value;void 0!==l&&ro.delete(l)}return ro.set(t,{type:r,quality:i,result:u}),u}catch(e){return t}}(n,u,a.type,a.quality)),vo(l,a)}if("image"===t)return vo(u,a)}return u}if("xlink:href"===r&&"#"!==i[0]){var h=ho(e,i);return"image"===t&&h.startsWith("data:")?vo(h,a):h}return"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function i(e){var i,n=e.exec(t.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(uo),t.length>r;){var a=i(so);if(","===a.slice(-1))a=ho(e,a.substring(0,a.length-1)),n.push(a);else{var o="";a=ho(e,a);for(var s=!1;;){var u=t.charAt(r);if(""===u){n.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,n.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,r+=1}}}return n.join(", ")}(e,i):"style"===r?Qa(i,co(e)):"object"===t&&"data"===r?ho(e,i):i:ho(e,i)}function po(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function go(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&go(Gn.parentNode(e),t,r);for(var i=e.classList.length;i--;)if(t.test(e.classList[i]))return!0;return!!r&&go(Gn.parentNode(e),t,r)}function mo(e,t,r,i){var n;if(xa(e)){if(!Gn.childNodes(n=e).length)return!1}else{if(null===Gn.parentElement(e))return!1;n=Gn.parentElement(e)}try{if("string"==typeof t){if(i){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(go(n,t,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function yo(e,t,r){var i=e.removeEventListener;"function"==typeof i&&i.call(e,t,r)}var bo=new Map;function wo(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}function ko(e){return null==e?"":e.toLowerCase()}var _o=50,So=!1,xo=!1;function Co(e,t){var r=t.doc,i=t.mirror,n=t.blockClass,a=t.blockSelector,o=t.maskTextClass,s=t.maskTextSelector,u=t.skipChild,l=void 0!==u&&u,h=t.inlineStylesheet,c=void 0===h||h,d=t.maskInputOptions,v=void 0===d?{}:d,f=t.maskTextFn,p=t.maskInputFn,g=t.maskAllElementAttributes,m=void 0!==g&&g,y=t.maskAttributeFn,b=t.slimDOMOptions,w=t.dataURLOptions,k=void 0===w?{}:w,_=t.inlineImages,S=void 0!==_&&_,x=t.recordCanvas,C=void 0!==x&&x,M=t.canvasMaskingConfigured,T=t.onSerialize,I=t.onIframeLoad,R=t.iframeLoadTimeout,A=void 0===R?5e3:R,E=t.onIframeListenerRegistered,L=t.onStylesheetLoad,O=t.stylesheetLoadTimeout,D=void 0===O?5e3:O,P=t.keepIframeSrcFn,N=void 0===P?()=>!1:P,F=t.newlyAddedElement,q=void 0!==F&&F,j=t.depth,B=void 0===j?0:j,H=t.maxDepth,U=void 0===H?_o:H,z=t.needsMask,W=t.preserveWhiteSpace,V=void 0===W||W;if(B>=U)return xo=!0,So||(So=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+U+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;z||(z=mo(e,o,s,void 0===z)),ra>0&&(aa.nodeCount+=1);var Z,G=function(e,t){var r=t.doc,i=t.blockClass,n=t.blockSelector,a=t.needsMask,o=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,h=t.maskInputFn,c=t.maskAllElementAttributes,d=void 0!==c&&c,v=t.maskAttributeFn,f=t.dataURLOptions,p=void 0===f?{}:f,g=t.inlineImages,m=t.recordCanvas,y=t.canvasMaskingConfigured,b=t.keepIframeSrcFn,w=t.newlyAddedElement,k=void 0!==w&&w,_=function(e,t){if(t.hasNode(e)){var r=t.getId(e);return 1===r?void 0:r}}(r,t.mirror);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Nn.Document,childNodes:[],compatMode:e.compatMode}:{type:Nn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Nn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return function(e,t){for(var r,i,n,a=t.doc,o=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskInputFn,h=t.maskAllElementAttributes,c=void 0!==h&&h,d=t.maskAttributeFn,v=t.dataURLOptions,f=void 0===v?{}:v,p=t.inlineImages,g=t.recordCanvas,m=t.canvasMaskingConfigured,y=t.keepIframeSrcFn,b=t.newlyAddedElement,w=void 0!==b&&b,k=t.rootId,_=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var i=e.classList.length;i--;)if(t.test(e.classList[i]))return!0;if(r)return e.matches(r)}catch(e){}return!1}(e,t.blockClass,t.blockSelector),S=function(e){if(e instanceof HTMLFormElement)return"form";var t=Ba(e.tagName);return no.test(t)?"div":t}(e),x=new Set,C={},M=e.attributes.length,T=0;M>T;T++){var I=e.attributes[T];po(S,I.name)||(C[I.name]=fo(a,S,Ba(I.name),I.value,e,f))}if("link"===S&&o&&!_){var R=e.sheet;if(!R){var A=function(e){return e.href}(e);A&&!(R=wo(a,A))&&A.includes(".css")&&(R=wo(a,window.location.origin+"/"+A.replace(window.location.href,"")))}var E=null;R&&(ka(R)?ra>0&&(ua.push(e),la+=1):E=Aa(R)),E&&(delete C.rel,delete C.href,C._cssText=E)}if("style"===S&&e.sheet&&!(e.innerText||Gn.textContent(e)||"").trim().length){var L=ba((()=>Aa(e.sheet)));L&&(C._cssText=L)}if("input"===S||"textarea"===S||"select"===S){var O=e.value,D=e.checked;"radio"!==C.type&&"checkbox"!==C.type&&"submit"!==C.type&&"button"!==C.type&&O?C.value=ja({element:e,type:za(e),tagName:S,value:O,maskInputOptions:u,maskInputFn:l}):D&&(C.checked=D)}if("option"===S&&(e.selected&&!u.select?C.selected=!0:delete C.selected),"dialog"===S&&e.open){try{C.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){C.rr_open_mode="modal",C.ph_rr_could_not_detect_modal=!0}x.add("rr_open_mode")}if("canvas"===S&&g&&!(null==m?void 0:m()))if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;e.width>r;r+=50)for(var i=0;e.height>i;i+=50){var n=t.getImageData;if(new Uint32Array((Ua in n?n[Ua]:n).call(t,r,i,Math.min(50,e.width-r),Math.min(50,e.height-i)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(C.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){var P=e.toDataURL(f.type,f.quality),N=a.createElement("canvas");N.width=e.width,N.height=e.height,P!==N.toDataURL(f.type,f.quality)&&(C.rr_dataURL=P)}var F,q,j=!1;if("img"===S&&p){Ja||(Ja=a.createElement("canvas"),Ya=Ja.getContext("2d"));var B=e,H=B.currentSrc||B.getAttribute("src")||"<unknown-src>",U=B.crossOrigin,z=(t,r)=>j?$a({element:e,name:t,value:r,maskAllElementAttributes:c,maskAttributeFn:d}):r,W=()=>{yo(B,"load",W);try{Ja.width=B.naturalWidth,Ja.height=B.naturalHeight,Ya.drawImage(B,0,0);var e=Ja.toDataURL(f.type,f.quality);C.rr_dataURL=z("rr_dataURL",e)}catch(e){if("anonymous"!==B.crossOrigin)return B.crossOrigin="anonymous",void(B.complete&&0!==B.naturalWidth?W():B.addEventListener("load",W));console.warn("Cannot inline img src="+H+"! Error: "+e)}"anonymous"===B.crossOrigin&&(U?C.crossOrigin=z("crossOrigin",U):B.removeAttribute("crossorigin"))};B.complete&&0!==B.naturalWidth?W():B.addEventListener("load",W)}if("audio"===S||"video"===S){var V=C;V.rr_mediaState=e.paused?"paused":"played",x.add("rr_mediaState"),V.rr_mediaCurrentTime=e.currentTime,V.rr_mediaPlaybackRate=e.playbackRate,V.rr_mediaMuted=e.muted,V.rr_mediaLoop=e.loop,V.rr_mediaVolume=e.volume}if(w||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),_){var Z=e.getBoundingClientRect(),G=Z.width,Q=Z.height,J=Z.left,Y=Z.top,K=null==(r=a.defaultView)?void 0:r.getComputedStyle(e);C={class:C.class,rr_width:G+"px",rr_height:Q+"px",rr_left:Math.floor(J+((null==(i=a.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(Y+((null==(n=a.defaultView)?void 0:n.scrollY)||0))+"px"},x.add("rr_width"),x.add("rr_height"),x.add("rr_left"),x.add("rr_top"),K&&(C.rr_position=K.position||"static",x.add("rr_position"),K.transform&&"none"!==K.transform&&(C.rr_transform=K.transform,x.add("rr_transform")),K.display&&K.display.startsWith("inline")&&(C.rr_display=K.display,x.add("rr_display")))}if("iframe"!==S||y(C.src)||(e.contentDocument||(C.rr_src=C.src),delete C.src),c||d)for(var X of Object.entries(C)){var ee=X[0],te=X[1];"string"!=typeof te&&null!==te||(C[ee]=$a({element:e,name:ee,value:te,maskAllElementAttributes:c,maskAttributeFn:d,isGenerated:x.has(ee)}))}j=!0;try{customElements.get(S)&&(F=!0)}catch(e){}return{type:Nn.Element,tagName:S,attributes:C,childNodes:[],isSVG:(q=e,Boolean("svg"===q.tagName||q.ownerSVGElement)||void 0),needBlock:_,rootId:k,isCustom:F}}(e,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,maskAllElementAttributes:d,maskAttributeFn:v,dataURLOptions:p,inlineImages:g,recordCanvas:m,canvasMaskingConfigured:y,keepIframeSrcFn:b,newlyAddedElement:k,rootId:_});case e.TEXT_NODE:return function(e,t){var r,i=t.needsMask,n=t.maskTextFn,a=t.rootId,o=Gn.parentNode(e),s=o&&o.tagName,u=Gn.textContent(e),l="STYLE"===s||void 0,h="SCRIPT"===s||void 0;if(l&&u){try{if(e.nextSibling||e.previousSibling);else if(ka(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var c=Aa(o.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(u=c)}}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=Qa(u,co(t.doc))}return h&&(u="SCRIPT_PLACEHOLDER"),!l&&!h&&u&&i&&(u=n?n(u,Gn.parentElement(e)):u.replace(/[\S]/g,"*")),{type:Nn.Text,textContent:u||"",isStyle:l,rootId:a}}(e,{doc:r,needsMask:a,maskTextFn:l,rootId:_});case e.CDATA_SECTION_NODE:return{type:Nn.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Nn.Comment,textContent:Gn.textContent(e)||"",rootId:_};default:return!1}}(e,{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:z,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,keepIframeSrcFn:N,newlyAddedElement:q});if(!G)return console.warn(e,"not serialized"),null;Z=i.hasNode(e)?i.getId(e):function(e,t){if(t.comment&&e.type===Nn.Comment)return!0;if(e.type===Nn.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===function(e,t){var r,i;try{i=new URL(e,window.location.href)}catch(e){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ko(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ko(e.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ko(e.attributes.rel)))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ko(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ko(e.attributes.property).match(/^(og|twitter|fb):/)||ko(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ko(e.attributes.name)))return!0;if(t.headMetaRobots&&["robots","googlebot","bingbot"].includes(ko(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(ko(e.attributes.name))||ko(e.attributes.property).match(/^article:/)||ko(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(ko(e.attributes.name)))return!0}}return!1}(G,b)||!V&&G.type===Nn.Text&&!G.isStyle&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?ao:oo();var Q=Object.assign(G,{id:Z});if(i.add(e,Q),Z===ao)return null;T&&T(e);var J=!l;if(Q.type===Nn.Element){J=J&&!Q.needBlock,delete Q.needBlock;var Y=Gn.shadowRoot(e);Y&&Ma(Y)&&(Q.isShadowHost=!0)}if((Q.type===Nn.Document||Q.type===Nn.Element)&&J){b.headWhitespace&&Q.type===Nn.Element&&"head"===Q.tagName&&(V=!1);var K={doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:z,maskTextClass:o,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,slimDOMOptions:b,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:I,iframeLoadTimeout:A,onIframeListenerRegistered:E,onStylesheetLoad:L,stylesheetLoadTimeout:D,keepIframeSrcFn:N,depth:B+1,maxDepth:U};if(Q.type===Nn.Element&&"textarea"===Q.tagName&&void 0!==Q.attributes.value);else for(var X of Array.from(Gn.childNodes(e))){var ee=Co(X,K);ee&&Q.childNodes.push(ee)}var te=null;if(xa(e)&&(te=Gn.shadowRoot(e)))for(var re of Array.from(Gn.childNodes(te))){var ie=Co(re,K);ie&&(Ma(te)&&(ie.isShadow=!0),Q.childNodes.push(ie))}}var ne=Gn.parentNode(e);if(ne&&Ca(ne)&&Ma(ne)&&(Q.isShadow=!0),Q.type===Nn.Element&&"iframe"===Q.tagName){var ae=function(e,t,r){var i,n=()=>{},a=e.contentWindow;if(!a)return n;try{i=a.document.readyState}catch(e){return n}var o=()=>t();if("complete"!==i){var s=!1,u=null,l=()=>{s||(s=!0,null!==u&&(clearTimeout(u),u=null),yo(e,"load",h),e.addEventListener("load",o),t())},h=()=>l();return u=setTimeout(l,r),e.addEventListener("load",h),()=>{null!==u&&(clearTimeout(u),u=null),s?yo(e,"load",o):(s=!0,yo(e,"load",h))}}var c,d="about:blank";try{c=a.location.href}catch(e){return n}if(c!==d||e.src===d||""===e.src){var v=setTimeout(t,0);return e.addEventListener("load",o),()=>{clearTimeout(v),yo(e,"load",o)}}return e.addEventListener("load",o),()=>{yo(e,"load",o)}}(e,(()=>{var t=e.contentDocument;if(t&&I){var r=Co(t,{doc:t,mirror:i,blockClass:n,blockSelector:a,needsMask:z,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,slimDOMOptions:b,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:I,iframeLoadTimeout:A,onIframeListenerRegistered:E,onStylesheetLoad:L,stylesheetLoadTimeout:D,keepIframeSrcFn:N,depth:B+1,maxDepth:U});r&&I(e,r)}}),A);null==E||E(e,ae)}return Q.type===Nn.Element&&"link"===Q.tagName&&"stylesheet"===Q.attributes.rel&&function(t,u,l){if(!bo.has(t)){var h;try{h=t.sheet}catch(e){return}if(!h){var d=new AbortController,g=!1,w=()=>{if(!g){g=!0;try{(()=>{if(L){var t=Co(e,{doc:r,mirror:i,blockClass:n,blockSelector:a,needsMask:z,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:v,maskTextFn:f,maskInputFn:p,maskAllElementAttributes:m,maskAttributeFn:y,slimDOMOptions:b,dataURLOptions:k,inlineImages:S,recordCanvas:C,canvasMaskingConfigured:M,preserveWhiteSpace:V,onSerialize:T,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:L,stylesheetLoadTimeout:D,keepIframeSrcFn:N,depth:B,maxDepth:U});t&&L(e,t)}})()}finally{bo.delete(t),d.abort()}}},_=setTimeout(w,l);d.signal.addEventListener("abort",(()=>clearTimeout(_)),{once:!0}),t.addEventListener("load",w,{signal:d.signal,once:!0}),bo.set(t,d)}}}(e,0,D),Q}function Mo(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:!1===e?{}:e}class To{constructor(){Rn(this,"parentElement",null),Rn(this,"parentNode",null),Rn(this,"ownerDocument"),Rn(this,"firstChild",null),Rn(this,"lastChild",null),Rn(this,"previousSibling",null),Rn(this,"nextSibling",null),Rn(this,"ELEMENT_NODE",1),Rn(this,"TEXT_NODE",3),Rn(this,"nodeType"),Rn(this,"nodeName"),Rn(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof To))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Io(e,t,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>Ro(r,e,t,i)}function Ro(e,t,r,i){Ao((()=>{var n=e.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(e,t,r,i):n.call(e,t,r))}))}function Ao(e){try{e()}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}}var Eo="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Lo={map:{},getId(){return console.error(Eo),-1},getNode(){return console.error(Eo),null},removeNodeFromMap(){console.error(Eo)},has(){return console.error(Eo),!1},reset(){console.error(Eo)}};function Oo(e,t,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var a=arguments.length,o=new Array(a),s=0;a>s;s++)o[s]=arguments[s];var u=Date.now();n||!1!==r.leading||(n=u);var l=t-(u-n),h=this;0>=l||l>t?(i&&(clearTimeout(i),i=null),n=u,e.apply(h,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,e.apply(h,o)}),l))}}function Do(e,t,r,i,n){void 0===n&&(n=window);var a=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(e){if(setTimeout((()=>{try{r.set.call(this,e)}catch(e){}}),0),a&&a.set){if(a.get)try{a.get.call(this)}catch(e){return}a.set.call(this,e)}}}),()=>Do(e,t,a||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Lo=new Proxy(Lo,{get(e,t,r){return"map"===t&&console.error(Eo),Reflect.get(e,t,r)}}));var Po=Date.now;function No(e){var t,r,i,n,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=Gn.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(i=Gn.parentElement(a.body))?void 0:i.scrollTop)||(null==(n=null==a?void 0:a.body)?void 0:n.scrollTop)||0}}function Fo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function jo(e){return e?e.nodeType===e.ELEMENT_NODE?e:Gn.parentElement(e):null}function Bo(e,t,r,i){if(!e)return!1;var n=jo(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(i&&null!==n.closest("."+t))return!0}else if(go(n,t,i))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function Ho(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===ao}function $o(e,t){if(Ca(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var i=Gn.parentNode(e);return(!i||i.nodeType!==e.DOCUMENT_NODE)&&(!i||$o(i,t))}function Uo(e){return Boolean(e.changedTouches)}function zo(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Wo(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Vo(e){return!!e&&(e instanceof To&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Gn.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Po=()=>(new Date).getTime());class Zo{constructor(){Rn(this,"id",1),Rn(this,"styleIDMap",new WeakMap),Rn(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Go(e){var t,r=null;return"getRootNode"in e&&(null==(t=Gn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Gn.host(Gn.getRootNode(e))&&(r=Gn.host(Gn.getRootNode(e))),r}function Qo(e){var t=e.ownerDocument;return!!t&&(Gn.contains(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Go(r);)r=t;return r}(e);return Gn.contains(t,r)}(e))}function Jo(e){return"__ln"in e}class Yo{constructor(){Rn(this,"length",0),Rn(this,"head",null),Rn(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;e>r;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Jo(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Jo(e.nextSibling)&&e.nextSibling.__ln.previous){var i=e.nextSibling.__ln.previous;t.previous=i,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,i&&(i.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var Ko,Xo=(e,t)=>e+"@"+t;class es{constructor(){Rn(this,"frozen",!1),Rn(this,"locked",!1),Rn(this,"texts",[]),Rn(this,"attributes",[]),Rn(this,"attributeMap",new WeakMap),Rn(this,"generatedAttributes",new WeakMap),Rn(this,"removes",[]),Rn(this,"mapRemoves",[]),Rn(this,"movedMap",{}),Rn(this,"addedSet",new Set),Rn(this,"movedSet",new Set),Rn(this,"droppedSet",new Set),Rn(this,"removesSubTreeCache",new Set),Rn(this,"mutationCb"),Rn(this,"blockClass"),Rn(this,"blockSelector"),Rn(this,"maskTextClass"),Rn(this,"maskTextSelector"),Rn(this,"inlineStylesheet"),Rn(this,"maskInputOptions"),Rn(this,"maskTextFn"),Rn(this,"maskInputFn"),Rn(this,"maskAllElementAttributes"),Rn(this,"maskAttributeFn"),Rn(this,"keepIframeSrcFn"),Rn(this,"recordCanvas"),Rn(this,"canvasMaskingConfigured"),Rn(this,"inlineImages"),Rn(this,"slimDOMOptions"),Rn(this,"dataURLOptions"),Rn(this,"doc"),Rn(this,"mirror"),Rn(this,"iframeManager"),Rn(this,"stylesheetManager"),Rn(this,"shadowDomManager"),Rn(this,"canvasManager"),Rn(this,"processedNodeManager"),Rn(this,"unattachedDoc"),Rn(this,"canvasManagerReleased",!1),Rn(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Rn(this,"emit",(()=>{if(!this.frozen&&!this.locked){var e,t,r=Jn(),i=ea();try{this.processBufferedMutations()}finally{e=Jn()-r,t=i,ra>0||ta(e,null!=t?t:Yn)||e>ca.slowestBatchMs&&(ca.slowestBatchMs=e)}}})),Rn(this,"processBufferedMutations",(()=>{for(var e=[],t=new Set,r=new Yo,i=e=>{for(var t=e,r=ao;r===ao;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},n=n=>{var a=Gn.parentNode(n);if(a&&Qo(n)&&"TEXTAREA"!==a.tagName){var o=Ca(a)?this.mirror.getId(Go(n)):this.mirror.getId(a),s=i(n);if(-1===o||-1===s)return r.addNode(n);var u=Co(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:e=>{zo(e,this.mirror)&&this.iframeManager.addIframe(e),Wo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Vo(e)&&!Bo(e,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(Gn.shadowRoot(e),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onIframeListenerRegistered:(e,t)=>{this.iframeManager.registerLoadListenerDisposer(e,t)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});u&&(e.push({parentId:o,nextId:s,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var a of this.movedSet)rs(this.removesSubTreeCache,a)&&!this.movedSet.has(Gn.parentNode(a))||n(a);for(var o of this.addedSet)is(this.droppedSet,o)||rs(this.removesSubTreeCache,o)?is(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var s=null;r.length;){var u=null;if(s){var l=this.mirror.getId(Gn.parentNode(s.value)),h=i(s.value);-1!==l&&-1!==h&&(u=s)}if(!u)for(var c=r.tail;c;){var d=c;if(c=c.previous,d){var v=this.mirror.getId(Gn.parentNode(d.value));if(-1===i(d.value))continue;if(-1!==v){u=d;break}var f=Gn.parentNode(d.value);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=Gn.host(f);if(-1!==this.mirror.getId(p)){u=d;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),n(u.value)}var g={texts:this.texts.map((e=>{var t=e.node,r=Gn.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var t,r=e.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof r.style){var i=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.style.length>i.length&&(i+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var a of Object.entries(r)){var o=a[0],s=a[1];"string"!=typeof s&&null!==s||(r[o]=$a({element:e.node,name:o,value:s,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null==(t=this.generatedAttributes.get(e.node))?void 0:t.has(o)}))}return{id:this.mirror.getId(e.node),attributes:r}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&this.mutationCb(g)})),Rn(this,"bufferBelongsToIframe",(e=>this.doc===e.contentDocument)),Rn(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(this.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e,t));var r=Array.from(Gn.childNodes(e),(e=>Gn.textContent(e)||"")).join("");t.attributes.value=ja({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:za(e),value:r,maskInputFn:this.maskInputFn})})),Rn(this,"processMutation",(e=>{var t;if(!Ho(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var r=Gn.textContent(e.target);Bo(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue||this.texts.push({value:mo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,jo(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var i,n=e.target,a=e.attributeName,o=null!==(i=e.attributeNamespace)&&void 0!==i?i:null,s=function(e,t,r){if(!r)return t;var i=e.getAttributeNodeNS(r,t);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+t;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+t;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===t?t:"xmlns:"+t;var n=e.lookupPrefix(r);return n?n+":"+t:t}(n,a,o),u=o?n.getAttributeNS(o,a):e.target.getAttribute(a);if("value"===s){var l=n,h=za(l);u=ja({element:l,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:h,value:u,maskInputFn:this.maskInputFn})}if(Bo(e.target,this.blockClass,this.blockSelector,!1)||u===e.oldValue)return;var c=this.attributeMap.get(e.target),d="IFRAME"===n.tagName&&"src"===s;if(d&&!this.keepIframeSrcFn(u)&&n.contentDocument)return;if(c||(this.attributes.push(c={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e.target,c)),"type"===s&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!po(n.tagName,s)){var v=fo(this.doc,Ba(n.tagName),Ba(s),u,n,this.dataURLOptions);if(d&&!this.keepIframeSrcFn(u)&&(s="rr_src"),c.attributes[s]=v,null==(t=this.generatedAttributes.get(e.target))||t.delete(s),"style"===s){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var f=this.unattachedDoc.createElement("span"),p=n.style;for(var g of(e.oldValue&&(f.style.cssText=e.oldValue),Array.from(p))){var m=p.getPropertyValue(g),y=p.getPropertyPriority(g);m!==f.style.getPropertyValue(g)||y!==f.style.getPropertyPriority(g)?c.styleDiff[g]=""===y?m:[m,y]:c._unchangedStyles[g]=[m,y]}for(var b of Array.from(f.style))""===p.getPropertyValue(b)&&(c.styleDiff[b]=!1)}else if("open"===s&&"DIALOG"===n.tagName){c.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";var w=this.generatedAttributes.get(e.target);w||this.generatedAttributes.set(e.target,w=new Set),w.add("rr_open_mode")}}break;case"childList":if(Bo(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),i=Ca(e.target)?this.mirror.getId(Gn.host(e.target)):this.mirror.getId(e.target);Bo(e.target,this.blockClass,this.blockSelector,!1)||Ho(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ts(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||$o(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xo(r,i)]?ts(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:!(!Ca(e.target)||!Ma(e.target))||void 0}),function(e,t){for(var r=[e];r.length;){var i=r.pop();t.has(i)||(t.add(i),Gn.childNodes(i).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Rn(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)){if(this.addedSet.has(e))return this.addedSet.delete(e),void this.addedSet.add(e);if(!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ho(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Xo(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Bo(e,this.blockClass,this.blockSelector,!1)||(Gn.childNodes(e).forEach((e=>this.genAdds(e))),Vo(e)&&Gn.childNodes(Gn.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]})),this.canvasManager.acquire()}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function ts(e,t){for(var r=[t];r.length;){var i=r.pop();e.delete(i),Gn.childNodes(i).forEach((e=>r.push(e)))}}function rs(e,t,r){return 0!==e.size&&function(e,t,r){var i=Gn.parentNode(t);return!!i&&e.has(i)}(e,t)}function is(e,t){if(0===e.size)return!1;for(var r=Gn.parentNode(t);r;){if(e.has(r))return!0;r=Gn.parentNode(r)}return!1}var ns=function(e,t){return void 0===t&&(t="rrweb"),Ko?function(){try{return e(...arguments)}catch(e){if(Ko&&!0===Ko(e,t))return;throw e}}:e},as=[];function os(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function ss(e,t){var r,i=new es;i.init(e);try{r=new(Vn())(ns(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return e.attributeFilter&&e.attributeFilter.length>0&&(n.attributeFilter=e.attributeFilter),r.observe(t,n),as.push(i),{observer:r,buffer:i}}catch(e){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(e){}throw e}}function us(e){var t=e.scrollCb,r=e.doc,i=e.mirror,n=e.blockClass,a=e.blockSelector,o=e.sampling,s=new Map,u=e=>{var o=os(e);if(o&&!Bo(o,n,a,!0)){var u,l,h=i.getId(o);if(o===r&&r.defaultView){var c=No(r.defaultView);u=c.left,l=c.top}else u=o.scrollLeft,l=o.scrollTop;var d=u+","+l;s.get(h)!==d&&(s.set(h,d),t({id:h,x:u,y:l}))}},l=[Io("scroll",ns(Oo(ns((e=>u(e))),o.scroll||100)),r)];return"onscrollend"in r&&l.push(Io("scrollend",ns(u),r)),()=>l.forEach((e=>e()))}function ls(e,t){for(var r=as.length-1;r>=0;r--){var i=as[r];if(i){var n=i.bufferBelongsToIframe(e);!n&&t&&t.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),as.splice(r,1))}}}var hs=["INPUT","TEXTAREA","SELECT"],cs=new WeakMap;function ds(e){return function e(t,r){if(ms("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||ms("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||ms("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||ms("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var i=Array.from(t.parentRule.cssRules).indexOf(t);return r.unshift(i),e(t.parentRule,r)}if(t.parentStyleSheet){var n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);r.unshift(n)}return r}(e,[])}function vs(e,t,r){var i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}var fs=5e3;function ps(e,t){var r,i,n,a,o=e.stylesheetManager;a=e.mirror.getId("#document"===t.nodeName?t:Gn.host(t));var s="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(n=null==(i=t.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==s?void 0:s.prototype)?Object.getOwnPropertyDescriptor(null==s?void 0:s.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&s&&u?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var e;return null==(e=u.get)?void 0:e.call(this)},set(e){var t,r;try{r=null==(t=u.set)?void 0:t.call(this,e)}catch(e){if(e&&"object"==typeof e&&"NotAllowedError"===e.name)return;throw e}if(null!==a&&-1!==a)try{o.adoptStyleSheets(e,a)}catch(e){}return r}}),ns((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function gs(e,t){void 0===t&&(t={});var r,i,n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){var r=e.mutationCb,i=e.mousemoveCb,n=e.mouseInteractionCb,a=e.scrollCb,o=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb,h=e.styleDeclarationCb,c=e.canvasMutationCb,d=e.fontCb,v=e.selectionCb,f=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),i(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),n(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),a(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),o(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),u(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),l(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),h(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),c(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),d(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),v(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t);var a,o,s,u,l,c,d,v,f=[],p=ns((()=>{if(i){i.destroy(),i.reset();var t=as.indexOf(i);-1!==t&&as.splice(t,1)}e.shadowDomManager.resetForDoc(e.doc),null==r||r.disconnect(),f.forEach((e=>e()))}));try{if(e.recordDOM){var g=ss(e,e.doc);r=g.observer,i=g.buffer}if(f.push(function(e){var t=e.mousemoveCb,r=e.sampling,i=e.doc,n=e.mirror;if(!1===r.mousemove)return()=>{};var a,o="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,u=[],l=Oo(ns((e=>{var r=Date.now()-a;t(u.map((e=>(e.timeOffset-=r,e))),e),u=[],a=null})),s),h=ns(Oo(ns((e=>{var t=os(e),r=Uo(e)?e.changedTouches[0]:e,i=r.clientX,o=r.clientY;a||(a=Po()),u.push({x:i,y:o,id:n.getId(t),timeOffset:Po()-a}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?En.Drag:e instanceof MouseEvent?En.MouseMove:En.TouchMove)})),o,{trailing:!1})),c=[Io("mousemove",h,i),Io("touchmove",h,i),Io("drag",h,i)];return ns((()=>{c.forEach((e=>e()))}))}(e)),f.push(function(e){var t=e.mouseInteractionCb,r=e.doc,i=e.mirror,n=e.blockClass,a=e.blockSelector,o=e.sampling;if(!1===o.mouseInteraction)return()=>{};var s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,u=[],l=null;return Object.keys(Ln).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((e=>{var o=Ba(e),s=(e=>r=>{var o=os(r);if(!Bo(o,n,a,!0)){var s=null,u=e;if("pointerType"in r){switch(r.pointerType){case"mouse":s=On.Mouse;break;case"touch":s=On.Touch;break;case"pen":s=On.Pen}s===On.Touch&&(Ln[e]===Ln.MouseDown?u="TouchStart":Ln[e]===Ln.MouseUp&&(u="TouchEnd"))}else Uo(r)&&(s=On.Touch);null!==s?(l=s,(u.startsWith("Touch")&&s===On.Touch||u.startsWith("Mouse")&&s===On.Mouse)&&(s=null)):Ln[e]===Ln.Click&&(s=l,l=null);var c=Uo(r)?r.changedTouches[0]:r;if(c){var d=i.getId(o),v=c.clientX,f=c.clientY;ns(t)(h({type:Ln[u],id:d,x:v,y:f},null!==s&&{pointerType:s}))}}})(e);if(window.PointerEvent)switch(Ln[e]){case Ln.MouseDown:case Ln.MouseUp:o=o.replace("mouse","pointer");break;case Ln.TouchStart:case Ln.TouchEnd:return}u.push(Io(o,s,r))})),ns((()=>{u.forEach((e=>e()))}))}(e)),f.push(us(e)),f.push(function(e,t){var r=e.viewportResizeCb,i=t.win,n=-1,a=-1;return Io("resize",ns(Oo(ns((()=>{var e=Fo(),t=qo();n===e&&a===t||(r({width:Number(t),height:Number(e)}),n=e,a=t)})),200)),i)}(e,{win:n})),f.push(function(e){var t=e.inputCb,r=e.doc,i=e.mirror,n=e.blockClass,a=e.blockSelector,o=e.ignoreClass,s=e.ignoreSelector,u=e.maskInputOptions,l=e.maskInputFn,c=e.userTriggeredOnInput;function d(e){var t=os(e),i=e.isTrusted,h=r.defaultView;if(!t||!h||t instanceof h.HTMLElement){var d=t&&t.tagName;if(t&&"OPTION"===d&&(t=Gn.parentElement(t)),t&&d&&hs.indexOf(d)>=0&&!Bo(t,n,a,!0)&&!(t.classList.contains(o)||s&&t.matches(s))){var f=t.value,p=!1,g=za(t)||"";"radio"===g||"checkbox"===g?p=t.checked:(u[d.toLowerCase()]||u[g])&&(f=ja({element:t,maskInputOptions:u,tagName:d,type:g,value:f,maskInputFn:l})),v(t,c?{text:f,isChecked:p,userTriggered:i}:{text:f,isChecked:p});var m=t.name;"radio"===g&&m&&p&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var r=e.value;v(e,c?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function v(e,r){var n=cs.get(e);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){cs.set(e,r);var a=i.getId(e);ns(t)(h({},r,{id:a}))}}var f=("last"===e.sampling.input?["change"]:["input","change"]).map((e=>Io(e,ns(d),r))),p=r.defaultView;if(!p)return()=>{f.forEach((e=>e()))};var g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return g&&g.set&&f.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map((e=>Do(e[0],e[1],{set(){ns(d)({target:this,isTrusted:!1})}},!1,p)))),ns((()=>{f.forEach((e=>e()))}))}(e)),f.push(function(e){var t=e.mediaInteractionCb,r=e.blockClass,i=e.blockSelector,n=e.mirror,a=e.sampling,o=e.doc,s=ns((e=>Oo(ns((a=>{var o=os(a);if(o&&!Bo(o,r,i,!0)){var s=o.currentTime,u=o.volume,l=o.muted,h=o.playbackRate,c=o.loop;t({type:e,id:n.getId(o),currentTime:s,volume:u,muted:l,playbackRate:h,loop:c})}})),a.media||500))),u=[Io("play",s(Pn.Play),o),Io("pause",s(Pn.Pause),o),Io("seeked",s(Pn.Seeked),o),Io("volumechange",s(Pn.VolumeChange),o),Io("ratechange",s(Pn.RateChange),o)];return ns((()=>{u.forEach((e=>e()))}))}(e)),e.recordDOM){var m=function(e){var t=new Map,r=new Set,i=!0,n=e=>{if(i)try{e()}catch(e){}},a=e=>{var r,i=t.get(e);if(i){for(;null==(r=i[0])?void 0:r.ready;){var a=i.shift();(null==a?void 0:a.emit)&&n(a.emit)}0===i.length&&t.delete(e)}};return{queueMutation(e,r){if(e){var i=t.get(e);i?(i.push({emit:r,ready:!0}),a(e)):n(r)}else n(r)},queuePendingMutation(o,s,u){if(!i)return()=>{};var l=t.get(o);l||t.set(o,l=[]);var h={emit:s,ready:!1};l.push(h);var c,d=!1,v=!1,f=()=>{d||v||(d=!0,void 0!==c&&r.delete(c),h.ready=!0,h.emit=void 0,a(o))};try{c=e.setTimeout(f,fs),d||v?e.clearTimeout(c):r.add(c)}catch(e){f()}return t=>{!v&&i&&(v=!0,void 0!==c&&(e.clearTimeout(c),r.delete(c)),d?t&&n(u):(h.ready=!0,t||(h.emit=void 0),a(o)))}},reset(){i=!1,r.forEach((t=>e.clearTimeout(t))),r.clear(),t.clear()}}}(n);f.push(m.reset),f.push(function(e,t){var r=e.styleSheetRuleCb,i=e.mirror,n=e.stylesheetManager,a=t.win,o=t.mutationQueue;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};var s=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t);var l=vs(t,i,n.styleMirror),h=l.id,c=l.styleId;return(h&&-1!==h||c&&-1!==c)&&o.queueMutation(t,(()=>r({id:h,styleId:c,adds:[{rule:s,index:u}]}))),u}),"host")}),a.CSSStyleSheet.prototype.addRule=function(e,t,r){return void 0===r&&(r=this.cssRules.length),a.CSSStyleSheet.prototype.insertRule.apply(this,[e+" { "+t+" }",r])};var u,l,h=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(h,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t);var l=vs(t,i,n.styleMirror),h=l.id,c=l.styleId;return(h&&-1!==h||c&&-1!==c)&&o.queueMutation(t,(()=>r({id:h,styleId:c,removes:[{index:s}]}))),u}),"host")}),a.CSSStyleSheet.prototype.removeRule=function(e){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(u=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);try{var l=null==u?void 0:u.then;if(t.ownerNode||!u||"function"!=typeof l)return u;n.onCssomSheetMutation(t);var h=vs(t,i,n.styleMirror),c=h.id,d=h.styleId;if(!(c&&-1!==c||d&&-1!==d))return u;var v=o.queuePendingMutation(t,(()=>r({id:c,styleId:d,replace:s})),(()=>{var e=Aa(t);null!==e&&r({id:c,styleId:d,replace:e})}));try{l.call(u,(()=>v(!0)),(()=>v(!1)))}catch(e){v(!1)}}catch(e){}return u}),"host")})),a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t);var l=vs(t,i,n.styleMirror),h=l.id,c=l.styleId;return(h&&-1!==h||c&&-1!==c)&&o.queueMutation(t,(()=>r({id:h,styleId:c,replaceSync:s}))),u}),"host")}));var c={};ys("CSSGroupingRule")?c.CSSGroupingRule=a.CSSGroupingRule:(ys("CSSMediaRule")&&(c.CSSMediaRule=a.CSSMediaRule),ys("CSSConditionRule")&&(c.CSSConditionRule=a.CSSConditionRule),ys("CSSSupportsRule")&&(c.CSSSupportsRule=a.CSSSupportsRule));var d={};return Object.entries(c).forEach((e=>{var t=e[0],a=e[1];d[t]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(d[t].insertRule,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t.parentStyleSheet);var l=vs(t.parentStyleSheet,i,n.styleMirror),h=l.id,c=l.styleId;if(t.parentStyleSheet&&(h&&-1!==h||c&&-1!==c)){var d=[...ds(t),u];o.queueMutation(t.parentStyleSheet,(()=>r({id:h,styleId:c,adds:[{rule:s,index:d}]})))}return u}),"host")}),a.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:ns(((e,t,a)=>{var s=a[0],u=e.apply(t,a);n.onCssomSheetMutation(t.parentStyleSheet);var l=vs(t.parentStyleSheet,i,n.styleMirror),h=l.id,c=l.styleId;if(t.parentStyleSheet&&(h&&-1!==h||c&&-1!==c)){var d=[...ds(t),s];o.queueMutation(t.parentStyleSheet,(()=>r({id:h,styleId:c,removes:[{index:d}]})))}return u}),"host")})})),ns((()=>{a.CSSStyleSheet.prototype.insertRule=s,a.CSSStyleSheet.prototype.deleteRule=h,u&&(a.CSSStyleSheet.prototype.replace=u),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach((e=>{var t=e[0],r=e[1];r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:n,mutationQueue:m})),f.push(ps(e,e.doc)),f.push(function(e,t){var r=e.styleDeclarationCb,i=e.mirror,n=e.ignoreCSSAttributes,a=e.stylesheetManager,o=t.win,s=t.mutationQueue,u=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:ns(((e,t,o)=>{var u,l=o[0],h=o[1],c=o[2],d=e.apply(t,o);if(n.has(l))return d;var v=null==(u=t.parentRule)?void 0:u.parentStyleSheet;a.onCssomSheetMutation(v);var f=vs(v,i,a.styleMirror),p=f.id,g=f.styleId;if(p&&-1!==p||g&&-1!==g){var m=ds(t.parentRule);s.queueMutation(v,(()=>r({id:p,styleId:g,set:{property:l,value:h,priority:c},index:m})))}return d}),"host")});var l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ns(((e,t,o)=>{var u,l=o[0],h=e.apply(t,o);if(n.has(l))return h;var c=null==(u=t.parentRule)?void 0:u.parentStyleSheet;a.onCssomSheetMutation(c);var d=vs(c,i,a.styleMirror),v=d.id,f=d.styleId;if(v&&-1!==v||f&&-1!==f){var p=ds(t.parentRule);s.queueMutation(c,(()=>r({id:v,styleId:f,remove:{property:l},index:p})))}return h}),"host")}),ns((()=>{o.CSSStyleDeclaration.prototype.setProperty=u,o.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:n,mutationQueue:m})),e.collectFonts&&f.push(function(e){var t=e.fontCb,r=e.doc,i=r.defaultView;if(!i)return()=>{};var n=[],a=new WeakMap,o=i.FontFace;i.FontFace=function(e,t,r){var i=new o(e,t,r);return a.set(i,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};var s=Zn(r.fonts,"add",(function(e){return function(r){return setTimeout(ns((()=>{var e=a.get(r);e&&(t(e),a.delete(r))})),0),e.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(s),ns((()=>{n.forEach((e=>e()))}))}(e))}for(var y of(f.push((o=(a=e).doc,s=a.mirror,u=a.blockClass,l=a.blockSelector,c=a.selectionCb,d=!0,(v=ns((()=>{var e=o.getSelection();if(!(!e||d&&(null==e?void 0:e.isCollapsed))){d=e.isCollapsed||!1;for(var t=[],r=e.rangeCount||0,i=0;r>i;i++){var n=e.getRangeAt(i),a=n.startContainer,h=n.startOffset,v=n.endContainer,f=n.endOffset;Bo(a,u,l,!0)||Bo(v,u,l,!0)||t.push({start:s.getId(a),startOffset:h,end:s.getId(v),endOffset:f})}c({ranges:t})}})))(),Io("selectionchange",v))),f.push(function(e){var t=e.customElementCb,r=e.doc.defaultView;return r&&r.customElements?Zn(r.customElements,"define",(function(e){return function(r,i,n){try{t({define:{name:r}})}catch(e){console.warn("Custom element callback failed for "+r)}return e.apply(this,[r,i,n])}})):()=>{}}(e)),e.plugins))f.push(y.observer(y.callback,n,y.options))}catch(e){try{p()}catch(e){}throw e}return p}function ms(e){return void 0!==window[e]}function ys(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class bs{constructor(e){Rn(this,"iframeRemoteIdToLocalIdMap",new WeakMap),Rn(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){if(0>t)return t;var n=r||this.getRemoteIdToLocalIdMap(e),a=i||this.getLocalIdToRemoteIdMap(e),o=n.get(t);return void 0===o&&(o=this.generateIdFn(),n.set(t,o),a.set(o,t)),o}getIds(e,t){var r=this.getRemoteIdToLocalIdMap(e),i=this.getLocalIdToRemoteIdMap(e);return t.map((t=>this.getId(e,t,r,i)))}getRemoteId(e,t,r){var i;return"number"!=typeof t||0>t?t:null!==(i=(r||this.getLocalIdToRemoteIdMap(e)).get(t))&&void 0!==i?i:-1}getRemoteIds(e,t){var r=this.getLocalIdToRemoteIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(e),this.iframeLocalIdToRemoteIdMap.delete(e)}getRemoteIdToLocalIdMap(e){var t=this.iframeRemoteIdToLocalIdMap.get(e);return t||this.iframeRemoteIdToLocalIdMap.set(e,t=new Map),t}getLocalIdToRemoteIdMap(e){var t=this.iframeLocalIdToRemoteIdMap.get(e);return t||this.iframeLocalIdToRemoteIdMap.set(e,t=new Map),t}}class ws{constructor(e){Rn(this,"iframes",new WeakMap),Rn(this,"crossOriginIframeMap",new WeakMap),Rn(this,"crossOriginIframeMirror",new bs(oo)),Rn(this,"crossOriginIframeStyleMirror"),Rn(this,"crossOriginIframeRootIdMap",new WeakMap),Rn(this,"mirror"),Rn(this,"mutationCb"),Rn(this,"wrappedEmit"),Rn(this,"loadListener"),Rn(this,"pageHideListener"),Rn(this,"stylesheetManager"),Rn(this,"recordCrossOriginIframes"),Rn(this,"messageHandler"),Rn(this,"nestedIframeListeners",new Map),Rn(this,"attachedWindows",new WeakMap),Rn(this,"attachedDocuments",new WeakMap),Rn(this,"attachedIframes",new Map),Rn(this,"loadListenerDisposers",new WeakMap),Rn(this,"iframeElementsById",new Map),Rn(this,"pageHideHandlers",new WeakMap),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}registerLoadListenerDisposer(e,t){var r=this.loadListenerDisposers.get(e);r||this.loadListenerDisposers.set(e,r=new Set),r.add(t);var i=this.mirror.getId(e);-1!==i&&this.iframeElementsById.set(i,e)}getIframeElementById(e){var t,r,i;return null!==(t=null!==(r=null==(i=this.attachedIframes.get(e))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(e))&&void 0!==t?t:null}forgetIframeId(e){this.attachedIframes.delete(e),this.iframeElementsById.delete(e)}disposeLoadListeners(e){var t=this.loadListenerDisposers.get(e);t&&(t.forEach((e=>Ao(e))),this.loadListenerDisposers.delete(e))}removePageHideListener(e){var t=this.pageHideHandlers.get(e);t&&(t.forEach((e=>{Ro(e.win,"pagehide",e.handler)})),this.pageHideHandlers.delete(e))}addLoadListener(e){this.loadListener=e}addPageHideListener(e){this.pageHideListener=e}removeLoadListener(){this.loadListener=void 0}trackIframeContent(e,t){var r=this.mirror.getId(e);return this.attachedIframes.set(r,{element:e,content:t}),r}attachIframe(e,t){var r,i=this.trackIframeContent(e,t);if(e.contentDocument){var n=this.attachedDocuments.get(e);n||this.attachedDocuments.set(e,n=new Set),n.add(e.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var a=e.contentWindow;if(this.recordCrossOriginIframes&&a&&!this.nestedIframeListeners.has(a)){var o=this.handleMessage.bind(this);Ao((()=>{a.addEventListener("message",o),this.nestedIframeListeners.set(a,o);var t=this.attachedWindows.get(e);t||this.attachedWindows.set(e,t=new Set),t.add(a)}))}Ao((()=>{var t=e.contentWindow;if(t){var r=this.pageHideHandlers.get(e);if(r)for(var i of r)if(i.win===t)return;var n=()=>{var t;null==(t=this.pageHideListener)||t.call(this,e),e.contentDocument&&this.mirror.removeNodeFromMap(e.contentDocument),e.contentWindow&&this.crossOriginIframeMap.delete(e.contentWindow)};t.addEventListener("pagehide",n),r||this.pageHideHandlers.set(e,r=new Set),r.add({win:t,handler:n})}})),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var i=this.transformCrossOriginEvent(r,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case An.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),this.trackIframeContent(e,t.data.node),{timestamp:t.timestamp,type:An.IncrementalSnapshot,data:{source:En.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case An.Meta:case An.Load:case An.DomContentLoaded:return!1;case An.Plugin:return t;case An.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case An.IncrementalSnapshot:switch(t.data.source){case En.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case En.Drag:case En.TouchMove:case En.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case En.ViewportResize:return!1;case En.MediaInteraction:case En.MouseInteraction:case En.Scroll:case En.CanvasMutation:case En.Input:return this.replaceIds(t.data,e,["id"]),t;case En.StyleSheetRule:case En.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case En.Font:return t;case En.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case En.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,i){for(var n of i)(Array.isArray(t[n])||"number"==typeof t[n])&&(t[n]=Array.isArray(t[n])?e.getIds(r,t[n]):e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Nn.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}removeIframeById(e){var t=this.attachedIframes.get(e),r=(null==t?void 0:t.element)||this.iframeElementsById.get(e)||this.mirror.getNode(e);if(this.iframeElementsById.delete(e),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach((e=>{var t=this.nestedIframeListeners.get(e);t&&(Ro(e,"message",t),this.nestedIframeListeners.delete(e)),this.crossOriginIframeMap.delete(e)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(Ro(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var a=this.attachedDocuments.get(r);a&&(a.forEach((e=>{Ao((()=>this.mirror.removeNodeFromMap(e)))})),Ao((()=>ls(r,a))),this.attachedDocuments.delete(r))}t&&this.attachedIframes.delete(e)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var e=[];this.attachedIframes.forEach(((t,r)=>{this.mirror.has(r)||e.push(r)})),e.forEach((e=>this.removeIframeById(e)))}}reattachIframes(){this.attachedIframes.forEach(((e,t)=>{var r=e.content;this.mirror.has(t)?this.mutationCb({adds:[{parentId:t,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(t)}))}destroy(){this.recordCrossOriginIframes&&Ro(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((e,t)=>{Ro(t,"message",e)})),this.nestedIframeListeners.clear();var e=new Set;this.iframeElementsById.forEach((t=>e.add(t))),this.attachedIframes.forEach((t=>e.add(t.element))),e.forEach((e=>{this.disposeLoadListeners(e),this.removePageHideListener(e)})),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}}class ks{constructor(e){Rn(this,"shadowDoms",new WeakSet),Rn(this,"mutationCb"),Rn(this,"scrollCb"),Rn(this,"bypassOptions"),Rn(this,"mirror"),Rn(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){var r,i;if(Ma(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=null!==(r=null==(i=Gn.host(e))?void 0:i.ownerDocument)&&void 0!==r?r:t,a=ss(h({},this.bypassOptions,{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),o=a.observer,s=a.buffer;this.restoreHandlers.push({doc:n,handler(){o.disconnect(),s.destroy(),s.releaseCanvasManager();var e=as.indexOf(s);-1!==e&&as.splice(e,1)}}),this.restoreHandlers.push({doc:n,handler:us(h({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Gn.host(e))),this.restoreHandlers.push({doc:n,handler:ps({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)})}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push({doc:t,handler:Zn(e.prototype,"attachShadow",(function(e){return function(i){var n=e.call(this,i),a=Gn.shadowRoot(this);return a&&Qo(this)&&r.addShadowRoot(a,t),n}}))})}reset(){this.restoreHandlers.forEach((e=>{var t=e.handler;try{t()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(e){var t=[];for(var r of this.restoreHandlers)if(r.doc===e)try{r.handler()}catch(e){}else t.push(r);this.restoreHandlers=t}}var _s="skip-frame";function Ss(e){if("object"!=typeof e||null===e)return!1;var t=e.y,r=e.width,i=e.height;return Number.isFinite(e.x)&&Number.isFinite(t)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var xs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cs="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ms=0;64>Ms;Ms++)Cs[xs.charCodeAt(Ms)]=Ms;var Ts=new Map,Is=(e,t,r)=>{if(e&&(Es(e,t)||"object"==typeof e)){var i=function(e,t){var r=Ts.get(e);return r||Ts.set(e,r=new Map),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),n=i.indexOf(e);return-1===n&&(n=i.length,i.push(e)),n}};function Rs(e,t,r,i){if(e instanceof Array)return e.map((e=>Rs(e,t,r,i)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var n=e.constructor.name,a=function(e){var t,r=new Uint8Array(e),i=r.length,n="";for(t=0;i>t;t+=3)n+=xs[r[t]>>2],n+=xs[(3&r[t])<<4|r[t+1]>>4],n+=xs[(15&r[t+1])<<2|r[t+2]>>6],n+=xs[63&r[t+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e);return{rr_type:n,base64:a}}return e instanceof DataView?{rr_type:e.constructor.name,args:[Rs(e.buffer,t,r,i),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL(i.type,i.quality)}:e instanceof ImageData?{rr_type:e.constructor.name,args:[Rs(e.data,t,r,i),e.width,e.height]}:Es(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Is(e,t,r)}:e}var As=(e,t,r,i)=>e.map((e=>Rs(e,t,r,i))),Es=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))},Ls=["webgl","webgl2"];function Os(e){return"nodeType"in e}function Ds(e,t,r,i){var n=[];try{if(i){var a=function(e,t,r){var i=e.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return Zn(i.prototype,"configure",(function(i){return function(n){var a=function(e){var t=e.canvas;return t&&"object"==typeof t?t:null}(this);if(!a||Os(a)&&Bo(a,t,r,!0))return i.call(this,n);Os(a)&&!("__context"in a)&&(a.__context="webgpu");var o=function(e){var t=e.GPUTextureUsage;return t?t.COPY_SRC|t.RENDER_ATTACHMENT:null}(e);return i.call(this,null!==o&&n?h({},n,{usage:"number"==typeof n.usage?n.usage|o:o}):n)}}))}(e,t,r);a&&n.push(a)}var o=Zn(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var a=function(e){return"experimental-webgl"===e?"webgl":e}(n),o=arguments.length,s=new Array(o>1?o-1:0),u=1;o>u;u++)s[u-1]=arguments[u];if(!Bo(this,t,r,!0)&&("__context"in this||(this.__context=a),i&&Ls.includes(a)))if(s[0]&&"object"==typeof s[0]){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0});return e.apply(this,[n,...s])}}));n.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Ps(e,t,r,i,n,a,o){var s=[],u=Object.getOwnPropertyNames(e),l=function(u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))return 0;try{if("function"!=typeof e[u])return 0;var l=Zn(e,u,(function(e){return function(){for(var s=arguments.length,l=new Array(s),h=0;s>h;h++)l[h]=arguments[h];var c=e.apply(this,l);if(Is(c,a,this),this.canvas&&"tagName"in this.canvas&&!Bo(this.canvas,i,n,!0)){var d=As(l,a,this,o);r(this.canvas,{type:t,property:u,args:d})}return c}}));s.push(l)}catch(a){var h=Do(e,u,{set(e){this.canvas&&"tagName"in this.canvas&&!Bo(this.canvas,i,n,!0)&&r(this.canvas,{type:t,property:u,args:[e],setter:!0})}});s.push(h)}};for(var h of u)l(h);return s}var Ns,Fs,qs,js='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentFingerprintMap = /* @__PURE__ */ new Map();\n const lastSentAtMap = /* @__PURE__ */ new Map();\n const PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n function hashPixels(data) {\n const view = new Uint32Array(\n data.buffer,\n data.byteOffset,\n data.byteLength >>> 2\n );\n let primaryHash = 2166136261;\n let secondaryHash = 2654435769;\n for (let i2 = 0; i2 < view.length; i2++) {\n primaryHash ^= view[i2];\n primaryHash = Math.imul(primaryHash, 16777619);\n secondaryHash ^= view[i2];\n secondaryHash = Math.imul(secondaryHash, 2246822507);\n }\n return `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n }\n function frameFingerprint(width, height, data) {\n return `${width}x${height}:${hashPixels(data)}`;\n }\n function transparentFingerprint(width, height) {\n const pixelCount = width * height;\n let hash = transparentFingerprintMap.get(pixelCount);\n if (hash === void 0) {\n hash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n transparentFingerprintMap.set(pixelCount, hash);\n }\n return `${width}x${height}:${hash}`;\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("resetFrameDedup" in e.data) {\n lastFingerprintMap.clear();\n return;\n }\n if ("OffscreenCanvas" in globalThis) {\n const {\n id,\n bitmap,\n width,\n height,\n displayWidth,\n displayHeight,\n dataURLOptions,\n maskRegions\n } = e.data;\n try {\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d", {\n willReadFrequently: true\n });\n }\n const ctx = reusableCtx;\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n if (maskRegions) {\n ctx.fillStyle = "black";\n for (const region of maskRegions) {\n ctx.fillRect(region.x, region.y, region.width, region.height);\n }\n }\n const fingerprint = frameFingerprint(\n width,\n height,\n ctx.getImageData(0, 0, width, height).data\n );\n const lastFingerprint = lastFingerprintMap.get(id) ?? transparentFingerprint(width, height);\n if (fingerprint === lastFingerprint) {\n const lastSentAt = lastSentAtMap.get(id);\n const keyframeDue = maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS;\n if (!keyframeDue) {\n return worker.postMessage({ id });\n }\n }\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n worker.postMessage({\n id,\n type: blob.type,\n base64: encode(arrayBuffer),\n // cpu intensive\n displayWidth,\n displayHeight\n });\n lastFingerprintMap.set(id, fingerprint);\n lastSentAtMap.set(id, Date.now());\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n',Bs="undefined"!=typeof self&&self.Blob&&new Blob([js],{type:"text/javascript;charset=utf-8"});function Hs(e){var t;try{if(!(t=Bs&&(self.URL||self.webkitURL).createObjectURL(Bs)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(js),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class $s{constructor(e){Rn(this,"pendingCanvasMutations",new Map),Rn(this,"rafStamps",{latestId:0,invokeId:null}),Rn(this,"mirror"),Rn(this,"mutationCb"),Rn(this,"resetObservers"),Rn(this,"frozen",!1),Rn(this,"locked",!1),Rn(this,"rafIdTimestamp",null),Rn(this,"rafIdFlush",null),Rn(this,"refCount",0),Rn(this,"torndown",!1),Rn(this,"resetFrameDedup",null),Rn(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var t=e.sampling,r=void 0===t?"all":t,i=e.win,n=e.blockClass,a=e.blockSelector,o=e.recordCanvas,s=e.dataURLOptions,u=e.resolutionScale,l=e.canvasMasking;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,a,s),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,a,{dataURLOptions:s,resolutionScale:u,canvasMasking:l})}onFullSnapshot(){var e;null==(e=this.resetFrameDedup)||e.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){var a=this;if("OffscreenCanvas"in t){var o,s="number"==typeof n.resolutionScale&&Number.isFinite(n.resolutionScale)?Math.min(1,Math.max(.1,n.resolutionScale)):1,u=Ds(t,r,i,!0),h=new Map;try{o=new Hs}catch(e){return}var c=!1;o.onerror=()=>{var e;c=!0,cancelAnimationFrame(d),null==(e=o.terminate)||e.call(o),this.resetFrameDedup=null},this.resetFrameDedup=()=>{o.postMessage({resetFrameDedup:!0})},o.onmessage=e=>{var t=e.data.id;if(h.set(t,!1),"base64"in e.data){var r=e.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:t,type:Dn["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var d,v=1e3/e,f=0,p=e=>{var u,g;c||(f&&v>e-f||(f=e,(u=[],g=e=>{try{e.querySelectorAll("canvas").forEach((e=>{Bo(e,r,i,!0)||u.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&g(e.shadowRoot)}))}catch(e){}},g(t.document),u).forEach(function(){var e=l((function*(e){var t,r,i=a.mirror.getId(e);if(!h.get(i)&&0!==e.width&&0!==e.height){h.set(i,!0);try{if(["webgl","webgl2"].includes(e.__context)){var u=e.getContext(e.__context);if(null==(t=null==u?void 0:u.isContextLost)?void 0:t.call(u))return void h.set(i,!1);!1===(null==(r=null==u?void 0:u.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&u.clear(u.COLOR_BUFFER_BIT)}var l=e.clientWidth||e.width,c=e.clientHeight||e.height,d=Math.max(1,Math.round(l*s)),v=Math.max(1,Math.round(c*s)),f=function(e,t,r,i,n,a){if(e&&"function"==typeof e.regionsFn){var o;try{o=e.regionsFn(t)}catch(e){return _s}if(void 0!==o){if(!Array.isArray(o)||!o.every(Ss))return _s;var s=r/n,u=i/a;return o.filter((e=>e.width>0&&e.height>0)).map((e=>{var t=Math.floor(e.x*s),r=Math.floor(e.y*u);return{x:t,y:r,width:Math.ceil((e.x+e.width)*s)-t,height:Math.ceil((e.y+e.height)*u)-r}}))}}}(n.canvasMasking,e,d,v,l,c);if(f===_s)return void h.set(i,!1);var p=yield createImageBitmap(e,1>s?{resizeWidth:d,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:d,resizeHeight:v});o.postMessage({id:i,bitmap:p,width:d,height:v,displayWidth:l,displayHeight:c,dataURLOptions:n.dataURLOptions,maskRegions:f},[p])}catch(e){h.set(i,!1)}}}));return function(t){return e.apply(this,arguments)}}())),d=requestAnimationFrame(p))};d=requestAnimationFrame(p),this.resetObservers=()=>{var e;u(),cancelAnimationFrame(d),null==(e=o.terminate)||e.call(o),this.resetFrameDedup=null}}}initCanvasMutationObserver(e,t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ds(e,t,r,!1),a=function(e,t,r,i,n){var a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return 1;var s=Zn(t.CanvasRenderingContext2D.prototype,o,(function(a){return function(){for(var s=arguments.length,u=new Array(s),l=0;s>l;l++)u[l]=arguments[l];return Bo(this.canvas,r,i,!0)||setTimeout((()=>{var r=As(u,t,this,n);e(this.canvas,{type:Dn["2D"],property:o,args:r})}),0),a.apply(this,u)}}));a.push(s)}catch(n){var u=Do(t.CanvasRenderingContext2D.prototype,o,{set(t){Bo(this.canvas,r,i,!0)||e(this.canvas,{type:Dn["2D"],property:o,args:[t],setter:!0})}});a.push(u)}};for(var u of o)s(u);return()=>{a.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,i),o=function(e,t,r,i,n){var a=[];return void 0!==t.WebGLRenderingContext&&a.push(...Ps(t.WebGLRenderingContext.prototype,Dn.WebGL,e,r,i,t,n)),void 0!==t.WebGL2RenderingContext&&a.push(...Ps(t.WebGL2RenderingContext.prototype,Dn.WebGL2,e,r,i,t,n)),()=>{a.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,i);this.resetObservers=()=>{n(),a(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,this.rafIdTimestamp=requestAnimationFrame(e)};this.rafIdTimestamp=requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var i=r.map((e=>{var t=function(e,t){if(null==e)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;r[i]=e[i]}return r}(e,Tn);return t}));this.mutationCb({id:t,type:r[0].type,commands:i}),this.pendingCanvasMutations.delete(e)}}}}class Us{constructor(e){var t;Rn(this,"trackedLinkElements",new WeakSet),Rn(this,"pendingDeferredSheets",new Set),Rn(this,"mutationCb"),Rn(this,"adoptedStyleSheetCb"),Rn(this,"maskAllElementAttributes"),Rn(this,"maskAttributeFn"),Rn(this,"styleMirror",new Zo),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(t=e.maskAllElementAttributes)&&void 0!==t&&t,this.maskAttributeFn=e.maskAttributeFn}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}beginDeferredLinkInlining(e,t){if(-1===t||!e.isConnected)return null;var r=null,i=null;try{(i=e.sheet)&&(r=Fa(i))}catch(e){}if(!r||!i)return _a(),null;var n=r,a=!1,o={sheet:i,invalidate(){a=!0}};this.pendingDeferredSheets.add(o);var s=!1;return{advance:r=>{if(s)return!0;var u,l,h=Jn(),c=ea(),d=!0;try{if(a)return s=!0,_a(),!0;if(!n.advance(r))return d=!1,!1;s=!0;var v=n.text();if(!e.isConnected)return!0;var f=null;try{f=e.sheet}catch(e){}return f!==i?(_a(),!0):v?(this.emitCssTextMutation(e,t,v),!0):(_a(),!0)}finally{d&&this.pendingDeferredSheets.delete(o),ta(u=Jn()-h,null!=(l=c)?l:Yn)||(da.totalMs+=u,u>da.slowestSliceMs&&(da.slowestSliceMs=u))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(e){if(e&&0!==this.pendingDeferredSheets.size)for(var t of this.pendingDeferredSheets)t.sheet===e&&(this.pendingDeferredSheets.delete(t),t.invalidate())}inlineDeferredLinkElement(e,t){var r;null==(r=this.beginDeferredLinkInlining(e,t))||r.advance(1/0)}emitCssTextMutation(e,t,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t,attributes:{_cssText:$a({element:e,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var i={id:t,styleIds:[]},n=[],a=function(e){var t;if(r.styleMirror.has(e))t=r.styleMirror.getId(e);else{var a=r.styleMirror.add(e);t=a;var o=Jn();try{ba((()=>{try{var t=e.rules||e.cssRules;t&&ya(t)}catch(e){}n.push({styleId:a,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:Ea(t,e.href),index:r})))})}))}finally{wa(Jn()-o)}}i.styleIds.push(t)};for(var o of e)a(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),bo.forEach((e=>e.abort())),bo.clear()}trackStylesheetInLinkElement(e){}}class zs{constructor(){Rn(this,"nodeMap",new WeakMap),Rn(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Ws=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Vs=document.createElement("iframe");document.body.appendChild(Vs),Array.from=(null==(Mn=Vs.contentWindow)?void 0:Mn.Array.from)||Array.from,document.body.removeChild(Vs)}}catch(e){console.debug("Unable to override Array.from",e)}var Zs=new qa,Gs=new Set([En.Mutation,En.MediaInteraction,En.StyleSheetRule,En.CanvasMutation,En.Font,En.Log,En.StyleDeclaration,En.AdoptedStyleSheet]);function Qs(e){var t=window;if("function"==typeof t.requestIdleCallback){var r=t.requestIdleCallback(e,{timeout:2e3});return{cancel(){var e;return null==(e=t.cancelIdleCallback)?void 0:e.call(t,r)}}}var i=setTimeout(e,250);return{cancel:()=>clearTimeout(i)}}function Js(e){var t;void 0===e&&(e={});var r=e,i=r.emit,n=r.checkoutEveryNms,a=r.checkoutEveryNth,o=r.blockClass,s=void 0===o?"rr-block":o,u=r.blockSelector,l=void 0===u?null:u,c=r.ignoreClass,d=void 0===c?"rr-ignore":c,v=r.ignoreSelector,f=void 0===v?null:v,p=r.maskTextClass,g=void 0===p?"rr-mask":p,m=r.maskTextSelector,y=void 0===m?null:m,b=r.inlineStylesheet,w=void 0===b||b,k=r.inlineStylesheetBudgetRules,_=r.maskAllInputs,S=r.maskInputOptions,x=r.slimDOMOptions,C=r.maskInputFn,M=r.maskTextFn,T=r.maskAllElementAttributes,I=void 0!==T&&T,R=r.maskAttributeFn,A=r.hooks,E=r.packFn,L=r.sampling,O=void 0===L?{}:L,D=r.dataURLOptions,P=void 0===D?{}:D,N=r.canvasResolutionScale,F=r.canvasMasking,q=r.mousemoveWait,j=r.recordDOM,B=void 0===j||j,H=r.recordCanvas,U=void 0!==H&&H,z=r.recordCrossOriginIframes,W=void 0!==z&&z,V=r.recordAfter,Z=void 0===V?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":V,G=r.userTriggeredOnInput,Q=void 0!==G&&G,J=r.collectFonts,Y=void 0!==J&&J,K=r.inlineImages,X=void 0!==K&&K,ee=r.plugins,te=r.keepIframeSrcFn,re=void 0===te?()=>!1:te,ie=r.ignoreCSSAttributes,ne=void 0===ie?new Set([]):ie,ae=r.attributeFilter;Ko=r.errorHandler;var oe=h({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},P),se=!W||window.parent===window,ue=!1;if(!se)try{window.parent.document&&(ue=!1)}catch(e){ue=!0}if(se&&!i)throw new Error("emit function is required");if(!se&&!ue)return()=>{};void 0!==q&&void 0===O.mousemove&&(O.mousemove=q),Zs.reset();var le,he=!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}:void 0!==S?S:{password:!0},ce=Mo(void 0!==x&&x);!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=[].forEach)}();var de,ve,fe=0,pe=new Map,ge=e=>{for(var t of ee||[])t.eventProcessor&&(e=t.eventProcessor(e));return E&&!ue&&(e=E(e)),e};Ns=(e,t)=>{var r,o=e;if(o.timestamp=Po(),!(null==(r=as[0])?void 0:r.isFrozen())||o.type===An.FullSnapshot||o.type===An.IncrementalSnapshot&&Gs.has(o.data.source)||as.forEach((e=>e.unfreeze())),se)null==i||i(ge(o),t);else if(ue){var s={type:"rrweb",event:ge(o),origin:window.location.origin,isCheckout:t};window.parent.postMessage(s,"*")}if(o.type===An.FullSnapshot)le=o,fe=0;else if(o.type===An.IncrementalSnapshot){if(o.data.source===En.Mutation&&o.data.isAttachIframe)return;fe++,(a&&fe>=a||n&&o.timestamp-le.timestamp>n)&&Fs(!0)}};var me=e=>{if(e.removes&&e.removes.length>0){var t=e.adds.length>0?new Set(e.adds.map((e=>e.node.id))):null,r=new Set;if(e.adds.length>0)for(var i of e.adds){var n=Zs.getNode(i.node.id);n&&"IFRAME"===n.nodeName&&r.add(n)}e.removes.forEach((e=>{var i=e.id;if(!t||!t.has(i)){var n=ke.getIframeElementById(i);n&&r.has(n)?ke.forgetIframeId(i):(null==de||de(i),ke.removeIframeById(i))}})),null==ve||ve(),ke.cleanupDetachedIframes()}Ns({type:An.IncrementalSnapshot,data:h({source:En.Mutation},e)})},ye=e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.Scroll},e)}),be=e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.CanvasMutation},e)}),we=new Us({mutationCb:me,adoptedStyleSheetCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.AdoptedStyleSheet},e)}),maskAllElementAttributes:I,maskAttributeFn:R}),ke=new ws({mirror:Zs,mutationCb:me,stylesheetManager:we,recordCrossOriginIframes:W,wrappedEmit:Ns});for(var _e of ee||[])_e.getMirror&&_e.getMirror({nodeMirror:Zs,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});var Se=new zs,xe=null==F?void 0:F.configured;qs=new $s({recordCanvas:U,mutationCb:be,win:window,blockClass:s,blockSelector:l,mirror:Zs,sampling:O.canvas,dataURLOptions:oe,resolutionScale:N,canvasMasking:F});var Ce=new ks({mutationCb:me,scrollCb:ye,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:g,maskTextSelector:y,inlineStylesheet:w,maskInputOptions:he,dataURLOptions:oe,maskTextFn:M,maskInputFn:C,maskAllElementAttributes:I,maskAttributeFn:R,recordCanvas:U,canvasMaskingConfigured:xe,inlineImages:X,sampling:O,slimDOMOptions:ce,iframeManager:ke,stylesheetManager:we,canvasManager:qs,keepIframeSrcFn:re,processedNodeManager:Se,attributeFilter:ae},mirror:Zs});Fs=function(e){if(void 0===e&&(e=!1),B){fa(k);try{Ns({type:An.Meta,data:{href:window.location.href,width:qo(),height:Fo()}},e),null==t||t.cancel(),t=void 0,we.reset(),Ce.init(),as.forEach((e=>e.lock()));var r,i=null;try{i=function(e,t){var r=t||{},i=r.mirror,n=void 0===i?new qa:i,a=r.blockClass,o=void 0===a?"rr-block":a,s=r.blockSelector,u=void 0===s?null:s,l=r.maskTextClass,h=void 0===l?"rr-mask":l,c=r.maskTextSelector,d=void 0===c?null:c,v=r.inlineStylesheet,f=void 0===v||v,p=r.inlineImages,g=void 0!==p&&p,m=r.recordCanvas,y=void 0!==m&&m,b=r.canvasMaskingConfigured,w=r.maskAllInputs,k=void 0!==w&&w,_=r.maskTextFn,S=r.maskInputFn,x=r.maskAllElementAttributes,C=void 0!==x&&x,M=r.maskAttributeFn,T=r.slimDOM,I=r.dataURLOptions,R=r.preserveWhiteSpace,A=r.onSerialize,E=r.onIframeLoad,L=r.iframeLoadTimeout,O=r.onIframeListenerRegistered,D=r.onStylesheetLoad,P=r.stylesheetLoadTimeout,N=r.keepIframeSrcFn,F=void 0===N?()=>!1:N,q=r.maxDepth,j=r.inlineStylesheetBudgetRules,B=!0===k?{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}:!1===k?{password:!0}:k,H=Mo(void 0!==T&&T);fa(j);try{return Co(e,{doc:e,mirror:n,blockClass:o,blockSelector:u,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:B,maskTextFn:_,maskInputFn:S,maskAllElementAttributes:C,maskAttributeFn:M,slimDOMOptions:H,dataURLOptions:I,inlineImages:g,recordCanvas:y,canvasMaskingConfigured:b,preserveWhiteSpace:R,onSerialize:A,onIframeLoad:E,iframeLoadTimeout:L,onIframeListenerRegistered:O,onStylesheetLoad:D,stylesheetLoadTimeout:P,keepIframeSrcFn:F,newlyAddedElement:!1,maxDepth:q})}finally{pa()}}(document,{mirror:Zs,blockClass:s,blockSelector:l,maskTextClass:g,maskTextSelector:y,inlineStylesheet:w,maskAllInputs:he,inlineStylesheetBudgetRules:k,maskTextFn:M,maskInputFn:C,maskAllElementAttributes:I,maskAttributeFn:R,slimDOM:ce,dataURLOptions:oe,recordCanvas:U,canvasMaskingConfigured:xe,inlineImages:X,onSerialize(e){zo(e,Zs)&&ke.addIframe(e),Wo(e,Zs)&&we.trackLinkElement(e),Vo(e)&&Ce.addShadowRoot(Gn.shadowRoot(e),document)},onIframeLoad(e,t){ke.attachIframe(e,t),Ce.observeAttachShadow(e)},onIframeListenerRegistered(e,t){ke.registerLoadListenerDisposer(e,t)},onStylesheetLoad(e,t){we.attachLinkElement(e,t)},keepIframeSrcFn:re})}finally{a=ua,ua=[],r=a}if(!i)return console.warn("Failed to snapshot the document");if(Ns({type:An.FullSnapshot,data:{node:i,initialOffset:No(window)}},e),as.forEach((e=>e.unlock())),qs.onFullSnapshot(),r.length){var n=function(e,t,r){var i=!1,n=null,a=0,o=null,s=()=>null!==o||e.length>a,u=()=>{var r=e[a];e[a]=null,a+=1,r&&Ao((()=>{o=t.beginDeferredLinkInlining(r,Zs.getId(r))}))},l=()=>{if(o){var e=o,t=!0;Ao((()=>{t=e.advance(200)})),t&&(o=null)}},h=e=>{if(n=null,!i){var t=0;do{try{o||u(),l()}catch(e){null==o||o.discard(),o=null,Sa(1)}t+=1}while(!i&&s()&&(e?!e.didTimeout&&e.timeRemaining()>5:10>t));i||(s()?n=Qs(h):r())}};return n=Qs(h),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var t=0,h=0;s()&&50>t;){o||u();var c=o;if(c)if(Math.floor(c.remainingRules()/200)+1>50-t)c.discard(),o=null,h+=1;else{try{l()}catch(e){null==o||o.discard(),o=null,h+=1}t+=1}}if(s()||h>0){for(var d=h+(null!==o?1:0),v=a;e.length>v;v++)null!==e[v]&&(d+=1);Sa(d),null==o||o.discard(),o=null}r()}}}}(r,we,(()=>{t===n&&(t=void 0)}));t=n}W&&ke.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,Zs.getId(document))}finally{pa()}var a}};try{var Me=[];for(var Te of(Me.push(Io("pagehide",(()=>{try{null==t||t.flush()}catch(e){}t=void 0}),window)),["visibilitychange","freeze","resume"]))Me.push(Io(Te,Xn,document));de=e=>{var t=pe.get(e);t&&(t.forEach((e=>{Ao(e);var t=Me.indexOf(e);-1!==t&&Me.splice(t,1)})),pe.delete(e))},ve=()=>{for(var e of pe){var t=e[0],r=Zs.getNode(t);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==de||de(t)}catch(e){null==de||de(t)}else null==de||de(t)}};var Ie=e=>{var t;return ns(gs)({mutationCb:me,mousemoveCb:(e,t)=>Ns({type:An.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.MouseInteraction},e)}),scrollCb:ye,viewportResizeCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.ViewportResize},e)}),inputCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.Input},e)}),mediaInteractionCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.MediaInteraction},e)}),styleSheetRuleCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.StyleSheetRule},e)}),styleDeclarationCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.StyleDeclaration},e)}),canvasMutationCb:be,fontCb:e=>Ns({type:An.IncrementalSnapshot,data:h({source:En.Font},e)}),selectionCb(e){Ns({type:An.IncrementalSnapshot,data:h({source:En.Selection},e)})},customElementCb(e){Ns({type:An.IncrementalSnapshot,data:h({source:En.CustomElement},e)})},blockClass:s,ignoreClass:d,ignoreSelector:f,maskTextClass:g,maskTextSelector:y,maskInputOptions:he,inlineStylesheet:w,sampling:O,recordDOM:B,recordCanvas:U,canvasMaskingConfigured:xe,inlineImages:X,userTriggeredOnInput:Q,collectFonts:Y,doc:e,maskInputFn:C,maskTextFn:M,maskAllElementAttributes:I,maskAttributeFn:R,keepIframeSrcFn:re,blockSelector:l,slimDOMOptions:ce,dataURLOptions:oe,mirror:Zs,iframeManager:ke,stylesheetManager:we,shadowDomManager:Ce,processedNodeManager:Se,canvasManager:qs,ignoreCSSAttributes:ne,attributeFilter:ae,plugins:(null==(t=null==ee?void 0:ee.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>Ns({type:An.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},A)};ke.addLoadListener((e=>{try{var t=Zs.getId(e),r=Ie(e.contentDocument);if("function"==typeof r&&(Me.push(r),-1!==t)){var i=pe.get(t);i||pe.set(t,i=new Set),i.add(r)}}catch(e){console.warn(e)}})),ke.addPageHideListener((e=>{var t=Zs.getId(e);null==de||de(t),ls(e)}));var Re=-1,Ae=e=>Ns({type:An.Custom,data:{tag:"rrweb/fullscreen",payload:e}}),Ee=()=>{var e,t,r,i,n=document,a=null!==(e=null!==(t=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==t?t:n.msFullscreenElement)&&void 0!==e?e:null,o=a?Zs.getId(a):-1;o!==Re&&(-1!==Re&&Ae({id:Re,enter:!1}),Re=o,-1!==o&&Ae({id:o,enter:!0}))},Le=()=>{Fs();var e=Ie(document);"function"==typeof e&&Me.push(e),Me.push(Io("fullscreenchange",Ee)),Me.push(Io("webkitfullscreenchange",Ee)),Me.push(Io("mozfullscreenchange",Ee)),Me.push(Io("MSFullscreenChange",Ee)),Ws=!0};return["interactive","complete"].includes(document.readyState)?Le():(Me.push(Io("DOMContentLoaded",(()=>{Ns({type:An.DomContentLoaded,data:{}}),"DOMContentLoaded"===Z&&Le()}))),Me.push(Io("load",(()=>{Ns({type:An.Load,data:{}}),"load"===Z&&Le()}),window))),()=>{try{null==t||t.flush()}catch(e){}t=void 0,Me.forEach((e=>Ao(e))),Se.destroy(),ke.removeLoadListener(),ke.destroy(),pe.clear(),Ce.reset(),Zs.reset(),Ws=!1,Ko=void 0}}catch(e){console.warn(e)}}Js.addCustomEvent=(e,t)=>{if(!Ws)throw new Error("please add custom event after start recording");Ns({type:An.Custom,data:{tag:e,payload:t}})},Js.freezePage=()=>{as.forEach((e=>e.freeze()))},Js.takeFullSnapshot=e=>{if(!Ws)throw new Error("please take full snapshot after start recording");Fs(e)},Js.mirror=Zs;var Ys=Object.defineProperty,Ks=(e,t,r)=>((e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Xs{constructor(e){Ks(this,"fileName"),Ks(this,"functionName"),Ks(this,"lineNumber"),Ks(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var eu=/(^|@)\S+:\d+/,tu=/^\s*at .*(\S+:\d+|\(native\))/m,ru=/^(eval@)?(\[native code])?$/,iu={parse(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(tu)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):[]:[]},extractLocation(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE(e){return e.stack.split("\n").filter((function(e){return!!e.match(tu)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),a=i.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Xs({functionName:a,fileName:o,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari(e){return e.stack.split("\n").filter((function(e){return!e.match(ru)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Xs({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Xs({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),i=[],n=2,a=r.length;a>n;n+=2){var o=t.exec(r[n]);o&&i.push(new Xs({fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera10(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),i=[],n=0,a=r.length;a>n;n+=2){var o=t.exec(r[n]);o&&i.push(new Xs({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera11(e){return e.stack.split("\n").filter((function(e){return!!e.match(eu)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),i=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Xs({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function nu(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var i=e.parentElement,n=[];if(i.children&&i.children.length>0)for(var a=0;i.children.length>a;a++){var o=i.children[a];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&n.push(o)}n.length>1&&(r+=":eq("+n.indexOf(e)+")"),t=r+(t?">"+t:""),e=i}return t}function au(e){return Array.isArray(e)}function ou(e){return"object"==typeof e&&null!==e&&!au(e)}function su(e,t){if(0===t)return!0;var r=Object.keys(e);for(var i of r)if(ou(e[i])&&su(e[i],t-1))return!0;return!1}function uu(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var i=[],n=[];return JSON.stringify(e,(function(e,t){if(i.length>0){var a=i.indexOf(this);~a?i.splice(a+1):i.push(this),~a?n.splice(a,1/0,e):n.push(e),~i.indexOf(t)&&(t=i[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(t)).join(".")+"]")}else i.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(ou(o=t)&&Object.keys(o).length>r.numOfKeysLimit||"function"==typeof o||ou(o)&&su(o,r.depthOfLimit))return function(e){var t=e.toString();return r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"..."),t}(t);var o;if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var s={};for(var u in t){var l=t[u];s[u]=au(l)?nu(l.length?l[0]:null):l}return s}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var lu={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function hu(e,t,r){var i,n=r?Object.assign({},lu,r):lu,a=n.logger;if(!a)return()=>{};i="string"==typeof a?t[a]:a;var o=0,s=!1,u=[];if(n.level.includes("error")){var l=t=>{var r=t.message,i=iu.parse(t.error).map((e=>e.toString())),a=[uu(r,n.stringifyOptions)];e({level:"error",trace:i,payload:a})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var h=t=>{var r,i;t.reason instanceof Error?i=[uu("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[uu("Uncaught (in promise)",n.stringifyOptions),uu(t.reason,n.stringifyOptions)]);var a=iu.parse(r).map((e=>e.toString()));e({level:"error",trace:a,payload:i})};t.addEventListener("unhandledrejection",h),u.push((()=>{t.removeEventListener("unhandledrejection",h)}))}for(var c of n.level)u.push(d(i,c));return()=>{u.forEach((e=>e()))};function d(t,r){var i=this;return t[r]?function(t,a,u){try{if(!(a in t))return()=>{};var l=t[a],h={next:l},c=(t=>function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];if(t.apply(i,u),!("assert"===r&&u[0]||s)){s=!0;try{var h=iu.parse(new Error).map((e=>e.toString())).splice(1),c=("assert"===r?u.slice(1):u).map((e=>uu(e,n.stringifyOptions)));o++,n.lengthThreshold>o?e({level:r,trace:h,payload:c}):o===n.lengthThreshold&&e({level:"warn",trace:[],payload:[uu("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})((function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];return h.next.apply(this,t)}));return"function"==typeof c&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:l},__rrweb_layer__:{enumerable:!1,value:h}})),t[a]=c,()=>{if(t[a]!==c)for(var e=e=>{var t;return"function"==typeof e?null!==(t=e.__rrweb_layer__)&&void 0!==t?t:e.__posthog_layer__:void 0},r=t[a],i=e(r);i;){if(i.next===c)return void(i.next=h.next);i=e(r=i.next)}else t[a]=h.next}}catch(e){return()=>{}}}(t,r):()=>{}}}var cu=e=>({name:"rrweb/console@1",observer:hu,options:e}),du=e=>"undefined"!=typeof Document&&e instanceof Document,vu=()=>{},fu=e=>{var t;if(k(e))return null!==(t=e.__posthog_layer__)&&void 0!==t?t:e.__rrweb_layer__};function pu(e,t,r){try{if(!(t in e))return vu;var i={next:e[t]},n=r((function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];return i.next.apply(this,t)}));return k(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:i}})),e[t]=n,()=>{if(e[t]!==n)for(var r=e[t],a=fu(r);a;){if(a.next===n)return void(a.next=i.next);a=fu(r=a.next)}else e[t]=i.next}}catch(e){return vu}}function gu(e,t){var r,i=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),n={hostname:i,isHostDenied:!1};if(null==(r=t.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var a of t.payloadHostDenyList)if(i.endsWith(a))return{hostname:i,isHostDenied:!0};return n}var mu=Oe("[Recorder]"),yu=e=>"navigation"===e.entryType,bu=e=>"resource"===e.entryType;function wu(e,t){return!!t&&(R(t)||t[e])}function ku(e){if("undefined"==typeof Request)return!1;if(e instanceof Request)return!0;try{return"[object Request]"==={}.toString.call(e)}catch(e){return!1}}var _u=["image/","video/","audio/","font/","application/octet-stream","application/pdf","application/zip","application/wasm"];function Su(e){var t=e.type,r=e.recordBody,i=e.headers;function n(e){var t=Object.keys(i).find((e=>"content-type"===e.toLowerCase())),r=t&&i[t];return e.some((e=>null==r?void 0:r.toLowerCase().includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:!!ku(t)&&e(t.url)}catch(e){return!1}}(e.url))return!1;if(n(_u))return!1;if(R(r))return!0;if(w(r))return n(r);var a=r[t];return R(a)?a:n(a)}function xu(e,t,r,i,n,a){return Cu.apply(this,arguments)}function Cu(){return Cu=l((function*(e,t,r,i,n,a){if(void 0===a&&(a=0),a>10)return mu.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var o=function(e,r){for(var a=e.length-1;a>=0;a-=1)if(bu(o=e[a])&&o.initiatorType===t&&(S(i)||o.startTime>=i)&&(S(n)||n>=o.startTime))return e[a];var o}(e.performance.getEntriesByName(r));return o||(yield new Promise((e=>setTimeout(e,50*a))),xu(e,t,r,i,n,a+1))})),Cu.apply(this,arguments)}function Mu(e){var t=e.body,r=e.options,i=e.url;if(T(t))return null;var n=gu(i,r);if(n.isHostDenied)return n.hostname+" is in deny list";if(x(t))return t;if(du(t))return t.textContent;if(A(t))return je(t);if(_(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var Tu=e=>!M(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Iu(e){var t=e.entry,r=e.method,i=e.status,n=e.networkRequest,a=e.isInitial,o=e.start,s=e.end,u=e.url,l=e.initiatorType;o=t?t.startTime:o,s=t?t.responseEnd:s;var c=Math.floor(Date.now()-performance.now()),d=Math.floor(c+(o||0)),v=[h({},t?t.toJSON():{name:u},{startTime:S(o)?void 0:Math.round(o),endTime:S(s)?void 0:Math.round(s),timeOrigin:c,timestamp:d,method:r,initiatorType:l||(t?t.initiatorType:void 0),status:i,requestHeaders:n.requestHeaders,requestBody:n.requestBody,responseHeaders:n.responseHeaders,responseBody:n.responseBody,isInitial:a})];if(Tu(t))for(var f of t.serverTiming||[])v.push({timeOrigin:c,timestamp:d,startTime:Math.round(t.startTime),name:f.name,duration:f.duration,entryType:"serverTiming"});return v}var Ru=["video/","audio/"];function Au(e){return _(e)&&k(e.getReader)&&k(e.tee)}var Eu=500,Lu="[SessionReplay] Timeout while trying to read body",Ou="[SessionReplay] Failed to read body";function Du(e){return Ou+": "+e}function Pu(e){return"[SessionReplay] Body too large to record (> "+e+" bytes)"}function Nu(e,t){if(!t.streamNetworkBody)return function(e){return new Promise((t=>{var r=setTimeout((()=>t(Lu)),Eu);try{e.clone().text().then((e=>t(e)),(e=>t(Du(e)))).finally((()=>clearTimeout(r)))}catch(e){clearTimeout(r),t(Ou)}}))}(e);var r=bt(t);return function(e,t){try{var r,i=null==(r=e.headers)||null==r.get?void 0:r.get("content-length");if(!i)return!1;var n=parseInt(i,10);return Number.isFinite(n)&&n>t}catch(e){return!1}}(e,r)?Promise.resolve(Pu(r)):function(e,t){return new Promise((r=>{var i,n=!1;function a(){try{var e;null==(e=i)||e.cancel().catch((()=>{}))}catch(e){}}function o(e){n||(n=!0,clearTimeout(u),a(),r(e))}var s,u=setTimeout((()=>o(Lu)),Eu);try{s=e.clone()}catch(e){return void o(Ou)}var l=s.body;if(Au(l)&&"undefined"!=typeof TextDecoder){try{i=l.getReader()}catch(e){return void o(Ou)}var h=[],c=0;!function e(){i.read().then((r=>{var i=r.done,s=r.value;if(n)a();else if(i)o((new TextDecoder).decode(function(e,t){var r=new Uint8Array(t),i=0;for(var n of e)r.set(n,i),i+=n.byteLength;return r}(h,c)));else{if(s){if(c+s.byteLength>t)return void o(Pu(t));c+=s.byteLength,h.push(s)}e()}}),(e=>o(Du(e))))}()}else try{s.text().then((e=>o(e)),(e=>o(Du(e))))}catch(e){o(Ou)}}))}(e,r)}function Fu(){return Fu=l((function*(e){var t=e.r,r=e.options,i=gu(e.url,r);return i.isHostDenied?Promise.resolve(i.hostname+" is in deny list"):Nu(t,r)})),Fu.apply(this,arguments)}function qu(){return qu=l((function*(e){var t=e.r,r=e.options,i=function(e){var t,r=e.r,i=e.options,n=e.url;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var a=null==(t=r.headers.get("Content-Type"))?void 0:t.toLowerCase(),o=Ru.some((e=>null==a?void 0:a.startsWith(e)));if(a&&o)return"Content-Type "+a+" is not supported";var s=gu(n,i);return s.isHostDenied?s.hostname+" is in deny list":null}({r:t,options:r,url:e.url});return M(i)?Nu(t,r):Promise.resolve(i)})),qu.apply(this,arguments)}var ju=null;function Bu(e,t,r){if(!("performance"in t))return()=>{};if(ju)return mu.warn("Network observer already initialised, doing nothing"),()=>{};var i=r?Object.assign({},wt,r):wt,n=t=>{var r=[],n=!1;t.requests.forEach((e=>{var t="serverTiming"===e.entryType;if(!t||!n){var a=i.maskRequestFn(e);t||(n=!a||(e=>!!e&&It.has(e))(a)),a&&r.push(a)}})),r.length>0&&e(h({},t,{requests:r}))},a=function(e,t,r){if(r.recordInitialRequests){var i=t.performance.getEntries().filter((e=>yu(e)||bu(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:i.flatMap((e=>Iu({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new t.PerformanceObserver((t=>{var i=t.getEntries().filter((e=>yu(e)||bu(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:i.flatMap((e=>Iu({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),a=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return n.observe({entryTypes:a}),()=>{n.disconnect()}}(n,t,i),o=()=>{},s=()=>{};return(i.recordHeaders||i.recordBody)&&(o=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=wu("request",r.recordHeaders),n=wu("response",r.recordHeaders),a=pu(t.XMLHttpRequest.prototype,"open",(a=>function(o,s,u,l,h){void 0===u&&(u=!0);var c=this;try{var d,v,f=new Request(s),p={},g={},m=c.setRequestHeader.bind(c);c.setRequestHeader=(e,t)=>(g[e]=t,m(e,t)),i&&(p.requestHeaders=g);var y=c.send.bind(c);c.send=e=>(Su({type:"request",headers:g,url:s,recordBody:r.recordBody})&&(p.requestBody=Mu({body:e,options:r,url:s})),d=t.performance.now(),y(e));var b=()=>{c.removeEventListener("readystatechange",w),c.removeEventListener("error",b),c.removeEventListener("abort",b),c.removeEventListener("timeout",b)},w=()=>{if(c.readyState===c.DONE){b(),v=t.performance.now();var i={};c.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),n=t.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),Su({type:"response",headers:i,url:s,recordBody:r.recordBody})&&(p.responseBody=Mu({body:c.response,options:r,url:s})),xu(t,"xmlhttprequest",f.url,d,v).then((t=>{var r=Iu({entry:t,method:o,status:null==c?void 0:c.status,networkRequest:p,start:d,end:v,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}};c.addEventListener("readystatechange",w),c.addEventListener("error",b),c.addEventListener("abort",b),c.addEventListener("timeout",b)}catch(e){mu.error("Failed to instrument XHR for network capture",e)}a.call(c,o,s.toString(),u,l,h)}));return()=>{a()}}(n,t,i),s=function(e,t,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var i=wu("request",r.recordHeaders),n=wu("response",r.recordHeaders),a=pu(t,"fetch",(a=>function(){var o=l((function*(o,s){var u,l;try{u=new Request(o,s)}catch(e){return mu.error("Failed to instrument fetch for network capture",e),a(o,s)}var h,c,d={};try{try{var v={};u.headers.forEach(((e,t)=>{v[t]=e})),i&&(d.requestHeaders=v),!Au(null==s?void 0:s.body)&&Su({type:"request",headers:v,url:o,recordBody:r.recordBody})&&(d.requestBody=yield function(e){return Fu.apply(this,arguments)}({r:u,options:r,url:o}))}catch(e){mu.error("Failed to record fetch request for network capture",e)}h=t.performance.now(),l=ku(o)?yield a(u):yield a(o,s),c=t.performance.now();var f={};l.headers.forEach(((e,t)=>{f[t]=e})),n&&(d.responseHeaders=f);try{Su({type:"response",headers:f,url:o,recordBody:r.recordBody})&&(d.responseBody=yield function(e){return qu.apply(this,arguments)}({r:l,options:r,url:o}))}catch(e){mu.error("Failed to record fetch response for network capture",e)}return l}finally{xu(t,"fetch",u.url,h,c).then((t=>{var r,i=Iu({entry:t,method:u.method,status:null==(r=l)?void 0:r.status,networkRequest:d,start:h,end:c,url:u.url,initiatorType:"fetch"});e({requests:i})})).catch((()=>{}))}}));return function(e,t){return o.apply(this,arguments)}}()));return()=>{a()}}(n,t,i)),ju=()=>{a(),o(),s(),ju=null}}var Hu=e=>({name:"rrweb/network@1",observer:Bu,options:e});s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:cu,getRecordNetworkPlugin:Hu},s.__PosthogExtensions__.rrweb={record:Js,version:"v2",wasMaxDepthReached:()=>xo,resetMaxDepthState(){xo=!1,So=!1},getLastSnapshotCost:()=>oa,getMutationCost:()=>h({},ca),resetSnapshotCostState(){ra=0,ia=0,na=0,Yn=0,aa=Qn(),oa=null,sa=null,ua=[],la=0,ha=0,ca={slowestBatchMs:0},da={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}},s.rrweb={record:Js,version:"v2"},s.rrwebConsoleRecord={getRecordConsolePlugin:cu},s.getRecordNetworkPlugin=Hu,s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.initSessionRecording=(e,t)=>new Cn(e,t);var $u,Uu,zu,Wu,Vu,Zu,Gu,Qu,Ju,Yu,Ku,Xu,el,tl,rl,il={},nl=[],al=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ol=Array.isArray;function sl(e,t){for(var r in t)e[r]=t[r];return e}function ul(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ll(e,t,r){var i,n,a,o={};for(a in t)"key"==a?i=t[a]:"ref"==a?n=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?$u.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===o[a]&&(o[a]=e.defaultProps[a]);return hl(e,o,i,n,null)}function hl(e,t,r,i,n){var a={type:e,props:t,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==n?++zu:n,__i:-1,__u:0};return null==n&&null!=Uu.vnode&&Uu.vnode(a),a}function cl(e){return e.children}function dl(e,t){this.props=e,this.context=t}function vl(e,t){if(null==t)return e.__?vl(e.__,e.__i+1):null;for(var r;e.__k.length>t;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?vl(e):null}function fl(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,i=[],n=[],a=sl({},t);a.__v=t.__v+1,Uu.vnode&&Uu.vnode(a),xl(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,i,null==r?vl(t):r,!!(32&t.__u),n),a.__v=t.__v,a.__.__k[a.__i]=a,Ml(i,a,n),t.__e=t.__=null,a.__e!=r&&pl(a)}}function pl(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some((function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e})),pl(e)}function gl(e){(!e.__d&&(e.__d=!0)&&Wu.push(e)&&!ml.__r++||Vu!=Uu.debounceRendering)&&((Vu=Uu.debounceRendering)||Zu)(ml)}function ml(){try{for(var e,t=1;Wu.length;)Wu.length>t&&Wu.sort(Gu),e=Wu.shift(),t=Wu.length,fl(e)}finally{Wu.length=ml.__r=0}}function yl(e,t,r,i,n,a,o,s,u,l,h){var c,d,v,f,p,g,m,y=i&&i.__k||nl,b=t.length;for(u=function(e,t,r,i,n){var a,o,s,u,l,h=r.length,c=h,d=0;for(e.__k=new Array(n),a=0;n>a;a++)null!=(o=t[a])&&"boolean"!=typeof o&&"function"!=typeof o?("string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?o=e.__k[a]=hl(null,o,null,null,null):ol(o)?o=e.__k[a]=hl(cl,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=e.__k[a]=hl(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,u=a+d,o.__=e,o.__b=e.__b+1,s=null,-1!=(l=o.__i=wl(o,r,u,c))&&(c--,(s=r[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(n>h?d--:h>n&&d++),"function"!=typeof o.type&&(o.__u|=4)):l!=u&&(l==u-1?d--:l==u+1?d++:(l>u?d--:d++,o.__u|=4))):e.__k[a]=null;if(c)for(a=0;h>a;a++)null!=(s=r[a])&&0==(2&s.__u)&&(s.__e==i&&(i=vl(s)),Rl(s,s));return i}(r,t,y,u,b),c=0;b>c;c++)null!=(v=r.__k[c])&&(d=-1!=v.__i&&y[v.__i]||il,v.__i=c,g=xl(e,v,d,n,a,o,s,u,l,h),f=v.__e,v.ref&&d.ref!=v.ref&&(d.ref&&Il(d.ref,null,v),h.push(v.ref,v.__c||f,v)),null==p&&null!=f&&(p=f),(m=!!(4&v.__u))||d.__k===v.__k?(u=bl(v,u,e,m),m&&d.__e&&(d.__e=null)):"function"==typeof v.type&&void 0!==g?u=g:f&&(u=f.nextSibling),v.__u&=-7);return r.__e=p,u}function bl(e,t,r,i){var n,a;if("function"==typeof e.type){for(n=e.__k,a=0;n&&n.length>a;a++)n[a]&&(n[a].__=e,t=bl(n[a],t,r,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=vl(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function wl(e,t,r,i){var n,a,o,s=e.key,u=e.type,l=t[r],h=null!=l&&0==(2&l.__u);if(null===l&&null==s||h&&s==l.key&&u==l.type)return r;if(i>(h?1:0))for(n=r-1,a=r+1;n>=0||t.length>a;)if(null!=(l=t[o=0>n?a++:n--])&&0==(2&l.__u)&&s==l.key&&u==l.type)return o;return-1}function kl(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||al.test(t)?r:r+"px"}function _l(e,t,r,i,n){var a,o;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)r&&t in r||kl(e.style,t,"");if(r)for(t in r)i&&r[t]==i[t]||kl(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(Ku,"$1")),o=t.toLowerCase(),t=o in e||"onFocusOut"==t||"onFocusIn"==t?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?i?r[Yu]=i[Yu]:(r[Yu]=Xu,e.addEventListener(t,a?tl:el,a)):e.removeEventListener(t,a?tl:el,a);else{if("http://www.w3.org/2000/svg"==n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function Sl(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t[Ju])t[Ju]=Xu++;else if(r[Yu]>t[Ju])return;return r(Uu.event?Uu.event(t):t)}}}function xl(e,t,r,i,n,a,o,s,u,l){var h,c,d,v,f,p,g,m,y,b,$,w,k,_,S,x,C=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),a=[s=t.__e=r.__e]),(h=Uu.__b)&&h(t);e:if("function"==typeof C){c=o.length;try{if(y=t.props,b=C.prototype&&C.prototype.render,$=(h=C.contextType)&&i[h.__c],w=h?$?$.props.value:h.__:i,r.__c?m=(d=t.__c=r.__c).__=d.__E:(b?t.__c=d=new C(y,w):(t.__c=d=new dl(y,w),d.constructor=C,d.render=Al),$&&$.sub(d),d.state||(d.state={}),d.__n=i,v=d.__d=!0,d.__h=[],d._sb=[]),b&&null==d.__s&&(d.__s=d.state),b&&null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=sl({},d.__s)),sl(d.__s,C.getDerivedStateFromProps(y,d.__s))),f=d.props,p=d.state,d.__v=t,v)b&&null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),b&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(b&&null==C.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,w),t.__v==r.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,w)){t.__v!=r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some((function(e){e&&(e.__=t)})),nl.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,w),b&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,p,g)}))}if(d.context=w,d.props=y,d.__P=e,d.__e=!1,k=Uu.__r,_=0,b)d.state=d.__s,d.__d=!1,k&&k(t),h=d.render(d.props,d.state,d.context),nl.push.apply(d.__h,d._sb),d._sb=[];else do{d.__d=!1,k&&k(t),h=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&25>++_);d.state=d.__s,null!=d.getChildContext&&(i=sl(sl({},i),d.getChildContext())),b&&!v&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(f,p)),S=null!=h&&h.type===cl&&null==h.key?Tl(h.props.children):h,s=yl(e,ol(S)?S:[S],t,r,i,n,a,o,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),m&&(d.__E=d.__=null)}catch(e){if(o.length=c,t.__v=null,u||null!=a)if(e.then){for(t.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;null!=a&&(a[a.indexOf(s)]=null),t.__e=s}else{if(null!=a)for(x=a.length;x--;)ul(a[x]);Cl(t)}else t.__e=r.__e,!t.__k&&r.__k&&(t.__k=r.__k),e.then||Cl(t);Uu.__e(e,t,r)}}else null==a&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=function(e,t,r,i,n,a,o,s,u){var l,h,c,d,v,f,p,g=r.props||il,m=t.props,y=t.type;if("svg"==y?n="http://www.w3.org/2000/svg":"math"==y?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),null!=a)for(l=0;a.length>l;l++)if((v=a[l])&&"setAttribute"in v==!!y&&(y?v.localName==y:3==v.nodeType)){e=v,a[l]=null;break}if(null==e){if(null==y)return document.createTextNode(m);e=document.createElementNS(n,y,m.is&&m),s&&(Uu.__m&&Uu.__m(t,a),s=!1),a=null}if(null==y)g===m||s&&e.data==m||(e.data=m);else{if(a="textarea"==y&&null!=m.defaultValue?null:a&&$u.call(e.childNodes),!s&&null!=a)for(g={},l=0;e.attributes.length>l;l++)g[(v=e.attributes[l]).name]=v.value;for(l in g)v=g[l],"dangerouslySetInnerHTML"==l?c=v:"children"==l||l in m||"value"==l&&"defaultValue"in m||"checked"==l&&"defaultChecked"in m||_l(e,l,null,v,n);for(l in m)v=m[l],"children"==l?d=v:"dangerouslySetInnerHTML"==l?h=v:"value"==l?f=v:"checked"==l?p=v:s&&"function"!=typeof v||g[l]===v||_l(e,l,v,g[l],n);if(h)s||c&&(h.__html==c.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(c&&(e.innerHTML=""),yl("template"==t.type?e.content:e,ol(d)?d:[d],t,r,i,"foreignObject"==y?"http://www.w3.org/1999/xhtml":n,a,o,a?a[0]:r.__k&&vl(r,0),s,u),null!=a)for(l=a.length;l--;)ul(a[l]);s&&"textarea"!=y||(l="value","progress"==y&&null==f?e.removeAttribute("value"):null!=f&&(f!==e[l]||"progress"==y&&!f||"option"==y&&f!=g[l])&&_l(e,l,f,g[l],n),l="checked",null!=p&&p!=e[l]&&_l(e,l,p,g[l],n))}return e}(r.__e,t,r,i,n,a,o,u,l);return(h=Uu.diffed)&&h(t),128&t.__u?void 0:s}function Cl(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Cl))}function Ml(e,t,r){for(var i=0;r.length>i;i++)Il(r[i],r[++i],r[++i]);Uu.__c&&Uu.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Uu.__e(e,t.__v)}}))}function Tl(e){return"object"!=typeof e||null==e||e.__b>0?e:ol(e)?e.map(Tl):void 0!==e.constructor?null:sl({},e)}function Il(e,t,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Uu.__e(e,r)}}function Rl(e,t,r){var i,n;if(Uu.unmount&&Uu.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Il(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){Uu.__e(e,t)}i.base=i.__P=i.__n=null}if(i=e.__k)for(n=0;i.length>n;n++)i[n]&&Rl(i[n],t,r||"function"!=typeof e.type);r||ul(e.__e),e.__c=e.__=e.__e=void 0}function Al(e,t,r){return this.constructor(e,r)}function El(e,t,r){var i,n,a;t==document&&(t=document.documentElement),Uu.__&&Uu.__(e,t),i=t.__k,n=[],a=[],xl(t,e=t.__k=ll(cl,null,[e]),i||il,il,t.namespaceURI,i?null:t.firstChild?$u.call(t.childNodes):null,n,i?i.__e:t.firstChild,!1,a),Ml(n,e,a),e.props.children=null}$u=nl.slice,Uu={__e(e,t,r,i){for(var n,a,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((a=n.constructor)&&null!=a.getDerivedStateFromError&&(n.setState(a.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,i||{}),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},zu=0,dl.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=sl({},this.state),"function"==typeof e&&(e=e(sl({},r),this.props)),e&&sl(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),gl(this))},dl.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gl(this))},dl.prototype.render=cl,Wu=[],Zu="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gu=function(e,t){return e.__v.__b-t.__v.__b},ml.__r=0,Qu=Math.random().toString(8),Ju="__d"+Qu,Yu="__a"+Qu,Ku=/(PointerCapture)$|Capture$/i,Xu=0,el=Sl(!1),tl=Sl(!0),rl=0;var Ll,Ol,Dl,Pl,Nl=0,Fl=[],ql=Uu,jl=ql.__b,Bl=ql.__r,Hl=ql.diffed,$l=ql.__c,Ul=ql.unmount,zl=ql.__;function Wl(e,t){ql.__h&&ql.__h(Ol,e,Nl||t),Nl=0;var r=Ol.__H||(Ol.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Vl(e){return Nl=1,function(e,t,r){var i=Wl(Ll++,2);if(i.t=e,!i.__c&&(i.__=[ih(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],r=i.t(t,e);t!==r&&(i.__N=[r,i.__[1]],i.__c.setState({}))}],i.__c=Ol,!Ol.__f)){var n=function(e,t,r){if(!i.__c.__H)return!0;var n=!1,o=i.__c.props!==e;if(i.__c.__H.__.some((function(e){if(e.__N){n=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),a){var s=a.call(this,e,t,r);return n?s||o:s}return!n||o};Ol.__f=!0;var a=Ol.shouldComponentUpdate,o=Ol.componentWillUpdate;Ol.componentWillUpdate=function(e,t,r){if(this.__e){var i=a;a=void 0,n(e,t,r),a=i}o&&o.call(this,e,t,r)},Ol.shouldComponentUpdate=n}return i.__N||i.__}(ih,e)}function Zl(e,t){var r=Wl(Ll++,3);!ql.__s&&rh(r.__H,t)&&(r.__=e,r.u=t,Ol.__H.__h.push(r))}function Gl(e){return Nl=5,Ql((function(){return{current:e}}),[])}function Ql(e,t){var r=Wl(Ll++,7);return rh(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Jl(e){var t=Ol.context[e.__c],r=Wl(Ll++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(Ol)),t.props.value):e.__}function Yl(){for(var e;e=Fl.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(eh),t.__h.some(th),t.__h=[]}catch(r){t.__h=[],ql.__e(r,e.__v)}}}ql.__b=function(e){Ol=null,jl&&jl(e)},ql.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zl&&zl(e,t)},ql.__r=function(e){Bl&&Bl(e),Ll=0;var t=(Ol=e.__c).__H;t&&(Dl===Ol?(t.__h=[],Ol.__h=[],t.__.some((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.length&&Yl(),Ll=0)),Dl=Ol},ql.diffed=function(e){Hl&&Hl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Fl.push(t)&&Pl===ql.requestAnimationFrame||((Pl=ql.requestAnimationFrame)||Xl)(Yl)),t.__H.__.some((function(e){e.u&&(e.__H=e.u,e.u=void 0)}))),Dl=Ol=null},ql.__c=function(e,t){t.some((function(e){try{e.__h.some(eh),e.__h=e.__h.filter((function(e){return!e.__||th(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],ql.__e(r,e.__v)}})),$l&&$l(e,t)},ql.unmount=function(e){Ul&&Ul(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some((function(e){try{eh(e)}catch(e){t=e}})),r.__H=void 0,t&&ql.__e(t,r.__v))};var Kl="function"==typeof requestAnimationFrame;function Xl(e){var t,r=function(){clearTimeout(i),Kl&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(r,35);Kl&&(t=requestAnimationFrame(r))}function eh(e){var t=Ol,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Ol=t}function th(e){var t=Ol;e.__c=e.__(),Ol=t}function rh(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function ih(e,t){return"function"==typeof t?t(e):t}var nh={Tab:"tab",Selector:"selector"},ah={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},oh={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},sh={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},uh={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},lh={End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},hh="always",ch={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},dh={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_COMPLETED:"$survey_completed",SURVEY_LANGUAGE:"$survey_language"},vh=Oe("[Surveys]"),fh=(e,t)=>""+e+function(e){return e.current_iteration&&e.current_iteration>0?e.id+"_"+e.current_iteration:e.id}(t),ph=e=>fh("seenSurvey_",e),gh=e=>{try{var t=ph(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){vh.error("Failed to persist survey seen state",e)}},mh=[sh.Popover,sh.Widget,sh.API];Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return I(e)&&isFinite(e)&&Math.floor(e)===e});class yh{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(i)||0>e||0>t||0>r||0>i||e>0xffffffffffff||t>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var n=new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/256,n[5]=e,n[6]=112|t>>>8,n[7]=t,n[8]=128|r>>>24,n[9]=r>>>16,n[10]=r>>>8,n[11]=r,n[12]=i>>>24,n[13]=i>>>16,n[14]=i>>>8,n[15]=i,new yh(n)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new yh(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class bh{generate(){var e=this.generateOrAbort();if(!S(e))return e;this.Yr=0;var t=this.generateOrAbort();if(S(t))throw new Error("Could not generate UUID after timestamp reset");return t}generateOrAbort(){var e=Date.now();if(e>this.Yr)this.Yr=e,this.Kr();else{if(this.Yr>=e+1e4)return;this.Xr++,this.Xr>4398046511103&&(this.Yr++,this.Kr())}return yh.fromFieldsV7(this.Yr,Math.trunc(this.Xr/Math.pow(2,30)),this.Xr&Math.pow(2,30)-1,this.ei.nextUint32())}Kr(){this.Xr=1024*this.ei.nextUint32()+(1023&this.ei.nextUint32())}constructor(){this.Yr=0,this.Xr=0,this.ei=new _h}}var wh,kh=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};e&&!S(e.crypto)&&crypto.getRandomValues&&(kh=e=>crypto.getRandomValues(e));class _h{nextUint32(){return this.Dt.length>this.ti||(kh(this.Dt),this.ti=0),this.Dt[this.ti++]}constructor(){this.Dt=new Uint32Array(8),this.ti=1/0}}var Sh=()=>xh().toString(),xh=()=>(wh||(wh=new bh)).generate(),Ch=null,Mh={ri(){if(!M(Ch))return Ch;var t=!0;if(S(e))t=!1;else try{var r="__mplssupport__";Mh.ii(r,"xyz"),'"xyz"'!==Mh.ni(r)&&(t=!1),Mh.ai(r)}catch(e){t=!1}return t||Le.error("localStorage unsupported; falling back to cookie store"),Ch=t,t},oi(e){Le.error("localStorage error: "+e)},ni(t){try{return null==e?void 0:e.localStorage.getItem(t)}catch(e){Mh.oi(e)}return null},si(e){try{return JSON.parse(Mh.ni(e))||{}}catch(e){}return null},ii(t,r){try{return null==e||e.localStorage.setItem(t,JSON.stringify(r)),!0}catch(e){Mh.oi(e)}return!1},ai(t){try{null==e||e.localStorage.removeItem(t)}catch(e){Mh.oi(e)}}},Th=Oe("[Stylesheet Loader]"),Ih=e,Rh=i,Ah="#020617",Eh={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:ah.Right,widgetType:nh.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:Ah,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},Lh=[ah.Center,ah.Left,ah.Right];function Oh(e){if(e.startsWith("#")){var t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function Dh(e){var t;void 0===e&&(e=Eh.backgroundColor),"#"===e[0]&&(t=Oh(e)),e.startsWith("rgb")&&(t=e);var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(r&&(t=Oh(r)),!t)return Ah;var i=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(i){var n=parseInt(i[1]),a=parseInt(i[2]),o=parseInt(i[3]);return Math.sqrt(n*n*.299+a*a*.587+o*o*.114)>127.5?Ah:"white"}return Ah}var Ph=(e,t,r)=>{var i=tc(e),n=Rh.querySelector("."+i);if(n&&n.shadowRoot)return{shadow:n.shadowRoot,isNewlyCreated:!1};var a=Rh.createElement("div");((e,t,r)=>{var i=h({},Eh,r),n=e.style,a=!Lh.includes(i.position)||t===sh.Widget&&(null==r?void 0:r.widgetType)===nh.Tab;n.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(i.fontFamily)),n.setProperty("--ph-survey-box-padding",i.boxPadding),n.setProperty("--ph-survey-max-width",i.maxWidth),n.setProperty("--ph-survey-z-index",i.zIndex),n.setProperty("--ph-survey-border-color",i.borderColor),a?(n.setProperty("--ph-survey-border-radius",i.borderRadius),n.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(n.setProperty("--ph-survey-border-bottom","none"),n.setProperty("--ph-survey-border-radius",i.borderRadius+" "+i.borderRadius+" 0 0")),n.setProperty("--ph-survey-background-color",i.backgroundColor),n.setProperty("--ph-survey-box-shadow",i.boxShadow),n.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),n.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),n.setProperty("--ph-survey-submit-button-text-color",(null==r?void 0:r.submitButtonTextColor)||Dh(i.submitButtonColor)),n.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),n.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),n.setProperty("--ph-survey-rating-active-text-color",Dh(i.ratingButtonActiveColor)),n.setProperty("--ph-survey-text-primary-color",(null==r?void 0:r.textColor)||Dh(i.backgroundColor)),n.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),n.setProperty("--ph-widget-color",i.widgetColor),n.setProperty("--ph-widget-text-color",Dh(i.widgetColor)),n.setProperty("--ph-widget-z-index",i.zIndex);var o=(null==r?void 0:r.inputBackground)||(null==r?void 0:r.inputBackgroundColor),s=o||i.inputBackground;o||"white"!==i.backgroundColor||(s="#f8f8f8"),n.setProperty("--ph-survey-input-background",s);var u=(null==r?void 0:r.inputTextColor)||Dh(s);n.setProperty("--ph-survey-input-text-color",u),n.setProperty("--ph-survey-rating-text-color",u),n.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),n.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),n.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,e.type,e.appearance),a.className=i;var o=a.attachShadow({mode:"open"}),s=function(e){var t=((e,t,r)=>{var i=e.createElement("style");i.innerText=t;var n=(e=>{var t;return k(e)?e:null==e||null==(t=e.config)?void 0:t.prepare_external_dependency_stylesheet})(r);return n&&(i=n(i)),i||(Th.error("prepare_external_dependency_stylesheet returned null"),null)})(Rh,':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483645;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.intro-screen-header~.bottom-section,.thank-you-message-header~.bottom-section{padding-top:16px}.intro-screen,.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.intro-screen-body,.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) embed,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) iframe,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) img,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) object,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.intro-screen,.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}:is(.survey-box .question-header--empty)~.multiple-choice-options,:is(.survey-box .question-header--empty)~textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb,var(--ph-survey-rating-active-bg-color) 14%,var(--ph-survey-rating-bg-color))}}.rating-text{font-size:11px;justify-content:space-between;opacity:.7}.form-buttons,.rating-text{display:flex;flex-direction:row}.form-buttons{gap:8px;width:100%}.form-buttons-with-back>.form-submit{flex:1 1 auto;min-width:0}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.form-back{background:transparent;border:1.5px solid var(--ph-survey-border-color);border-radius:6px;color:var(--ph-survey-text-primary-color);cursor:pointer;flex:0 0 auto;font-weight:600;padding:12px 16px;text-align:center;user-select:none}.form-back:hover{transform:scale(1.02)}.form-back:active{transform:scale(.98)}.validation-hint{font-size:12px;margin-top:4px;opacity:.7}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.intro-screen{animation:ph-survey-fade-in .3s ease-out forwards;text-align:center}.intro-screen-header{margin:10px 0 0}.intro-screen-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}(t);if(s){var u=o.querySelector("style");u&&o.removeChild(u),o.appendChild(s)}return Rh.body.appendChild(a),{shadow:o,isNewlyCreated:!0}},Nh=e=>{var t=e.responses,r=e.survey,i=e.surveySubmissionId,n=e.posthog,a=e.isSurveyCompleted,o=e.properties,s=e.surveyLanguage,u=e.questionSnapshots;n?(gh(r),n.capture(ch.SENT,h({[dh.SURVEY_NAME]:r.name,[dh.SURVEY_ID]:r.id,[dh.SURVEY_ITERATION]:r.current_iteration,[dh.SURVEY_ITERATION_START_DATE]:r.current_iteration_start_date,[dh.SURVEY_SUBMISSION_ID]:i,[dh.SURVEY_COMPLETED]:a},s&&{[dh.SURVEY_LANGUAGE]:s},{sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url()},li(t,r,u),o,{$set:{[hi(r,"responded")]:!0}})),a&&(Ih.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:r.id}})),ec(r),n.reloadFeatureFlags())):vh.error("[survey sent] event not captured, PostHog instance not found.")},Fh=(e,t,r)=>{return h({[dh.SURVEY_NAME]:e.name,[dh.SURVEY_ID]:e.id,[dh.SURVEY_ITERATION]:e.current_iteration,[dh.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,[dh.SURVEY_PARTIALLY_COMPLETED]:(i=null==t?void 0:t.responses,void 0===i&&(i={}),Object.values(i).some((e=>!T(e))))},(null==t?void 0:t.surveyLanguage)&&{[dh.SURVEY_LANGUAGE]:t.surveyLanguage},{sessionRecordingUrl:null==r.get_session_replay_url?void 0:r.get_session_replay_url(),[dh.SURVEY_SUBMISSION_ID]:null==t?void 0:t.surveySubmissionId},li(null==t?void 0:t.responses,e,null==t?void 0:t.questionSnapshots));var i},qh=(e,t,r,i)=>{if(t){if(!r){var n=Kh(e),a=n?n.surveyLanguage:i;t.capture(ch.DISMISSED,h({},Fh(e,n,t),a&&{[dh.SURVEY_LANGUAGE]:a},{$set:{[hi(e,"dismissed")]:!0}})),ec(e),gh(e),Ih.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else vh.error("[survey dismissed] event not captured, PostHog instance not found.")},jh=(e,t)=>{if(t){var r=(e=>fh("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(r))return}catch(e){return}var i=Kh(e);if(i){try{localStorage.setItem(r,"true")}catch(e){}t.capture(ch.ABANDONED,Fh(e,i,t),{transport:"sendBeacon"})}}else vh.error("[survey abandoned] event not captured, PostHog instance not found.")},Bh=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),Hh=(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r]))?t.reverse():t,$h=e=>{var t=e.map((e=>e.id));return t.every((e=>!!e))?t:void 0},Uh=(e,t)=>{return(e=>e.questions.some((e=>{var t;return!(null==(t=e.branching)||!t.type)})))(e)?e.questions:t?null!==(r=((e,t)=>{if(!t||t.length!==e.questions.length)return null;var r=new Map(e.questions.map((e=>[e.id,e]))),i=[];for(var n of t){var a=r.get(n);if(!a)return null;i.push(a)}return i})(e,t.questionOrder))&&void 0!==r?r:e.questions:e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?Hh(e.questions,Bh(e.questions)):e.questions;var r},zh=e=>function(e){var t;return gi(e)&&!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation)||"always"===e.schedule}(e)||Xh(e),Wh=function(e){function t(e){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach((function(e){e.__e=!0,gl(e)}))},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+rl++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},onPreviewBack(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),Vh=()=>Jl(Wh),Zh=e=>{var t=e.children,r=e.style;return function(e,t,r){var i,n,a,o,s=sl({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)"key"==a?i=t[a]:"ref"==a?n=t[a]:s[a]=void 0===t[a]&&null!=o?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?$u.call(arguments,2):r),hl(e.type,s,i||e.key,n||e.ref,null)}(e.component,e.renderAsHtml?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})};function Gh(e,t){var r,i;if(null==(r=e.conditions)||!r.url)return!0;var n=Be(t);if(!n)return!1;var a=[e.conditions.url],o=function(e){return null!=e?e:"icontains"}(null==(i=e.conditions)?void 0:i.urlMatchType);return bi[o](a,[n])}function Qh(t){var i,n;return function(t,i){var n,o,s;if(!t||0===t.length)return!0;if(!a)return!1;var u,l,h,c,d,v,f=(u={userAgentDataPlatform:null==r||null==(n=r.userAgentData)?void 0:n.platform,maxTouchPoints:null==r?void 0:r.maxTouchPoints,screenWidth:null==e||null==(o=e.screen)?void 0:o.width,screenHeight:null==e||null==(s=e.screen)?void 0:s.height,devicePixelRatio:null==e?void 0:e.devicePixelRatio},(v=function(e){return ie.test(e)?V:re.test(e)?Z:te.test(e)?G:new RegExp(Y,"i").test(e)?Y:new RegExp("("+Q+"|WPDesktop)","i").test(e)?Q:/iPad/.test(e)?U:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?z:ne.test(e)?W:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(J,"i").test(e)?J:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(q).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?j:H:new RegExp("(pda|"+q+")","i").test(e)?X:new RegExp(B,"i").test(e)&&!new RegExp(B+" pc","i").test(e)?ee:""}(a))===U||v===H||"Kobo"===v||"Kindle Fire"===v||v===ee?B:v===V||v===G||v===Z||v===Y?"Console":v===z?"Wearable":v?q:"Android"===(null==u?void 0:u.userAgentDataPlatform)&&(null!==(l=null==u?void 0:u.maxTouchPoints)&&void 0!==l?l:0)>0?600>Math.min(null!==(h=null==u?void 0:u.screenWidth)&&void 0!==h?h:0,null!==(c=null==u?void 0:u.screenHeight)&&void 0!==c?c:0)/(null!==(d=null==u?void 0:u.devicePixelRatio)&&void 0!==d?d:1)?q:B:"Desktop");return bi[null!=i?i:"icontains"](t,[f])}(null==(i=t.conditions)?void 0:i.deviceTypes,null==(n=t.conditions)?void 0:n.deviceTypesMatchType)}var Jh=e=>fh("inProgressSurvey_",e),Yh=(e,t)=>{try{localStorage.setItem(Jh(e),JSON.stringify(t))}catch(e){vh.error("Error setting in-progress survey state in localStorage",e)}},Kh=e=>{try{var t=localStorage.getItem(Jh(e));if(t)return JSON.parse(t)}catch(e){vh.error("Error getting in-progress survey state from localStorage",e)}return null},Xh=e=>{var t=Kh(e);return!T(null==t?void 0:t.surveySubmissionId)},ec=e=>{try{localStorage.removeItem(Jh(e))}catch(e){vh.error("Error clearing in-progress survey state from localStorage",e)}};function tc(e,t){void 0===t&&(t=!1);var r="PostHogSurvey-"+e.id;return t?"."+r:r}function rc(e,t,r){if(void 0===t&&(t=ah.Right),e===sh.ExternalSurvey)return{};switch(t){case ah.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case ah.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case ah.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case ah.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case ah.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case ah.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case ah.Left:return{left:"30px"};case ah.Center:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===sh.Widget&&r===nh.Tab?"60px":"30px"}}}var ic=0;function nc(e,t,r,i,n,a){t||(t={});var o,s,u=t;if("ref"in u)for(s in u={},t)"ref"==s?o=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ic,__i:-1,__u:0,__source:n,__self:a};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===u[s]&&(u[s]=o[s]);return Uu.vnode&&Uu.vnode(l),l}var ac=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),oc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),sc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),uc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),lc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:nc("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),hc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:nc("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),cc=nc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:nc("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),dc=function(e){var t=(void 0===e?{}:e).fill,r=void 0===t?"currentColor":t;return nc("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:r,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[nc("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),nc("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:r})]})},vc=nc("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[nc("g",{"clip-path":"url(#clip0_2415_6911)",children:[nc("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:nc("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),nc("g",{mask:"url(#mask0_2415_6911)",children:[nc("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),nc("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),nc("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),nc("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),nc("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),nc("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),nc("defs",{children:nc("clipPath",{id:"clip0_2415_6911",children:nc("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function fc(e){var t=e.urlParams,r=t?Object.entries(t).map((e=>{var t=e[1];return encodeURIComponent(e[0])+"="+encodeURIComponent(t)})).join("&"):"";return nc("a",{href:"https://posthog.com/surveys"+(r?"?"+r:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",vc]})}function pc(t){var r=t.text,i=t.submitDisabled,n=t.appearance,a=t.onSubmit,o=t.link,s=t.onPreviewSubmit,u=t.skipSubmitButton,l=t.canGoBack,h=t.onBack,c=Jl(Wh).isPreviewMode,d=!!l&&!!h,v=!u&&nc("button",{className:"form-submit",disabled:i,"aria-label":"Submit survey",type:"button",onClick(){o&&(null==e||e.open(o)),c?null==s||s():a()},children:r});return nc("div",{className:"bottom-section",children:[d?nc("div",{className:"form-buttons form-buttons-with-back",children:[nc("button",{className:"form-back",type:"button","aria-label":"Go to previous question",onClick:h,children:n.backButtonText||"Back"}),v]}):v,!n.whiteLabel&&nc(fc,{urlParams:{utm_source:"survey-footer"}})]})}function gc(e){var t=e.question,r=e.forceDisableHtml;return nc("div",{class:t.question||t.description?"question-header":"question-header question-header--empty",children:[nc(t.type===uh.Open?"label":"h3",{className:"survey-question",htmlFor:e.htmlFor,children:t.question}),t.description&&Zh({component:ll("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!r&&"text"!==t.descriptionContentType})]})}function mc(e){return nc("button",{className:"form-cancel",onClick:e.onClick,disabled:Jl(Wh).isPreviewMode,"aria-label":"Close survey",type:"button",children:dc({fill:"black"})})}nc("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:nc("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var yc=e;function bc(e){var t=e.header,r=e.description,i=e.contentType,n=e.forceDisableHtml,a=e.appearance,o=e.onClose,s=Jl(Wh).isPopup;return Zl((()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),o())};return Ne(yc,"keydown",e),()=>{yc.removeEventListener("keydown",e)}}),[o]),nc("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==a.hideCancelButton&&nc(mc,{onClick:()=>o()}),nc("h3",{className:"thank-you-message-header",children:t}),r&&Zh({component:ll("p",{className:"thank-you-message-body"}),children:r,renderAsHtml:!n&&"text"!==i}),s&&nc(pc,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>o()})]})}function wc(e){var t=e.header,r=e.description,i=e.contentType,n=e.forceDisableHtml,a=e.appearance,o=e.onStart,s=Jl(Wh),u=s.onPreviewSubmit,l=s.onPopupSurveyDismissed;return nc("div",{className:"intro-screen",role:"status",tabIndex:0,"aria-atomic":"true",children:[s.isPopup&&!0!==a.hideCancelButton&&nc(mc,{onClick:()=>l()}),t&&nc("h3",{className:"intro-screen-header",children:t}),r&&Zh({component:ll("p",{className:"intro-screen-body"}),children:r,renderAsHtml:!n&&"text"!==i}),nc(pc,{text:a.introScreenButtonText||"Get started",submitDisabled:!1,appearance:a,onSubmit:o,onPreviewSubmit:()=>u(null)})]})}var kc=e=>w(e)&&e.every((e=>x(e)));function _c(e){var t=e.question,r=e.forceDisableHtml,i=e.appearance,n=e.onSubmit,a=e.onPreviewSubmit,o=e.displayQuestionIndex,s=e.initialValue,u=e.canGoBack,l=e.onBack,h=Vh().isPreviewMode,c=Gl(null),d=Vl((()=>x(s)?s:"")),p=d[0],g=d[1],m=null==i?void 0:i.disableAutofocus;Zl((()=>{m||setTimeout((()=>{var e;h||null==(e=c.current)||e.focus()}),100)}),[h,m]);var y="surveyQuestion"+o,b=Ql((()=>function(e,t,r){var i,n,a=e.trim();if(!r&&""===a)return"This field is required";if(""===a)return!1;if(t&&t.length>0)for(var o of t)switch(o.type){case v:if(void 0!==o.value&&o.value>a.length)return null!==(i=o.errorMessage)&&void 0!==i?i:"Please enter at least "+o.value+" characters";break;case f:if(void 0!==o.value&&a.length>o.value)return null!==(n=o.errorMessage)&&void 0!==n?n:"Please enter no more than "+o.value+" characters"}return!1}(p,t.validation,t.optional)),[p,t.validation,t.optional]),w=fe(t.validation,v),k=fe(t.validation,f),_=Ql((()=>function(e,t){var r=1===e?void 0:e;return r&&t?"Enter "+r+"-"+t+" characters":r?"Enter at least "+r+" "+(1===r?"character":"characters"):t?"Maximum "+t+" "+(1===t?"character":"characters"):void 0}(w,k)),[w,k]),S=()=>{b||n(p.trim())},C=()=>{b||a(p.trim())};return nc(cl,{children:[nc("div",{className:"question-container",children:[nc(gc,{question:t,forceDisableHtml:r,htmlFor:y}),nc("textarea",{ref:c,id:y,rows:4,placeholder:null==i?void 0:i.placeholder,minLength:w,maxLength:k,onInput(e){g(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||b||(e.preventDefault(),h?C():S())},value:p}),_&&nc("div",{className:"validation-hint",children:_})]}),nc(pc,{text:t.buttonText||"Submit",submitDisabled:!!b,appearance:i,onSubmit:S,onPreviewSubmit:C,canGoBack:u,onBack:l})]})}function Sc(e){var t=e.question,r=e.appearance,i=e.onSubmit,n=e.onPreviewSubmit,a=e.canGoBack,o=e.onBack;return nc(cl,{children:[nc("div",{className:"question-container",children:nc(gc,{question:t,forceDisableHtml:e.forceDisableHtml})}),nc(pc,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>n("link clicked"),canGoBack:a,onBack:o})]})}function xc(e){var t,r=e.question,i=e.forceDisableHtml,n=e.displayQuestionIndex,a=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,u=e.initialValue,l=e.canGoBack,h=e.onBack,c=r.scale,d=10===r.scale?0:1,v=Vl((()=>I(u)?u:w(u)&&u.length>0&&I(parseInt(u[0]))?parseInt(u[0]):x(u)&&I(parseInt(u))?parseInt(u):null)),f=v[0],p=v[1],g="emoji"===r.display&&2===r.scale,m=Vh().isPreviewMode,y=e=>m?s(e):o(e);return nc(cl,{children:[nc("div",{className:"question-container",children:[nc(gc,{question:r,forceDisableHtml:i}),nc("div",{className:"rating-section",children:[nc("div",{className:"rating-options",children:["emoji"===r.display&&nc("div",{className:"rating-options-emoji"+(g?" rating-options-emoji-2":""),children:null==(t=Ac[r.scale])?void 0:t.map(((e,t)=>nc("button",{"aria-label":"Rate "+(t+1),className:"ratings-emoji question-"+n+"-rating-"+t+" "+(t+1===f?"rating-active":""),value:t+1,type:"button",onClick(){var e=t+1;p(e),r.skipSubmitButton&&y(e)},children:e},t)))}),"number"===r.display&&nc("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(c-d+1)+", minmax(0, 1fr))"},children:Ec(r.scale).map(((e,t)=>nc(Cc,{displayQuestionIndex:n,active:f===e,appearance:a,num:e,setActiveNumber(e){p(e),r.skipSubmitButton&&y(e)}},t)))})]}),!g&&nc("div",{className:"rating-text",children:[nc("div",{children:r.lowerBoundLabel}),nc("div",{children:r.upperBoundLabel})]})]})]}),nc(pc,{text:r.buttonText||(null==a?void 0:a.submitButtonText)||"Submit",submitDisabled:M(f)&&!r.optional,appearance:a,onSubmit:()=>o(f),onPreviewSubmit:()=>s(f),skipSubmitButton:r.skipSubmitButton,canGoBack:l,onBack:h})]})}function Cc(e){var t=e.num,r=e.setActiveNumber;return nc("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+e.displayQuestionIndex+"-rating-"+t+" "+(e.active?"rating-active":""),type:"button",onClick(){r(t)},children:t})}function Mc(e){var t=e.question,r=e.forceDisableHtml,i=e.displayQuestionIndex,n=e.appearance,a=e.onSubmit,o=e.onPreviewSubmit,s=e.initialValue,u=e.canGoBack,l=e.onBack,c=Gl(null),d=Ql((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,r="";e.hasOpenChoice&&(r=t.pop());var i=Hh(t,Bh(t));return e.hasOpenChoice&&(e.choices.push(r),i.push(r)),i})(t)),[t]),v=Vl((()=>((e,t)=>x(e)||kc(e)?e:t===uh.SingleChoice?null:[])(s,t.type))),f=v[0],p=v[1],g=Vl((()=>((e,t)=>{if(x(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(kc(e)){var r=e.find((e=>!t.includes(e)));if(r)return{isSelected:!0,inputValue:r}}return{isSelected:!1,inputValue:""}})(s,d))),m=g[0],y=g[1],b=Vh().isPreviewMode,k=t.type===uh.SingleChoice,_=t.type===uh.MultipleChoice,S=t.skipSubmitButton&&k&&!t.hasOpenChoice,C=(e,t)=>{if(t){var r=!m.isSelected;return y((e=>h({},e,{isSelected:r,inputValue:r?e.inputValue:""}))),k&&p(""),void(r&&setTimeout((()=>{var e;return null==(e=c.current)?void 0:e.focus()}),75))}if(k)return p(e),y((e=>h({},e,{isSelected:!1,inputValue:""}))),void(S&&(a(e),b&&o(e)));_&&w(f)&&(f.includes(e)?p(f.filter((t=>t!==e))):p([...f,e]))},T=e=>{e.stopPropagation();var t=e.currentTarget.value;y((e=>h({},e,{inputValue:t}))),k&&p(t)},I=e=>{e.stopPropagation(),"Enter"!==e.key||R()||(e.preventDefault(),A()),"Escape"===e.key&&(e.preventDefault(),y((e=>h({},e,{isSelected:!1,inputValue:""}))),k&&p(null))},R=()=>!(t.optional||!M(f)&&(!w(f)||m.isSelected||0!==f.length)&&(!m.isSelected||""!==m.inputValue.trim())),A=()=>{m.isSelected&&_?w(f)&&(b?o([...f,m.inputValue]):a([...f,m.inputValue])):b?o(f):a(f)};return nc(cl,{children:[nc("div",{className:"question-container",children:[nc(gc,{question:t,forceDisableHtml:r}),nc("fieldset",{className:"multiple-choice-options limit-height",children:[nc("legend",{className:"sr-only",children:_?" Select all that apply":" Select one"}),d.map(((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,a="surveyQuestion"+i+"Choice"+r,o=a+"Open",s=n?m.isSelected:k?f===e:w(f)&&f.includes(e);return nc("label",{className:n?"choice-option-open":"",children:[nc("div",{className:"response-choice",children:[nc("input",{type:k?"radio":"checkbox",name:a,checked:s,onChange:()=>C(e,n),id:a,"aria-controls":o}),nc("span",{children:n?e+":":e})]}),n&&nc("input",{type:"text",ref:c,id:o,name:"question"+i+"Open",value:m.inputValue,onKeyDown:I,onInput:T,onClick(t){m.isSelected||C(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},r)}))]})]}),nc(pc,{text:t.buttonText||"Submit",submitDisabled:R(),appearance:n,onSubmit:A,onPreviewSubmit:A,skipSubmitButton:S,canGoBack:u,onBack:l})]})}var Tc=[1,2,3,4,5],Ic=[1,2,3,4,5,6,7],Rc=[0,1,2,3,4,5,6,7,8,9,10],Ac={2:[hc,cc],3:[sc,oc,ac],5:[uc,sc,oc,ac,lc]};function Ec(e){switch(e){case 5:default:return Tc;case 7:return Ic;case 10:return Rc}}var Lc=Oe("[Surveys]");function Oc(e,t,r){var i,n=e.questions[t],a=t+1;if(null==(i=n.branching)||!i.type)return t===e.questions.length-1?lh.End:a;if(n.branching.type===lh.End)return lh.End;if(n.branching.type===lh.SpecificQuestion){if(Number.isInteger(n.branching.index))return n.branching.index}else if(n.branching.type===lh.ResponseBased){if(n.type===uh.SingleChoice){var o,s=n.choices.indexOf(""+r);if(-1===s&&n.hasOpenChoice&&(s=n.choices.length-1),null!=(o=n.branching)&&null!=(o=o.responseValues)&&o.hasOwnProperty(s)){var u=n.branching.responseValues[s];return Number.isInteger(u)?u:u===lh.End?lh.End:a}}else if(n.type===uh.Rating){var l;if("number"!=typeof r||!Number.isInteger(r))throw new Error("The response type must be an integer");var h=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(r,n.scale);if(null!=(l=n.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(h)){var c=n.branching.responseValues[h];return Number.isInteger(c)?c:c===lh.End?lh.End:a}}return a}return Lc.warn("Falling back to next question index due to unexpected branching type"),a}var Dc=Oe("[SurveyTranslations]");function Pc(e,t){var r=function(e){return function(e,t){var r=e.storedPersonProperties,i=e.locale,n=ci(e.overrideLanguage);if(n)return null==t||t.info("Using override display language: "+n),n;var a=function(e){return e&&"object"==typeof e&&"language"in e?ci(e.language):null}(r);if(a)return null==t||t.info("Using person property language: "+a),a;var o=ci(i);return o?(null==t||t.info("Using detected locale: "+o),o):(null==t||t.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:k(e.get_property)?e.get_property(zt):void 0,locale:navigator.language||navigator.userLanguage},Dc)}(t);if(!r)return Dc.info("No user language detected"),{survey:e,language:null};var i=pi(e,r,Dc);return{survey:i.survey,language:i.matchedKey}}var Nc=-1,Fc=e,qc=i,jc="ph:show_survey_widget",Bc="PHWidgetSurveyClickListener";function Hc(e,t){try{var r=e.getBoundingClientRect(),i=Fc.innerHeight,n=Fc.innerWidth,a=r.left+r.width/2-t/2;a+t>n-20&&(a=n-t-20),20>a&&(a=20);var o=i-r.bottom,s=250>o&&r.top>o;return{position:"fixed",top:s?"auto":r.bottom+12+"px",left:a+"px",right:"auto",bottom:s?i-r.top+12+"px":"auto",zIndex:Eh.zIndex}}catch(e){return vh.warn("Failed to calculate trigger position:",e),null}}class $c{constructor(e){var t=this;this.ui=new Map,this.li=new Map,this.hi=new Map,this.ci=new Set,this.di=null,this.vi=!1,this.fi=null,this.pi=null,this.gi=null,this.handlePageUnload=()=>{var e=this._posthog.get_property(Wt);if(e)for(var t of e)Xh(t)&&jh(t,this._posthog)},this.handlePopoverSurvey=function(e,r,i){var n,a,o,s,u,l=(void 0===i?{}:i).resumeDelayFromActivation,c=void 0!==l&&l,d=t.mi(e),v=d.survey,f=d.language;t.di=f,t.gi=null,t.yi=r;var p=t.bi(v,r);t.wi(p.id);var g=null!=r?r:{},m=g.properties,y=g.initialResponses,b=!(!y||0>=Object.keys(y).length)&&t.ki(p,y,m,f);if(!b||null!=(n=p.appearance)&&n.displayThankYouMessage){t.Si(p);var w={};if((null==(a=p.appearance)?void 0:a.position)===ah.NextToTrigger&&null!=(o=p.appearance)&&o.widgetSelector){var k,_=qc.querySelector(p.appearance.widgetSelector);_&&(w=Hc(_,parseInt((null==(k=p.appearance)?void 0:k.maxWidth)||Eh.maxWidth))||{})}var S=(null==(s=p.appearance)?void 0:s.surveyPopupDelaySeconds)||0,x=Ph(p,t._posthog).shadow;t.hi.set(x,x.host);var C={posthog:t._posthog,survey:p,removeSurveyFromFocus:t.xi,properties:m,style:w,isSurveyCompleted:b,skipShownEvent:null==r?void 0:r.skipShownEvent,surveyLanguage:f};if(t.gi=C,0>=S)return t.vi=!0,El(nc(Zc,h({},C)),x);var M=()=>{if(!t.Ci(p))return vh.info("Survey "+p.id+" no longer eligible when its display delay elapsed; not displaying"),t.xi(p);(()=>{t.vi=!0;var i=t.mi(e),n=i.survey,a=i.language;t.di=a;var o=t.bi(n,r),s=h({},C,{survey:o,surveyLanguage:a});t.gi=s,El(nc(Zc,h({},s,{survey:h({},o,{appearance:h({},o.appearance,{surveyPopupDelaySeconds:0})})})),x)})()},T=c?null==(u=t._posthog.surveys)||null==(u=u._surveyEventReceiver)||null==u.getActivationTimestamp?void 0:u.getActivationTimestamp(p.id):void 0,R=I(T)?Math.max(0,Date.now()-T):0,A=Math.max(0,1e3*S-R);if(0>=A)return M();var E=Fc.setTimeout((()=>{t.ui.delete(p.id),M()}),A);t.ui.set(p.id,E)}},this.Mi=e=>{var t=this.mi(e),r=t.survey,i=t.language,n=Ph(r,this._posthog),a=n.shadow,o=n.isNewlyCreated;this.hi.set(a,a.host),o&&El(nc(Qc,{posthog:this._posthog,survey:r,surveyLanguage:i},e.id),a)},this.Ti=e=>{var t=this.li.get(e);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute(Bc),this.li.delete(e),vh.info("Removed click listener for survey "+e))},this.Ii=e=>{this.Ri(e)||(this.Ai(e),this.Ti(e.id))},this.Ri=e=>{try{var t,r=qc.querySelector(tc(e,!0));return!(null==r||null==(t=r.shadowRoot)||!t.querySelector(".ph-survey"))}catch(e){return!1}},this.Ei=(e,t)=>{var r=qc.querySelector(t),i=this.li.get(e.id);if(r){if(this.Mi(e),i){if(r===i.element)return;vh.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.Ti(e.id)}if(!r.hasAttribute(Bc)){var n=t=>{var r,i;t.stopPropagation();var n=(null==(r=e.appearance)?void 0:r.position)===ah.NextToTrigger?Hc(t.currentTarget,parseInt((null==(i=e.appearance)?void 0:i.maxWidth)||Eh.maxWidth)):{};Fc.dispatchEvent(new CustomEvent(jc,{detail:{surveyId:e.id,position:n}}))};Ne(r,"click",n),r.setAttribute(Bc,"true"),this.li.set(e.id,{element:r,listener:n,survey:e}),vh.info("Attached click listener for feedback button survey "+e.id)}}else i&&this.Ii(e)},this.renderPopover=e=>{var t=this.mi(e),r=t.survey,i=t.language,n=Ph(r,this._posthog).shadow;this.hi.set(n,n.host),El(nc(Zc,{posthog:this._posthog,survey:r,removeSurveyFromFocus:this.xi,surveyLanguage:i}),n)},this.renderSurvey=(e,t,r)=>{var i,n=this.mi(e),a=n.survey,o=n.language,s=!1;null!=(i=this._posthog.config)&&null!=(i=i.surveys)&&i.prefillFromUrl&&(s=this.Li(a,o,r)),El(nc(Zc,{posthog:this._posthog,survey:a,removeSurveyFromFocus:this.xi,isPopup:!1,properties:r,isSurveyCompleted:s,surveyLanguage:o}),t)},this.getActiveMatchingSurveys=function(e,r){var i;void 0===r&&(r=!1),null==(i=t._posthog)||null==(i=i.surveys)||i.getSurveys((r=>{var i=r.filter((e=>t.Ci(e)));e(i)}),r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var r=e.filter((e=>e.type===sh.Popover||e.type===sh.Widget)),i=new Set(r.map((e=>e.id)));for(var n of Array.from(t.ui.keys()))i.has(n)||t.cancelSurvey(n);var a=t.Oi(r),o=new Set;a.forEach((e=>{if(e.type===sh.Widget){var r,i,n,a;if((null==(r=e.appearance)?void 0:r.widgetType)===nh.Tab)return void t.Mi(e);(null==(i=e.appearance)?void 0:i.widgetType)===nh.Selector&&null!=(n=e.appearance)&&n.widgetSelector&&(o.add(e.id),t.Ei(e,null==(a=e.appearance)?void 0:a.widgetSelector))}M(t.Di)&&e.type===sh.Popover&&t.handlePopoverSurvey(e,void 0,{resumeDelayFromActivation:!0})})),t.li.forEach((e=>{var r=e.survey;o.has(r.id)||t.Ii(r)}))}),e)},this.Si=e=>{M(this.Di)||vh.error("Survey "+this.Di+" already in focus. Cannot add survey "+e.id+"."),this.Di=e.id},this.xi=e=>{this.Di!==e.id&&vh.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.wi(e.id),this.Di=null,this.di=null,this.vi=!1,this.gi=null,this.yi=void 0,this.Ai(e)},this._posthog=e,this.Di=null,this.fi=()=>this.Pi(),Ne(Fc,"languagechange",this.fi),this.pi=e.onFeatureFlags((()=>this.Pi()))}Pi(){if(!M(this.Di)){var e=this._posthog.get_property(Wt),t=null==e?void 0:e.find((e=>e.id===this.Di));if(t){var r=this.mi(t),i=r.survey,n=r.language;if(n!==this.di&&(this.di=n,this.vi)){var a=this.bi(i,this.yi),o=Ph(a,this._posthog).shadow;El(nc(Zc,h({},this.gi,{posthog:this._posthog,survey:a,removeSurveyFromFocus:this.xi,surveyLanguage:n})),o)}}}}get Ni(){var e,t,r;return null!==(e=null==(t=(r=this._posthog).getExtension)?void 0:t.call(r,"featureFlags"))&&void 0!==e?e:this._posthog.featureFlags}bi(e,t){return null!=t&&t.position||null!=t&&t.selector?h({},e,{appearance:h({},e.appearance,t.position&&{position:t.position},t.selector&&{widgetSelector:t.selector})}):e}wi(e){var t=this.ui.get(e);t&&(clearTimeout(t),this.ui.delete(e))}cancelSurvey(e){this.ui.has(e)&&(vh.info("Cancelled pending survey "+e),this.wi(e),this.Di===e&&(this.Di=null,this.di=null,this.vi=!1,this.gi=null,this.yi=void 0))}setAutomaticDisplayDispose(e){this.Fi=e}dispose(){var e;null==(e=this.Fi)||e.call(this),this.Fi=void 0,this.fi&&(Fc.removeEventListener("languagechange",this.fi),this.fi=null),this.pi&&(this.pi(),this.pi=null),this.ui.forEach(((e,t)=>this.wi(t))),this.li.forEach(((e,t)=>this.Ti(t))),this.hi.forEach(((e,t)=>{El(null,t),null==e||e.remove()})),this.hi.clear(),this.Di=null}Oi(e){return e.sort(((e,t)=>{var r,i,n=Xh(e),a=Xh(t);if(n&&!a)return-1;if(!n&&a)return 1;var o=e.schedule===hh,s=t.schedule===hh;return o&&!s?1:!o&&s?-1:((null==(r=e.appearance)?void 0:r.surveyPopupDelaySeconds)||0)-((null==(i=t.appearance)?void 0:i.surveyPopupDelaySeconds)||0)}))}mi(e){return Pc(e,this._posthog)}Li(e,t,r){if(this.ci.has(e.id))return!1;var i=function(e){var t={},r=!1,i=e.replace(/^\?/,"");if(!i)return{params:t,autoSubmit:r};var n=i.split("&");for(var a of n){var o=a.split("="),s=o[0],u=o[1];if(s&&!S(u)){var l=decodeURIComponent(s),h=decodeURIComponent(u);if("auto_submit"!==l||"true"!==h){var c=l.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);t[d]||(t[d]=[]),t[d].push(h)}}else r=!0}}return{params:t,autoSubmit:r}}(Fc.location.search),n=i.params;if(0===Object.keys(n).length)return!1;vh.info("[Survey Prefill] Detected URL prefill parameters");var a=this.qi(e,n,t);return!!a&&(this.ji(e,a,r,t),this.ci.add(e.id),a.isSurveyCompleted)}ji(e,t,r,i){var n=t.responses,a=t.submissionId,o=t.isSurveyCompleted,s=t.skippedResponses;(Object.keys(s).length>0&&e.enable_partial_responses||o)&&Nh({responses:o?n:s,survey:e,surveySubmissionId:a,posthog:this._posthog,isSurveyCompleted:o,properties:r,surveyLanguage:i})}ki(e,t,r,i){var n={};for(var a of Object.entries(t)){var o=a[1];n[parseInt(a[0])]=w(o)?o.map(String):[String(o)]}vh.info("[Survey] Processing initial responses");var s=this.qi(e,n,i);return!!s&&(this.ji(e,s,r,i),s.isSurveyCompleted)}qi(e,t,r){try{var i=function(e,t){var r={};return e.questions.forEach(((e,i)=>{if(t[i]&&e.id){var n=t[i],a=si(e.id);try{switch(e.type){case uh.SingleChoice:if(!e.choices||0===e.choices.length)return void Le.warn("[Survey Prefill] Question "+i+" has no choices");var o=parseInt(n[0],10);if(isNaN(o)||0>o||o>=e.choices.length)return void Le.warn("[Survey Prefill] Invalid choice index for q"+i+": "+n[0]);r[a]=e.choices[o];break;case uh.MultipleChoice:if(!e.choices||0===e.choices.length)return void Le.warn("[Survey Prefill] Question "+i+" has no choices");var s=n.map((e=>parseInt(e,10))).filter((t=>!isNaN(t)&&t>=0&&e.choices.length>t));if(0===s.length)return void Le.warn("[Survey Prefill] No valid choices for q"+i);var u=[...new Set(s.map((t=>e.choices[t])))];s.length>u.length&&Le.warn("[Survey Prefill] Removed duplicate choices for q"+i),r[a]=u;break;case uh.Rating:var l=parseInt(n[0],10),h=e.scale||10;if(isNaN(l)||0>l||l>h)return void Le.warn("[Survey Prefill] Invalid rating for q"+i+": "+n[0]+" (scale: 0-"+h+")");r[a]=l;break;default:Le.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){Le.error("[Survey Prefill] Error converting q"+i+":",e)}}})),r}(e,t);if(0===Object.keys(i).length)return vh.warn("[Survey Prefill] No valid responses after conversion"),null;var n=Sh(),a=Object.keys(t).map((e=>parseInt(e,10))),o=function(e,t,r){for(var i=0,n={},a=[],o=e.questions.length+1,s=0;e.questions.length>i&&o>s&&(s++,t.includes(i));){var u=e.questions[i];if(!u||!("skipSubmitButton"in u)||!u.skipSubmitButton)break;if(u.id){var l=si(u.id);S(r[l])||(n[l]=r[l])}a.push(i);var h=Oc(e,i,u.id?r[si(u.id)]:null);if(h===lh.End)return{startQuestionIndex:e.questions.length,skippedResponses:n,skippedIndices:a};i=h}return{startQuestionIndex:i,skippedResponses:n,skippedIndices:a}}(e,a,i),s=o.startQuestionIndex,u=o.skippedResponses,l=o.skippedIndices,h=s>=e.questions.length;return Yh(e,{surveySubmissionId:n,responses:i,lastQuestionIndex:s,questionOrder:$h(e.questions),visitedIndices:l,surveyLanguage:r}),vh.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:i,submissionId:n,startQuestionIndex:s,isSurveyCompleted:h,skippedResponses:u}}catch(e){return vh.error("[Survey Prefill] Error handling prefill:",e),null}}Bi(e,t){if(void 0===t&&(t=void 0),!e)return!0;var r=this.Ni,i=!(null==r||!r.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),n=!0;return t&&(n=(null==r?void 0:r.getFeatureFlag(e,{send_event:!1}))===t||"any"===t),i&&n}Hi(e){return!e.conditions||Gh(e,this._posthog)&&Qh(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==Rh||!Rh.querySelector(e.conditions.selector))}(e)}$i(e){var t;return zh(e)?{satisfied:!0}:!e.internal_targeting_flag_key||!function(e){var t;return"recurring"===e.schedule||(null!==(t=e.current_iteration)&&void 0!==t?t:0)>0}(e)||null!=(t=this.Ni)&&t.hasLoadedFlags?{satisfied:this.Bi(e.internal_targeting_flag_key)}:{satisfied:!1,reason:"Feature flags have not loaded yet; deferring internal targeting flag check"}}checkSurveyEligibility(e){var t,r,i={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return i.eligible=!1,i.reason="Survey is not running. It was completed on "+e.end_date,i;if(!mh.includes(e.type))return i.eligible=!1,i.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",i;var n=null==(t=e.conditions)?void 0:t.linkedFlagVariant;if(!this.Bi(e.linked_flag_key,n))return i.eligible=!1,i.reason=n?"Survey linked feature flag is not enabled for variant "+n:"Survey linked feature flag is not enabled",i;if(!this.Bi(e.targeting_flag_key))return i.eligible=!1,i.reason="Survey targeting feature flag is not enabled",i;var a,o=this.$i(e);return o.satisfied?function(e,t){if(!e||!t)return!0;var r="string"==typeof t?new Date(t):t,i=new Date,n=Math.abs(i.getTime()-r.getTime());return Math.ceil(n/864e5)>e}(null==(r=e.conditions)?void 0:r.seenSurveyWaitPeriodInDays,Mh.ni("lastSeenSurveyDate"))?(e=>!!Mh.ni(ph(e))&&!zh(e))(e)?(i.eligible=!1,i.reason="Survey has already been seen and it can't be activated again",i):i:(i.eligible=!1,i.reason="Survey wait period has not passed",i):(i.eligible=!1,i.reason=null!==(a=o.reason)&&void 0!==a?a:"Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",i)}checkSurveyRenderability(e){var t=this.checkSurveyEligibility(e);return t.eligible&&!this.Ui(e)?{eligible:!1,reason:"Survey event/action trigger has not been fired yet"}:t}Ui(e){var t;if(!gi(e)&&!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))return!0;var r=null==(t=this._posthog.surveys)||null==(t=t._surveyEventReceiver)?void 0:t.getSurveys();return!(null==r||!r.includes(e.id))}zi(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var t=e.value;return!e.key||!t||this.Bi(t)}))}Ci(e){return this.checkSurveyEligibility(e).eligible&&this.Hi(e)&&this.Ui(e)&&this.zi(e)}Ai(e){try{var t=qc.querySelector(tc(e,!0));null!=t&&t.shadowRoot&&(El(null,t.shadowRoot),this.hi.delete(t.shadowRoot)),null==t||t.remove()}catch(t){vh.warn("Failed to remove survey "+e.id+" from DOM:",t)}}getTestAPI(){return{addSurveyToFocus:this.Si,removeSurveyFromFocus:this.xi,surveyInFocus:this.Di,surveyTimeouts:this.ui,handleWidget:this.Mi,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.Ei,sortSurveysByAppearanceDelay:this.Oi,checkFlags:this.zi.bind(this),isSurveyFeatureFlagEnabled:this.Bi.bind(this),onLanguageChange:this.Pi.bind(this),currentLanguage:this.di,surveyIsRendered:this.vi}}}function Uc(e,t){if(qc&&Fc){var r,i=new $c(e);if(e.config.disable_surveys_automatic_display)return vh.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),i;if(!1===t)return vh.info("There are no surveys to load or Surveys is disabled in the project settings."),i;i.callSurveysAndEvaluateDisplayLogic(!0);var n=()=>{S(r)&&(r=setInterval((()=>{i.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))},a=()=>{S(r)||(clearInterval(r),r=void 0)};n();var o=()=>{qc.hidden?a():(i.callSurveysAndEvaluateDisplayLogic(!1),n())};return Ne(qc,"visibilitychange",o),i.setAutomaticDisplayDispose((()=>{a(),qc.removeEventListener("visibilitychange",o)})),i}}function zc(e){var t=e.survey,r=e.removeSurveyFromFocus,i=void 0===r?()=>{}:r,n=e.setSurveyVisible,a=e.isPreviewMode,o=void 0!==a&&a,s=e.posthog;Zl((()=>{var e;if(!o&&null!=(e=t.conditions)&&e.url){var r=()=>{var e,r=t.type===sh.Widget,a=Gh(t,s),o=(null==(e=t.appearance)?void 0:e.widgetType)===nh.Tab&&r;if(!a)return vh.info("Hiding survey "+t.id+" because URL does not match"),n(!1),i(t);o&&(vh.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),n(!0))};Ne(Fc,"popstate",r),Ne(Fc,"hashchange",r);var a=Fc.history.pushState,u=Fc.history.replaceState;return Fc.history.pushState=function(){for(var e=arguments.length,t=new Array(e),i=0;e>i;i++)t[i]=arguments[i];a.apply(this,t),r()},Fc.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),i=0;e>i;i++)t[i]=arguments[i];u.apply(this,t),r()},()=>{Fc.removeEventListener("popstate",r),Fc.removeEventListener("hashchange",r),Fc.history.pushState=a,Fc.history.replaceState=u}}}),[o,t,i,n,s])}var Wc=200;function Vc(e){switch(void 0===e&&(e=oh.Right),e){case oh.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case oh.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case oh.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function Zc(e){var t,r,i,n,a,o,s,u,l,c,d,v,f=e.survey,p=e.forceDisableHtml,g=e.posthog,m=e.style,y=void 0===m?{}:m,b=e.previewPageIndex,w=e.removeSurveyFromFocus,k=void 0===w?()=>{}:w,_=e.isPopup,x=void 0===_||_,C=e.onPreviewSubmit,M=void 0===C?()=>{}:C,T=e.onPreviewBack,I=void 0===T?()=>{}:T,R=e.onPopupSurveyDismissed,A=void 0===R?()=>{}:R,E=e.onCloseConfirmationMessage,L=void 0===E?()=>{}:E,O=e.properties,D=e.isSurveyCompleted,P=e.skipShownEvent,N=e.surveyLanguage,F=Gl(null),q=Number.isInteger(b),j=null!=(t=f.appearance)&&t.surveyPopupDelaySeconds?1e3*f.appearance.surveyPopupDelaySeconds:0,B=function(e,t,r,i,n,a,o,s,u){var l=Vl(i||0===r||e.type===sh.ExternalSurvey),c=l[0],d=l[1],v=Vl(!1),f=v[0],p=v[1],g=Gl(!1),m=()=>{var t=()=>{a&&n(e),d(!1)};if(!g.current){var r=null==o?void 0:o.current;r?(g.current=!0,r.style.transition="opacity "+Wc+"ms ease-out",r.style.opacity="0",setTimeout((()=>{g.current=!1,t()}),Wc+50)):t()}},y=t=>{t.detail.surveyId===e.id&&m()};return Zl((()=>{if(t){if(!i){var n,a=t=>{var r,i;if(t.detail.surveyId===e.id){if(null==(r=e.appearance)||!r.displayThankYouMessage)return m();p(!0),null!=(i=e.appearance)&&i.autoDisappear&&(n&&clearTimeout(n),n=setTimeout(m,5e3))}},o=()=>{if(Gh(e,t)){d(!0),Fc.dispatchEvent(new Event("PHSurveyShown")),s||t.capture(ch.SHOWN,h({[dh.SURVEY_NAME]:e.name,[dh.SURVEY_ID]:e.id,[dh.SURVEY_ITERATION]:e.current_iteration,[dh.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date},u&&{[dh.SURVEY_LANGUAGE]:u},{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()}));try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}}};Ne(Fc,"PHSurveyClosed",y),Ne(Fc,"PHSurveySent",a);var l=r>0?setTimeout(o,r):void 0;return S(l)&&o(),()=>{S(l)||clearTimeout(l),S(n)||clearTimeout(n),Fc.removeEventListener("PHSurveyClosed",y),Fc.removeEventListener("PHSurveySent",a)}}}else vh.error("usePopupVisibility hook called without a PostHog instance.")}),[]),zc({survey:e,removeSurveyFromFocus:n,setSurveyVisible:d,isPreviewMode:i,posthog:t}),{isPopupVisible:c,isSurveySent:f,setIsPopupVisible:d,hidePopupWithAnimation:m}}(f,g,j,q,k,x,F,P,N),H=B.isPopupVisible,U=B.hidePopupWithAnimation,z=B.isSurveySent||b===f.questions.length||!0===D,W=Vl(!1),V=W[0],Z=W[1],G=Ql((()=>!!Kh(f)),[f]),Q=!!(null!=(r=f.appearance)&&r.introScreenHeader||null!=(i=f.appearance)&&i.introScreenDescription),J=q?b===Nc:!(null==(n=f.appearance)||!n.displayIntroScreen)&&Q&&!V&&!G,Y=Ql((()=>{var e=Kh(f),t=(null==e?void 0:e.surveySubmissionId)||Sh();return{isPreviewMode:q,previewPageIndex:b,onPopupSurveyDismissed(){N?qh(f,g,q,N):qh(f,g,q),A()},isPopup:x||!1,surveySubmissionId:t,onPreviewSubmit:M,onPreviewBack:I,posthog:g,properties:O,surveyLanguage:N}}),[q,b,x,g,f,A,M,I,O,N]);return H?nc(Wh.Provider,{value:Y,children:nc("div",{className:"ph-survey",style:h({},rc(f.type,null==(a=f.appearance)?void 0:a.position,null==(o=f.appearance)?void 0:o.widgetType),y),ref:F,children:z?nc(bc,{header:(null==(s=f.appearance)?void 0:s.thankYouMessageHeader)||"Thank you!",description:(null==(u=f.appearance)?void 0:u.thankYouMessageDescription)||"",forceDisableHtml:!!p,contentType:null==(l=f.appearance)?void 0:l.thankYouMessageDescriptionContentType,appearance:f.appearance||Eh,onClose(){U(),L()}}):J?nc(wc,{header:(null==(c=f.appearance)?void 0:c.introScreenHeader)||"",description:(null==(d=f.appearance)?void 0:d.introScreenDescription)||"",forceDisableHtml:!!p,contentType:null==(v=f.appearance)?void 0:v.introScreenDescriptionContentType,appearance:f.appearance||Eh,onStart:()=>Z(!0)}):nc(Gc,{survey:f,forceDisableHtml:!!p,posthog:g})})}):null}function Gc(e){var t,r,i=e.survey,n=e.forceDisableHtml,a=e.posthog,o=Ql((()=>{var e=Kh(i);if(!e)return null;var t=I(e.lastQuestionIndex);return!t||t&&e.lastQuestionIndex>=0&&i.questions.length>e.lastQuestionIndex?e:(ec(i),null)}),[i]),s=Vl((()=>(null!=o&&o.responses&&vh.info("Survey is already in progress, filling in initial responses"),(null==o?void 0:o.responses)||{}))),u=s[0],l=s[1],c=Jl(Wh),d=c.previewPageIndex,v=c.onPopupSurveyDismissed,f=c.isPopup,p=c.onPreviewSubmit,g=c.onPreviewBack,m=c.surveySubmissionId,y=c.isPreviewMode,b=c.properties,w=c.surveyLanguage,k=Vl((()=>{var e=null==o?void 0:o.lastQuestionIndex,t=I(e)&&e>=0&&i.questions.length>e?e:0;return I(d)&&d>=0?d:t})),_=k[0],x=k[1],C=Vl((()=>{var e;return(null!==(e=null==o?void 0:o.visitedIndices)&&void 0!==e?e:[]).filter((e=>e>=0&&i.questions.length>e))})),M=C[0],T=C[1],R=Vl((()=>{var e,t=Kh(i);return null!==(e=null==t?void 0:t.questionSnapshots)&&void 0!==e?e:{}})),A=R[0],E=R[1],L=Ql((()=>$h(Uh(i,o))),[i.id,o]),O=Ql((()=>{if(!L||new Set(L).size!==L.length)return Uh(i,o);var e=new Map(i.questions.map((e=>[e.id,e]))),t=L.map((t=>e.get(t))).filter((e=>!!e));return t.length===L.length?t:i.questions}),[L,i.questions,i,o]);Zl((()=>{!y||S(d)||0>d||x(d)}),[d,y]);var D=!(null==(t=i.appearance)||!t.allowGoBack)&&(y?(null!=d?d:0)>0:M.length>0),P=O.at(_);return P?nc("form",{className:"survey-form",name:"surveyForm",children:[f&&!0!==(null==(r=i.appearance)?void 0:r.hideCancelButton)&&nc(mc,{onClick(){v()}}),nc("div",{className:"survey-box","data-question-index":_,children:Jc({question:P,forceDisableHtml:n,displayQuestionIndex:_,appearance:i.appearance||Eh,onSubmit:e=>(e=>{var t=e.res,r=e.displayQuestionIndex,n=e.questionId;if(a)if(n){var o=si(n),s=h({},u,{[o]:t});l(s);var c=O[r],d=null!=c&&c.id?h({},A,{[c.id]:c.question}):A;E(d);var v=Oc(i,r,t),f=v===lh.End,p=[...M,r];if(f||(T(p),x(v),Yh(i,{surveySubmissionId:m,responses:s,lastQuestionIndex:v,questionOrder:$h(O),visitedIndices:p,surveyLanguage:w,questionSnapshots:d})),i.enable_partial_responses||f){var g=new Set(p.map((e=>{var t;return null==(t=O[e])?void 0:t.id})).filter((e=>!!e)).map((e=>si(e)))),y=Object.fromEntries(Object.entries(s).filter((e=>g.has(e[0]))));Nh({responses:y,survey:i,surveySubmissionId:m,isSurveyCompleted:f,posthog:a,properties:b,surveyLanguage:w,questionSnapshots:d})}}else vh.error("onNextButtonClick called without a questionId.");else vh.error("onNextButtonClick called without a PostHog instance.")})({res:e,displayQuestionIndex:_,questionId:P.id}),onPreviewSubmit:p,initialValue:P.id?u[si(P.id)]:void 0,canGoBack:D,onBack(){if(y)g();else if(0!==M.length){var e=M[M.length-1],t=M.slice(0,-1);T(t),x(e),Yh(i,{surveySubmissionId:m,responses:u,lastQuestionIndex:e,questionOrder:$h(O),visitedIndices:t,surveyLanguage:w,questionSnapshots:A})}}})})]}):null}function Qc(e){var t,r,i,n,a,o,s,u=e.survey,l=e.forceDisableHtml,h=e.posthog,c=e.readOnly,d=e.surveyLanguage,v=Vl(!0),f=v[0],p=v[1],g=Vl(!1),m=g[0],y=g[1],b=Vl({}),w=b[0],k=b[1],_=Gl(void 0),x=()=>{y(!m)};if(Zl((()=>{var e;if(h){if(!c){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&k({top:"50%",bottom:"auto"});var t=e=>{var t,r=e;(null==(t=r.detail)?void 0:t.surveyId)===u.id&&(vh.info("Received show event for feedback button survey "+u.id),k(r.detail.position||{}),x())};return Ne(Fc,jc,t),()=>{S(_.current)||(clearTimeout(_.current),_.current=void 0),Fc.removeEventListener(jc,t)}}}else vh.error("FeedbackWidget called without a PostHog instance.")}),[h,c,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(r=u.appearance)?void 0:r.widgetSelector,null==(i=u.appearance)?void 0:i.borderColor]),zc({survey:u,setSurveyVisible:p,posthog:h}),!f)return null;var C=()=>{u.schedule!==hh&&p(!1),S(_.current)||clearTimeout(_.current),_.current=setTimeout((()=>{_.current=void 0,y(!1)}),200)};return nc(cl,{children:["tab"===(null==(n=u.appearance)?void 0:n.widgetType)&&nc("button",{className:"ph-survey-widget-tab "+((null==(a=u.appearance)?void 0:a.tabPosition)===oh.Top?"widget-tab-top":""),onClick:x,disabled:c,style:Vc(null==(o=u.appearance)?void 0:o.tabPosition),children:(null==(s=u.appearance)?void 0:s.widgetLabel)||""}),m&&nc(Zc,{posthog:h,survey:u,forceDisableHtml:l,style:w,onPopupSurveyDismissed:C,onCloseConfirmationMessage:C,surveyLanguage:d})]})}var Jc=e=>{var t=e.question,r=e.onSubmit,i=e.onPreviewSubmit,n={forceDisableHtml:e.forceDisableHtml,appearance:e.appearance,onPreviewSubmit(e){i(e)},onSubmit(e){r(e)},initialValue:e.initialValue,displayQuestionIndex:e.displayQuestionIndex,canGoBack:e.canGoBack,onBack:e.onBack};switch(t.type){case uh.Open:return ll(_c,h({},n,{question:t,key:t.id}));case uh.Link:return ll(Sc,h({},n,{question:t,key:t.id}));case uh.Rating:return ll(xc,h({},n,{question:t,key:t.id}));case uh.SingleChoice:case uh.MultipleChoice:return ll(Mc,h({},n,{question:t,key:t.id}));default:return vh.error("Unsupported question type: "+t.type),null}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.generateSurveys=Uc,s.extendPostHogWithSurveys=Uc;var Yc=1e4,Kc=(e,t,r)=>r.remaining>0?t.length>r.remaining?(e.push(t.slice(0,r.remaining)),r.remaining=0,r.truncated=!0,!1):(e.push(t),r.remaining-=t.length,!0):(r.truncated=!0,!1),Xc=(e,t,r)=>{var i=JSON.stringify(e);if(r.remaining>=i.length)return Kc(t,i,r);if(r.truncated=!0,2>r.remaining)return!1;for(var n=0,a=Math.min(e.length,r.remaining-2);a>n;){var o=Math.ceil((n+a)/2);JSON.stringify(e.slice(0,o)).length>r.remaining?a=o-1:n=o}return Kc(t,JSON.stringify(e.slice(0,n)),r)},ed=e=>void 0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e,td=(e,t,r)=>{if(!r.truncated){if(r.keysRemaining-=1,r.sizeRemaining-=String(t).length+e.length,0>=r.keysRemaining||0>=r.sizeRemaining)return r.truncated=!0,void(r.result.attributes_truncated=!0);r.result[e]=t}},rd=(e,t,r)=>{if(!r.truncated)if(_(e)){if(r.seen.has(e))return void td(t||"circular","[Circular]",r);r.seen.add(e);try{for(var i in e)try{if(!{}.hasOwnProperty.call(e,i))continue;if(rd(e[i],t?t+"."+i:i,r),r.truncated)return}catch(e){continue}}catch(e){}}else td(t,e,r)},id=function(e,t,r,i,n,a){if(void 0===n&&(n=!1),!ed(e))return!n||Kc(t,"null",r);if(M(e)||(e=>{try{return I(e)||R(e)}catch(e){return!1}})(e))return Kc(t,JSON.stringify(e),r);if("string"==typeof e)return Xc(e,t,r);if(!_(e)&&!w(e))return Kc(t,JSON.stringify(e),r);if(i.has(e))return Xc("[Circular]",t,r);i.add(e);try{var o=e.toJSON;if(k(o))return id(o.call(e),t,r,i,n)}catch(e){}try{var s={}.toString.call(e);if("[object String]"===s)return Xc(String(e.valueOf()),t,r);if("[object Number]"===s||"[object Boolean]"===s)return Kc(t,JSON.stringify(e.valueOf()),r)}catch(e){}if(e instanceof Error){var u={};try{for(var l in e)({}).hasOwnProperty.call(e,l)&&(u[l]=e[l])}catch(e){}try{u.name=e.name}catch(e){}try{u.message=e.message}catch(e){}try{u.stack=e.stack}catch(e){}return id(u,t,r,i,n,a)}if(w(e)){if(!Kc(t,"[",r))return!1;for(var h=0;e.length>h;h++){if(h>0&&!Kc(t,",",r))return!1;var c=void 0;try{c=e[h]}catch(e){c=void 0}if(!id(c,t,r,i,!0))return!1}return Kc(t,"]",r)}if(!Kc(t,"{",r))return!1;var d=!0;try{for(var v in e)if({}.hasOwnProperty.call(e,v)){if(0>=r.remaining)return r.truncated=!0,!1;var f=void 0;try{f=e[v]}catch(e){continue}if(a)try{rd(f,v,a)}catch(e){}if(ed(f)){var p=(d?"":",")+JSON.stringify(v)+":";if(p.length>=r.remaining)return r.truncated=!0,!1;var g=t.length,m=r.remaining,y=r.truncated;if(!Kc(t,p,r))return!1;var b=t.length,S=id(f,t,r,i,!1),x=r.truncated;if(t.length!==b){if(d=!1,!S)return!1}else if(t.length=g,r.remaining=m,r.truncated=S?y:x,!S)return!1}}}catch(e){}return Kc(t,"}",r)},nd=(e,t)=>{for(var r=[],i={remaining:t,truncated:!1},n=_(e[0])?{result:{},keysRemaining:50,sizeRemaining:Yc,truncated:!1,seen:new WeakSet([e[0]])}:void 0,a=0;e.length>a&&(0>=a||Kc(r," ",i))&&id(e[a],r,i,new WeakSet,!1,0===a?n:void 0);a++);return{body:r.join("")+(i.truncated?"...":""),truncated:i.truncated,attributes:(null==n?void 0:n.result)||{}}},ad={debug:"debug",log:"info",warn:"warn",error:"error",info:"info"},od=e=>"canCapture"in e,sd=e=>od(e)?e.canCapture?e.getExtension("logs"):void 0:e.is_capturing()?e.logs:void 0;s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.logs={initializeLogs(e){var t=e,r=[],i={host:s.location.host},n=!1,a=function(e){var a=s.console[e];r.push(pu(s.console,e,(r=>{var o=(r=>function(){for(var a=!1,o=arguments.length,u=new Array(o),l=0;o>l;l++)u[l]=arguments[l];try{var c=t;if(u.length>0&&!n&&c){var d=sd(c);if(d){n=!0,a=!0;var v=nd(u,Yc),f=v.body,p=v.attributes,g=h({},i,v.truncated?{body_truncated:"true"}:{});((e,t,r)=>{if(od(e))t.captureConsoleLog(r);else{var i=(e=>{var t=/^1\.(\d+)\.(\d+)$/.exec(e);if(t){var r=Number(t[1]),i=Number(t[2]);if(r>=392&&419>=r)return 410===r?i>4?i>10?void 0:"de":"le":418===r?i>3?i>10?i>14?i>17?void 0:"vi":"ci":"ui":"he":419===r?i>2?void 0:"vi":410>r?"le":"he"}})(e.version),n=i?t[i]:void 0;k(n)&&n.call(t,r)}})(c,d,{level:ad[e],body:f,attributes:h({"log.source":"console."+e},g,p)})}}}catch(e){}finally{a&&(n=!1),r.apply(s.console,u)}})(r);return o.__rrweb_original__=(e=>{for(;null!=(t=e)&&t.__rrweb_original__;){var t;e=e.__rrweb_original__}return e})(a),o})))};for(var o of Object.keys(ad))a(o);return()=>{t=void 0,r.forEach((e=>e()))}},replayConsoleBuffer(e,t){var r=sd(e);if(r)for(var i of t)try{var n=nd(i.args,Yc);null==r.captureBufferedConsoleLog||r.captureBufferedConsoleLog({level:ad[i.level],body:n.body,attributes:h({"log.source":"console."+i.level,host:s.location.host},n.truncated?{body_truncated:"true"}:{},n.attributes)},i.context,i.occurredAtMs)}catch(e){}}},Oe("[Error tracking]");var ud=Oe("[ExceptionAutocapture]"),ld=new class{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,t,0).apply(e),n=this.buildParsingContext(t),a=this.parseStacktrace(i,n);return{$exception_list:this.convertToExceptionList(a,r),$exception_level:"error"}}modifyFrames(e){var t=this;return l((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&w(r.stacktrace.frames)&&(r.stacktrace.frames=yield t.applyModifiers(r.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var r,i;return null!=e.cause&&(r=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),h({},e,{cause:r,stack:i})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return l((function*(){var r=e;for(var i of t.modifiers)r=yield i(r);return r}))()}convertToExceptionList(e,t){var r,i,n,a={type:e.type,value:e.value,mechanism:{type:null!==(r=t.type)&&void 0!==r?r:"generic",handled:null===(i=t.handled)||void 0===i||i,synthetic:null!==(n=e.synthetic)&&void 0!==n&&n}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var o=[a];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,h({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:pe(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,r){void 0===r&&(r=0);var i=(r,i)=>{if(4>=i){var n=this.buildCoercingContext(e,t,i);return this.applyCoercers(r,n)}};return h({},t,{syntheticException:0==r?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,r),next:e=>i(e,r+1)})}}([new class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=x(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return L(e,"DOMException")}isDOMError(e){return L(e,"DOMError")}},new class{match(e){return L(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!D(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var r,i=this.getUnhandledRejectionReason(e);return E(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(i)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}},new class{constructor(){}match(e){return!!L(e,"ErrorEvent")&&(null!=e.error||this.Wi(e))}coerce(e,t){var r;if(null!=e.error)return t.apply(e.error);var i=t.apply(e.message);return h({},i,{stack:null!==(r=this.Vi(e))&&void 0!==r?r:i.stack,synthetic:!0})}Wi(e){return x(e.message)&&e.message.length>0}Vi(e){var t,r,i=e,n=null!==(t=i.lineno)&&void 0!==t?t:0,a=null!==(r=i.colno)&&void 0!==r?r:0;if(x(i.filename)&&0!==i.filename.length&&0!==n)return"Error\n at "+i.filename+":"+n+":"+a}},new class{match(e){return O(e)}coerce(e,t){var r,i=this.getStack(e),n=void 0===i;return{type:this.getType(e),value:this.getMessage(e,t),stack:null!=i?i:null==(r=t.syntheticException)?void 0:r.stack,cause:e.cause?t.next(e.cause):void 0,synthetic:n}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return String(r.error&&"string"==typeof r.error.message?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}},new class{match(e){return D(e)}coerce(e,t){var r,i=e.constructor.name;return{type:i,value:i+" captured as exception with keys: "+Re(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}},new class{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,i,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null!==(r=this.getStack(e))&&void 0!==r?r:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(D(e))return e.constructor.name;var t="name"in e?e.name:void 0;return x(t)&&!C(t)?t:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+Re(e)}isSeverityLevel(e){return x(e)&&!C(e)&&Ie.indexOf(e)>=0}getStack(e){try{return x(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:x(e.stack)&&e.stack.length>0?e.stack:void 0}catch(e){return}}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var r=e[t];if(O(r))return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}},new class{match(e){return"string"==typeof e}coerce(e,t){var r,i=this.getInfos(e),n=i[0],a=i[1];return{type:null!=n?n:"Error",value:null!=a?a:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,i=e.match(Te);return i&&(t=i[1],r=i[2]),[t,r]}},new class{match(e){return E(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}],function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;t>i;i++)r[i-1]=arguments[i];return function(t,i){void 0===i&&(i=0);for(var n=[],a=t.split("\n"),o=i;a.length>o;o++){var s=a[o];if(1024>=s.length){var u=Me.test(s)?s.replace(Me,"$1"):s;if(!u.match(/\S*Error: /)){for(var l of r){var c=l(u,e);if(c){n.push(c);break}}if(n.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return h({},e,{filename:e.filename||(r=t,r[r.length-1]||{}).filename,function:e.function||ge});var r}))}(n)}}("web:javascript",_e,Ce)),hd=t=>{var r=e;r||ud.info("window not available, cannot wrap onerror");var i=r.onerror;return r.onerror=function(){for(var e,r=arguments.length,n=new Array(r),a=0;r>a;a++)n[a]=arguments[a];var o=ld.buildFromUnknown((e=>{var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4];if(null!=a)return a;if(x(t)&&x(r)&&r.length>0&&"undefined"!=typeof ErrorEvent)try{return new ErrorEvent("error",{message:t,filename:r,lineno:i,colno:n})}catch(e){return t}return t})(n),{mechanism:{handled:!1}});return t(o),!!k(i)&&null!==(e=i(...n))&&void 0!==e&&e},r.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=r.onerror)||delete e.__POSTHOG_INSTRUMENTED__,r.onerror=i}},cd=function(t,r){void 0===r&&(r=!1);var i=e;i||ud.info("window not available, cannot wrap onUnhandledRejection");var n=i.onunhandledrejection;return i.onunhandledrejection=function(e){var i,a=ld.buildFromUnknown(e,{mechanism:{handled:!1}});return t(a),k(n)?null!==(i=n(e))&&void 0!==i&&i:r},i.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=i.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,i.onunhandledrejection=n}},dd={wrapOnError:hd,wrapUnhandledRejection:cd,wrapConsoleError(e){var t=console;t||ud.info("console not available, cannot wrap console.error");var r=t.error;return t.error=function(){for(var t,i=arguments.length,n=new Array(i),a=0;i>a;a++)n[a]=arguments[a];t=1==n.length?n[0]:n.join(" ");var o=n.find((e=>e instanceof Error)),s=ld.buildFromUnknown(o||t,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2});e(s),k(r)&&r(...n)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=r}}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.errorWrappingFunctions=dd,s.posthogErrorWrappingFunctions=dd;var vd=(e,t)=>{if(k(null==e?void 0:e.capture)){var r=null==t?void 0:t.autocaptureExceptions,i=!M(r)&&"object"==typeof r&&w(r.errors_to_ignore)?r.errors_to_ignore.reduce(((e,t)=>{try{e.push(new RegExp(t))}catch(e){ud.error("Ignoring invalid legacy exception exclusion rule",t,e)}return e}),[]):[],n=t=>{try{null==e.capture||e.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent",_noHeatmaps:!0})}catch(e){ud.error("Failed to capture exception for a legacy client",e)}};hd((e=>{i.some((t=>e.$exception_list.some((e=>t.test(e.value||"")))))||n(e)})),cd(n,!0)}};s.extendPostHogWithExceptionAutoCapture=vd,s.extendPostHogWithExceptionAutocapture=vd;var fd="X-POSTHOG-SESSION-ID",pd="X-POSTHOG-WINDOW-ID",gd="X-POSTHOG-DISTINCT-ID",md=[fd,pd,gd],yd=["attributionReporting","body","browsingTopics","cache","credentials","dispatcher","duplex","integrity","keepalive","method","mode","priority","redirect","referrer","referrerPolicy","signal","window"],bd=(e,t)=>({}.hasOwnProperty.call(e,t)),wd=e=>"object"==typeof e&&!M(e)||k(e),kd=e=>"undefined"!=typeof Request&&(e instanceof Request||"[object Request]"==={}.toString.call(e)),_d=t=>{try{var r;return kd(t)?t.url:new URL(t instanceof URL?t.toString():String(t),null==e||null==(r=e.location)?void 0:r.href).toString()}catch(e){return}},Sd=(e,t,r,i,n)=>{var a;try{a=new URL(i).hostname}catch(e){return!1}if(!e)return!1;if(w(e)&&!e.includes(a))return!1;var o=!1;if(r){var s=r.checkAndGetSessionAndWindowId(!0),u=s.windowId;n.set(fd,s.sessionId),n.set(pd,u),o=!0}var l=(e=>k(e)?e():e)(t);return l&&"$posthog_cookieless"!==l&&(n.set(gd,l),o=!0),o};s.__PosthogExtensions__=s.__PosthogExtensions__||{};var xd={_patchFetch:(t,r,i)=>pu(e,"fetch",(e=>function(n,a){var o=arguments.length>1?[n,a]:[n],s=o;try{var u=_d(n);if(u)if(kd(n)){var l=new Request(n,a);Sd(t,r,i,l.url,l.headers),s=[l]}else{var c=new Headers(wd(a)?a.headers:void 0);if(Sd(t,r,i,u,c)){var d=((e,t)=>{if(S(e)||M(e))return{headers:t};if(wd(e)){var r=e;if("undefined"==typeof Proxy||"undefined"==typeof Reflect){var i=Object.create(r);return Object.defineProperty(i,"headers",{configurable:!0,enumerable:!0,value:t,writable:!0}),i}return new Proxy({headers:t},{get:(e,t)=>bd(e,t)?Reflect.get(e,t):Reflect.get(r,t,r),has:(e,t)=>bd(e,t)||t in r,ownKeys(e){var t=new Set(Reflect.ownKeys(e));return Reflect.ownKeys(r).forEach((e=>t.add(e))),yd.forEach((e=>{e in r&&t.add(e)})),Array.from(t)},getOwnPropertyDescriptor(e,t){var i=Reflect.getOwnPropertyDescriptor(e,t);if(i)return i;if("string"==typeof t&&yd.includes(t)&&t in r)return{configurable:!0,enumerable:!0,get(){return Reflect.get(r,t,r)}};var n=Reflect.getOwnPropertyDescriptor(r,t);return n?h({},n,{configurable:!0}):void 0},getPrototypeOf:()=>Object.getPrototypeOf(r)})}})(a,c);d&&(s=[n,d])}}}catch(e){s=o}return e.apply(this,s)})),_patchXHR:(t,r,i)=>pu(e.XMLHttpRequest.prototype,"open",(e=>function(n,a,o,s,u){void 0===o&&(o=!0);var l=this,h=new Headers,c=_d(a);c&&Sd(t,r,i,c,h);var d=e.call(l,n,a,o,s,u);return md.forEach((e=>{var t=h.get(e);if(t)try{l.setRequestHeader(e,t)}catch(e){}})),d}))};s.__PosthogExtensions__.tracingHeadersPatchFns=xd,s.postHogTracingHeadersPatchFns=xd,"function"!=typeof[].at&&Object.defineProperty(Array.prototype,"at",{value(e){var t=this.length,r=Math.trunc(e)||0;return 0>r&&(r+=t),0>r||r>=t?void 0:this[r]},writable:!0,enumerable:!1,configurable:!0});let Cd=class{constructor(){this.t=void 0,this.o=0,this.i=[]}l(e){var t;if(!e.hadRecentInput){var r=this.i[0],i=this.i.at(-1);this.o&&r&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-r.startTime?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),null==(t=this.t)||t.call(this,e)}}};var Md=()=>{var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Td=e=>{if("loading"===document.readyState)return"loading";var t=Md();if(t){if(t.domInteractive>e)return"loading";if(0===t.domContentLoadedEventStart||t.domContentLoadedEventStart>e)return"dom-interactive";if(0===t.domComplete||t.domComplete>e)return"dom-content-loaded"}return"complete"},Id=e=>{var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Rd=e=>{var t="";try{for(;9!==(null==(r=e)?void 0:r.nodeType);){var r,i,n=e,a=n.id?"#"+n.id:[Id(n),...Array.from(null!==(i=n.classList)&&void 0!==i?i:[]).sort()].join(".");if(t.length+a.length>99)return t||a;if(t=t?a+">"+t:a,n.id)break;e=n.parentNode}}catch(e){}return t},Ad=new WeakMap;function Ed(e,t){var r=Ad.get(t);return r||(r=new WeakMap,Ad.set(t,r)),r.get(e)||r.set(e,new t),r.get(e)}var Ld=-1,Od=()=>Ld,Dd=e=>{addEventListener("pageshow",(t=>{t.persisted&&(Ld=t.timeStamp,e(t))}),!0)},Pd=(e,t,r,i)=>{var n,a;return o=>{t.value>=0&&(o||i)&&((a=t.value-(null!=n?n:0))||void 0===n)&&(n=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t))}},Nd=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Fd=()=>{var e,t;return null!==(e=null==(t=Md())?void 0:t.activationStart)&&void 0!==e?e:0},qd=-1,jd=new Set,Bd=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Hd=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(var t of jd)t();isFinite(qd)||(qd="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Hd,!0))}},$d=function(e){if(void 0===e&&(e=!1),e&&(qd=1/0),0>qd){var t,r=Fd(),i=document.prerendering||null==(t=globalThis.performance.getEntriesByType("visibility-state").find((e=>"hidden"===e.name&&e.startTime>=r)))?void 0:t.startTime;qd=null!=i?i:Bd(),addEventListener("visibilitychange",Hd,!0),addEventListener("prerenderingchange",Hd,!0),Dd((()=>{setTimeout((()=>{qd=Bd()}))}))}return{get firstHiddenTime(){return qd},onHidden(e){jd.add(e)}}},Ud=function(e,t,r,i,n,a,o){void 0===t&&(t=-1),void 0===i&&(i=0);var s=Md(),u=(null==s?void 0:s.navigationId)||0,l="navigate";return r?l=r:0>Od()?s&&(document.prerendering||Fd()>0?l="prerender":document.wasDiscarded?l="restore":s.type&&(l=s.type.replace(/_/g,"-"))):l="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:"v6-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12),navigationType:l,navigationId:i||u,navigationInteractionId:n,navigationURL:a||(null==s?void 0:s.name),navigationStartTime:o||0}},zd=function(e,t,r){void 0===r&&(r={});try{var i=e.filter((e=>PerformanceObserver.supportedEntryTypes.includes(e)));if(i.length>0){var n=new PerformanceObserver((e=>{queueMicrotask((()=>{var r=e.getEntries();i.length>1&&r.sort(((e,t)=>e.startTime+e.duration-(t.startTime+t.duration))),t(r)}))}));for(var a of i)n.observe(h({type:a,buffered:!0},r));return n}}catch(e){}},Wd=e=>{var t,r;return(null==(t=globalThis.PerformanceObserver)||null==(t=t.supportedEntryTypes)?void 0:t.includes("soft-navigation"))&&"function"==typeof(null==(r=globalThis.PerformanceSoftNavigation)||null==(r=r.prototype)?void 0:r.getLargestInteractionContentfulPaint)&&e&&e.reportSoftNavs},Vd=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){var r=e.keys().next().value;void 0!==r&&e.delete(r)}},Zd=e=>{var t=!1;return()=>{t||(e(),t=!0)}};class Gd{constructor(){this.u=void 0}}var Qd,Jd=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},Yd=[1800,3e3],Kd=function(e,t){void 0===t&&(t={});var r=Wd(t);Jd((()=>{var i,n=Ed(t,Gd),a=$d(),o=Ud("FCP"),s=zd(["paint"],(e=>{for(var t of e)"first-contentful-paint"===t.name&&(s.disconnect(),a.firstHiddenTime>t.startTime&&(o.value=Math.max(t.startTime-Fd(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,i(!0)))}));s&&(i=Pd(e,o,Yd,t.reportAllChanges),Dd((r=>{o=Ud("FCP",-1,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Od()),i=Pd(e,o,Yd,t.reportAllChanges),Nd((()=>{o.value=performance.now()-r.timeStamp,i(!0)}))}))),r&&zd(["soft-navigation"],(r=>{r.forEach((r=>{n.u&&r.navigationId&&Vd(n.u,r);var a=Math.max((r.presentationTime||r.paintTime||0)-r.startTime,0);o=Ud("FCP",a,"soft-navigation",r.navigationId,r.interactionId,r.name,r.startTime),(i=Pd(e,o,Yd,t.reportAllChanges))(!0)}))}),t)}))},Xd=[.1,.25],ev=e=>e.find((e=>{var t;return 1===(null==(t=e.node)?void 0:t.nodeType)}))||e[0],tv=function(e,t){void 0===t&&(t={});var r=Ed(t=Object.assign({},t),Cd),i=new WeakMap;r.t=e=>{var r;if(null!=e&&null!=(r=e.sources)&&r.length){var n=ev(e.sources),a=null==n?void 0:n.node;if(a){var o,s=null!==(o=null==t.generateTarget?void 0:t.generateTarget(a))&&void 0!==o?o:Rd(a);i.set(n,s)}}},function(e,t){void 0===t&&(t={});var r=$d();Kd(Zd((()=>{var i,n=Ud("CLS",0),a=Ed(t,Cd),o=(r,o,s,u,l)=>{n=Ud("CLS",0,r,o,s,u,l),a.o=0,i=Pd(e,n,Xd,t.reportAllChanges)},s=function(e){void 0===e&&(e=!1),a.o>n.value&&(n.value=a.o,n.entries=a.i),i(e)},u=e=>{s(!0),o("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(var t of e)"soft-navigation"!==t.entryType?a.l(t):u(t);s()},h=["layout-shift"];Wd(t)&&h.push("soft-navigation");var c=zd(h,l);c&&(i=Pd(e,n,Xd,t.reportAllChanges),r.onHidden((()=>{l(c.takeRecords()),i(!0)})),Dd((()=>{o("back-forward-cache",n.navigationId,n.navigationInteractionId,n.navigationURL,Od()),Nd(i)})),setTimeout(i))})))}((t=>{e((e=>{var t={};if(e.entries.length){var r,n=e.entries.reduce(((e,t)=>e.value>t.value?e:t));if(null!=n&&null!=(r=n.sources)&&r.length){var a=ev(n.sources);a&&(t={largestShiftTarget:i.get(a),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:a,largestShiftEntry:n,loadState:Td(n.startTime)})}}return Object.assign(e,{attribution:t})})(t))}),t)},rv=function(e,t){void 0===t&&(t={});var r=Ed(t=Object.assign({},t),Gd);Wd(t)&&(r.u=new Map),Kd((t=>{e((e=>{var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:Td(Od())};if("soft-navigation"!==e.navigationType){if(e.entries.length){var i=Md(),n=e.entries.at(-1);if(i){var a=Math.max(0,i.responseStart-(i.activationStart||0));t={timeToFirstByte:a,firstByteToFCP:e.value-a,loadState:Td(e.entries[0].startTime),navigationEntry:i,fcpEntry:n}}}}else{var o,s=null==(o=r.u)?void 0:o.get(e.navigationId);s&&(t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:"complete",navigationEntry:s})}return Object.assign(e,{attribution:t})})(t))}),t)},iv=0,nv=1/0,av=0,ov=e=>{for(var t of e)t.interactionId&&(nv=Math.min(nv,t.interactionId),av=Math.max(av,t.interactionId),iv=av?(av-nv)/7+1:0)},sv=()=>{var e;return Qd?iv:null!==(e=performance.interactionCount)&&void 0!==e?e:0};let uv=class{constructor(){this.h=0,this.v=[],this.p=new Map,this.m=void 0,this.M=void 0}T(){return sv()-this.h}D(){this.h=sv(),this.v.length=0,this.p.clear()}S(e){var t=this.T(),r=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==r||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[r]:{k:8,id:-1,entries:[]}}l(e){var t;if(null!=(t=this.m)&&t.call(this,e),e.interactionId){var r=this.v.at(-1),i=this.p.get(e.interactionId);if(i||10>this.v.length||e.duration>r.k){var n;if(i?e.duration>i.k?(i.entries=[e],i.k=e.duration):e.duration===i.k&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(this.p.set((i={id:e.interactionId,entries:[e],k:e.duration}).id,i),this.v.push(i)),this.v.sort(((e,t)=>t.k-e.k)),this.v.length>10){var a=this.v.splice(10);for(var o of a)this.p.delete(o.id)}null==(n=this.M)||n.call(this,i)}}}};var lv=e=>{var t="requestIdleCallback"in globalThis?1e3:0,r=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{var n=Zd(e),a=-1,o=()=>{i(a),n()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),a=r((()=>{removeEventListener("visibilitychange",o,{capture:!0}),n()}),{timeout:t})}},hv=[200,500],cv=function(e,t){void 0===t&&(t={});var r=Ed(t=Object.assign({},t),uv),i=[],n=[],a=0,o=new WeakMap,s=new WeakMap,u=!1,l=()=>{u||(lv(c),u=!0)},c=()=>{var e=new Set(r.v.map((e=>o.get(e.entries[0])))),t=n.length-10;n=n.filter(((r,i)=>i>=t||e.has(r)));var s=new Set;for(var l of n){var h=d(l.startTime,l.processingEnd);for(var c of h)s.add(c)}i=i.filter((e=>e.startTime>a||s.has(e))),u=!1};r.m=e=>{var r,i=e.startTime+e.duration;a=Math.max(a,e.processingEnd);for(var s=n.length-1;s>=0;s--){var u=n[s];if(8>=Math.abs(i-u.renderTime)){(r=u).startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),t.includeProcessedEventEntries&&r.entries.push(e);break}}r||n.push(r={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:i,entries:t.includeProcessedEventEntries?[e]:[]}),e.interactionId&&o.set(e,r),l()},r.M=e=>{if(!s.get(e)){var r,i=null==(r=e.entries.find((e=>e.target)))?void 0:r.target;if(i){var n,a=null!==(n=null==t.generateTarget?void 0:t.generateTarget(i))&&void 0!==n?n:Rd(i);s.set(e,a)}else{var o,u=null==(o=e.entries.find((e=>e.targetSelector)))?void 0:o.targetSelector;u&&s.set(e,u)}}};var d=(e,t)=>{var r=[];for(var n of i)if(n.startTime+n.duration>=e){if(n.startTime>t)break;r.push(n)}return r};zd(["long-animation-frame"],(e=>{i=i.concat(e),l()}),t),function(e,t){if(void 0===t&&(t={}),globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=$d();Jd((()=>{var i;"interactionCount"in performance||Qd||(Qd=zd(["event"],ov,{durationThreshold:0}));var n,a=Ud("INP"),o=Ed(t,uv),s=(r,i,s,u,l)=>{o.D(),a=Ud("INP",-1,r,i,s,u,l),n=Pd(e,a,hv,t.reportAllChanges)},u=()=>{var e=o.S(a.navigationType);e&&e.k!==a.value&&(a.value=e.k,a.entries=e.entries,n())},l=e=>{u(),n(!0),s("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},c=function(e,t){void 0===t&&(t=!1),lv((()=>{for(var r of e)"soft-navigation"!==r.entryType?o.l(r):l(r);u(),t&&n(!0)}))},d=["event","first-input"];Wd(t)&&d.push("soft-navigation");var v=zd(d,c,h({},t,{durationThreshold:null!==(i=t.durationThreshold)&&void 0!==i?i:40}));n=Pd(e,a,hv,t.reportAllChanges),v&&(r.onHidden((()=>{c(v.takeRecords(),!0)})),Dd((()=>{s("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,Od())})))}))}}((t=>{e((e=>{if(0===e.entries.length){var t={processedEventEntries:[],longAnimationFrameEntries:[],inputDelay:0,processingDuration:0,presentationDelay:e.value,loadState:Td(e.navigationStartTime||0)};return Object.assign(e,{attribution:t})}var i=e.entries[0],n=o.get(i),a=Math.max(n.processingStart,i.startTime),u=Math.max(i.startTime+i.duration,a),l=Math.min(n.processingEnd,u),h=n.entries.sort(((e,t)=>e.processingStart-t.processingStart)),c=d(i.startTime,l),v=r.p.get(i.interactionId),f={interactionTarget:s.get(v),interactionType:i.name.startsWith("key")?"keyboard":"pointer",interactionTime:i.startTime,nextPaintTime:u,processedEventEntries:h,longAnimationFrameEntries:c,inputDelay:a-i.startTime,processingDuration:l-a,presentationDelay:u-l,loadState:Td(i.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return((e,t)=>{var r=e.interactionTime,i=e.nextPaintTime;if(null!=(t=e.longAnimationFrameEntries)&&t.length&&r&&i){var n,a,o=e.inputDelay,s=e.processingDuration,u=0,l=0,h=0,c=0;for(var d of e.longAnimationFrameEntries)for(var v of(l=l+d.startTime+d.duration-d.styleAndLayoutStart,d.scripts)){var f=v.startTime+v.duration;if(f>=r){var p=f-Math.max(r,v.startTime),g=v.duration?p/v.duration*v.forcedStyleAndLayoutDuration:0;u+=p-g,l+=g,p>c&&(a=r+o>v.startTime?"input-delay":r+o+s>v.startTime?"processing-duration":"presentation-delay",n=v,c=p)}}var m=e.longAnimationFrameEntries.at(-1),y=m?m.startTime+m.duration:0;y>=r+o+s&&(h=i-y),n&&a&&(e.longestScript={entry:n,subpart:a,intersectingDuration:c}),e.totalScriptDuration=u,e.totalStyleAndLayoutDuration=l,e.totalPaintDuration=h,e.totalUnattributedDuration=i-r-u-l-h}})(f),Object.assign(e,{attribution:f})})(t))}),t)};let dv=class{constructor(){this.m=void 0,this.u=void 0}l(e){var t;null==(t=this.m)||t.call(this,e)}};var $=[2500,4e3],vv=50,fv=[];zd(["resource"],(e=>{for(var t of e)fv.push(t),fv.length>vv&&fv.shift()}));var pv=function(e,t){void 0===t&&(t={}),null!=(t=Object.assign({},t)).resourceBufferSize&&(vv=t.resourceBufferSize);var r=Ed(t,dv),i=new WeakMap;Wd(t)&&(r.u=new Map),r.m=e=>{var r=e.element;if(r){var n,a=null!==(n=null==t.generateTarget?void 0:t.generateTarget(r))&&void 0!==n?n:Rd(r);i.set(e,a)}else e.id&&i.set(e,"#"+e.id)},function(e,t){void 0===t&&(t={});var r=!1,i=Wd(t);Jd((()=>{var n,a=$d(),o=Ud("LCP"),s=Ed(t,dv),u=(i,s,u,l,h)=>{o=Ud("LCP",-1,i,s,u,l,h),n=Pd(e,o,$,t.reportAllChanges),r=!1,"soft-navigation"===i&&(a=$d(!0))},l=e=>{s.u&&e.navigationId&&Vd(s.u,e),r||n(!0),u("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);var t=null==e.getLargestInteractionContentfulPaint?void 0:e.getLargestInteractionContentfulPaint();t&&h([t])},h=e=>{for(var r of(t.reportAllChanges||i||(e=e.slice(-1)),e))if(r)if("soft-navigation"!==r.entryType){var u=0,h=[],c=r.startTime;if("largest-contentful-paint"===r.entryType)u=Math.max(r.startTime-Fd(),0),s.l(r),h=[r];else if("interaction-contentful-paint"===r.entryType){var d,v=r;if(!o.navigationId)continue;if("interactionId"in v&&v.interactionId!=o.navigationInteractionId)continue;c=(null==(d=v.largestContentfulPaint)?void 0:d.renderTime)||0,u=Math.max(c-r.startTime,0),v.largestContentfulPaint&&(s.l(v.largestContentfulPaint),h=[v.largestContentfulPaint])}a.firstHiddenTime>c&&(o.value=u,o.entries=h,n())}else l(r)},c=["largest-contentful-paint"];i&&c.push("interaction-contentful-paint","soft-navigation");var d=zd(c,h);if(d){n=Pd(e,o,$,t.reportAllChanges);var v=["keydown","click","visibilitychange"],f=e=>{if(e.isTrusted&&!r){var t=o.id;lv((()=>{if(!r){if(!i)for(var e of(d.disconnect(),v))removeEventListener(e,f,{capture:!0});t===o.id&&(r=!0,n(!0))}}))}};for(var p of v)addEventListener(p,f,{capture:!0});Dd((i=>{u("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Od()),n=Pd(e,o,$,t.reportAllChanges),Nd((()=>{o.value=performance.now()-i.timeStamp,r=!0,n(!0)}))}))}}))}((t=>{e((e=>{var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n,a,o,s,u,l,c=e.entries.at(-1),d=c.url&&(fv.findLast((e=>e.name===c.url))||performance.getEntriesByType("resource").findLast((e=>e.name===c.url)));t.target=i.get(c),t.lcpEntry=c,c.url&&(t.url=c.url),d&&(t.lcpResourceEntry=d);var v=0,f=0;if("soft-navigation"!==e.navigationType?(v=null!==(n=null==(a=l=Md())?void 0:a.activationStart)&&void 0!==n?n:0,f=null!==(o=null==(s=l)?void 0:s.responseStart)&&void 0!==o?o:0):(v=e.navigationStartTime||0,l=null==(u=r.u)?void 0:u.get(e.navigationId)),l){var p=Math.max(0,f-v),g=Math.max(p,d?(d.requestStart||d.startTime)-v:0),m=Math.min(e.value,Math.max(g,d?d.responseEnd-v:0));t=h({},t,{timeToFirstByte:p,resourceLoadDelay:g-p,resourceLoadDuration:m-g,elementRenderDelay:e.value-m,navigationEntry:l})}}return Object.assign(e,{attribution:t})})(t))}),t)},gv=-1,mv=()=>gv,yv=e=>{addEventListener("pageshow",(t=>{t.persisted&&(gv=t.timeStamp,e(t))}),!0)},bv=(e,t,r,i)=>{var n,a;return o=>{t.value>=0&&(o||i)&&((a=t.value-(null!=n?n:0))||void 0===n)&&(n=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t))}},wv=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},kv=()=>{var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},_v=()=>{var e,t;return null!==(e=null==(t=kv())?void 0:t.activationStart)&&void 0!==e?e:0},Sv=-1,xv=new Set,Cv=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Mv=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(var t of xv)t();isFinite(Sv)||(Sv="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Mv,!0))}},Tv=function(e){if(void 0===e&&(e=!1),e&&(Sv=1/0),0>Sv){var t,r=_v(),i=document.prerendering||null==(t=globalThis.performance.getEntriesByType("visibility-state").find((e=>"hidden"===e.name&&e.startTime>=r)))?void 0:t.startTime;Sv=null!=i?i:Cv(),addEventListener("visibilitychange",Mv,!0),addEventListener("prerenderingchange",Mv,!0),yv((()=>{setTimeout((()=>{Sv=Cv()}))}))}return{get firstHiddenTime(){return Sv},onHidden(e){xv.add(e)}}},Iv=function(e,t,r,i,n,a,o){void 0===t&&(t=-1),void 0===i&&(i=0);var s=kv(),u=(null==s?void 0:s.navigationId)||0,l="navigate";return r?l=r:0>mv()?s&&(document.prerendering||_v()>0?l="prerender":document.wasDiscarded?l="restore":s.type&&(l=s.type.replace(/_/g,"-"))):l="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:"v6-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12),navigationType:l,navigationId:i||u,navigationInteractionId:n,navigationURL:a||(null==s?void 0:s.name),navigationStartTime:o||0}},Rv=new WeakMap;function Av(e,t){var r=Rv.get(t);return r||(r=new WeakMap,Rv.set(t,r)),r.get(e)||r.set(e,new t),r.get(e)}class Ev{constructor(){this.t=void 0,this.i=0,this.o=[]}h(e){var t;if(!e.hadRecentInput){var r=this.o[0],i=this.o.at(-1);this.i&&r&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-r.startTime?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null==(t=this.t)||t.call(this,e)}}}var Lv=function(e,t,r){void 0===r&&(r={});try{var i=e.filter((e=>PerformanceObserver.supportedEntryTypes.includes(e)));if(i.length>0){var n=new PerformanceObserver((e=>{queueMicrotask((()=>{var r=e.getEntries();i.length>1&&r.sort(((e,t)=>e.startTime+e.duration-(t.startTime+t.duration))),t(r)}))}));for(var a of i)n.observe(h({type:a,buffered:!0},r));return n}}catch(e){}},Ov=e=>{var t,r;return(null==(t=globalThis.PerformanceObserver)||null==(t=t.supportedEntryTypes)?void 0:t.includes("soft-navigation"))&&"function"==typeof(null==(r=globalThis.PerformanceSoftNavigation)||null==(r=r.prototype)?void 0:r.getLargestInteractionContentfulPaint)&&e&&e.reportSoftNavs},Dv=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){var r=e.keys().next().value;void 0!==r&&e.delete(r)}},Pv=e=>{var t=!1;return()=>{t||(e(),t=!0)}};class Nv{constructor(){this.l=void 0}}var Fv,qv=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},jv=[1800,3e3],Bv=function(e,t){void 0===t&&(t={});var r=Ov(t);qv((()=>{var i,n=Av(t,Nv),a=Tv(),o=Iv("FCP"),s=Lv(["paint"],(e=>{for(var t of e)"first-contentful-paint"===t.name&&(s.disconnect(),a.firstHiddenTime>t.startTime&&(o.value=Math.max(t.startTime-_v(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,i(!0)))}));s&&(i=bv(e,o,jv,t.reportAllChanges),yv((r=>{o=Iv("FCP",-1,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,mv()),i=bv(e,o,jv,t.reportAllChanges),wv((()=>{o.value=performance.now()-r.timeStamp,i(!0)}))}))),r&&Lv(["soft-navigation"],(r=>{r.forEach((r=>{n.l&&r.navigationId&&Dv(n.l,r);var a=Math.max((r.presentationTime||r.paintTime||0)-r.startTime,0);o=Iv("FCP",a,"soft-navigation",r.navigationId,r.interactionId,r.name,r.startTime),(i=bv(e,o,jv,t.reportAllChanges))(!0)}))}),t)}))},Hv=[.1,.25],$v=function(e,t){void 0===t&&(t={});var r=Tv();Bv(Pv((()=>{var i,n=Iv("CLS",0),a=Av(t,Ev),o=(r,o,s,u,l)=>{n=Iv("CLS",0,r,o,s,u,l),a.i=0,i=bv(e,n,Hv,t.reportAllChanges)},s=function(e){void 0===e&&(e=!1),a.i>n.value&&(n.value=a.i,n.entries=a.o),i(e)},u=e=>{s(!0),o("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(var t of e)"soft-navigation"!==t.entryType?a.h(t):u(t);s()},h=["layout-shift"];Ov(t)&&h.push("soft-navigation");var c=Lv(h,l);c&&(i=bv(e,n,Hv,t.reportAllChanges),r.onHidden((()=>{l(c.takeRecords()),i(!0)})),yv((()=>{o("back-forward-cache",n.navigationId,n.navigationInteractionId,n.navigationURL,mv()),wv(i)})),setTimeout(i))})))},Uv=0,zv=1/0,Wv=0,Vv=e=>{for(var t of e)t.interactionId&&(zv=Math.min(zv,t.interactionId),Wv=Math.max(Wv,t.interactionId),Uv=Wv?(Wv-zv)/7+1:0)},Zv=()=>{var e;return Fv?Uv:null!==(e=performance.interactionCount)&&void 0!==e?e:0};class Gv{constructor(){this.u=0,this.v=[],this.m=new Map,this.p=void 0,this.T=void 0}_(){return Zv()-this.u}M(){this.u=Zv(),this.v.length=0,this.m.clear()}L(e){var t=this._(),r=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==r||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[r]:{P:8,id:-1,entries:[]}}h(e){var t;if(null!=(t=this.p)&&t.call(this,e),e.interactionId){var r=this.v.at(-1),i=this.m.get(e.interactionId);if(i||10>this.v.length||e.duration>r.P){var n;if(i?e.duration>i.P?(i.entries=[e],i.P=e.duration):e.duration===i.P&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(this.m.set((i={id:e.interactionId,entries:[e],P:e.duration}).id,i),this.v.push(i)),this.v.sort(((e,t)=>t.P-e.P)),this.v.length>10){var a=this.v.splice(10);for(var o of a)this.m.delete(o.id)}null==(n=this.T)||n.call(this,i)}}}}var Qv=e=>{var t="requestIdleCallback"in globalThis?1e3:0,r=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{var n=Pv(e),a=-1,o=()=>{i(a),n()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),a=r((()=>{removeEventListener("visibilitychange",o,{capture:!0}),n()}),{timeout:t})}},Jv=[200,500],Yv=function(e,t){if(void 0===t&&(t={}),globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=Tv();qv((()=>{var i;"interactionCount"in performance||Fv||(Fv=Lv(["event"],Vv,{durationThreshold:0}));var n,a=Iv("INP"),o=Av(t,Gv),s=(r,i,s,u,l)=>{o.M(),a=Iv("INP",-1,r,i,s,u,l),n=bv(e,a,Jv,t.reportAllChanges)},u=()=>{var e=o.L(a.navigationType);e&&e.P!==a.value&&(a.value=e.P,a.entries=e.entries,n())},l=e=>{u(),n(!0),s("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},c=function(e,t){void 0===t&&(t=!1),Qv((()=>{for(var r of e)"soft-navigation"!==r.entryType?o.h(r):l(r);u(),t&&n(!0)}))},d=["event","first-input"];Ov(t)&&d.push("soft-navigation");var v=Lv(d,c,h({},t,{durationThreshold:null!==(i=t.durationThreshold)&&void 0!==i?i:40}));n=bv(e,a,Jv,t.reportAllChanges),v&&(r.onHidden((()=>{c(v.takeRecords(),!0)})),yv((()=>{s("back-forward-cache",a.navigationId,a.navigationInteractionId,a.navigationURL,mv())})))}))}};class Kv{constructor(){this.p=void 0,this.l=void 0}h(e){var t;null==(t=this.p)||t.call(this,e)}}var Xv=[2500,4e3],ef=function(e,t){void 0===t&&(t={});var r=!1,i=Ov(t);qv((()=>{var n,a=Tv(),o=Iv("LCP"),s=Av(t,Kv),u=(i,s,u,l,h)=>{o=Iv("LCP",-1,i,s,u,l,h),n=bv(e,o,Xv,t.reportAllChanges),r=!1,"soft-navigation"===i&&(a=Tv(!0))},l=e=>{s.l&&e.navigationId&&Dv(s.l,e),r||n(!0),u("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);var t=null==e.getLargestInteractionContentfulPaint?void 0:e.getLargestInteractionContentfulPaint();t&&h([t])},h=e=>{for(var r of(t.reportAllChanges||i||(e=e.slice(-1)),e))if(r)if("soft-navigation"!==r.entryType){var u=0,h=[],c=r.startTime;if("largest-contentful-paint"===r.entryType)u=Math.max(r.startTime-_v(),0),s.h(r),h=[r];else if("interaction-contentful-paint"===r.entryType){var d,v=r;if(!o.navigationId)continue;if("interactionId"in v&&v.interactionId!=o.navigationInteractionId)continue;c=(null==(d=v.largestContentfulPaint)?void 0:d.renderTime)||0,u=Math.max(c-r.startTime,0),v.largestContentfulPaint&&(s.h(v.largestContentfulPaint),h=[v.largestContentfulPaint])}a.firstHiddenTime>c&&(o.value=u,o.entries=h,n())}else l(r)},c=["largest-contentful-paint"];i&&c.push("interaction-contentful-paint","soft-navigation");var d=Lv(c,h);if(d){n=bv(e,o,Xv,t.reportAllChanges);var v=["keydown","click","visibilitychange"],f=e=>{if(e.isTrusted&&!r){var t=o.id;Qv((()=>{if(!r){if(!i)for(var e of(d.disconnect(),v))removeEventListener(e,f,{capture:!0});t===o.id&&(r=!0,n(!0))}}))}};for(var p of v)addEventListener(p,f,{capture:!0});yv((i=>{u("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,mv()),n=bv(e,o,Xv,t.reportAllChanges),wv((()=>{o.value=performance.now()-i.timeStamp,r=!0,n(!0)}))}))}}))},tf={onLCP:pv,onCLS:tv,onFCP:rv,onINP:cv,withoutAttribution:{onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals-with-attribution-soft-navs"]=tf,s.__PosthogExtensions__.postHogWebVitalsCallbacks=tf,s.postHogWebVitalsCallbacks=tf;var rf={onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals-soft-navs"]=rf,s.__PosthogExtensions__.postHogWebVitalsCallbacks=rf,s.postHogWebVitalsCallbacks=rf,s.__PosthogExtensions__.loadWebVitalsCallbacks=()=>rf;var nf={onLCP:pv,onCLS:tv,onFCP:rv,onINP:cv,withoutAttribution:{onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv}};s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals-with-attribution"]=nf,s.__PosthogExtensions__.postHogWebVitalsCallbacks=nf,s.postHogWebVitalsCallbacks=nf;var af={onLCP:ef,onCLS:$v,onFCP:Bv,onINP:Yv};function of(e,t){return t.length>e?t.slice(0,e)+"...":t}function sf(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!ze(t));return t}function uf(t,r){var i,n,a=r.e,o=r.maskAllElementAttributes,s=r.maskAllText,u=r.elementAttributeIgnoreList,l=r.disableCaptureUrlHashes;if(!ze(t))return{props:{}};for(var c=[t],d=new Set([t]),v=t;v.parentNode&&!We(v,"body")&&Ze>c.length;)if(Ve(v.parentNode)){var f=v.parentNode.host;if(d.has(f))break;d.add(f),c.push(f),v=f}else{if(!ze(v.parentNode))break;if(d.has(v.parentNode))break;d.add(v.parentNode),c.push(v.parentNode),v=v.parentNode}var g,m=[],y={},b=!1,k=!1;if(De(c,(e=>{var t=rt(e);if(We(e,"a")){var r=e.getAttribute("href");b=!!(t&&r&&ct(r))&&(l?ae(r):r)}p(Qe(e),"ph-no-capture")&&(k=!0),m.push(function(e,t,r,i,n){void 0===n&&(n=!1);var a=e.tagName.toLowerCase(),o={tag_name:a};Ye.indexOf(a)>-1&&!r&&(o.$el_text="a"===a.toLowerCase()||"button"===a.toLowerCase()?of(1024,dt(e)):of(1024,Je(e)));var s=Qe(e);s.length>0&&(o.classes=s.filter((function(e){return""!==e}))),De(e.attributes,(function(r){var a;if((!it(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&(null==i||!i.includes(r.name))&&!t&&ct(r.value)&&(!x(a=r.name)||"_ngcontent"!==a.substring(0,10)&&"_nghost"!==a.substring(0,7))){var s=r.value;"class"===r.name&&(s=Ge(s).join(" ")),o["attr__"+r.name]=of(1024,"href"===r.name&&n?ae(s):s)}}));for(var u=1,l=1,h=e;h=sf(h);)u++,h.tagName===e.tagName&&l++;return o.nth_child=u,o.nth_of_type=l,o}(e,o,s,u,l));var i=function(e){if(!rt(e))return{};var t={};return De(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),i=e.value;r&&i&&ct(i)&&(t[r]=i)}})),t}(e);De(i,((e,t)=>{({}).hasOwnProperty.call(y,t)||(y[t]=e)}))})),k)return{props:{},explicitNoCapture:k};if(s||(m[0].$el_text=We(t,"a")||We(t,"button")?dt(t):Je(t)),b){var _,S;m[0].attr__href=b;var C=null==(_=qe(b))?void 0:_.host,M=null==e||null==(S=e.location)?void 0:S.host;C&&M&&C!==M&&(g=b)}var T,I=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;t>i;i++)r[i-1]=arguments[i];for(var n of r)for(var a in n)void 0!==n[a]&&(e[a]=n[a]);return e}({$event_type:a.type,$ce_version:1},{$elements:m},{$elements_chain:(T=m,w(T)?function(e){var t=e.map((e=>{var t,r,i="";if(e.tag_name&&(i+=e.tag_name),e.attr_class)for(var n of(e.attr_class.sort(),e.attr_class))i+="."+n.replace(/"/g,"");var a=h({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(r=e.nth_of_type)&&void 0!==r?r:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return Pe(a).sort(((e,t)=>function(e,t){return t>e?-1:e>t?1:0}(e[0],t[0]))).forEach((e=>{var t=e[1];return o[ft(e[0].toString())]=ft(t.toString())})),(i+=":")+Pe(o).map((e=>e[0]+'="'+e[1]+'"')).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,r,i={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:pt(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Pe(e).filter((e=>0===e[0].indexOf("attr__"))).forEach((e=>i.attributes[e[0]]=e[1])),i}))}(T)):"")},null!=(i=m[0])&&i.$el_text?{$el_text:null==(n=m[0])?void 0:n.$el_text}:{},g&&"click"===a.type?{$external_click_url:g}:{},y);return{props:I}}s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor=s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor||{},s.__PosthogExtensions__.postHogWebVitalsCallbacksByFlavor["web-vitals"]=af,s.__PosthogExtensions__.postHogWebVitalsCallbacks=af,s.postHogWebVitalsCallbacks=af,s.__PosthogExtensions__.loadWebVitalsCallbacks=()=>af,Oe("[AutoCapture]");var lf={};function hf(t,r){var i=lf[t];if(i)return i;var n=r[t];if((e=>k(e)&&-1!==e.toString().indexOf("[native code]"))(n)&&(null==e||!e.Zone))return lf[t]=n.bind(r);var a=r.document;if(a&&k(a.createElement)){var o,s=!1;try{(o=a.createElement("iframe")).hidden=!0,a.head.appendChild(o);var u,l,h=o.contentWindow;h&&h[t]&&(n=h[t],"MutationObserver"===t&&function(e){return p(e,"AppleWebKit")&&!p(e,"Chrome")}(null!==(u=null==(l=r.navigator)?void 0:l.userAgent)&&void 0!==u?u:"")&&(o.classList.add("rr-block","ph-no-capture"),s=!0))}catch(e){Le.warn("Could not create sandbox iframe for "+t+" check, bailing to assignableWindow."+t+": ",e)}finally{var c;!s&&null!=(c=o)&&c.parentNode&&o.parentNode.removeChild(o)}}return n&&k(n)?lf[t]=n.bind(r):n}function cf(e,t){var r=function(e){var t;return S(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}(e);return r?h({node:r,originalEvent:e,timestamp:Date.now()},t):null}function df(e,t){return Math.abs(e)<Math.abs(t)?0>t?"up":"down":0>e?"left":"right"}function vf(e){return"swipe"===e.type?"$dead_swipe":"$dead_click"}var ff="canvas,video,audio,embed,object",pf=1e3;function gf(e,t){return I(e)&&e>=t}function mf(e){return e>=0&&pf>e?e:void 0}function yf(e,t){return t?mf(e-t):void 0}class bf{Zi(e){var t,r,i,n,a,o,s,u,l=this.Gi((null==e?void 0:e.__onCapture)||this.Qi.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:l.element_attribute_ignorelist,scroll_threshold_ms:null!==(r=null==e?void 0:e.scroll_threshold_ms)&&void 0!==r?r:l.scroll_threshold_ms,selection_change_threshold_ms:null!==(i=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==i?i:l.selection_change_threshold_ms,mutation_threshold_ms:null!==(n=null==e?void 0:e.mutation_threshold_ms)&&void 0!==n?n:l.mutation_threshold_ms,capture_clicks_with_modifier_keys:null!==(a=null==e?void 0:e.capture_clicks_with_modifier_keys)&&void 0!==a?a:l.capture_clicks_with_modifier_keys,capture_dead_swipes:null!==(o=null==e?void 0:e.capture_dead_swipes)&&void 0!==o?o:l.capture_dead_swipes,swipe_threshold_px:null!==(s=null==e?void 0:e.swipe_threshold_px)&&void 0!==s?s:l.swipe_threshold_px,max_dead_swipes_per_page_load:null!==(u=null==e?void 0:e.max_dead_swipes_per_page_load)&&void 0!==u?u:l.max_dead_swipes_per_page_load,css_selector_ignorelist:null==e?void 0:e.css_selector_ignorelist,__onCapture:l.__onCapture}}constructor(e,t){this.Ji=[],this.Yi=0,this.Gi=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,capture_dead_swipes:!0,swipe_threshold_px:30,max_dead_swipes_per_page_load:10,__onCapture:e}),this.Ki=e=>{var t=cf(e,{type:"click"});M(t)||this.Xi(t)||this.en(t),this.tn()},this.rn=()=>{var e=Date.now();this.nn=e,e%50==0&&this.Ji.forEach((t=>{S(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.an=()=>{this.sn=Date.now()},this.Wt=()=>{var e=Date.now();this.un=e,this.ln("visibilityChangedDelayMs",e)},this.hn=()=>{var e=Date.now();this.cn=e,this.ln("focusChangedDelayMs",e)},this.dn=e=>{var t=e.touches,r=1===(null==t?void 0:t.length)?t[0]:void 0;this.vn=r?{x:r.clientX,y:r.clientY,timestamp:Date.now()}:void 0},this.fn=()=>{this.vn=void 0},this.pn=e=>{var t,r=this.vn;if(this.vn=void 0,!S(r)&&this.gn.max_dead_swipes_per_page_load>this.Yi){var n=e,a=null==(t=n.changedTouches)?void 0:t[0];if(a){var o=a.clientX-r.x,s=a.clientY-r.y,u=o*o+s*s,l=this.gn.swipe_threshold_px;if(u>=l*l&&![this.nn,this.mn,this.sn].some((e=>I(e)&&e>=r.timestamp))){var h;if(this.yn()&&(null!==(h=null==i||null==i.elementsFromPoint?void 0:i.elementsFromPoint(r.x,r.y))&&void 0!==h?h:[]).some((e=>null==e.matches?void 0:e.matches(ff))))return;var c=cf(n,{type:"swipe",swipeDirection:df(o,s),swipeDistancePx:Math.round(Math.sqrt(u))});M(c)||this.Xi(c)||this.en(c),this.tn()}}}},this.instance=e,this.gn=this.Zi(t),this._onCapture=this.gn.__onCapture}start(e){this.bn(),this.wn(),this.kn(),this._n(),this.Sn(),this.xn(e),this.gn.capture_dead_swipes&&this.Cn()}xn(e){if(!this.Mn){var t=function(e){return hf("MutationObserver",e)}(s);this.Mn=new t((e=>{this.Tn(e)})),this.Mn.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.Mn)||e.disconnect(),this.Mn=void 0,s.removeEventListener("click",this.Ki),s.removeEventListener("scroll",this.rn,{capture:!0}),s.removeEventListener("selectionchange",this.an),s.removeEventListener("touchstart",this.dn,{capture:!0}),s.removeEventListener("touchend",this.pn,{capture:!0}),s.removeEventListener("touchcancel",this.fn,{capture:!0}),null==i||i.removeEventListener("visibilitychange",this.Wt),s.removeEventListener("blur",this.hn),s.removeEventListener("focus",this.hn),this.vn=void 0}Tn(e){this.mn=Date.now()}bn(){Ne(s,"click",this.Ki)}en(e){e.visibilityChangedDelayMs=yf(e.timestamp,this.un),e.focusChangedDelayMs=yf(e.timestamp,this.cn),this.Ji.push(e)}tn(){this.Ji.length&&S(this.In)&&(this.In=s.setTimeout((()=>{this.Rn()}),1e3))}wn(){Ne(s,"scroll",this.rn,{capture:!0})}kn(){Ne(s,"selectionchange",this.an)}_n(){Ne(i,"visibilitychange",this.Wt)}Sn(){Ne(s,"blur",this.hn),Ne(s,"focus",this.hn)}ln(e,t){this.Ji.forEach((r=>{var i=mf(t-r.timestamp);I(i)&&(S(r[e])||r[e]>i)&&(r[e]=i)}))}Cn(){Ne(s,"touchstart",this.dn,{capture:!0,passive:!0}),Ne(s,"touchend",this.pn,{capture:!0,passive:!0}),Ne(s,"touchcancel",this.fn,{capture:!0,passive:!0})}yn(){var e=S(this.An)||I(this.mn)&&this.mn>this.An;return(S(this.En)||e)&&(this.An=Date.now(),this.En=!(null==i||!i.querySelector(ff))),!!this.En}Xi(e){return!e||("swipe"===e.type?this.Ln(e):this.On(e))}Ln(t){if((r=t.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===r.id||null!=r.closest&&r.closest(".toolbar-global-fade-container")))return!0;var r,i=this.Ji.some((e=>e.type===t.type&&e.node===t.node&&1e3>Math.abs(e.timestamp-t.timestamp)));return!(!i&&!We(t.node,"html")&&ze(t.node)&&function(t,r){var i;if(!e||et(t))return!1;var n=R(r)?Xe:null!==(i=null==r?void 0:r.css_selector_ignorelist)&&void 0!==i?i:Xe;return!function(e,t){if(S(t))return!0;var r,i=function(e){if(t.some((t=>function(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!r&&r.call(e,t)}catch(e){return!1}}(e,t))))return{v:!0}};for(var n of e)if(r=i(n))return r.v;return!1}(tt(t).targetElementList,n)}(t.node,{css_selector_ignorelist:this.gn.css_selector_ignorelist}))}On(t){return!(this.gn.capture_clicks_with_modifier_keys||(r=t.originalEvent,!(r.ctrlKey||r.metaKey||r.altKey||r.shiftKey)))||!!this.Ln(t)||(i=t.node,!(!e||et(i))&&tt(i).targetElementList.some((e=>We(e,"a"))));var r,i}Rn(){if(this.Ji.length){clearTimeout(this.In),this.In=void 0;var e=this.Ji;for(var t of(this.Ji=[],e)){var r;t.mutationDelayMs=null!==(r=t.mutationDelayMs)&&void 0!==r?r:this.mn&&this.mn>=t.timestamp?this.mn-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.sn&&this.sn>=t.timestamp?this.sn-t.timestamp:void 0;var i=gf(t.scrollDelayMs,this.gn.scroll_threshold_ms),n=gf(t.selectionChangedDelayMs,this.gn.selection_change_threshold_ms),a=gf(t.mutationDelayMs,this.gn.mutation_threshold_ms),o=gf(t.absoluteDelayMs,1.1*this.gn.mutation_threshold_ms),s=I(t.scrollDelayMs)&&this.gn.scroll_threshold_ms>t.scrollDelayMs,u=I(t.mutationDelayMs)&&this.gn.mutation_threshold_ms>t.mutationDelayMs,l=I(t.selectionChangedDelayMs)&&this.gn.selection_change_threshold_ms>t.selectionChangedDelayMs,h=I(t.visibilityChangedDelayMs),c=I(t.focusChangedDelayMs);if(!(s||u||l||h||c))if(i||a||o||n){var d=vf(t);if("$dead_swipe"===d){if(this.Yi>=this.gn.max_dead_swipes_per_page_load)continue;this.Yi++}this._onCapture(t,{[d+"_last_mutation_timestamp"]:this.mn,[d+"_event_timestamp"]:t.timestamp,[d+"_scroll_timeout"]:i,[d+"_mutation_timeout"]:a,[d+"_absolute_timeout"]:o,[d+"_selection_changed_timeout"]:n,[d+"_visibility_changed_timeout"]:!1})}else this.gn.mutation_threshold_ms>t.absoluteDelayMs&&this.Ji.push(t)}this.tn()}}Qi(e,t){var r=vf(e);this.instance.capture(r,h({},t,uf(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.gn.element_attribute_ignorelist,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}).props,{[r+"_scroll_delay_ms"]:e.scrollDelayMs,[r+"_mutation_delay_ms"]:e.mutationDelayMs,[r+"_absolute_delay_ms"]:e.absoluteDelayMs,[r+"_selection_changed_delay_ms"]:e.selectionChangedDelayMs,[r+"_visibility_changed_delay_ms"]:e.visibilityChangedDelayMs,[r+"_focus_changed_delay_ms"]:e.focusChangedDelayMs,$dead_swipe_direction:e.swipeDirection,$dead_swipe_distance_px:e.swipeDistancePx}),{timestamp:new Date(e.timestamp)})}}s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new bf(e,t)}();
2
2
  //# sourceMappingURL=all-external-dependencies.js.map