­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ "use strict";(self.webpackChunkelementor=self.webpackChunkelementor||[]).push([[8523],{68523:(e,t,r)=>{var n;if(r.r(t),r.d(t,{default:()=>Zu}),"undefined"==typeof window){var i={hostname:""};n={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:i,referrer:""},screen:{width:0,height:0},location:i,addEventListener:function(){},removeEventListener:function(){}}}else n=window;function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function wrapNativeSuper(e){if(null===e||!function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(Wrapper,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _create_for_of_iterator_helper_loose(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _ts_generator(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function verb(o){return function(a){return function step(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,s=Object.defineProperty,__publicField=function(e,t,r){return function(e,t,r){return t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,r)},a=Object.defineProperty,__publicField$1=function(e,t,r){return function(e,t,r){return t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r}(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,r)},c=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(c||{}),u={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},l={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},p={};function getUntaintedPrototype$1(e){if(p[e])return p[e];var t=globalThis[e],r=t.prototype,n=e in u?u[e]:void 0,i=Boolean(n&&n.every(function(e){var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in l?l[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s&&!globalThis.Zone)return p[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return t.prototype;var h=c[e].prototype;return document.body.removeChild(a),h?p[e]=h:r}catch(e){return r}}var h={};function getUntaintedAccessor$1(e,t,r){var n,i=e+"."+String(r);if(h[i])return h[i].call(t);var o=getUntaintedPrototype$1(e),s=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return s?(h[i]=s,s.call(t)):t[r]}var d={};function getUntaintedMethod$1(e,t,r){var n=e+"."+String(r);if(d[n])return d[n].bind(t);var i=getUntaintedPrototype$1(e)[r];return"function"!=typeof i?t[r]:(d[n]=i,i.bind(t))}var f={childNodes:function childNodes$1(e){return getUntaintedAccessor$1("Node",e,"childNodes")},parentNode:function parentNode$1(e){return getUntaintedAccessor$1("Node",e,"parentNode")},parentElement:function parentElement$1(e){return getUntaintedAccessor$1("Node",e,"parentElement")},textContent:function textContent$1(e){return getUntaintedAccessor$1("Node",e,"textContent")},contains:function contains$1(e,t){return getUntaintedMethod$1("Node",e,"contains")(t)},getRootNode:function getRootNode$1(e){return getUntaintedMethod$1("Node",e,"getRootNode")()},host:function host$1(e){return e&&"host"in e?getUntaintedAccessor$1("ShadowRoot",e,"host"):null},styleSheets:function styleSheets$1(e){return e.styleSheets},shadowRoot:function shadowRoot$1(e){return e&&"shadowRoot"in e?getUntaintedAccessor$1("Element",e,"shadowRoot"):null},querySelector:function querySelector$1(e,t){return getUntaintedAccessor$1("Element",e,"querySelector")(t)},querySelectorAll:function querySelectorAll$1(e,t){return getUntaintedAccessor$1("Element",e,"querySelectorAll")(t)},mutationObserver:function mutationObserverCtor$1(){return getUntaintedPrototype$1("MutationObserver").constructor},patch:function patch$1(e,t,r){try{if(!(t in e))return function(){};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,function(){e[t]=n}}catch(e){return function(){}}}};function isElement(e){return e.nodeType===e.ELEMENT_NODE}function isShadowRoot(e){var t=e&&"host"in e&&"mode"in e&&f.host(e)||null;return Boolean(t&&"shadowRoot"in t&&f.shadowRoot(t)===e)}function isNativeShadowDom(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function stringifyStylesheet(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;return!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href),function fixBrowserCompatibilityIssuesInCSS(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}(Array.from(t,function(e){return stringifyRule(e,r)}).join(""))}catch(e){return null}}function stringifyRule(e,t){if(function isCSSImportRule(e){return"styleSheet"in e}(e)){var r;try{r=stringifyStylesheet(e.styleSheet)||function escapeImportStatement(e){var t=e.cssText;if(t.split('"').length<3)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(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?absolutifyURLs(r,e.styleSheet.href):r}var n=e.cssText;return function isCSSStyleRule(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=function fixSafariColons(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(n)),t?absolutifyURLs(n,t):n}var g=function(){function Mirror(){__publicField$1(this,"idNodeMap",new Map),__publicField$1(this,"nodeMetaMap",new WeakMap)}var e=Mirror.prototype;return e.getId=function getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1},e.getNode=function getNode(e){return this.idNodeMap.get(e)||null},e.getIds=function getIds(){return Array.from(this.idNodeMap.keys())},e.getMeta=function getMeta(e){return this.nodeMetaMap.get(e)||null},e.removeNodeFromMap=function removeNodeFromMap(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},e.has=function has(e){return this.idNodeMap.has(e)},e.hasNode=function hasNode(e){return this.nodeMetaMap.has(e)},e.add=function add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.replace=function replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.reset=function reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},Mirror}();function maskInputValue(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,i=e.type,o=e.value,s=e.maskInputFn,a=o||"",c=i&&toLowerCase(i);return(r[n.toLowerCase()]||c&&r[c])&&(a=s?s(a,t):"*".repeat(a.length)),a}function toLowerCase(e){return e.toLowerCase()}var m="__rrweb_original__";function getInputType(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?toLowerCase(t):null}function extractFileExtension(e,t){var r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var n,i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(n=null==i?void 0:i[1])?n:null}var v=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_=/^(?:[a-z+]+:)?\/\//i,y=/^www\..*/i,b=/^(data:)([^,]*),(.*)/i;function absolutifyURLs(e,t){return(e||"").replace(v,function(e,r,n,i,o,s){var a=n||o||s,c=r||i||"";if(!a)return e;if(_.test(a)||y.test(a))return"url("+c+a+c+")";if(b.test(a))return"url("+c+a+c+")";if("/"===a[0])return"url("+c+(function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+a)+c+")";var u=t.split("/"),l=a.split("/");u.pop();for(var p,h=_create_for_of_iterator_helper_loose(l);!(p=h()).done;){var d=p.value;"."!==d&&(".."===d?u.pop():u.push(d))}return"url("+c+u.join("/")+c+")"})}function normalizeCssString(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function markCssSplits(e,t){return function splitCssText(e,t,r){void 0===r&&(r=!1);var n=Array.from(t.childNodes),i=[],o=0;if(n.length>1&&e&&"string"==typeof e)for(var s=normalizeCssString(e,r),a=s.length/e.length,c=1;c2&&""===h[0]&&""!==n[c-1].textContent)d=s.indexOf(p,1);else if(1===h.length){if(p=p.substring(0,p.length-1),(h=s.split(p)).length<=1)return i.push(e),i;l=101}else l===u.length-1&&(d=s.indexOf(p));if(h.length>=2&&l>100){var f=n[c-1].textContent;if(f&&"string"==typeof f){var g=normalizeCssString(f).length;d=s.indexOf(p,g)}-1===d&&(d=h[0].length)}if(-1!==d){for(var m=Math.floor(d/a);m>0&&m50*n.length)return i.push(e),i;var v=normalizeCssString(e.substring(0,m),r);if(v.length===d){i.push(e.substring(0,m)),e=e.substring(m),s=s.substring(d);break}v.length=t.length);){var i=collectCharacters(I);if(","===i.slice(-1))i=absoluteToDoc(e,i.substring(0,i.length-1)),n.push(i);else{var o="";i=absoluteToDoc(e,i);for(var s=!1;;){var a=t.charAt(r);if(""===a){n.push((i+o).trim());break}if(s)")"===a&&(s=!1);else{if(","===a){r+=1,n.push((i+o).trim());break}"("===a&&(s=!0)}o+=a,r+=1}}}return n.join(", ")}(e,n):"style"===r?absolutifyURLs(n,getHref(e)):"object"===t&&"data"===r?absoluteToDoc(e,n):n:absoluteToDoc(e,n):n}function ignoreAttribute(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function classMatchesRegex(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&classMatchesRegex(f.parentNode(e),t,r);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return!!r&&classMatchesRegex(f.parentNode(e),t,r)}function needMaskingText(e,t,r,n){var i;if(isElement(e)){if(i=e,!f.childNodes(i).length)return!1}else{if(null===f.parentElement(e))return!1;i=f.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(classMatchesRegex(i,t,n))return!0;if(r)if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}catch(e){}return!1}function serializeNode(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,u=t.maskInputOptions,l=void 0===u?{}:u,p=t.maskTextFn,h=t.maskInputFn,d=t.dataURLOptions,g=void 0===d?{}:d,v=t.inlineImages,_=t.recordCanvas,y=t.keepIframeSrcFn,b=t.newlyAddedElement,S=void 0!==b&&b,I=t.cssCaptured,x=void 0!==I&&I,O=function getRootId(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:c.Document,childNodes:[],compatMode:e.compatMode}:{type:c.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:c.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:O};case e.ELEMENT_NODE:return function serializeElementNode(e,t){for(var r,n=t.doc,i=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,a=t.maskInputOptions,u=void 0===a?{}:a,l=t.maskInputFn,p=t.dataURLOptions,h=void 0===p?{}:p,d=t.inlineImages,f=t.recordCanvas,g=t.keepIframeSrcFn,v=t.newlyAddedElement,_=void 0!==v&&v,y=t.rootId,b=function _isBlockedElement(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,i,o),S=function getValidTagName$1(e){if(_instanceof(e,HTMLFormElement))return"form";var t=toLowerCase(e.tagName);return C.test(t)?"div":t}(e),I={},x=e.attributes.length,O=0;O1&&(A=markCssSplits(A,e)),I._cssText=A)}if("input"===S||"textarea"===S||"select"===S){var T=e.value,P=e.checked;"radio"!==I.type&&"checkbox"!==I.type&&"submit"!==I.type&&"button"!==I.type&&T?I.value=maskInputValue({element:e,type:getInputType(e),tagName:S,value:T,maskInputOptions:u,maskInputFn:l}):P&&(I.checked=P)}"option"===S&&(e.selected&&!u.select?I.selected=!0:delete I.selected);"dialog"===S&&e.open&&(I.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===S&&f)if("2d"===e.__context)(function is2DCanvasBlank(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r",U=L.crossOrigin,recordInlineImage=function(){L.removeEventListener("load",recordInlineImage);try{w.width=L.naturalWidth,w.height=L.naturalHeight,k.drawImage(L,0,0),I.rr_dataURL=w.toDataURL(h.type,h.quality)}catch(e){if("anonymous"!==L.crossOrigin)return L.crossOrigin="anonymous",void(L.complete&&0!==L.naturalWidth?recordInlineImage():L.addEventListener("load",recordInlineImage));console.warn("Cannot inline img src="+F+"! Error: "+e)}"anonymous"===L.crossOrigin&&(U?I.crossOrigin=U:L.removeAttribute("crossorigin"))};L.complete&&0!==L.naturalWidth?recordInlineImage():L.addEventListener("load",recordInlineImage)}if("audio"===S||"video"===S){var B=I;B.rr_mediaState=e.paused?"paused":"played",B.rr_mediaCurrentTime=e.currentTime,B.rr_mediaPlaybackRate=e.playbackRate,B.rr_mediaMuted=e.muted,B.rr_mediaLoop=e.loop,B.rr_mediaVolume=e.volume}_||(e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop));if(b){var $=e.getBoundingClientRect(),z=$.width,j=$.height;I={class:I.class,rr_width:z+"px",rr_height:j+"px"}}"iframe"!==S||g(I.src)||(e.contentDocument||(I.rr_src=I.src),delete I.src);try{customElements.get(S)&&(r=!0)}catch(e){}return{type:c.Element,tagName:S,attributes:I,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:b,rootId:y,isCustom:r}}(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:g,inlineImages:v,recordCanvas:_,keepIframeSrcFn:y,newlyAddedElement:S,rootId:O});case e.TEXT_NODE:return function serializeTextNode(e,t){var r=t.needsMask,n=t.maskTextFn,i=t.rootId,o=t.cssCaptured,s=f.parentNode(e),a=s&&s.tagName,u="",l="STYLE"===a||void 0,p="SCRIPT"===a||void 0;p?u="SCRIPT_PLACEHOLDER":o||(u=f.textContent(e),l&&u&&(u=absolutifyURLs(u,getHref(t.doc))));!l&&!p&&u&&r&&(u=n?n(u,f.parentElement(e)):u.replace(/[\S]/g,"*"));return{type:c.Text,textContent:u||"",rootId:i}}(e,{doc:r,needsMask:s,maskTextFn:p,rootId:O,cssCaptured:x});case e.CDATA_SECTION_NODE:return{type:c.CDATA,textContent:"",rootId:O};case e.COMMENT_NODE:return{type:c.Comment,textContent:f.textContent(e)||"",rootId:O};default:return!1}}function lowerIfExists(e){return null==e?"":e.toLowerCase()}function serializeNodeWithId(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,u=t.skipChild,l=void 0!==u&&u,p=t.inlineStylesheet,h=void 0===p||p,d=t.maskInputOptions,g=void 0===d?{}:d,m=t.maskTextFn,v=t.maskInputFn,_=t.slimDOMOptions,y=t.dataURLOptions,b=void 0===y?{}:y,w=t.inlineImages,k=void 0!==w&&w,S=t.recordCanvas,C=void 0!==S&&S,I=t.onSerialize,x=t.onIframeLoad,O=t.iframeLoadTimeout,E=void 0===O?5e3:O,M=t.onStylesheetLoad,R=t.stylesheetLoadTimeout,A=void 0===R?5e3:R,T=t.keepIframeSrcFn,P=void 0===T?function(){return!1}:T,N=t.newlyAddedElement,D=void 0!==N&&N,L=t.cssCaptured,F=void 0!==L&&L,U=t.needsMask,B=t.preserveWhiteSpace,$=void 0===B||B;U||(U=needMaskingText(e,s,a,void 0===U));var z,j=serializeNode(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:U,inlineStylesheet:h,maskInputOptions:g,maskTextFn:m,maskInputFn:v,dataURLOptions:b,inlineImages:k,recordCanvas:C,keepIframeSrcFn:P,newlyAddedElement:D,cssCaptured:F});if(!j)return console.warn(e,"not serialized"),null;z=n.hasNode(e)?n.getId(e):function slimDOMExcluded(e,t){if(t.comment&&e.type===c.Comment)return!0;if(e.type===c.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"===extractFileExtension(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(lowerIfExists(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===lowerIfExists(e.attributes.name)||"icon"===lowerIfExists(e.attributes.rel)||"apple-touch-icon"===lowerIfExists(e.attributes.rel)||"shortcut icon"===lowerIfExists(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&lowerIfExists(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(lowerIfExists(e.attributes.property).match(/^(og|twitter|fb):/)||lowerIfExists(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===lowerIfExists(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===lowerIfExists(e.attributes.name)||"googlebot"===lowerIfExists(e.attributes.name)||"bingbot"===lowerIfExists(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===lowerIfExists(e.attributes.name)||"generator"===lowerIfExists(e.attributes.name)||"framework"===lowerIfExists(e.attributes.name)||"publisher"===lowerIfExists(e.attributes.name)||"progid"===lowerIfExists(e.attributes.name)||lowerIfExists(e.attributes.property).match(/^article:/)||lowerIfExists(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===lowerIfExists(e.attributes.name)||"yandex-verification"===lowerIfExists(e.attributes.name)||"csrf-token"===lowerIfExists(e.attributes.name)||"p:domain_verify"===lowerIfExists(e.attributes.name)||"verify-v1"===lowerIfExists(e.attributes.name)||"verification"===lowerIfExists(e.attributes.name)||"shopify-checkout-api-token"===lowerIfExists(e.attributes.name)))return!0}}return!1}(j,_)||!$&&j.type===c.Text&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?-2:genId();var q=Object.assign(j,{id:z});if(n.add(e,q),-2===z)return null;I&&I(e);var W=!l;if(q.type===c.Element){W=W&&!q.needBlock,delete q.needBlock;var V=f.shadowRoot(e);V&&isNativeShadowDom(V)&&(q.isShadowHost=!0)}if((q.type===c.Document||q.type===c.Element)&&W){_.headWhitespace&&q.type===c.Element&&"head"===q.tagName&&($=!1);var G={doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:U,maskTextClass:s,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:_,dataURLOptions:b,inlineImages:k,recordCanvas:C,preserveWhiteSpace:$,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:E,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:P,cssCaptured:!1};if(q.type===c.Element&&"textarea"===q.tagName&&void 0!==q.attributes.value);else{q.type===c.Element&&void 0!==q.attributes._cssText&&"string"==typeof q.attributes._cssText&&(G.cssCaptured=!0);for(var H,J=_create_for_of_iterator_helper_loose(Array.from(f.childNodes(e)));!(H=J()).done;){var Y=serializeNodeWithId(H.value,G);Y&&q.childNodes.push(Y)}}var Z=null;if(isElement(e)&&(Z=f.shadowRoot(e)))for(var X,K=_create_for_of_iterator_helper_loose(Array.from(f.childNodes(Z)));!(X=K()).done;){var Q=serializeNodeWithId(X.value,G);Q&&(isNativeShadowDom(Z)&&(Q.isShadow=!0),q.childNodes.push(Q))}}var ee=f.parentNode(e);return ee&&isShadowRoot(ee)&&isNativeShadowDom(ee)&&(q.isShadow=!0),q.type===c.Element&&"iframe"===q.tagName&&function onceIframeLoaded(e,t,r){var n=e.contentWindow;if(n){var i,o=!1;try{i=n.document.readyState}catch(e){return}if("complete"===i){var s="about:blank";if(n.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},r);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&x){var r=serializeNodeWithId(t,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:U,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:_,dataURLOptions:b,inlineImages:k,recordCanvas:C,preserveWhiteSpace:$,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:E,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:P});r&&x(e,r)}},E),q.type===c.Element&&"link"===q.tagName&&"string"==typeof q.attributes.rel&&("stylesheet"===q.attributes.rel||"preload"===q.attributes.rel&&"string"==typeof q.attributes.href&&"css"===extractFileExtension(q.attributes.href))&&function onceStylesheetLoaded(e,t,r){var n,i=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout(function(){i||(t(),i=!0)},r);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(M){var t=serializeNodeWithId(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:U,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskTextFn:m,maskInputFn:v,slimDOMOptions:_,dataURLOptions:b,inlineImages:k,recordCanvas:C,preserveWhiteSpace:$,onSerialize:I,onIframeLoad:x,iframeLoadTimeout:E,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:P});t&&M(e,t)}},A),q}function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace$1(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function a22(){return _instanceof(this,a22)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function get(){return e[t]}})}),r}var E={exports:{}},M=String,R=function create$1(){return{isColorSupported:!1,reset:M,bold:M,dim:M,italic:M,underline:M,inverse:M,hidden:M,strikethrough:M,black:M,red:M,green:M,yellow:M,blue:M,magenta:M,cyan:M,white:M,gray:M,bgBlack:M,bgRed:M,bgGreen:M,bgYellow:M,bgBlue:M,bgMagenta:M,bgCyan:M,bgWhite:M}};E.exports=R(),E.exports.createColors=R;var A=E.exports,T=getAugmentedNamespace$1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),P=A,N=T,D=function(e){function CssSyntaxError(t,r,n,i,o,s){var a;return(a=e.call(this,t)||this).name="CssSyntaxError",a.reason=t,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(a.line=r,a.column=n):(a.line=r.line,a.column=r.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,CssSyntaxError),a}_inherits(CssSyntaxError,e);var t=CssSyntaxError.prototype;return t.setMessage=function setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},t.showSourceCode=function showSourceCode(e){var t=this;if(!this.source)return"";var r=this.source;null==e&&(e=P.isColorSupported),N&&e&&(r=N(r));var n,i,o=r.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;if(e){var u=P.createColors(!0),l=u.bold,p=u.gray,h=u.red;n=function(e){return l(h(e))},i=function(e){return p(e)}}else n=i=function(e){return e};return o.slice(s,a).map(function(e,r){var o=s+1+r,a=" "+(" "+o).slice(-c)+" | ";if(o===t.line){var u=i(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return n(">")+i(a)+e+"\n "+u+n("^")}return" "+i(a)+e}).join("\n")},t.toString=function toString(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},CssSyntaxError}(_wrap_native_super(Error)),L=D;D.default=D;var F={};F.isClean=Symbol("isClean"),F.my=Symbol("my");var U={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var B=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;return e.atrule=function atrule(e,t){var r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{var i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}},e.beforeAfter=function beforeAfter(e,t){var r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var n=e.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),n=0;n0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},e.rawBeforeComment=function rawBeforeComment(e,t){var r;return e.walkComments(function(e){if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r},e.rawBeforeDecl=function rawBeforeDecl(e,t){var r;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r},e.rawBeforeOpen=function rawBeforeOpen(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},e.rawBeforeRule=function rawBeforeRule(e){var t;return e.walk(function(r){if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},e.rawColon=function rawColon(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},e.rawEmptyBody=function rawEmptyBody(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},e.rawIndent=function rawIndent(e){return e.raws.indent?e.raws.indent:(e.walk(function(r){var n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},e.rawSemicolon=function rawSemicolon(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},e.rawValue=function rawValue(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r},e.root=function root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},e.rule=function rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},e.stringify=function stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},Stringifier}(),$=B;B.default=B;var z=$;function stringify$4$1(e,t){new z(t).stringify(e)}var j=stringify$4$1;stringify$4$1.default=stringify$4$1;var q=F.isClean,W=F.my,V=L,G=$,H=j;function cloneNode$1(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n){var i=e[n],o=void 0===i?"undefined":_type_of(i);"parent"===n&&"object"===o?t&&(r[n]=t):"source"===n?r[n]=i:Array.isArray(i)?r[n]=i.map(function(e){return cloneNode$1(e,r)}):("object"===o&&null!==i&&(i=cloneNode$1(i)),r[n]=i)}return r}var J=function(){function Node2(e){for(var t in void 0===e&&(e={}),this.raws={},this[q]=!1,this[W]=!0,e)if("nodes"===t){this.nodes=[];for(var r,n=_create_for_of_iterator_helper_loose(e[t]);!(r=n()).done;){var i=r.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var e=Node2.prototype;return e.addToError=function addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},e.after=function after(e){return this.parent.insertAfter(this,e),this},e.assign=function assign(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},e.before=function before(e){return this.parent.insertBefore(this,e),this},e.cleanRaws=function cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},e.clone=function clone(e){void 0===e&&(e={});var t=cloneNode$1(this);for(var r in e)t[r]=e[r];return t},e.cloneAfter=function cloneAfter(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},e.cloneBefore=function cloneBefore(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},e.error=function error(e,t){if(void 0===t&&(t={}),this.source){var r=this.rangeBy(t),n=r.end,i=r.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new V(e)},e.getProxyProcessor=function getProxyProcessor(){return{get:function get(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function set(e,t,r){return e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},e.markDirty=function markDirty(){if(this[q]){this[q]=!1;for(var e=this;e=e.parent;)e[q]=!1}},e.next=function next(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},e.positionBy=function positionBy(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){var n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r},e.positionInside=function positionInside(e,t){for(var r=t||this.toString(),n=this.source.start.column,i=this.source.start.line,o=0;o-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}},e.loadFile=function loadFile(e){if(this.root=re(e),ee(e))return this.mapFile=e,te(e,"utf-8").toString().trim()},e.loadMap=function loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(_instanceof(t,K))return Q.fromSourceMap(t).toString();if(_instanceof(t,Q))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=ne(re(e),i)),this.loadFile(i)}}},e.startWith=function startWith(e,t){return!!e&&e.substr(0,t.length)===t},e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},PreviousMap}(),oe=ie;ie.default=ie;var se=T.SourceMapConsumer,ae=T.SourceMapGenerator,ce=T.fileURLToPath,ue=T.pathToFileURL,le=T.isAbsolute,pe=T.resolve,he=nonSecure$1_nanoid,de=T,fe=L,ge=oe,me=Symbol("fromOffsetCache"),ve=Boolean(se&&ae),_e=Boolean(pe&&le),ye=function(){function Input(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":_type_of(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!_e||/^\w+:\/\//.test(t.from)||le(t.from)?this.file=t.from:this.file=pe(t.from)),_e&&ve){var r=new ge(this.css,t);if(r.text){this.map=r;var n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}var e=Input.prototype;return e.error=function error(e,t,r,n){var i,o,s;if(void 0===n&&(n={}),t&&"object"===(void 0===t?"undefined":_type_of(t))){var a=t,c=r;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);t=u.line,r=u.col}else t=a.line,r=a.column;if("number"==typeof c.offset){var l=this.fromOffset(c.offset);o=l.line,s=l.col}else o=c.line,s=c.column}else if(!r){var p=this.fromOffset(t);t=p.line,r=p.col}var h=this.origin(t,r,o,s);return(i=h?new fe(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,n.plugin):new fe(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:s,line:o},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(ue&&(i.input.url=ue(this.file).toString()),i.input.file=this.file),i},e.fromOffset=function fromOffset(e){var t;if(this[me])t=this[me];else{var r=this.css.split("\n");t=new Array(r.length);for(var n=0,i=0,o=r.length;i=t[t.length-1])s=t.length-1;else for(var a,c=t.length-2;s>1)])c=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},e.mapResolve=function mapResolve(e){return/^\w+:\/\//.test(e)?e:pe(this.map.consumer().sourceRoot||this.map.root||".",e)},e.origin=function origin(e,t,r,n){if(!this.map)return!1;var i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(i=s.originalPositionFor({column:n,line:r})),o=le(a.source)?ue(a.source):new URL(a.source,this.map.consumer().sourceRoot||ue(this.map.mapFile));var c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!ce)throw new Error("file: protocol is not available in this PostCSS build");c.file=ce(o)}var u=s.sourceContentFor(a.source);return u&&(c.source=u),c},e.toJSON=function toJSON(){for(var e={},t=0,r=["hasBOM","css","file","id"];t=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},e.generate=function generate(){if(this.clearAnnotation(),Re&&Me&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},e.generateMap=function generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ke.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ke({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},e.generateString=function generateString(){var e=this;this.css="",this.map=new ke({file:this.outputFile(),ignoreInvalidMapping:!0});var t,r,n=1,i=1,o="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,c,u){if(e.css+=a,c&&"end"!==u&&(s.generated.line=n,s.generated.column=i-1,c.source&&c.source.start?(s.source=e.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(n+=t.length,r=a.lastIndexOf("\n"),i=a.length-r):i+=a.length,c&&"start"!==u){var l=c.parent||{raws:{}};("decl"===c.type||"atrule"===c.type&&!c.nodes)&&c===l.last&&!l.raws.semicolon||(c.source&&c.source.end?(s.source=e.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=n,s.generated.column=i-2,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=i-1,e.map.addMapping(s)))}})},e.isAnnotation=function isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},e.isInline=function isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},e.isMap=function isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},e.isSourcesContent=function isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},e.outputFile=function outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},e.path=function path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?Se(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Se(Ie(r,this.mapOpts.annotation)));var path=Ce(r,e);return this.memoizedPaths.set(e,path),path},e.previous=function previous(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;e.previousMaps.includes(r)||e.previousMaps.push(r)}});else{var t=new Ee(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},e.setSourcesContent=function setSourcesContent(){var e=this,t={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var i=e.usesFileUrls?e.toFileUrl(n):e.toUrl(e.path(n));e.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}},e.sourcePath=function sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},e.toBase64=function toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},e.toFileUrl=function toFileUrl(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(Oe){var r=Oe(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")},e.toUrl=function toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===xe&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r},MapGenerator}(),Te=function(e){function Comment(t){var r;return(r=e.call(this,t)||this).type="comment",r}return _inherits(Comment,e),Comment}(Y),Pe=Te;Te.default=Te;var Ne,De,Le,Fe,Ue=F.isClean,Be=F.my,$e=X,ze=Pe;function cleanSource$1(e){return e.map(function(e){return e.nodes&&(e.nodes=cleanSource$1(e.nodes)),delete e.source,e})}function markDirtyUp$1(e){if(e[Ue]=!1,e.proxyOf.nodes)for(var t,r=_create_for_of_iterator_helper_loose(e.proxyOf.nodes);!(t=r()).done;){markDirtyUp$1(t.value)}}var je=function(e){function Container(){return e.apply(this,arguments)||this}_inherits(Container,e);var t=Container.prototype;return t.append=function append(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),i=1;i=e&&(this.indexes[r]=t-1);return this.markDirty(),this},t.replaceValues=function replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(function(n){t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this},t.some=function some(e){return this.nodes.some(e)},t.walk=function walk(e){return this.each(function(t,r){var n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})},t.walkAtRules=function walkAtRules(e,t){return t?_instanceof(e,RegExp)?this.walk(function(r,n){if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("atrule"===e.type)return t(e,r)}))},t.walkComments=function walkComments(e){return this.walk(function(t,r){if("comment"===t.type)return e(t,r)})},t.walkDecls=function walkDecls(e,t){return t?_instanceof(e,RegExp)?this.walk(function(r,n){if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("decl"===e.type)return t(e,r)}))},t.walkRules=function walkRules(e,t){return t?_instanceof(e,RegExp)?this.walk(function(r,n){if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("rule"===e.type)return t(e,r)}))},_create_class(Container,[{key:"first",get:function get(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function get(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),Container}(Y);je.registerParse=function(e){Ne=e},je.registerRule=function(e){De=e},je.registerAtRule=function(e){Le=e},je.registerRoot=function(e){Fe=e};var qe=je;je.default=je,je.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Le.prototype):"rule"===e.type?Object.setPrototypeOf(e,De.prototype):"decl"===e.type?Object.setPrototypeOf(e,$e.prototype):"comment"===e.type?Object.setPrototypeOf(e,ze.prototype):"root"===e.type&&Object.setPrototypeOf(e,Fe.prototype),e[Be]=!0,e.nodes&&e.nodes.forEach(function(e){je.rebuild(e)})};var We,Ve,Ge=function(e){function Document2(t){var r;return(r=e.call(this,_extends({type:"document"},t))||this).nodes||(r.nodes=[]),r}return _inherits(Document2,e),Document2.prototype.toResult=function toResult(e){return void 0===e&&(e={}),new We(new Ve,this,e).stringify()},Document2}(qe);Ge.registerLazyResult=function(e){We=e},Ge.registerProcessor=function(e){Ve=e};var He=Ge;Ge.default=Ge;var Je=function(){function Warning(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var n in t)this[n]=t[n]}return Warning.prototype.toString=function toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},Warning}(),Ye=Je;Je.default=Je;var Ze=Ye,Xe=function(){function Result(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}var e=Result.prototype;return e.toString=function toString(){return this.css},e.warn=function warn(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new Ze(e,t);return this.messages.push(r),r},e.warnings=function warnings(){return this.messages.filter(function(e){return"warning"===e.type})},_create_class(Result,[{key:"content",get:function get(){return this.css}}]),Result}(),Ke=Xe;Xe.default=Xe;var Qe="'".charCodeAt(0),et='"'.charCodeAt(0),tt="\\".charCodeAt(0),rt="/".charCodeAt(0),nt="\n".charCodeAt(0),it=" ".charCodeAt(0),ot="\f".charCodeAt(0),st="\t".charCodeAt(0),at="\r".charCodeAt(0),ct="[".charCodeAt(0),ut="]".charCodeAt(0),lt="(".charCodeAt(0),pt=")".charCodeAt(0),ht="{".charCodeAt(0),dt="}".charCodeAt(0),ft=";".charCodeAt(0),gt="*".charCodeAt(0),mt=":".charCodeAt(0),vt="@".charCodeAt(0),_t=/[\t\n\f\r "#'()/;[\\\]{}]/g,yt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bt=/.[\r\n"'(/\\]/,wt=/[\da-f]/i,kt=qe,St=function(e){function AtRule(t){var r;return(r=e.call(this,t)||this).type="atrule",r}_inherits(AtRule,e);var t=AtRule.prototype;return t.append=function append(){for(var t=arguments.length,r=new Array(t),n=0;n1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var o,s=_create_for_of_iterator_helper_loose(i);!(o=s()).done;){o.value.raws.before=r.raws.before}return i},t.removeChild=function removeChild(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},t.toResult=function toResult(e){return void 0===e&&(e={}),new It(new xt,this,e).stringify()},Root}(Ot);Et.registerLazyResult=function(e){It=e},Et.registerProcessor=function(e){xt=e};var Mt=Et;Et.default=Et,Ot.registerRoot(Et);var Rt={comma:function comma(e){return Rt.split(e,[","],!0)},space:function space(e){return Rt.split(e,[" ","\n","\t"])},split:function split(e,t,r){for(var n,i=[],o="",split=!1,s=0,a=!1,c="",u=!1,l=_create_for_of_iterator_helper_loose(e);!(n=l()).done;){var p=n.value;u?u=!1:"\\"===p?u=!0:a?p===c&&(a=!1):'"'===p||"'"===p?(a=!0,c=p):"("===p?s+=1:")"===p?s>0&&(s-=1):0===s&&t.includes(p)&&(split=!0),split?(""!==o&&i.push(o.trim()),o="",split=!1):o+=p}return(r||""!==o)&&i.push(o.trim()),i}},At=Rt;Rt.default=Rt;var Tt=qe,Pt=At,Nt=function(e){function Rule(t){var r;return(r=e.call(this,t)||this).type="rule",r.nodes||(r.nodes=[]),r}return _inherits(Rule,e),_create_class(Rule,[{key:"selectors",get:function get(){return Pt.comma(this.selector)},set:function set(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}]),Rule}(Tt),Dt=Nt;Nt.default=Nt,Tt.registerRule(Nt);var Lt=X,Ft=function tokenizer(e,t){void 0===t&&(t={});var r,n,i,o,s,a,c,u,l,p,h=e.css.valueOf(),d=t.ignoreErrors,f=h.length,g=0,m=[],v=[];function unclosed(t){throw e.error("Unclosed "+t,g)}return{back:function back(e){v.push(e)},endOfFile:function endOfFile(){return 0===v.length&&g>=f},nextToken:function nextToken(e){if(v.length)return v.pop();if(!(g>=f)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(g)){case nt:case it:case st:case at:case ot:n=g;do{n+=1,r=h.charCodeAt(n)}while(r===it||r===nt||r===st||r===at||r===ot);p=["space",h.slice(g,n)],g=n-1;break;case ct:case ut:case ht:case dt:case mt:case ft:case pt:var _=String.fromCharCode(r);p=[_,_,g];break;case lt:if(u=m.length?m.pop()[1]:"",l=h.charCodeAt(g+1),"url"===u&&l!==Qe&&l!==et&&l!==it&&l!==nt&&l!==st&&l!==ot&&l!==at){n=g;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(d||t){n=g;break}unclosed("bracket")}for(c=n;h.charCodeAt(c-1)===tt;)c-=1,a=!a}while(a);p=["brackets",h.slice(g,n+1),g,n],g=n}else n=h.indexOf(")",g+1),o=h.slice(g,n+1),-1===n||bt.test(o)?p=["(","(",g]:(p=["brackets",o,g,n],g=n);break;case Qe:case et:i=r===Qe?"'":'"',n=g;do{if(a=!1,-1===(n=h.indexOf(i,n+1))){if(d||t){n=g+1;break}unclosed("string")}for(c=n;h.charCodeAt(c-1)===tt;)c-=1,a=!a}while(a);p=["string",h.slice(g,n+1),g,n],g=n;break;case vt:_t.lastIndex=g+1,_t.test(h),n=0===_t.lastIndex?h.length-1:_t.lastIndex-2,p=["at-word",h.slice(g,n+1),g,n],g=n;break;case tt:for(n=g,s=!0;h.charCodeAt(n+1)===tt;)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&r!==rt&&r!==it&&r!==nt&&r!==st&&r!==at&&r!==ot&&(n+=1,wt.test(h.charAt(n)))){for(;wt.test(h.charAt(n+1));)n+=1;h.charCodeAt(n+1)===it&&(n+=1)}p=["word",h.slice(g,n+1),g,n],g=n;break;default:r===rt&&h.charCodeAt(g+1)===gt?(0===(n=h.indexOf("*/",g+2)+1)&&(d||t?n=h.length:unclosed("comment")),p=["comment",h.slice(g,n+1),g,n],g=n):(yt.lastIndex=g+1,yt.test(h),n=0===yt.lastIndex?h.length-1:yt.lastIndex-2,p=["word",h.slice(g,n+1),g,n],m.push(p),g=n)}return g++,p}},position:function position(){return g}}},Ut=Pe,Bt=Ct,$t=Mt,zt=Dt,jt={empty:!0,space:!0};var qt=function(){function Parser(e){this.input=e,this.root=new $t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var e=Parser.prototype;return e.atrule=function atrule(e){var t,r,n,i=new Bt;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],c=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(r=a[n=a.length-1];r&&"space"===r[0];)r=a[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)},e.checkMissedSemicolon=function checkMissedSemicolon(e){var t=this.colon(e);if(!1!==t){for(var r,n=0,i=t-1;i>=0&&("space"===(r=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}},e.colon=function colon(e){for(var t,r,n,i,o=0,s=_create_for_of_iterator_helper_loose(e.entries());!(i=s()).done;){var a=i.value,c=a[0];if("("===(r=(t=a[1])[0])&&(o+=1),")"===r&&(o-=1),0===o&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return c}this.doubleColon(t)}n=t}return!1},e.comment=function comment(e){var t=new Ut;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}},e.createTokenizer=function createTokenizer(){this.tokenizer=Ft(this.input)},e.decl=function decl(e,t){var r=new Lt;this.init(r,e[0][2]);var n,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||function findLastWithPosition$1(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(n=e.shift())[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if("!important"===(n=e[c])[1].toLowerCase()){r.important=!0;var u=this.stringFrom(e,c);" !important"!==(u=this.spacesFromEnd(e)+u)&&(r.raws.important=u);break}if("important"===n[1].toLowerCase()){for(var l=e.slice(0),p="",h=c;h>0;h--){var d=l[h][0];if(0===p.trim().indexOf("!")&&"space"!==d)break;p=l.pop()[1]+p}0===p.trim().indexOf("!")&&(r.important=!0,r.raws.important=p,e=l)}if("space"!==n[0]&&"comment"!==n[0])break}var f=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});f&&(r.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},e.doubleColon=function doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},e.emptyRule=function emptyRule(e){var t=new zt;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},e.end=function end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},e.endFile=function endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},e.freeSemicolon=function freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},e.getPosition=function getPosition(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},e.init=function init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},e.other=function other(e){for(var t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],c=e;c;){if(r=c[0],a.push(c),"("===r||"["===r)i||(i=c),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=c),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,s);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&("space"===(c=a[a.length-1][0])||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},e.parse=function parse(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},e.precheckMissedSemicolon=function precheckMissedSemicolon(){},e.raw=function raw(e,t,r,n){for(var i,o,s,a,c=r.length,u="",l=!0,p=0;p0},e.runAsync=function runAsync(){var e=this;return _async_to_generator(function(){var t,r,n,i,o,s,a,c,u,l,p,h;return _ts_generator(this,function(d){switch(d.label){case 0:e.plugin=0,t=0,d.label=1;case 1:if(!(t0))return[3,13];if(!isPromise$1(a=e.visitTick(s)))return[3,12];d.label=9;case 9:return d.trys.push([9,11,,12]),[4,a];case 10:return d.sent(),[3,12];case 11:throw c=d.sent(),u=s[s.length-1].node,e.handleError(c,u);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];l=function(){var t,r,n,i,s;return _ts_generator(this,function(a){switch(a.label){case 0:t=h.value,r=t[0],n=t[1],e.result.lastPlugin=r,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return n(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,n(o,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},p=_create_for_of_iterator_helper_loose(e.listeners.OnceExit),d.label=15;case 15:return(h=p()).done?[3,18]:[5,_ts_values(l())];case 16:d.sent(),d.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},e.runOnRoot=function runOnRoot(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return e.Once(r,t.helpers)});return isPromise$1(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},e.stringify=function stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Xt;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new Zt(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},e.sync=function sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=_create_for_of_iterator_helper_loose(this.plugins);!(e=t()).done;){var r=e.value;if(isPromise$1(this.runOnRoot(r)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var n=this.result.root;!n[Jt];)n[Jt]=!0,this.walkSync(n);if(this.listeners.OnceExit)if("document"===n.type)for(var i,o=_create_for_of_iterator_helper_loose(n.nodes);!(i=o()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,n)}return this.result},e.then=function then(e,t){return this.async().then(e,t)},e.toString=function toString(){return this.css},e.visitSync=function visitSync(e,t){for(var r,n=_create_for_of_iterator_helper_loose(e);!(r=n()).done;){var i=r.value,o=i[0],s=i[1];this.result.lastPlugin=o;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(isPromise$1(a))throw this.getAsyncError()}},e.visitTick=function visitTick(e){var t=e[e.length-1],r=t.node,n=t.visitors;if("root"===r.type||"document"===r.type||r.parent){if(n.length>0&&t.visitorIndex",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},t.showSourceCode=function showSourceCode(e){var t=this;if(!this.source)return"";var r=this.source;null==e&&(e=tn.isColorSupported),rn&&e&&(r=rn(r));var n,i,o=r.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;if(e){var u=tn.createColors(!0),l=u.bold,p=u.gray,h=u.red;n=function(e){return l(h(e))},i=function(e){return p(e)}}else n=i=function(e){return e};return o.slice(s,a).map(function(e,r){var o=s+1+r,a=" "+(" "+o).slice(-c)+" | ";if(o===t.line){var u=i(a.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return n(">")+i(a)+e+"\n "+u+n("^")}return" "+i(a)+e}).join("\n")},t.toString=function toString(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},CssSyntaxError2}(_wrap_native_super(Error)),sn=nn;nn.default=nn;var an={};an.isClean=Symbol("isClean"),an.my=Symbol("my");var cn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var un=function(){function Stringifier2(e){this.builder=e}var e=Stringifier2.prototype;return e.atrule=function atrule(e,t){var r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{var i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}},e.beforeAfter=function beforeAfter(e,t){var r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var n=e.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),n=0;n0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},e.rawBeforeComment=function rawBeforeComment(e,t){var r;return e.walkComments(function(e){if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r},e.rawBeforeDecl=function rawBeforeDecl(e,t){var r;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r},e.rawBeforeOpen=function rawBeforeOpen(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},e.rawBeforeRule=function rawBeforeRule(e){var t;return e.walk(function(r){if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},e.rawColon=function rawColon(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},e.rawEmptyBody=function rawEmptyBody(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},e.rawIndent=function rawIndent(e){return e.raws.indent?e.raws.indent:(e.walk(function(r){var n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},e.rawSemicolon=function rawSemicolon(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},e.rawValue=function rawValue(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r},e.root=function root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},e.rule=function rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},e.stringify=function stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},Stringifier2}(),ln=un;un.default=un;var pn=ln;function stringify$4(e,t){new pn(t).stringify(e)}var hn=stringify$4;stringify$4.default=stringify$4;var dn=an.isClean,fn=an.my,gn=sn,mn=ln,vn=hn;function cloneNode(e,t){var r=new e.constructor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n){var i=e[n],o=void 0===i?"undefined":_type_of(i);"parent"===n&&"object"===o?t&&(r[n]=t):"source"===n?r[n]=i:Array.isArray(i)?r[n]=i.map(function(e){return cloneNode(e,r)}):("object"===o&&null!==i&&(i=cloneNode(i)),r[n]=i)}return r}var _n=function(){function Node3(e){for(var t in void 0===e&&(e={}),this.raws={},this[dn]=!1,this[fn]=!0,e)if("nodes"===t){this.nodes=[];for(var r,n=_create_for_of_iterator_helper_loose(e[t]);!(r=n()).done;){var i=r.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var e=Node3.prototype;return e.addToError=function addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},e.after=function after(e){return this.parent.insertAfter(this,e),this},e.assign=function assign(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},e.before=function before(e){return this.parent.insertBefore(this,e),this},e.cleanRaws=function cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},e.clone=function clone(e){void 0===e&&(e={});var t=cloneNode(this);for(var r in e)t[r]=e[r];return t},e.cloneAfter=function cloneAfter(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},e.cloneBefore=function cloneBefore(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},e.error=function error(e,t){if(void 0===t&&(t={}),this.source){var r=this.rangeBy(t),n=r.end,i=r.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new gn(e)},e.getProxyProcessor=function getProxyProcessor(){return{get:function get(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function set(e,t,r){return e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},e.markDirty=function markDirty(){if(this[dn]){this[dn]=!1;for(var e=this;e=e.parent;)e[dn]=!1}},e.next=function next(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},e.positionBy=function positionBy(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){var n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r},e.positionInside=function positionInside(e,t){for(var r=t||this.toString(),n=this.source.start.column,i=this.source.start.line,o=0;o-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}},e.loadFile=function loadFile(e){if(this.root=xn(e),Cn(e))return this.mapFile=e,In(e,"utf-8").toString().trim()},e.loadMap=function loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(_instanceof(t,kn))return Sn.fromSourceMap(t).toString();if(_instanceof(t,Sn))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=On(xn(e),i)),this.loadFile(i)}}},e.startWith=function startWith(e,t){return!!e&&e.substr(0,t.length)===t},e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},PreviousMap2}(),Mn=En;En.default=En;var Rn=en.SourceMapConsumer,An=en.SourceMapGenerator,Tn=en.fileURLToPath,Pn=en.pathToFileURL,Nn=en.isAbsolute,Dn=en.resolve,Ln=nonSecure_nanoid,Fn=en,Un=sn,Bn=Mn,$n=Symbol("fromOffsetCache"),zn=Boolean(Rn&&An),jn=Boolean(Dn&&Nn),qn=function(){function Input2(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":_type_of(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!jn||/^\w+:\/\//.test(t.from)||Nn(t.from)?this.file=t.from:this.file=Dn(t.from)),jn&&zn){var r=new Bn(this.css,t);if(r.text){this.map=r;var n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}var e=Input2.prototype;return e.error=function error(e,t,r,n){var i,o,s;if(void 0===n&&(n={}),t&&"object"===(void 0===t?"undefined":_type_of(t))){var a=t,c=r;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);t=u.line,r=u.col}else t=a.line,r=a.column;if("number"==typeof c.offset){var l=this.fromOffset(c.offset);o=l.line,s=l.col}else o=c.line,s=c.column}else if(!r){var p=this.fromOffset(t);t=p.line,r=p.col}var h=this.origin(t,r,o,s);return(i=h?new Un(e,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,n.plugin):new Un(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:s,line:o},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(Pn&&(i.input.url=Pn(this.file).toString()),i.input.file=this.file),i},e.fromOffset=function fromOffset(e){var t;if(this[$n])t=this[$n];else{var r=this.css.split("\n");t=new Array(r.length);for(var n=0,i=0,o=r.length;i=t[t.length-1])s=t.length-1;else for(var a,c=t.length-2;s>1)])c=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}},e.mapResolve=function mapResolve(e){return/^\w+:\/\//.test(e)?e:Dn(this.map.consumer().sourceRoot||this.map.root||".",e)},e.origin=function origin(e,t,r,n){if(!this.map)return!1;var i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(i=s.originalPositionFor({column:n,line:r})),o=Nn(a.source)?Pn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Pn(this.map.mapFile));var c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Tn)throw new Error("file: protocol is not available in this PostCSS build");c.file=Tn(o)}var u=s.sourceContentFor(a.source);return u&&(c.source=u),c},e.toJSON=function toJSON(){for(var e={},t=0,r=["hasBOM","css","file","id"];t=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},e.generate=function generate(){if(this.clearAnnotation(),ei&&Qn&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},e.generateMap=function generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Gn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Gn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},e.generateString=function generateString(){var e=this;this.css="",this.map=new Gn({file:this.outputFile(),ignoreInvalidMapping:!0});var t,r,n=1,i=1,o="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(a,c,u){if(e.css+=a,c&&"end"!==u&&(s.generated.line=n,s.generated.column=i-1,c.source&&c.source.start?(s.source=e.sourcePath(c),s.original.line=c.source.start.line,s.original.column=c.source.start.column-1,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,e.map.addMapping(s))),(t=a.match(/\n/g))?(n+=t.length,r=a.lastIndexOf("\n"),i=a.length-r):i+=a.length,c&&"start"!==u){var l=c.parent||{raws:{}};("decl"===c.type||"atrule"===c.type&&!c.nodes)&&c===l.last&&!l.raws.semicolon||(c.source&&c.source.end?(s.source=e.sourcePath(c),s.original.line=c.source.end.line,s.original.column=c.source.end.column-1,s.generated.line=n,s.generated.column=i-2,e.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=i-1,e.map.addMapping(s)))}})},e.isAnnotation=function isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},e.isInline=function isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},e.isMap=function isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},e.isSourcesContent=function isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},e.outputFile=function outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},e.path=function path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?Hn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Hn(Yn(r,this.mapOpts.annotation)));var path=Jn(r,e);return this.memoizedPaths.set(e,path),path},e.previous=function previous(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;e.previousMaps.includes(r)||e.previousMaps.push(r)}});else{var t=new Kn(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},e.setSourcesContent=function setSourcesContent(){var e=this,t={};if(this.root)this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var i=e.usesFileUrls?e.toFileUrl(n):e.toUrl(e.path(n));e.map.setSourceContent(i,r.source.input.css)}}});else if(this.css){var r=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(r,this.css)}},e.sourcePath=function sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},e.toBase64=function toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},e.toFileUrl=function toFileUrl(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(Xn){var r=Xn(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")},e.toUrl=function toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===Zn&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r},MapGenerator2}(),ri=function(e){function Comment2(t){var r;return(r=e.call(this,t)||this).type="comment",r}return _inherits(Comment2,e),Comment2}(yn),ni=ri;ri.default=ri;var ii,oi,si,ai,ci=an.isClean,ui=an.my,li=wn,pi=ni;function cleanSource(e){return e.map(function(e){return e.nodes&&(e.nodes=cleanSource(e.nodes)),delete e.source,e})}function markDirtyUp(e){if(e[ci]=!1,e.proxyOf.nodes)for(var t,r=_create_for_of_iterator_helper_loose(e.proxyOf.nodes);!(t=r()).done;){markDirtyUp(t.value)}}var hi=function(e){function Container2(){return e.apply(this,arguments)||this}_inherits(Container2,e);var t=Container2.prototype;return t.append=function append(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),i=1;i=e&&(this.indexes[r]=t-1);return this.markDirty(),this},t.replaceValues=function replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(function(n){t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this},t.some=function some(e){return this.nodes.some(e)},t.walk=function walk(e){return this.each(function(t,r){var n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})},t.walkAtRules=function walkAtRules(e,t){return t?_instanceof(e,RegExp)?this.walk(function(r,n){if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk(function(r,n){if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("atrule"===e.type)return t(e,r)}))},t.walkComments=function walkComments(e){return this.walk(function(t,r){if("comment"===t.type)return e(t,r)})},t.walkDecls=function walkDecls(e,t){return t?_instanceof(e,RegExp)?this.walk(function(r,n){if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk(function(r,n){if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("decl"===e.type)return t(e,r)}))},t.walkRules=function walkRules(e,t){return t?_instanceof(e,RegExp)?this.walk(function(r,n){if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk(function(r,n){if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk(function(e,r){if("rule"===e.type)return t(e,r)}))},_create_class(Container2,[{key:"first",get:function get(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function get(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),Container2}(yn);hi.registerParse=function(e){ii=e},hi.registerRule=function(e){oi=e},hi.registerAtRule=function(e){si=e},hi.registerRoot=function(e){ai=e};var di=hi;hi.default=hi,hi.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,si.prototype):"rule"===e.type?Object.setPrototypeOf(e,oi.prototype):"decl"===e.type?Object.setPrototypeOf(e,li.prototype):"comment"===e.type?Object.setPrototypeOf(e,pi.prototype):"root"===e.type&&Object.setPrototypeOf(e,ai.prototype),e[ui]=!0,e.nodes&&e.nodes.forEach(function(e){hi.rebuild(e)})};var fi,gi,mi=function(e){function Document23(t){var r;return(r=e.call(this,_extends({type:"document"},t))||this).nodes||(r.nodes=[]),r}return _inherits(Document23,e),Document23.prototype.toResult=function toResult(e){return void 0===e&&(e={}),new fi(new gi,this,e).stringify()},Document23}(di);mi.registerLazyResult=function(e){fi=e},mi.registerProcessor=function(e){gi=e};var vi=mi;mi.default=mi;var _i=function(){function Warning2(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var n in t)this[n]=t[n]}return Warning2.prototype.toString=function toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},Warning2}(),yi=_i;_i.default=_i;var bi=yi,wi=function(){function Result2(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}var e=Result2.prototype;return e.toString=function toString(){return this.css},e.warn=function warn(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new bi(e,t);return this.messages.push(r),r},e.warnings=function warnings(){return this.messages.filter(function(e){return"warning"===e.type})},_create_class(Result2,[{key:"content",get:function get(){return this.css}}]),Result2}(),ki=wi;wi.default=wi;var Si="'".charCodeAt(0),Ci='"'.charCodeAt(0),Ii="\\".charCodeAt(0),xi="/".charCodeAt(0),Oi="\n".charCodeAt(0),Ei=" ".charCodeAt(0),Mi="\f".charCodeAt(0),Ri="\t".charCodeAt(0),Ai="\r".charCodeAt(0),Ti="[".charCodeAt(0),Pi="]".charCodeAt(0),Ni="(".charCodeAt(0),Di=")".charCodeAt(0),Li="{".charCodeAt(0),Fi="}".charCodeAt(0),Ui=";".charCodeAt(0),Bi="*".charCodeAt(0),$i=":".charCodeAt(0),zi="@".charCodeAt(0),ji=/[\t\n\f\r "#'()/;[\\\]{}]/g,qi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Wi=/.[\r\n"'(/\\]/,Vi=/[\da-f]/i,Gi=di,Hi=function(e){function AtRule2(t){var r;return(r=e.call(this,t)||this).type="atrule",r}_inherits(AtRule2,e);var t=AtRule2.prototype;return t.append=function append(){for(var t=arguments.length,r=new Array(t),n=0;n1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var o,s=_create_for_of_iterator_helper_loose(i);!(o=s()).done;){o.value.raws.before=r.raws.before}return i},t.removeChild=function removeChild(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},t.toResult=function toResult(e){return void 0===e&&(e={}),new Yi(new Zi,this,e).stringify()},Root2}(Xi);Ki.registerLazyResult=function(e){Yi=e},Ki.registerProcessor=function(e){Zi=e};var Qi=Ki;Ki.default=Ki,Xi.registerRoot(Ki);var eo={comma:function comma(e){return eo.split(e,[","],!0)},space:function space(e){return eo.split(e,[" ","\n","\t"])},split:function split(e,t,r){for(var n,i=[],o="",split=!1,s=0,a=!1,c="",u=!1,l=_create_for_of_iterator_helper_loose(e);!(n=l()).done;){var p=n.value;u?u=!1:"\\"===p?u=!0:a?p===c&&(a=!1):'"'===p||"'"===p?(a=!0,c=p):"("===p?s+=1:")"===p?s>0&&(s-=1):0===s&&t.includes(p)&&(split=!0),split?(""!==o&&i.push(o.trim()),o="",split=!1):o+=p}return(r||""!==o)&&i.push(o.trim()),i}},to=eo;eo.default=eo;var ro=di,no=to,io=function(e){function Rule2(t){var r;return(r=e.call(this,t)||this).type="rule",r.nodes||(r.nodes=[]),r}return _inherits(Rule2,e),_create_class(Rule2,[{key:"selectors",get:function get(){return no.comma(this.selector)},set:function set(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}]),Rule2}(ro),oo=io;io.default=io,ro.registerRule(io);var so=wn,ao=function tokenizer2(e,t){void 0===t&&(t={});var r,n,i,o,s,a,c,u,l,p,h=e.css.valueOf(),d=t.ignoreErrors,f=h.length,g=0,m=[],v=[];function unclosed(t){throw e.error("Unclosed "+t,g)}return{back:function back(e){v.push(e)},endOfFile:function endOfFile(){return 0===v.length&&g>=f},nextToken:function nextToken(e){if(v.length)return v.pop();if(!(g>=f)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(g)){case Oi:case Ei:case Ri:case Ai:case Mi:n=g;do{n+=1,r=h.charCodeAt(n)}while(r===Ei||r===Oi||r===Ri||r===Ai||r===Mi);p=["space",h.slice(g,n)],g=n-1;break;case Ti:case Pi:case Li:case Fi:case $i:case Ui:case Di:var _=String.fromCharCode(r);p=[_,_,g];break;case Ni:if(u=m.length?m.pop()[1]:"",l=h.charCodeAt(g+1),"url"===u&&l!==Si&&l!==Ci&&l!==Ei&&l!==Oi&&l!==Ri&&l!==Mi&&l!==Ai){n=g;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(d||t){n=g;break}unclosed("bracket")}for(c=n;h.charCodeAt(c-1)===Ii;)c-=1,a=!a}while(a);p=["brackets",h.slice(g,n+1),g,n],g=n}else n=h.indexOf(")",g+1),o=h.slice(g,n+1),-1===n||Wi.test(o)?p=["(","(",g]:(p=["brackets",o,g,n],g=n);break;case Si:case Ci:i=r===Si?"'":'"',n=g;do{if(a=!1,-1===(n=h.indexOf(i,n+1))){if(d||t){n=g+1;break}unclosed("string")}for(c=n;h.charCodeAt(c-1)===Ii;)c-=1,a=!a}while(a);p=["string",h.slice(g,n+1),g,n],g=n;break;case zi:ji.lastIndex=g+1,ji.test(h),n=0===ji.lastIndex?h.length-1:ji.lastIndex-2,p=["at-word",h.slice(g,n+1),g,n],g=n;break;case Ii:for(n=g,s=!0;h.charCodeAt(n+1)===Ii;)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&r!==xi&&r!==Ei&&r!==Oi&&r!==Ri&&r!==Ai&&r!==Mi&&(n+=1,Vi.test(h.charAt(n)))){for(;Vi.test(h.charAt(n+1));)n+=1;h.charCodeAt(n+1)===Ei&&(n+=1)}p=["word",h.slice(g,n+1),g,n],g=n;break;default:r===xi&&h.charCodeAt(g+1)===Bi?(0===(n=h.indexOf("*/",g+2)+1)&&(d||t?n=h.length:unclosed("comment")),p=["comment",h.slice(g,n+1),g,n],g=n):(qi.lastIndex=g+1,qi.test(h),n=0===qi.lastIndex?h.length-1:qi.lastIndex-2,p=["word",h.slice(g,n+1),g,n],m.push(p),g=n)}return g++,p}},position:function position(){return g}}},co=ni,uo=Ji,lo=Qi,po=oo,ho={empty:!0,space:!0};var fo=function(){function Parser2(e){this.input=e,this.root=new lo,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var e=Parser2.prototype;return e.atrule=function atrule(e){var t,r,n,i=new uo;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],c=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(r=a[n=a.length-1];r&&"space"===r[0];)r=a[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)},e.checkMissedSemicolon=function checkMissedSemicolon(e){var t=this.colon(e);if(!1!==t){for(var r,n=0,i=t-1;i>=0&&("space"===(r=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}},e.colon=function colon(e){for(var t,r,n,i,o=0,s=_create_for_of_iterator_helper_loose(e.entries());!(i=s()).done;){var a=i.value,c=a[0];if("("===(r=(t=a[1])[0])&&(o+=1),")"===r&&(o-=1),0===o&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return c}this.doubleColon(t)}n=t}return!1},e.comment=function comment(e){var t=new co;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}},e.createTokenizer=function createTokenizer(){this.tokenizer=ao(this.input)},e.decl=function decl(e,t){var r=new so;this.init(r,e[0][2]);var n,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||function findLastWithPosition(e){for(var t=e.length-1;t>=0;t--){var r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(n=e.shift())[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var c=e.length-1;c>=0;c--){if("!important"===(n=e[c])[1].toLowerCase()){r.important=!0;var u=this.stringFrom(e,c);" !important"!==(u=this.spacesFromEnd(e)+u)&&(r.raws.important=u);break}if("important"===n[1].toLowerCase()){for(var l=e.slice(0),p="",h=c;h>0;h--){var d=l[h][0];if(0===p.trim().indexOf("!")&&"space"!==d)break;p=l.pop()[1]+p}0===p.trim().indexOf("!")&&(r.important=!0,r.raws.important=p,e=l)}if("space"!==n[0]&&"comment"!==n[0])break}var f=e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});f&&(r.raws.between+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},e.doubleColon=function doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},e.emptyRule=function emptyRule(e){var t=new po;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},e.end=function end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},e.endFile=function endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},e.freeSemicolon=function freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},e.getPosition=function getPosition(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},e.init=function init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},e.other=function other(e){for(var t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],c=e;c;){if(r=c[0],a.push(c),"("===r||"["===r)i||(i=c),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=c),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,s);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&("space"===(c=a[a.length-1][0])||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)},e.parse=function parse(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},e.precheckMissedSemicolon=function precheckMissedSemicolon(){},e.raw=function raw(e,t,r,n){for(var i,o,s,a,c=r.length,u="",l=!0,p=0;p0},e.runAsync=function runAsync(){var e=this;return _async_to_generator(function(){var t,r,n,i,o,s,a,c,u,l,p,h;return _ts_generator(this,function(d){switch(d.label){case 0:e.plugin=0,t=0,d.label=1;case 1:if(!(t0))return[3,13];if(!isPromise(a=e.visitTick(s)))return[3,12];d.label=9;case 9:return d.trys.push([9,11,,12]),[4,a];case 10:return d.sent(),[3,12];case 11:throw c=d.sent(),u=s[s.length-1].node,e.handleError(c,u);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];l=function(){var t,r,n,i,s;return _ts_generator(this,function(a){switch(a.label){case 0:t=h.value,r=t[0],n=t[1],e.result.lastPlugin=r,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return n(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,n(o,e.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw s=a.sent(),e.handleError(s);case 7:return[2]}})},p=_create_for_of_iterator_helper_loose(e.listeners.OnceExit),d.label=15;case 15:return(h=p()).done?[3,18]:[5,_ts_values(l())];case 16:d.sent(),d.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},e.runOnRoot=function runOnRoot(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var r=this.result.root.nodes.map(function(r){return e.Once(r,t.helpers)});return isPromise(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}},e.stringify=function stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=ko;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new wo(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},e.sync=function sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=_create_for_of_iterator_helper_loose(this.plugins);!(e=t()).done;){var r=e.value;if(isPromise(this.runOnRoot(r)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var n=this.result.root;!n[yo];)n[yo]=!0,this.walkSync(n);if(this.listeners.OnceExit)if("document"===n.type)for(var i,o=_create_for_of_iterator_helper_loose(n.nodes);!(i=o()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}else this.visitSync(this.listeners.OnceExit,n)}return this.result},e.then=function then(e,t){return this.async().then(e,t)},e.toString=function toString(){return this.css},e.visitSync=function visitSync(e,t){for(var r,n=_create_for_of_iterator_helper_loose(e);!(r=n()).done;){var i=r.value,o=i[0],s=i[1];this.result.lastPlugin=o;var a=void 0;try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(isPromise(a))throw this.getAsyncError()}},e.visitTick=function visitTick(e){var t=e[e.length-1],r=t.node,n=t.visitors;if("root"===r.type||"document"===r.type||r.parent){if(n.length>0&&t.visitorIndext?(n&&(clearTimeout(n),n=null),i=c,e.apply(l,s)):n||!1===r.trailing||(n=setTimeout(function(){i=!1===r.leading?0:Date.now(),n=null,e.apply(l,s)},u))}}function hookSetter(e,t,r,n,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set:function set(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Es=new Proxy(Es,{get:function get(e,t,r){return"map"===t&&console.error(Os),Reflect.get(e,t,r)}}));var Ms=Date.now;function getWindowScroll(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=xs.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=xs.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function closestElementOfNode(e){return e?e.nodeType===e.ELEMENT_NODE?e:xs.parentElement(e):null}function isBlocked(e,t,r,n){if(!e)return!1;var i=closestElementOfNode(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(classMatchesRegex(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1}function isIgnored(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function isAncestorRemoved(e,t){if(isShadowRoot(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=xs.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||isAncestorRemoved(n,t))}function legacy_isTouchEvent(e){return Boolean(e.changedTouches)}function isSerializedIframe(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function isSerializedStylesheet(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function hasShadowRoot(e){return!!e&&(_instanceof(e,bs)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(xs.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ms=function(){return(new Date).getTime()});var Rs=function(){function StyleSheetMirror(){__publicField(this,"id",1),__publicField(this,"styleIDMap",new WeakMap),__publicField(this,"idStyleMap",new Map)}var e=StyleSheetMirror.prototype;return e.getId=function getId(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1},e.has=function has(e){return this.styleIDMap.has(e)},e.add=function 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},e.getStyle=function getStyle(e){return this.idStyleMap.get(e)||null},e.reset=function reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},e.generateId=function generateId(){return this.id++},StyleSheetMirror}();function getShadowHost(e){var t,r=null;return"getRootNode"in e&&(null==(t=xs.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&xs.host(xs.getRootNode(e))&&(r=xs.host(xs.getRootNode(e))),r}function shadowHostInDom(e){var t=e.ownerDocument;if(!t)return!1;var r=function getRootShadowHost(e){for(var t,r=e;t=getShadowHost(r);)r=t;return r}(e);return xs.contains(t,r)}function inDom(e){var t=e.ownerDocument;return!!t&&(xs.contains(t,e)||shadowHostInDom(e))}var As=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(As||{}),Ts=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(Ts||{}),Ps=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(Ps||{}),Ns=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(Ns||{}),Ds=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(Ds||{}),Ls=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Ls||{}),Fs=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Fs||{});function isNodeInLinkedList(e){return"__ln"in e}var Us,Bs=function(){function DoubleLinkedList(){__publicField(this,"length",0),__publicField(this,"head",null),__publicField(this,"tail",null)}var e=DoubleLinkedList.prototype;return e.get=function get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},e.handleMessage=function 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 n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}},e.transformCrossOriginEvent=function transformCrossOriginEvent(e,t){var r,n=this;switch(t.type){case As.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),{timestamp:t.timestamp,type:As.IncrementalSnapshot,data:{source:Ts.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case As.Meta:case As.Load:case As.DomContentLoaded:return!1;case As.Plugin:return t;case As.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case As.IncrementalSnapshot:switch(t.data.source){case Ts.Mutation:return t.data.adds.forEach(function(t){n.replaceIds(t,e,["parentId","nextId","previousId"]),n.replaceIdOnNode(t.node,e);var r=n.crossOriginIframeRootIdMap.get(e);r&&n.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(function(t){n.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){n.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){n.replaceIds(t,e,["id"])}),t;case Ts.Drag:case Ts.TouchMove:case Ts.MouseMove:return t.data.positions.forEach(function(t){n.replaceIds(t,e,["id"])}),t;case Ts.ViewportResize:return!1;case Ts.MediaInteraction:case Ts.MouseInteraction:case Ts.Scroll:case Ts.CanvasMutation:case Ts.Input:return this.replaceIds(t.data,e,["id"]),t;case Ts.StyleSheetRule:case Ts.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ts.Font:return t;case Ts.Selection:return t.data.ranges.forEach(function(t){n.replaceIds(t,e,["start","end"])}),t;case Ts.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(function(t){n.replaceStyleIds(t,e,["styleId"])}),t}}return!1},e.replace=function replace(e,t,r,n){for(var i,o=_create_for_of_iterator_helper_loose(n);!(i=o()).done;){var s=i.value;(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]))}return t},e.replaceIds=function replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)},e.replaceStyleIds=function replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)},e.replaceIdOnNode=function replaceIdOnNode(e,t){var r=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){r.replaceIdOnNode(e,t)})},e.patchRootIdOnNode=function patchRootIdOnNode(e,t){var r=this;e.type===Fs.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){r.patchRootIdOnNode(e,t)})},IframeManager}(),Gs=function(){function ShadowDomManager(e){__publicField(this,"shadowDoms",new WeakSet),__publicField(this,"mutationCb"),__publicField(this,"scrollCb"),__publicField(this,"bypassOptions"),__publicField(this,"mirror"),__publicField(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var e=ShadowDomManager.prototype;return e.init=function init(){this.reset(),this.patchAttachShadow(Element,document)},e.addShadowRoot=function addShadowRoot(e,t){var r=this;if(isNativeShadowDom(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=initMutationObserver(_extends({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(initScrollObserver(_extends({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(xs.host(e))),r.restoreHandlers.push(initAdoptedStyleSheetObserver({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0)}},e.observeAttachShadow=function observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},e.patchAttachShadow=function patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(patch(e.prototype,"attachShadow",function(e){return function(n){var i=e.call(this,n),o=xs.shadowRoot(this);return o&&inDom(this)&&r.addShadowRoot(o,t),i}}))},e.reset=function reset(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},ShadowDomManager}(),Hs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Js="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ys=0;Ys<64;Ys++)Js[Hs.charCodeAt(Ys)]=Ys;var Zs=new Map;var saveWebGLVar=function(e,t,r){if(e&&(isInstanceOfWebGLObject(e,t)||"object"===(void 0===e?"undefined":_type_of(e)))){var n=function variableListFor$1(e,t){var r=Zs.get(e);return r||(r=new Map,Zs.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),i=n.indexOf(e);return-1===i&&(i=n.length,n.push(e)),i}};function serializeArg(e,t,r){if(_instanceof(e,Array))return e.map(function(e){return serializeArg(e,t,r)});if(null===e)return e;if(_instanceof(e,Float32Array)||_instanceof(e,Float64Array)||_instanceof(e,Int32Array)||_instanceof(e,Uint32Array)||_instanceof(e,Uint8Array)||_instanceof(e,Uint16Array)||_instanceof(e,Int16Array)||_instanceof(e,Int8Array)||_instanceof(e,Uint8ClampedArray))return{rr_type:e.constructor.name,args:[Object.values(e)]};if(_instanceof(e,ArrayBuffer))return{rr_type:e.constructor.name,base64:function encode(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t>2],i+=Hs[(3&r[t])<<4|r[t+1]>>4],i+=Hs[(15&r[t+1])<<2|r[t+2]>>6],i+=Hs[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)};if(_instanceof(e,DataView))return{rr_type:e.constructor.name,args:[serializeArg(e.buffer,t,r),e.byteOffset,e.byteLength]};if(_instanceof(e,HTMLImageElement))return{rr_type:e.constructor.name,src:e.src};if(_instanceof(e,HTMLCanvasElement)){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return _instanceof(e,ImageData)?{rr_type:e.constructor.name,args:[serializeArg(e.data,t,r),e.width,e.height]}:isInstanceOfWebGLObject(e,t)||"object"===(void 0===e?"undefined":_type_of(e))?{rr_type:e.constructor.name,index:saveWebGLVar(e,t,r)}:e}var serializeArgs=function(e,t,r){return e.map(function(e){return serializeArg(e,t,r)})},isInstanceOfWebGLObject=function(e,t){var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(r.find(function(r){return _instanceof(e,t[r])}))};function initCanvasContextObserver(e,t,r,n){var i=[];try{var o=patch(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a0&&(i.styles=o),this.adoptedStyleSheetCb(i)}},e.reset=function reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},e.trackStylesheetInLinkElement=function trackStylesheetInLinkElement(e){},StylesheetManager}(),oa=function(){function ProcessedNodeManager(){__publicField(this,"nodeMap",new WeakMap),__publicField(this,"active",!1)}var e=ProcessedNodeManager.prototype;return e.inOtherBuffer=function inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some(function(e){return e!==t})},e.add=function add(e,t){var r=this;this.active||(this.active=!0,requestAnimationFrame(function(){r.nodeMap=new WeakMap,r.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))},e.destroy=function destroy(){},ProcessedNodeManager}(),sa=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var aa=document.createElement("iframe");document.body.appendChild(aa),Array.from=(null==(o=aa.contentWindow)?void 0:o.Array.from)||Array.from,document.body.removeChild(aa)}}catch(e){console.debug("Unable to override Array.from",e)}var ca,ua,la=function createMirror$2(){return new g}();function record(e){void 0===e&&(e={});var t=e.emit,r=e.checkoutEveryNms,n=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,s=e.blockSelector,a=void 0===s?null:s,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,l=e.ignoreSelector,p=void 0===l?null:l,h=e.maskTextClass,d=void 0===h?"rr-mask":h,f=e.maskTextSelector,m=void 0===f?null:f,v=e.inlineStylesheet,_=void 0===v||v,y=e.maskAllInputs,b=e.maskInputOptions,w=e.slimDOMOptions,k=e.maskInputFn,S=e.maskTextFn,C=e.hooks,I=e.packFn,x=e.sampling,O=void 0===x?{}:x,E=e.dataURLOptions,M=void 0===E?{}:E,R=e.mousemoveWait,A=e.recordDOM,T=void 0===A||A,P=e.recordCanvas,N=void 0!==P&&P,D=e.recordCrossOriginIframes,L=void 0!==D&&D,F=e.recordAfter,U=void 0===F?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":F,B=e.userTriggeredOnInput,$=void 0!==B&&B,z=e.collectFonts,j=void 0!==z&&z,q=e.inlineImages,W=void 0!==q&&q,V=e.plugins,G=e.keepIframeSrcFn,H=void 0===G?function(){return!1}:G,J=e.ignoreCSSAttributes,Y=void 0===J?new Set([]):J;!function registerErrorHandler(e){Us=e}(e.errorHandler);var Z=!L||window.parent===window,X=!1;if(!Z)try{window.parent.document&&(X=!1)}catch(e){X=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!X)return function(){};void 0!==R&&void 0===O.mousemove&&(O.mousemove=R),la.reset();var K,Q=!0===y?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:void 0!==b?b:{password:!0},ee=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w,headTitleMutations:"all"===w}:w||{};!function polyfill$1(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var te=0,eventProcessor=function(e){for(var t,r=_create_for_of_iterator_helper_loose(V||[]);!(t=r()).done;){var n=t.value;n.eventProcessor&&(e=n.eventProcessor(e))}return I&&!X&&(e=I(e)),e};ea=function(e,i){var o,s=e;if(s.timestamp=Ms(),!(null==(o=zs[0])?void 0:o.isFrozen())||s.type===As.FullSnapshot||s.type===As.IncrementalSnapshot&&s.data.source===Ts.Mutation||zs.forEach(function(e){return e.unfreeze()}),Z)null==t||t(eventProcessor(s),i);else if(X){var a={type:"rrweb",event:eventProcessor(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(s.type===As.FullSnapshot)K=s,te=0;else if(s.type===As.IncrementalSnapshot){if(s.data.source===Ts.Mutation&&s.data.isAttachIframe)return;te++;var c=n&&te>=n,u=r&&s.timestamp-K.timestamp>r;(c||u)&&ta(!0)}};for(var re,wrappedMutationEmit=function(e){ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.Mutation},e)})},wrappedScrollEmit=function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.Scroll},e)})},wrappedCanvasMutationEmit=function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.CanvasMutation},e)})},ne=new ia({mutationCb:wrappedMutationEmit,adoptedStyleSheetCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.AdoptedStyleSheet},e)})}}),ie=new Vs({mirror:la,mutationCb:wrappedMutationEmit,stylesheetManager:ne,recordCrossOriginIframes:L,wrappedEmit:ea}),oe=_create_for_of_iterator_helper_loose(V||[]);!(re=oe()).done;){var se=re.value;se.getMirror&&se.getMirror({nodeMirror:la,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror})}var ae=new oa;ra=new na({recordCanvas:N,mutationCb:wrappedCanvasMutationEmit,win:window,blockClass:o,blockSelector:a,mirror:la,sampling:O.canvas,dataURLOptions:M});var ce=new Gs({mutationCb:wrappedMutationEmit,scrollCb:wrappedScrollEmit,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:m,inlineStylesheet:_,maskInputOptions:Q,dataURLOptions:M,maskTextFn:S,maskInputFn:k,recordCanvas:N,inlineImages:W,sampling:O,slimDOMOptions:ee,iframeManager:ie,stylesheetManager:ne,canvasManager:ra,keepIframeSrcFn:H,processedNodeManager:ae},mirror:la});ta=function(e){if(void 0===e&&(e=!1),T){ea({type:As.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}},e),ne.reset(),ce.init(),zs.forEach(function(e){return e.lock()});var t=function snapshot(e,t){var r=t||{},n=r.mirror,i=void 0===n?new g:n,o=r.blockClass,s=void 0===o?"rr-block":o,a=r.blockSelector,c=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,p=r.maskTextSelector,h=void 0===p?null:p,d=r.inlineStylesheet,f=void 0===d||d,m=r.inlineImages,v=void 0!==m&&m,_=r.recordCanvas,y=void 0!==_&&_,b=r.maskAllInputs,w=void 0!==b&&b,k=r.maskTextFn,S=r.maskInputFn,C=r.slimDOM,I=void 0!==C&&C,x=r.dataURLOptions,O=r.preserveWhiteSpace,E=r.onSerialize,M=r.onIframeLoad,R=r.iframeLoadTimeout,A=r.onStylesheetLoad,T=r.stylesheetLoadTimeout,P=r.keepIframeSrcFn;return serializeNodeWithId(e,{doc:e,mirror:i,blockClass:s,blockSelector:c,maskTextClass:l,maskTextSelector:h,skipChild:!1,inlineStylesheet:f,maskInputOptions:!0===w?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:!1===w?{password:!0}:w,maskTextFn:k,maskInputFn:S,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:x,inlineImages:v,recordCanvas:y,preserveWhiteSpace:O,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:void 0===P?function(){return!1}:P,newlyAddedElement:!1})}(document,{mirror:la,blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:m,inlineStylesheet:_,maskAllInputs:Q,maskTextFn:S,maskInputFn:k,slimDOM:ee,dataURLOptions:M,recordCanvas:N,inlineImages:W,onSerialize:function(e){isSerializedIframe(e,la)&&ie.addIframe(e),isSerializedStylesheet(e,la)&&ne.trackLinkElement(e),hasShadowRoot(e)&&ce.addShadowRoot(xs.shadowRoot(e),document)},onIframeLoad:function(e,t){ie.attachIframe(e,t),ce.observeAttachShadow(e)},onStylesheetLoad:function(e,t){ne.attachLinkElement(e,t)},keepIframeSrcFn:H});if(!t)return console.warn("Failed to snapshot the document");ea({type:As.FullSnapshot,data:{node:t,initialOffset:getWindowScroll(window)}},e),zs.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ne.adoptStyleSheets(document.adoptedStyleSheets,la.getId(document))}};try{var ue=[],observe=function(e){var t;return callbackWrapper(initObservers)({mutationCb:wrappedMutationEmit,mousemoveCb:function(e,t){return ea({type:As.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.MouseInteraction},e)})},scrollCb:wrappedScrollEmit,viewportResizeCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.ViewportResize},e)})},inputCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.Input},e)})},mediaInteractionCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.MediaInteraction},e)})},styleSheetRuleCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.StyleSheetRule},e)})},styleDeclarationCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.StyleDeclaration},e)})},canvasMutationCb:wrappedCanvasMutationEmit,fontCb:function(e){return ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.Font},e)})},selectionCb:function(e){ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.Selection},e)})},customElementCb:function(e){ea({type:As.IncrementalSnapshot,data:_extends({source:Ts.CustomElement},e)})},blockClass:o,ignoreClass:u,ignoreSelector:p,maskTextClass:d,maskTextSelector:m,maskInputOptions:Q,inlineStylesheet:_,sampling:O,recordDOM:T,recordCanvas:N,inlineImages:W,userTriggeredOnInput:$,collectFonts:j,doc:e,maskInputFn:k,maskTextFn:S,keepIframeSrcFn:H,blockSelector:a,slimDOMOptions:ee,dataURLOptions:M,mirror:la,iframeManager:ie,stylesheetManager:ne,shadowDomManager:ce,processedNodeManager:ae,canvasManager:ra,ignoreCSSAttributes:Y,plugins:(null==(t=null==V?void 0:V.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return ea({type:As.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},C)};ie.addLoadListener(function(e){try{ue.push(observe(e.contentDocument))}catch(e){console.warn(e)}});var init=function(){ta(),ue.push(observe(document)),sa=!0};return"interactive"===document.readyState||"complete"===document.readyState?init():(ue.push(on("DOMContentLoaded",function(){ea({type:As.DomContentLoaded,data:{}}),"DOMContentLoaded"===U&&init()})),ue.push(on("load",function(){ea({type:As.Load,data:{}}),"load"===U&&init()},window))),function(){ue.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),ae.destroy(),sa=!1,function unregisterErrorHandler(){Us=void 0}()}}catch(e){console.warn(e)}}record.addCustomEvent=function(e,t){if(!sa)throw new Error("please add custom event after start recording");ea({type:As.Custom,data:{tag:e,payload:t}})},record.freezePage=function(){zs.forEach(function(e){return e.freeze()})},record.takeFullSnapshot=function(e){if(!sa)throw new Error("please take full snapshot after start recording");ta(e)},record.mirror=la,(ua=ca||(ca={}))[ua.NotStarted=0]="NotStarted",ua[ua.Running=1]="Running",ua[ua.Stopped=2]="Stopped",record.addCustomEvent,record.freezePage,record.takeFullSnapshot;var pa,ha,da,fa=n.setImmediate,ga=Object.prototype.toString,ma=void 0!==fa?function timer(e){return fa(e)}:setTimeout;try{Object.defineProperty({},"x",{}),pa=function builtInProp(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(e){pa=function builtInProp(e,t,r){return e[t]=r,e}}function schedule(e,t){da.add(e,t),ha||(ha=ma(da.drain))}function isThenable(e){var t,r=typeof e;return null===e||"object"!==r&&"function"!==r||(t=e.then),"function"==typeof t&&t}function notify(){for(var e=0;e0&&schedule(notify,r))}catch(e){reject.call(new MakeDefWrapper(r),e)}}}function reject(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&schedule(notify,t))}function iteratePromises(e,t,r,n){for(var i=0;i0&&(t[r]=e)}),t},Za.truncate=function(e,t){var r;return"string"==typeof e?r=e.slice(0,t):Za.isArray(e)?(r=[],Za.each(e,function(e){r.push(Za.truncate(e,t))})):Za.isObject(e)?(r={},Za.each(e,function(e,n){r[n]=Za.truncate(e,t)})):r=e,r},Za.JSONEncode=function(e){var quote=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},str=function(e,t){var r="",n=0,i="",o="",s=0,a=r,c=[],u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(r+=" ",c=[],"[object Array]"===La.apply(u)){for(s=u.length,n=0;n="0"&&ba<="9";)t+=ba,Ia();if("."===ba)for(t+=".";Ia()&&ba>="0"&&ba<="9";)t+=ba;if("e"===ba||"E"===ba)for(t+=ba,Ia(),"-"!==ba&&"+"!==ba||(t+=ba,Ia());ba>="0"&&ba<="9";)t+=ba,Ia();if(e=+t,isFinite(e))return e;Ca("Bad number")},Oa=function(){var e,t,r,n="";if('"'===ba)for(;Ia();){if('"'===ba)return Ia(),n;if("\\"===ba)if(Ia(),"u"===ba){for(r=0,t=0;t<4&&(e=parseInt(Ia(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof Sa[ba])break;n+=Sa[ba]}else n+=ba}Ca("Bad string")},Ea=function(){for(;ba&&ba<=" ";)Ia()},ka=function(){switch(Ea(),ba){case"{":return function(){var e,t={};if("{"===ba){if(Ia("{"),Ea(),"}"===ba)return Ia("}"),t;for(;ba;){if(e=Oa(),Ea(),Ia(":"),Object.hasOwnProperty.call(t,e)&&Ca('Duplicate key "'+e+'"'),t[e]=ka(),Ea(),"}"===ba)return Ia("}"),t;Ia(","),Ea()}}Ca("Bad object")}();case"[":return function(){var e=[];if("["===ba){if(Ia("["),Ea(),"]"===ba)return Ia("]"),e;for(;ba;){if(e.push(ka()),Ea(),"]"===ba)return Ia("]"),e;Ia(","),Ea()}}Ca("Bad array")}();case'"':return Oa();case"-":return xa();default:return ba>="0"&&ba<="9"?xa():function(){switch(ba){case"t":return Ia("t"),Ia("r"),Ia("u"),Ia("e"),!0;case"f":return Ia("f"),Ia("a"),Ia("l"),Ia("s"),Ia("e"),!1;case"n":return Ia("n"),Ia("u"),Ia("l"),Ia("l"),null}Ca('Unexpected "'+ba+'"')}()}},function(e){var t;return wa=e,ya=0,ba=" ",t=ka(),Ea(),ba&&Ca("Syntax error"),t}),Za.base64Encode=function(e){var t,r,n,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,u="",l=[];if(!e)return e;e=Za.utf8Encode(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,r=o>>12&63,n=o>>6&63,i=63&o,l[c++]=s.charAt(t)+s.charAt(r)+s.charAt(n)+s.charAt(i)}while(a127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(r>t&&(o+=e.substring(t,r)),o+=a,t=r=i+1)}return r>t&&(o+=e.substring(t,e.length)),o},Za.UUID=function(){try{return n.crypto.randomUUID()}catch(r){for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",Za.map(e,function(e){return e.toString(16)}).join("")}};var Ka=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];Za.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function getElementsBySelector(e){if(!$a.getElementsByTagName)return[];var t,r,n,i,o,s,a,c,u,l,p=e.split(" "),h=[$a];for(s=0;s-1){n=(r=t.split("#"))[0];var d=r[1],f=$a.getElementById(d);if(!f||n&&f.nodeName.toLowerCase()!=n)return[];h=[f]}else if(t.indexOf(".")>-1){n=(r=t.split("."))[0];var g=r[1];for(n||(n="*"),i=[],o=0,a=0;a-1};break;default:v=function(e){return e.getAttribute(_)}}for(h=[],l=0,a=0;a=3?t[2]:""},currentUrl:function(){return n.location.href},properties:function(e){return"object"!=typeof e&&(e={}),Za.extend(Za.strip_empty_properties({$os:Za.info.os(),$browser:Za.info.browser(qa,Ba.vendor,za),$referrer:$a.referrer,$referring_domain:Za.info.referringDomain($a.referrer),$device:Za.info.device(qa)}),{$current_url:Za.info.currentUrl(),$browser_version:Za.info.browserVersion(qa,Ba.vendor,za),$screen_height:ja.height,$screen_width:ja.width,mp_lib:"web",$lib_version:Ma.LIB_VERSION,$insert_id:cheap_guid(),time:Za.timestamp()/1e3},Za.strip_empty_properties(e))},people_properties:function(){return Za.extend(Za.strip_empty_properties({$os:Za.info.os(),$browser:Za.info.browser(qa,Ba.vendor,za)}),{$browser_version:Za.info.browserVersion(qa,Ba.vendor,za)})},mpPageViewProperties:function(){return Za.strip_empty_properties({current_page_title:$a.title,current_domain:n.location.hostname,current_url_path:n.location.pathname,current_url_protocol:n.location.protocol,current_url_search:n.location.search})}};var cheap_guid=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},ic=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,oc=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,extract_domain=function(e){var t=oc,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=ic);var i=e.match(t);return i?i[0]:""},NOOP_FUNC=function(){},sc=null,ac=null;"undefined"!=typeof JSON&&(sc=JSON.stringify,ac=JSON.parse),sc=sc||Za.JSONEncode,ac=ac||Za.JSONDecode,Za.info=Za.info,Za.info.browser=Za.info.browser,Za.info.browserVersion=Za.info.browserVersion,Za.info.device=Za.info.device,Za.info.properties=Za.info.properties,Za.isBlockedUA=Za.isBlockedUA,Za.isEmptyObject=Za.isEmptyObject,Za.isObject=Za.isObject,Za.JSONDecode=Za.JSONDecode,Za.JSONEncode=Za.JSONEncode,Za.toArray=Za.toArray,Za.NPO=NpoPromise;var cc="mixpanelRecordingEvents",uc="mixpanelRecordingRegistry",lc=[cc,uc],IDBStorageWrapper=function(e){this.dbPromise=null,this.storeName=e};IDBStorageWrapper.prototype._openDb=function(){return new va(function(e,t){var r=n.indexedDB.open("mixpanelBrowserDb",1);r.onerror=function(){t(r.error)},r.onsuccess=function(){e(r.result)},r.onupgradeneeded=function(e){var t=e.target.result;lc.forEach(function(e){t.createObjectStore(e)})}})},IDBStorageWrapper.prototype.init=function(){return n.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof n.IDBDatabase?va.resolve():va.reject(e)})):va.reject("indexedDB is not supported in this browser")},IDBStorageWrapper.prototype.isInitialized=function(){return!!this.dbPromise},IDBStorageWrapper.prototype.makeTransaction=function(e,t){var r=this.storeName,doTransaction=function(n){return new va(function(i,o){var s=n.transaction(r,e);s.oncomplete=function(){i(s)},s.onabort=s.onerror=function(){o(s.error)},t(s.objectStore(r))})};return this.dbPromise.then(doTransaction).catch(function(e){return e&&"InvalidStateError"===e.name?(this.dbPromise=this._openDb(),this.dbPromise.then(doTransaction)):va.reject(e)}.bind(this))},IDBStorageWrapper.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(r){r.put(t,e)})},IDBStorageWrapper.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(r){t=r.get(e)}).then(function(){return t.result})},IDBStorageWrapper.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},IDBStorageWrapper.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};function optIn(e,t){_optInOut(!0,e,t)}function optOut(e,t){_optInOut(!1,e,t)}function hasOptedIn(e,t){return"1"===_getStorageValue(e,t)}function hasOptedOut(e,t){if(function _hasDoNotTrackFlagOn(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||n,r=t.navigator||{},i=!1;return Za.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(e){Za.includes([!0,1,"1","yes"],e)&&(i=!0)}),i}(t))return Xa.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===_getStorageValue(e,t);return r&&Xa.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function addOptOutCheckMixpanelLib(e){return _addOptOutCheck(e,function(e){return this.get_config(e)})}function addOptOutCheckMixpanelPeople(e){return _addOptOutCheck(e,function(e){return this._get_config(e)})}function addOptOutCheckMixpanelGroup(e){return _addOptOutCheck(e,function(e){return this._get_config(e)})}function clearOptInOut(e,t){_getStorage(t=t||{}).remove(_getStorageKey(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function _getStorage(e){return"localStorage"===(e=e||{}).persistenceType?Za.localStorage:Za.cookie}function _getStorageKey(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function _getStorageValue(e,t){return _getStorage(t).get(_getStorageKey(e,t))}function _optInOut(e,t,r){Za.isString(t)&&t.length?(_getStorage(r=r||{}).set(_getStorageKey(t,r),e?1:0,Za.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})):Xa.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function _addOptOutCheck(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");n&&(r=hasOptedOut(n,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:a}))}catch(e){Xa.error("Unexpected error when checking tracking opt-out status: "+e)}if(!r)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var pc=console_with_prefix("lock"),SharedLock=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||n.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||va};SharedLock.prototype.withLock=function(e,t){return new(0,this.promiseImpl)(Za.bind(function(r,n){var i=t||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),s=this.storageKey,a=this.pollIntervalMS,c=this.timeoutMS,u=this.storage,l=s+":X",p=s+":Y",h=s+":Z",delay=function(e){if((new Date).getTime()-o>c)return pc.error("Timeout waiting for mutex on "+s+"; clearing lock. ["+i+"]"),u.removeItem(h),u.removeItem(p),void loop();setTimeout(function(){try{e()}catch(e){n(e)}},a*(Math.random()+.1))},waitFor=function(e,t){e()?t():delay(function(){waitFor(e,t)})},getSetY=function(){var e=u.getItem(p);return(!e||e===i)&&(u.setItem(p,i),u.getItem(p)===i||(localStorageSupported(u,!0)||n(new Error("localStorage support dropped while acquiring lock")),!1))},loop=function(){u.setItem(l,i),waitFor(getSetY,function(){u.getItem(l)!==i?delay(function(){u.getItem(p)===i?waitFor(function(){return!u.getItem(h)},criticalSection):loop()}):criticalSection()})},criticalSection=function(){u.setItem(h,"1");var removeLock=function(){u.removeItem(h),u.getItem(p)===i&&u.removeItem(p),u.getItem(l)===i&&u.removeItem(l)};e().then(function(e){removeLock(),r(e)}).catch(function(e){removeLock(),n(e)})};try{if(!localStorageSupported(u,!0))throw new Error("localStorage support check failed");loop()}catch(e){n(e)}},this))};var LocalStorageWrapper=function(e){this.storage=e||n.localStorage};LocalStorageWrapper.prototype.init=function(){return va.resolve()},LocalStorageWrapper.prototype.isInitialized=function(){return!0},LocalStorageWrapper.prototype.setItem=function(e,t){return new va(Za.bind(function(r,n){try{this.storage.setItem(e,sc(t))}catch(e){n(e)}r()},this))},LocalStorageWrapper.prototype.getItem=function(e){return new va(Za.bind(function(t,r){var n;try{n=ac(this.storage.getItem(e))}catch(e){r(e)}t(n)},this))},LocalStorageWrapper.prototype.removeItem=function(e){return new va(Za.bind(function(t,r){try{this.storage.removeItem(e)}catch(e){r(e)}t()},this))};var hc=console_with_prefix("batch"),RequestQueue=function(e,t){var r,i,o,s;t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new LocalStorageWrapper,this.lock=new SharedLock(e,{storage:t.sharedLockStorage||n.localStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||Za.bind(hc.error,hc),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=(r=Za.bind(this._enqueuePersisted,this),i=t.enqueueThrottleMs,o=null,s=[],function(e){var t=this;return s.push(e),o||(o=new va(function(e){setTimeout(function(){var n=r.apply(t,[s]);o=null,s=[],e(n)},i)})),o}):this.enqueuePersisted=Za.bind(function(e){return this._enqueuePersisted([e])},this)};RequestQueue.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?va.resolve():this.queueStorage.init().then(Za.bind(function(){this.initialized=!0},this)).catch(Za.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},RequestQueue.prototype.enqueue=function(e,t){var r={id:cheap_guid(),flushAfter:(new Date).getTime()+2*t,payload:e};return this.usePersistence?this.enqueuePersisted(r):(this.memQueue.push(r),va.resolve(!0))},RequestQueue.prototype._enqueuePersisted=function(e){var t=Za.bind(function(){return this.ensureInit().then(Za.bind(function(){return this.readFromStorage()},this)).then(Za.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then(Za.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch(Za.bind(function(t){return this.reportError("Error enqueueing items",t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(Za.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this))},RequestQueue.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.lengtho.flushAfter&&!n[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}return t},this)):va.resolve(t)};var filterOutIDsAndInvalid=function(e,t){var r=[];return Za.each(e,function(e){e.id&&!t[e.id]&&r.push(e)}),r};RequestQueue.prototype.removeItemsByID=function(e){var t={};if(Za.each(e,function(e){t[e]=!0}),this.memQueue=filterOutIDsAndInvalid(this.memQueue,t),this.usePersistence){var r=Za.bind(function(){return this.ensureInit().then(Za.bind(function(){return this.readFromStorage()},this)).then(Za.bind(function(e){return e=filterOutIDsAndInvalid(e,t),this.saveToStorage(e)},this)).then(Za.bind(function(){return this.readFromStorage()},this)).then(Za.bind(function(e){for(var r=0;r5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[n]}),r=!1):this.reportError("[dupe] found item with no ID",{item:e}),r&&a.push(t)}c[e.id]=t},this),a.length<1)return this.requestInProgress=!1,this.resetFlush(),va.resolve();var u=Za.bind(function(){return this.queue.removeItemsByID(Za.map(o,function(e){return e.id})).then(Za.bind(function(e){return Za.each(o,Za.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:o.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!s?(this.resetFlush(),va.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),va.resolve())},this))},this),l=Za.bind(function(s){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(c);if(Za.isObject(s)&&"timeout"===s.error&&(new Date).getTime()-r>=t)return this.reportError("Network timeout; retrying"),this.flush();if(Za.isObject(s)&&(s.httpStatusCode>=500||429===s.httpStatusCode||s.httpStatusCode<=0&&(p=n.navigator.onLine,!Za.isUndefined(p)&&!p)||"timeout"===s.error)){var a=2*this.flushInterval;return s.retryAfter&&(a=1e3*parseInt(s.retryAfter,10)||a),a=Math.min(6e5,a),this.reportError("Error; retry in "+a+" ms"),this.scheduleFlush(a),va.resolve()}if(Za.isObject(s)&&413===s.httpStatusCode){if(o.length>1){var l=Math.max(1,Math.floor(i/2));return this.batchSize=Math.min(this.batchSize,l,o.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),va.resolve()}return this.reportError("Single-event request too large; dropping",o),this.resetBatchSize(),u()}return u()}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}var p},this),p={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(p.transport="sendBeacon"),dc.log("MIXPANEL REQUEST:",a),this.sendRequestPromise(a,p).then(l)},this)).catch(Za.bind(function(e){this.reportError("Error flushing request queue",e),this.resetFlush()},this))},RequestBatcher.prototype.reportError=function(e,t){if(dc.error.apply(dc.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){dc.error(t)}};var isRecordingExpired=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},fc=console_with_prefix("recorder"),gc=n.CompressionStream,mc={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},vc=new Set([Ts.MouseMove,Ts.MouseInteraction,Ts.Scroll,Ts.ViewportResize,Ts.Input,Ts.TouchMove,Ts.MediaInteraction,Ts.Drag,Ts.Selection]);var SessionRecording=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||NOOP_FUNC,this._onMaxLengthReached=e.onMaxLengthReached||NOOP_FUNC,this._onBatchSent=e.onBatchSent||NOOP_FUNC,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=Ra,this.recordMinMs=0;var t=localStorageSupported(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new IDBStorageWrapper(cc),this.batcher=new RequestBatcher(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:mc,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:250,sharedLockTimeoutMS:1e4})};SessionRecording.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var r=this._mixpanel.get_property("$user_id");return r&&(e.$user_id=r),e},SessionRecording.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))},SessionRecording.prototype.getConfig=function(e){return this._mixpanel.get_config(e)},SessionRecording.prototype.get_config=function(e){return this.getConfig(e)},SessionRecording.prototype.startRecording=function(e){if(null!==this._rrwebRecord)if(null===this._stopRecording){this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>Ra&&(this.recordMaxMs=Ra,fc.critical("record_max_ms cannot be greater than "+Ra+"ms. Capping value.")),this.maxExpires||(this.maxExpires=(new Date).getTime()+this.recordMaxMs),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>Aa&&(this.recordMinMs=Aa,fc.critical("record_min_ms cannot be greater than 8000ms. Capping value.")),this.replayStartTime||(this.replayStartTime=(new Date).getTime(),this.batchStartUrl=Za.info.currentUrl(),this.replayStartUrl=Za.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=(new Date).getTime()+e}.bind(this);t();var r=this.getConfig("record_block_selector");""!==r&&null!==r||(r=void 0);try{this._stopRecording=this._rrwebRecord({emit:function(e){this.idleExpires&&this.idleExpires=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e))}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15}})}catch(e){this.reportError("Unexpected error when starting rrweb recording.",e)}if("function"!=typeof this._stopRecording)return this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,void this.stopRecording();var n=this.maxExpires-(new Date).getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),n)}else fc.log("Recording already in progress, skipping startRecording.");else this.reportError("rrweb record function not provided. ")},SessionRecording.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError("Error with rrweb stopRecording",e)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},SessionRecording.prototype.isRrwebStopped=function(){return null===this._stopRecording},SessionRecording.prototype.flushEventsWithOptOut=function(e,t,r){var n=function(e){0===e&&(this.stopRecording(),r({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(e,t,r,n)},SessionRecording.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(t){this.reportError("Error getting tab ID for serialization ",t),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},SessionRecording.deserialize=function(e,t){return new SessionRecording(Za.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},SessionRecording.prototype._sendRequest=function(e,t,r,i){var o=function(t,r){200===t.status&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=Za.info.currentUrl()),this._onBatchSent(),i({status:0,httpStatusCode:t.status,responseBody:r,retryAfter:t.headers.get("Retry-After")})}.bind(this),s=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");n.fetch(s+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:r}).then(function(e){e.json().then(function(t){o(e,t)}).catch(function(e){i({error:e})})}).catch(function(e){i({error:e,httpStatusCode:0})})},SessionRecording.prototype._flushEvents=addOptOutCheckMixpanelLib(function(e,t,r){var n=e.length;if(n>0){for(var i=this.replayId,o=1/0,s=-1/0,a=!1,c=0;c=o)return this.clicks=[],!0}else this.clicks=[{x:e,y:t,timestamp:s}];return!1},ShadowDOMObserver.prototype.getEventTarget=function(e){if(this.observedShadowRoots){var t=this.getComposedPath(e);return t&&t.length?t[0]:e.target||e.srcElement}},ShadowDOMObserver.prototype.getComposedPath=function(e){return"composedPath"in e?e.composedPath():[]},ShadowDOMObserver.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=this.getComposedPath(e),r=0;r=t?this.hasChangesAfter(s.timestamp)||i.push(s):this.pendingClicks.push(s)}return i},DeadClickTracker.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},DeadClickTracker.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},DeadClickTracker.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},DeadClickTracker.prototype.processRecursively=function(e){if(this.isTracking&&this.onDeadClickCallback){var t=e.timeout_ms,r=this;this.processingTimeout=setTimeout(function(){if(r.processingActive){for(var t=r.getDeadClicks(e),n=0;n0?r.processRecursively(e):r.processingActive=!1}},t)}else this.processingActive=!1},DeadClickTracker.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;Bc.forEach(function(t){var handler=function(){e.recordChangeEvent()};document.addEventListener(t,handler,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler,options:{capture:!0,passive:!0}})}),zc.forEach(function(t){var handler=function(){e.recordChangeEvent()};window.addEventListener(t,handler),e.eventListeners.push({target:window,event:t,handler})}),$c.forEach(function(t){var handler=function(){e.recordChangeEvent()};window.addEventListener(t,handler,{passive:!0}),e.eventListeners.push({target:window,event:t,handler,options:{passive:!0}})});var selectionHandler=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",selectionHandler),e.eventListeners.push({target:document,event:"selectionchange",handler:selectionHandler}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,jc)}catch(e){Uc.critical("Error while setting up mutation observer",e)}if(window.customElements)try{this.shadowDOMObserver=new ShadowDOMObserver(function(){e.recordChangeEvent()},jc),this.shadowDOMObserver.start()}catch(e){Uc.critical("Error while setting up shadow DOM observer",e),this.shadowDOMObserver=null}}},DeadClickTracker.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;ethis.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=$a.body.scrollHeight}}.bind(this));this.listenerScrollDepth=e.listener,n.addEventListener(e.eventType,this.listenerScrollDepth)}},Autocapture.prototype.initClickTracking=function(){n.removeEventListener(bc,this.listenerClick),(this.getConfig(tu)||this.mp.get_config("record_heatmap_data"))&&(Uc.log("Initializing click tracking"),this.listenerClick=function(e){(this.getConfig(tu)||this.mp.is_recording_heatmap_data())&&this.trackDomEvent(e,pu)}.bind(this),n.addEventListener(bc,this.listenerClick))},Autocapture.prototype.initDeadClickTracking=function(){this._getClickTrackingConfig(ru)||this.mp.get_config("record_heatmap_data")?(Uc.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new DeadClickTracker(function(e){this.trackDomEvent(e,hu)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(ru);if((t||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var r=t||{};r.timeout_ms||(r.timeout_ms=500),this._deadClickTracker.trackClick(e,r)}}.bind(this),n.addEventListener(bc,this.listenerDeadClick))):this.stopDeadClickTracking()},Autocapture.prototype.initInputTracking=function(){n.removeEventListener(yc,this.listenerChange),this.getConfig(nu)&&(Uc.log("Initializing input tracking"),this.listenerChange=function(e){this.getConfig(nu)&&this.trackDomEvent(e,"$mp_input_change")}.bind(this),n.addEventListener(yc,this.listenerChange))},Autocapture.prototype.initPageviewTracking=function(){if(n.removeEventListener(Sc,this.listenerLocationchange),this.pageviewTrackingConfig()){Uc.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(lu)),t&&(e=Za.info.currentUrl()),this.listenerLocationchange=safewrap(function(){if(!this.currentUrlBlocked()){var t=Za.info.currentUrl(),r=!1,n=t.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],i=this.pageviewTrackingConfig();if(i===Wc?r=t!==e:"url-with-path-and-query-string"===i?r=t.split("#")[0]!==e.split("#")[0]:"url-with-path"===i&&(r=n),r)this.mp.track_pageview(lu)&&(e=t),n&&(this.lastScrollCheckpoint=0,Uc.log("Path change: re-initializing scroll depth checkpoints"))}}.bind(this)),n.addEventListener(Sc,this.listenerLocationchange)}},Autocapture.prototype.initRageClickTracking=function(){n.removeEventListener(bc,this.listenerRageClick),(this._getClickTrackingConfig(ou)||this.mp.get_config("record_heatmap_data"))&&(Uc.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new RageClickTracker),this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(ou);(t||this.mp.is_recording_heatmap_data())&&(this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e.pageX,e.pageY,t)&&this.trackDomEvent(e,du))}.bind(this),n.addEventListener(bc,this.listenerRageClick))},Autocapture.prototype.initScrollTracking=function(){if(n.removeEventListener(Ic,this.listenerScroll),n.removeEventListener(xc,this.listenerScroll),this.getConfig(su)){Uc.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=getPolyfillScrollEndFunction(function(){if(this.getConfig(su)&&!this.currentUrlBlocked()){var e=this.getConfig(Qc),t=(this.getConfig(eu)||[]).slice().sort(function(e,t){return e-t}),r=n.scrollY,i=Za.extend({$scroll_top:r},lu);try{var o=$a.body.scrollHeight,s=Math.round(r/(o-n.innerHeight)*100);if(i.$scroll_height=o,i.$scroll_percentage=s,s>this.lastScrollCheckpoint)for(var a=0;a=c&&this.lastScrollCheckpoint=0;l--)c=this._mixpanel.persistence.load_queue(ku),u=c.pop(),a._mixpanel.persistence.save(),Za.isEmptyObject(u)||a.append(u,append_callback);var p=this._mixpanel.persistence.load_queue(Cu);if(!Za.isUndefined(p)&&Za.isArray(p)&&p.length)for(var h,remove_callback=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(Cu,h),Za.isUndefined(s)||s(e,t)},d=p.length-1;d>=0;d--)p=this._mixpanel.persistence.load_queue(Cu),h=p.pop(),a._mixpanel.persistence.save(),Za.isEmptyObject(h)||a.remove(h,remove_callback)},MixpanelPeople.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},MixpanelPeople.prototype.set=MixpanelPeople.prototype.set,MixpanelPeople.prototype.set_once=MixpanelPeople.prototype.set_once,MixpanelPeople.prototype.unset=MixpanelPeople.prototype.unset,MixpanelPeople.prototype.increment=MixpanelPeople.prototype.increment,MixpanelPeople.prototype.append=MixpanelPeople.prototype.append,MixpanelPeople.prototype.remove=MixpanelPeople.prototype.remove,MixpanelPeople.prototype.union=MixpanelPeople.prototype.union,MixpanelPeople.prototype.track_charge=MixpanelPeople.prototype.track_charge,MixpanelPeople.prototype.clear_charges=MixpanelPeople.prototype.clear_charges,MixpanelPeople.prototype.delete_user=MixpanelPeople.prototype.delete_user,MixpanelPeople.prototype.toString=MixpanelPeople.prototype.toString;var xu,Ou="__mps",Eu="__mpso",Mu="__mpus",Ru="__mpa",Au="__mpap",Tu="__mpr",Pu="__mpu",Nu="$people_distinct_id",Du="__alias",Lu="__timers",Fu=[Ou,Eu,Mu,Ru,Au,Tu,Pu,Nu,Du,Lu],MixpanelPersistence=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(Xa.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&Za.localStorage.is_supported()?this.storage=Za.localStorage:this.storage=Za.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};MixpanelPersistence.prototype.properties=function(){var e={};return this.load(),Za.each(this.props,function(t,r){Za.include(Fu,r)||(e[r]=t)}),e},MixpanelPersistence.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Za.extend({},e))}},MixpanelPersistence.prototype.upgrade=function(){var e,t;this.storage===Za.localStorage?(e=Za.cookie.parse(this.name),Za.cookie.remove(this.name),Za.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===Za.cookie&&(t=Za.localStorage.parse(this.name),Za.localStorage.remove(this.name),t&&this.register_once(t))},MixpanelPersistence.prototype.save=function(){this.disabled||this.storage.set(this.name,sc(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},MixpanelPersistence.prototype.load_prop=function(e){return this.load(),this.props[e]},MixpanelPersistence.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},MixpanelPersistence.prototype.clear=function(){this.remove(),this.props={}},MixpanelPersistence.prototype.register_once=function(e,t,r){return!!Za.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===r?this.default_expiry:r,this.load(),Za.each(e,function(e,r){this.props.hasOwnProperty(r)&&this.props[r]!==t||(this.props[r]=e)},this),this.save(),!0)},MixpanelPersistence.prototype.register=function(e,t){return!!Za.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),Za.extend(this.props,e),this.save(),!0)},MixpanelPersistence.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},MixpanelPersistence.prototype.update_search_keyword=function(e){this.register(Za.info.searchInfo(e))},MixpanelPersistence.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:Za.info.referringDomain(e)||"$direct"},"")},MixpanelPersistence.prototype.get_referrer_info=function(){return Za.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},MixpanelPersistence.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},MixpanelPersistence.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},MixpanelPersistence.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},MixpanelPersistence.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},MixpanelPersistence.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},MixpanelPersistence.prototype.get_cross_subdomain=function(){return this.cross_subdomain},MixpanelPersistence.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},MixpanelPersistence.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],i=this._get_or_create_queue(_u),o=this._get_or_create_queue(yu),s=this._get_or_create_queue(bu),a=this._get_or_create_queue(wu),c=this._get_or_create_queue(Su),u=this._get_or_create_queue(Cu,[]),l=this._get_or_create_queue(ku,[]);r===Ou?(Za.extend(i,n),this._pop_from_people_queue(wu,n),this._pop_from_people_queue(Su,n),this._pop_from_people_queue(bu,n)):r===Eu?(Za.each(n,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(bu,n)):r===Mu?Za.each(n,function(e){Za.each([i,o,a,c],function(t){e in t&&delete t[e]}),Za.each(l,function(t){e in t&&delete t[e]}),s[e]=!0}):r===Ru?(Za.each(n,function(e,t){t in i?i[t]+=e:(t in a||(a[t]=0),a[t]+=e)},this),this._pop_from_people_queue(bu,n)):r===Pu?(Za.each(n,function(e,t){Za.isArray(e)&&(t in c||(c[t]=[]),Za.each(e,function(e){Za.include(c[t],e)||c[t].push(e)}))}),this._pop_from_people_queue(bu,n)):r===Tu?(u.push(n),this._pop_from_people_queue(ku,n)):r===Au&&(l.push(n),this._pop_from_people_queue(bu,n)),Xa.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),Xa.log(t),this.save()},MixpanelPersistence.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];Za.isUndefined(r)||Za.each(t,function(t,n){e===ku||e===Cu?Za.each(r,function(e){e[n]===t&&delete e[n]}):delete r[n]},this)},MixpanelPersistence.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},MixpanelPersistence.prototype._get_queue_key=function(e){return e===_u?Ou:e===yu?Eu:e===bu?Mu:e===wu?Ru:e===ku?Au:e===Cu?Tu:e===Su?Pu:void Xa.error("Invalid queue:",e)},MixpanelPersistence.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=Za.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)},MixpanelPersistence.prototype.set_event_timer=function(e,t){var r=this.load_prop(Lu)||{};r[e]=t,this.props[Lu]=r,this.save()},MixpanelPersistence.prototype.remove_event_timer=function(e){var t=(this.load_prop(Lu)||{})[e];return Za.isUndefined(t)||(delete this.props[Lu][e],this.save()),t};var Uu,load_extra_bundle=function(e,t){throw new Error(e+" not available in this build.")},IDENTITY_FUNC=function(e){return e},Bu="mixpanel",$u="base64",zu="$device:",ju=n.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,qu=!ju&&-1===qa.indexOf("MSIE")&&-1===qa.indexOf("Mozilla"),Wu=null;Ba.sendBeacon&&(Wu=function(){return Ba.sendBeacon.apply(Ba,arguments)});var Vu={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},Gu={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Vu,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:$u,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:NOOP_FUNC,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:NOOP_FUNC,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_heatmap_data:!1,record_idle_timeout_ms:18e5,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:Ra,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Hu=!1,MixpanelLib=function(){},create_mplib=function(e,t,r){var n,i=r===Bu?Uu:Uu[r];if(i&&0===xu)n=i;else{if(i&&!Za.isArray(i))return void Xa.error("You have already initialized "+r);n=new MixpanelLib}if(n._cached_groups={},n._init(e,t,r),n.people=new MixpanelPeople,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var o=Za.info.campaignParams(null),s={},a=!1;Za.each(o,function(e,t){s["initial_"+t]=e,e&&(a=!0)}),a&&n.people.set_once(s)}return Ma.DEBUG=Ma.DEBUG||n.get_config("debug"),!Za.isUndefined(i)&&Za.isArray(i)&&(n._execute_array.call(n.people,i.people),n._execute_array(i)),n};MixpanelLib.prototype.init=function(e,t,r){if(Za.isUndefined(r))this.report_error("You must name your new library: init(token, config, name)");else{if(r!==Bu){var n=create_mplib(e,t,r);return Uu[r]=n,n._loaded(),n}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},MixpanelLib.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in t||(t.api_host||Gu.api_host).match(/\.mixpanel\.com/)&&(i.api_payload_format="json");if(this.set_config(Za.extend({},Gu,i,t,{name:r,token:e,callback_fn:(r===Bu?r:Bu+"."+r)+"._jsc"})),this._jsc=NOOP_FUNC,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(Za.localStorage.is_supported(!0)&&ju){if(this.init_batchers(),Wu&&n.addEventListener){var o=Za.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);n.addEventListener("pagehide",function(e){e.persisted&&o()}),n.addEventListener("visibilitychange",function(){"hidden"===$a.visibilityState&&o()})}}else this._batch_requests=!1,Xa.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),Za.each(this.get_batcher_configs(),function(e){Xa.log("Clearing batch queue "+e.queue_key),Za.localStorage.remove(e.queue_key)});this.persistence=this.cookie=new MixpanelPersistence(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=Za.UUID();this.get_distinct_id()||this.register_once({distinct_id:zu+s,$device_id:s},""),this.flags=new FeatureFlagManager({getFullApiRoute:Za.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:Za.bind(this.get_config,this),setConfigFunc:Za.bind(this.set_config,this),getPropertyFunc:Za.bind(this.get_property,this),trackingFunc:Za.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new Autocapture(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},MixpanelLib.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))Xa.log("Tab ID initialization skipped due to disable_persistence config");else if(Za.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,r="mp_gen_new_tab_id_"+e;!Za.sessionStorage.get(r)&&Za.sessionStorage.get(t)||Za.sessionStorage.set(t,"$tab-"+Za.UUID()),Za.sessionStorage.set(r,"1"),this.tab_id=Za.sessionStorage.get(t),n.addEventListener("beforeunload",function(){Za.sessionStorage.remove(r)})}catch(e){this.report_error("Error initializing tab id",e)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},MixpanelLib.prototype.get_tab_id=function(){return this.tab_id||null},MixpanelLib.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return Xa.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new IDBStorageWrapper(uc),t=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(e){for(var r=0;r0&&100*Math.random()<=this.get_config("record_sessions_percent");e||r?t(!0):this._should_load_recorder().then(function(e){e&&t(!1)})}else Xa.critical("Browser does not support MutationObserver; skipping session recording")}),MixpanelLib.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},MixpanelLib.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},MixpanelLib.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},MixpanelLib.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},MixpanelLib.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},MixpanelLib.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e},MixpanelLib.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();t&&(e="https://mixpanel.com/projects/replay-redirect?"+Za.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")}));return e},MixpanelLib.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},MixpanelLib.prototype.__get_recorder=function(){return this._recorder},MixpanelLib.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=Za.info.campaignParams(null);Za.each(e,function(e,t){this.unregister(t)}.bind(this))}},MixpanelLib.prototype._set_default_superprops=function(){this.persistence.update_search_keyword($a.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(Za.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info($a.referrer)},MixpanelLib.prototype._dom_loaded=function(){Za.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||Za.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},MixpanelLib.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Hu)return this.__dom_loaded_queue.push([e,t]),!1;var r=(new e).init(this);return r.track.apply(r,t)},MixpanelLib.prototype._prepare_callback=function(e,t){if(Za.isUndefined(e))return null;if(ju){return function(r){e(r,t)}}var r=this._jsc,n=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+n+"]";return r[n]=function(i){delete r[n],e(i,t)},i},MixpanelLib.prototype._send_request=function(e,t,r,n){var i=!0;if(qu)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;n||!Za.isFunction(r)&&"string"!=typeof r||(n=r,r=null),r=Za.extend(o,r||{}),ju||(r.method="GET");var a="POST"===r.method,c=Wu&&a&&"sendbeacon"===r.transport.toLowerCase(),u=r.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),ju||(n?t.callback=n:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),Za.extend(t,this.get_config("api_extra_query_params")),e+="?"+Za.HTTPBuildQuery(t);var l=this;if("img"in t){var p=$a.createElement("img");p.src=e,$a.body.appendChild(p)}else if(c){try{i=Wu(e,s)}catch(e){l.report_error(e),i=!1}try{n&&n(i?1:0)}catch(e){l.report_error(e)}}else if(ju)try{var h=new XMLHttpRequest;h.open(r.method,e,!0);var d=this.get_config("xhr_headers");if(a&&(d["Content-Type"]="application/x-www-form-urlencoded"),Za.each(d,function(e,t){h.setRequestHeader(t,e)}),r.timeout_ms&&void 0!==h.timeout){h.timeout=r.timeout_ms;var f=(new Date).getTime()}h.withCredentials=!0,h.onreadystatechange=function(){var e;if(4===h.readyState)if(200===h.status){if(n)if(u){var t;try{t=Za.JSONDecode(h.responseText)}catch(e){if(l.report_error(e),!r.ignore_json_errors)return;t=h.responseText}n(t)}else n(Number(h.responseText))}else if(e=h.timeout&&!h.status&&(new Date).getTime()-f>=h.timeout?"timeout":"Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(e),n)if(u){var i=h.responseHeaders||{};n({status:0,httpStatusCode:h.status,error:e,retryAfter:i["Retry-After"]})}else n(0)},h.send(s)}catch(e){l.report_error(e),i=!1}else{var g=$a.createElement("script");g.type="text/javascript",g.async=!0,g.defer=!0,g.src=e;var m=$a.getElementsByTagName("script")[0];m.parentNode.insertBefore(g,m)}return i},MixpanelLib.prototype._execute_array=function(e){var t,r=[],n=[],i=[];Za.each(e,function(e){e&&(t=e[0],Za.isArray(t)?i.push(e):"function"==typeof e?e.call(this):Za.isArray(e)&&"alias"===t?r.push(e):Za.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):n.push(e))},this);var execute=function(e,t){Za.each(e,function(e){if(Za.isArray(e[0])){var r=t;Za.each(e,function(e){r=r[e[0]].apply(r,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};execute(r,this),execute(n,this),execute(i,this)},MixpanelLib.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},MixpanelLib.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs},MixpanelLib.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=Za.bind(function(e){return new RequestBatcher(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:Za.bind(function(t,r,n){var i=this.get_config("api_routes");this._send_request(this.get_api_host(e.api_name)+"/"+i[e.api_name],this._encode_data_for_request(t),r,this._prepare_callback(n,t))},this),beforeSendHook:Za.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),stopAllBatchingFunc:Za.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},MixpanelLib.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,Za.each(this.request_batchers,function(e){e.start()}))},MixpanelLib.prototype.stop_batch_senders=function(){this._batch_requests=!1,Za.each(this.request_batchers,function(e){e.stop(),e.clear()})},MixpanelLib.prototype.push=function(e){this._execute_array([e])},MixpanelLib.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},MixpanelLib.prototype._encode_data_for_request=function(e){var t=sc(e);return this.get_config("api_payload_format")===$u&&(t=Za.base64Encode(t)),{data:t}},MixpanelLib.prototype._track_or_batch=function(e,t){var r=Za.truncate(e.data,255),n=e.endpoint,i=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||NOOP_FUNC;var a=!0,c=Za.bind(function(){return s.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r?(Xa.log("MIXPANEL REQUEST:"),Xa.log(r),this._send_request(n,this._encode_data_for_request(r),s,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?i.enqueue(r).then(function(e){e?t(1,r):c()}):a=c(),a&&r},MixpanelLib.prototype.track=addOptOutCheckMixpanelLib(function(e,t,r,n){n||"function"!=typeof r||(n=r,r=null);var i=(r=r||{}).transport;i&&(r.transport=i);var o=r.send_immediately;if("function"!=typeof n&&(n=NOOP_FUNC),Za.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=Za.extend({},t)).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!Za.isUndefined(s)){var a=(new Date).getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?Za.info.marketingParams():{};t=Za.extend({},Za.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var u=this.get_config("property_blacklist");Za.isArray(u)?Za.each(u,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+u);var l={event:e,properties:t};return this._track_or_batch({type:"events",data:l,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},n)}n(0)}}),MixpanelLib.prototype.set_group=addOptOutCheckMixpanelLib(function(e,t,r){Za.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)}),MixpanelLib.prototype.add_group=addOptOutCheckMixpanelLib(function(e,t,r){var n=this.get_property(e),i={};return void 0===n?(i[e]=[t],this.register(i)):-1===n.indexOf(t)&&(n.push(t),i[e]=n,this.register(i)),this.people.union(e,t,r)}),MixpanelLib.prototype.remove_group=addOptOutCheckMixpanelLib(function(e,t,r){var n=this.get_property(e);if(void 0!==n){var i=n.indexOf(t);i>-1&&(n.splice(i,1),this.register({group_key:n})),0===n.length&&this.unregister(e)}return this.people.remove(e,t,r)}),MixpanelLib.prototype.track_with_groups=addOptOutCheckMixpanelLib(function(e,t,r,n){var i=Za.extend({},t||{});return Za.each(r,function(e,t){null!=e&&(i[t]=e)}),this.track(e,i,n)}),MixpanelLib.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},MixpanelLib.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},MixpanelLib.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return void 0!==n&&n._group_key===e&&n._group_id===t||((n=new MixpanelGroup)._init(this,e,t),this._cached_groups[r]=n),n},MixpanelLib.prototype.track_pageview=addOptOutCheckMixpanelLib(function(e,t){"object"!=typeof e&&(e={});var r=(t=t||{}).event_name||"$mp_web_page_view",n=Za.extend(Za.info.mpPageViewProperties(),Za.info.campaignParams(),Za.info.clickParams()),i=Za.extend({},n,e);return this.track(r,i)}),MixpanelLib.prototype.track_links=function(){return this._track_dom.call(this,LinkTracker,arguments)},MixpanelLib.prototype.track_forms=function(){return this._track_dom.call(this,FormTracker,arguments)},MixpanelLib.prototype.time_event=function(e){Za.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var Ju={persistent:!0},options_for_register=function(e){var t;return t=Za.isObject(e)?e:Za.isUndefined(e)?{}:{days:e},Za.extend({},Ju,t)};MixpanelLib.prototype.register=function(e,t){var r=options_for_register(t);r.persistent?this.persistence.register(e,r.days):Za.extend(this.unpersisted_superprops,e)},MixpanelLib.prototype.register_once=function(e,t,r){var n=options_for_register(r);n.persistent?this.persistence.register_once(e,t,n.days):(void 0===t&&(t="None"),Za.each(e,function(e,r){this.unpersisted_superprops.hasOwnProperty(r)&&this.unpersisted_superprops[r]!==t||(this.unpersisted_superprops[r]=e)},this))},MixpanelLib.prototype.unregister=function(e,t){(t=options_for_register(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},MixpanelLib.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)},MixpanelLib.prototype.identify=function(e,t,r,n,i,o,s,a){var c=this.get_distinct_id();if(e&&c!==e){if("string"==typeof e&&0===e.indexOf(zu))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var u=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==c&&e!==this.get_property(Du)&&(this.unregister(Du),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,i,o,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0}),e!==c&&this.flags.fetchFlags()},MixpanelLib.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=Za.UUID();this.register_once({distinct_id:zu+e,$device_id:e},""),this._check_and_start_session_recording()},MixpanelLib.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},MixpanelLib.prototype.alias=function(e,t){if(e===this.get_property(Nu))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return Za.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Du,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},MixpanelLib.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},MixpanelLib.prototype.set_config=function(e){Za.isObject(e)&&(Za.extend(this.config,e),e.batch_size&&Za.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Ma.DEBUG=Ma.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init())},MixpanelLib.prototype.get_config=function(e){return this.config[e]},MixpanelLib.prototype._run_hook=function(e){var t=(this.config.hooks[e]||IDENTITY_FUNC).apply(this,Da.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},MixpanelLib.prototype.get_property=function(e){return this.persistence.load_prop([e])},MixpanelLib.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")},MixpanelLib.prototype.toString=function(){var e=this.get_config("name");return e!==Bu&&(e=Bu+"."+e),e},MixpanelLib.prototype._event_is_disabled=function(e){return Za.isBlockedUA(qa)||this._flags.disable_all_events||Za.include(this.__disabled_events,e)},MixpanelLib.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&Za.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!Za.cookie.get("mp_optout")||(Za.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},MixpanelLib.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},MixpanelLib.prototype._gdpr_call_func=function(e,t){return t=Za.extend({track:Za.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),Za.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},MixpanelLib.prototype.opt_in_tracking=function(e){e=Za.extend({enable_persistence:!0},e),this._gdpr_call_func(optIn,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.opt_out_tracking=function(e){(e=Za.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(optOut,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(hasOptedIn,e)},MixpanelLib.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(hasOptedOut,e)},MixpanelLib.prototype.clear_opt_in_out_tracking=function(e){e=Za.extend({enable_persistence:!0},e),this._gdpr_call_func(clearOptInOut,e),this._gdpr_update_persistence(e)},MixpanelLib.prototype.report_error=function(e,t){Xa.error.apply(Xa.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){Xa.error(t)}},MixpanelLib.prototype.init=MixpanelLib.prototype.init,MixpanelLib.prototype.reset=MixpanelLib.prototype.reset,MixpanelLib.prototype.disable=MixpanelLib.prototype.disable,MixpanelLib.prototype.time_event=MixpanelLib.prototype.time_event,MixpanelLib.prototype.track=MixpanelLib.prototype.track,MixpanelLib.prototype.track_links=MixpanelLib.prototype.track_links,MixpanelLib.prototype.track_forms=MixpanelLib.prototype.track_forms,MixpanelLib.prototype.track_pageview=MixpanelLib.prototype.track_pageview,MixpanelLib.prototype.register=MixpanelLib.prototype.register,MixpanelLib.prototype.register_once=MixpanelLib.prototype.register_once,MixpanelLib.prototype.unregister=MixpanelLib.prototype.unregister,MixpanelLib.prototype.identify=MixpanelLib.prototype.identify,MixpanelLib.prototype.alias=MixpanelLib.prototype.alias,MixpanelLib.prototype.name_tag=MixpanelLib.prototype.name_tag,MixpanelLib.prototype.set_config=MixpanelLib.prototype.set_config,MixpanelLib.prototype.get_config=MixpanelLib.prototype.get_config,MixpanelLib.prototype.get_api_host=MixpanelLib.prototype.get_api_host,MixpanelLib.prototype.get_property=MixpanelLib.prototype.get_property,MixpanelLib.prototype.get_distinct_id=MixpanelLib.prototype.get_distinct_id,MixpanelLib.prototype.toString=MixpanelLib.prototype.toString,MixpanelLib.prototype.opt_out_tracking=MixpanelLib.prototype.opt_out_tracking,MixpanelLib.prototype.opt_in_tracking=MixpanelLib.prototype.opt_in_tracking,MixpanelLib.prototype.has_opted_out_tracking=MixpanelLib.prototype.has_opted_out_tracking,MixpanelLib.prototype.has_opted_in_tracking=MixpanelLib.prototype.has_opted_in_tracking,MixpanelLib.prototype.clear_opt_in_out_tracking=MixpanelLib.prototype.clear_opt_in_out_tracking,MixpanelLib.prototype.get_group=MixpanelLib.prototype.get_group,MixpanelLib.prototype.set_group=MixpanelLib.prototype.set_group,MixpanelLib.prototype.add_group=MixpanelLib.prototype.add_group,MixpanelLib.prototype.remove_group=MixpanelLib.prototype.remove_group,MixpanelLib.prototype.track_with_groups=MixpanelLib.prototype.track_with_groups,MixpanelLib.prototype.start_batch_senders=MixpanelLib.prototype.start_batch_senders,MixpanelLib.prototype.stop_batch_senders=MixpanelLib.prototype.stop_batch_senders,MixpanelLib.prototype.start_session_recording=MixpanelLib.prototype.start_session_recording,MixpanelLib.prototype.stop_session_recording=MixpanelLib.prototype.stop_session_recording,MixpanelLib.prototype.pause_session_recording=MixpanelLib.prototype.pause_session_recording,MixpanelLib.prototype.resume_session_recording=MixpanelLib.prototype.resume_session_recording,MixpanelLib.prototype.get_session_recording_properties=MixpanelLib.prototype.get_session_recording_properties,MixpanelLib.prototype.get_session_replay_url=MixpanelLib.prototype.get_session_replay_url,MixpanelLib.prototype.get_tab_id=MixpanelLib.prototype.get_tab_id,MixpanelLib.prototype.DEFAULT_API_ROUTES=Vu,MixpanelLib.prototype.__get_recorder=MixpanelLib.prototype.__get_recorder,MixpanelPersistence.prototype.properties=MixpanelPersistence.prototype.properties,MixpanelPersistence.prototype.update_search_keyword=MixpanelPersistence.prototype.update_search_keyword,MixpanelPersistence.prototype.update_referrer_info=MixpanelPersistence.prototype.update_referrer_info,MixpanelPersistence.prototype.get_cross_subdomain=MixpanelPersistence.prototype.get_cross_subdomain,MixpanelPersistence.prototype.clear=MixpanelPersistence.prototype.clear;var Yu={},override_mp_init_func=function(){Uu.init=function(e,t,r){if(r)return Uu[r]||(Uu[r]=Yu[r]=create_mplib(e,t,r),Uu[r]._loaded()),Uu[r];var i=Uu;Yu[Bu]?i=Yu[Bu]:e&&((i=create_mplib(e,t,Bu))._loaded(),Yu[Bu]=i),Uu=i,1===xu&&(n[Bu]=Uu),Za.each(Yu,function(e,t){t!==Bu&&(Uu[t]=e)}),Uu._=Za}};var Zu=function init_as_module(e){return load_extra_bundle=e,xu=0,Uu=new MixpanelLib,override_mp_init_func(),Uu.init(),function(){function dom_loaded_handler(){dom_loaded_handler.done||(dom_loaded_handler.done=!0,Hu=!0,qu=!1,Za.each(Yu,function(e){e._dom_loaded()}))}if($a.addEventListener)"complete"===$a.readyState?dom_loaded_handler():$a.addEventListener("DOMContentLoaded",dom_loaded_handler,!1);else if($a.attachEvent){$a.attachEvent("onreadystatechange",dom_loaded_handler);var e=!1;try{e=null===n.frameElement}catch(e){}$a.documentElement.doScroll&&e&&function do_scroll_check(){try{$a.documentElement.doScroll("left")}catch(e){return void setTimeout(do_scroll_check,1)}dom_loaded_handler()}()}Za.register_event(n,"load",dom_loaded_handler,!0)}(),Uu}(function loadNoop(e,t){t()})}}]);