PageSourceSearch

https://www.unozen.ai/_next/static/chunks/00__d3qgeowgx.js?dpl=dpl_EemJNJmWBG2HmgCqKnJB3YwvunBb

js unozen.ai collected 2026-10-05 14:59:29 UTC 643,453 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,644719,e=>{"use strict";let t,n,r,o,i,a,l,c,u,d,p;var h,f,g,m=e.i(515401),v=e.i(583018),y=e.i(994845),b={d:(e,t)=>{for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},w={};function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function S(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=k(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==k(t)?t:String(t)}b.d(w,{A:()=>uz});var I=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),S(this,"feedbackButton",null),S(this,"injectedFeedbackButton",!1),S(this,"buttonHidden",null),S(this,"lastButtonIcon",null),S(this,"showingRedDot",!1)}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"destroy",value:function(){this.feedbackButton&&(this.feedbackButton.remove(),this.feedbackButton=null),this.buttonHidden=null,this.lastButtonIcon=null,this.injectedFeedbackButton=!1,this.instance=null}},{key:"toggleFeedbackButton",value:function(e){this.buttonHidden=!e,n.getInstance().updateFeedbackButtonState(),lz.getInstance().updateContainerStyle()}},{key:"updateRedDot",value:function(e){var t=nT.getInstance();if(this.feedbackButton&&!this.buttonHidden&&!t.isOpened()){var n="bb-feedback-button--red-dot",r=this.feedbackButton.querySelector(".".concat(n));if(e){if(!r){var o=document.createElement("div");o.className=n,this.feedbackButton.appendChild(o)}}else r&&r.remove()}}},{key:"feedbackButtonPressed",value:function(){var e=nT.getInstance();e.isOpened()?(e.hideWidget(),this.updateRedDot(this.showingRedDot)):(e.setAppMode("widget"),e.showWidget(),this.updateRedDot(!1))}},{key:"injectFeedbackButton",value:function(){var e=this;if(!this.injectedFeedbackButton){this.injectedFeedbackButton=!0;var t=document.createElement("div");t.addEventListener("click",function(){e.feedbackButtonPressed()}),document.body.appendChild(t),this.feedbackButton=t,this.updateFeedbackButtonState()}}},{key:"updateNotificationBadge",value:function(e){var t=document.querySelector(".bb-notification-bubble");if(t){var n="bb-notification-bubble--hidden";e>0&&!nT.getInstance().isOpened()?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"refresh",value:function(){document.querySelector(".bb-feedback-button")?(this.updateFeedbackButtonText(),this.updateFeedbackButtonState()):(this.injectedFeedbackButton=!1,this.feedbackButton=null,this.buttonHidden=null,this.lastButtonIcon=null,this.injectFeedbackButton())}},{key:"updateFeedbackButtonText",value:function(){var e=tW.getInstance().getFlowConfig();if(e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC||e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC_BOTTOM||e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC_LEFT){var t=document.querySelector(".bb-feedback-button-classic");t&&(t.innerText=e.widgetButtonText)}}},{key:"updateFeedbackButtonState",value:function(){if(lX.getInstance().updateUIVisibility(),null!==this.feedbackButton){var e=tW.getInstance().getFlowConfig(),t="";t=e.buttonLogo?'<img class="bb-logo-logo" src="'.concat(e.buttonLogo,'" alt="Feedback Button" />'):L("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-font gl-block",this.feedbackButton.setAttribute("dir",lT.getInstance().isRTLLayout?"rtl":"ltr"),e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC||e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC_BOTTOM||e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC_LEFT?(this.feedbackButton.classList.add("bb-feedback-button--classic-button-style"),this.feedbackButton.innerHTML='<div class="bb-feedback-button-classic '.concat(e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC_LEFT?"bb-feedback-button-classic--left":"").concat(e.feedbackButtonPosition===n.FEEDBACK_BUTTON_CLASSIC_BOTTOM?"bb-feedback-button-classic--bottom":"",'">').concat(e.widgetButtonText,"</div>")):t!==this.lastButtonIcon&&(this.feedbackButton.innerHTML='<div class="bb-feedback-button-icon">'.concat(t).concat(L("arrowdown","#fff"),'</div><div class="bb-notification-bubble bb-notification-bubble--hidden"></div>')),this.lastButtonIcon=t;var r=!1;null===n.getInstance().buttonHidden?e.feedbackButtonPosition===n.FEEDBACK_BUTTON_NONE&&(r=!0):n.getInstance().buttonHidden&&(r=!0),r&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),e.feedbackButtonPosition===n.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),nT.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var o=nT.getInstance().appMode;"survey"!==o&&"survey_full"!==o&&"survey_web"!==o||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==e.hideForGuests||tR.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}],x(n.prototype,e),t&&x(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}S(I,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),S(I,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),S(I,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),S(I,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),S(I,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),S(I,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),S(I,"instance",void 0);var O=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var n,r=function(e){if(Array.isArray(e))return e}(n=e.match(/.{2}/g))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],l=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(l=(n=o.call(t)).done)&&(a.push(n.value),3!==a.length);l=!0);}catch(e){c=!0,r=e}
1finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return E(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return E(e,3)}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1],a=r[2],l=[parseInt(o,16)+t,parseInt(i,16)+t,parseInt(a,16)+t];o=l[0],i=l[1],a=l[2],o=Math.max(Math.min(255,o),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16),a=Math.max(Math.min(255,a),0).toString(16);var c=(o.length<2?"0":"")+o,u=(i.length<2?"0":"")+i,d=(a.length<2?"0":"")+a;return"#".concat(c).concat(u).concat(d)},T=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},L=function(e,t){return"button"===e?'<svg class="bb-logo-logo bb-logo-logo--default" width="145" height="144" viewBox="0 0 145 144" fill="none" xmlns="http://www.w3.org/2000/svg">\n    <path fill-rule="evenodd" clip-rule="evenodd" d="M38.9534 15H105.047C113.857 15 121 22.1426 121 30.9534L121 89.5238L121 96.015L121 125.541C121 128.759 117.393 130.66 114.739 128.84L90.1188 111.968H38.9534C30.1426 111.968 23 104.826 23 96.015V30.9534C23 22.1426 30.1426 15 38.9534 15Z" fill="white"/>\n    </svg>':"drag"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!--!Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path d="M64 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM96 416a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96-288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM192 448a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>':"unmute"===e?'<svg id="tooltip-svg-unmute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path id="tooltip-svg-unmute-path" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.1 386.2C556.7 352 576 306.3 576 256c0-60.1-27.7-113.8-70.9-149c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C507.3 170.7 528 210.9 528 256c0 39.1-15.6 74.5-40.9 100.5L449 326.6c19-17.5 31-42.7 31-70.6c0-30.1-13.9-56.9-35.4-74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C425.1 227.6 432 241 432 256s-6.9 28.4-17.7 37.3c-1.3 1-2.4 2.2-3.4 3.4L352 250.6V64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L197.8 129.8 38.8 5.1zM352 373.3L82.9 161.3C53.8 167.4 32 193.1 32 224v64c0 35.3 28.7 64 64 64h67.8L298.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S352 460.6 352 448V373.3z"/></svg>':"mute"===e?'<svg id="tooltip-svg-mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path id="tooltip-svg-mute-path" d="M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"/></svg>':"replay"===e?'<svg id="tooltip-svg-replay" width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n    <path id="tooltip-svg-replay-path" d="M48.5 224H40C26.7 224 16 213.3 16 200V72C16 62.3 21.8 53.5 30.8 49.8C39.8 46.1 50.1 48.1 57 55L98.6 96.6C186.2 10.1 327.3 10.4 414.4 97.6C501.9 185.1 501.9 326.9 414.4 414.4C326.9 501.9 185.1 501.9 97.6 414.4C85.1 401.9 85.1 381.6 97.6 369.1C110.1 356.6 130.4 356.6 142.9 369.1C205.4 431.6 306.7 431.6 369.2 369.1C431.7 306.6 431.7 205.3 369.2 142.8C307 80.6 206.5 80.3 143.9 141.8L185 183C191.9 189.9 193.9 200.2 190.2 209.2C186.5 218.2 177.7 224 168 224H48.5Z" />\n    </svg>':"dismiss"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M294.6 166.6L317.3 144 272 98.7l-22.6 22.6L160 210.7 70.6 121.4 48 98.7 2.7 144l22.6 22.6L114.7 256 25.4 345.4 2.7 368 48 413.3l22.6-22.6L160 301.3l89.4 89.4L272 413.3 317.3 368l-22.6-22.6L205.3 256l89.4-89.4z"/></svg>':"blur"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path class="bb-svg-path" d="m602.25 1200c238.2 0 435.95-193.26 435.95-435.95 0-269.66-220.23-615.73-435.95-764.05-220.23 161.8-440.45 485.39-440.45 764.05 0 242.7 197.75 435.95 440.45 435.95zm-260.68-382.02c0 112.36 89.887 206.74 206.74 206.74v62.922c-148.32 0-274.16-121.35-274.16-269.66z" fill="#333"/>\n</svg>':"pen"===e?'<svg width="1072px" height="1034px" viewBox="0 0 1072 1034" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g transform="translate(-907.000000, -217.000000)" fill-rule="nonzero">\n            <g transform="translate(907.268457, 217.009827)">\n                <g transform="translate(132.335119, 0.000000)" fill="#000" class="bb-svg-path">\n                    <path d="M20.3764235,730.530173 L10.1884235,720.342173 C-0.791576454,709.362173 -3.16357645,692.432173 4.37592355,678.858173 L83.1809235,537.018173 C71.7589235,502.979173 82.3098335,463.998173 112.254924,440.706173 L655.334924,18.3161733 C689.951924,-8.6058267 739.197924,-5.5388267 770.214924,25.4684733 L913.774924,169.028473 C944.782924,200.040473 947.848924,249.286473 920.927224,283.908473 L498.537224,826.988473 C496.322424,829.836173 493.935624,832.543173 491.384924,835.090073 C467.271924,859.207073 432.513924,866.195073 402.232924,856.063073 L260.382924,934.8
168073 C246.804924,942.407173 229.874924,940.036073 218.894924,929.055573 L208.706924,918.867573 L20.3764235,730.530173 Z M866.006424,241.190173 C871.393124,234.264373 870.779824,224.417173 864.576724,218.213173 L721.016724,74.6531733 C714.813624,68.4500733 704.965724,67.8367733 698.043724,73.2234733 L154.963724,495.613473 C147.381724,501.507973 146.018424,512.433473 151.912924,520.015473 C152.358234,520.585783 152.834804,521.128773 153.346524,521.636573 L417.586524,785.886573 C424.379524,792.675673 435.391524,792.675673 442.180524,785.886573 C442.692244,785.374853 443.168804,784.831873 443.610224,784.265473 L866.006424,241.190173 Z M342.796424,809.480173 L129.746424,596.430173 L77.9264235,689.707173 L249.516424,861.297173 L342.796424,809.480173 Z"></path>\n                </g>\n                <g transform="translate(-0.000000, 755.530173)" fill="#EB144C">\n                    <path d="M124.711543,0 L313.042043,188.3374 L233.288043,268.0914 C222.003043,279.3764 204.483043,281.5324 190.800043,273.3219 L16.8900429,168.9719 C-2.51595711,157.3309 -5.80895711,130.5499 10.1908429,114.5499 L124.711543,0 Z" class="bb-pen-tip"></path>\n                </g>\n            </g>\n        </g>\n    </g>\n</svg>':"rect"===e?'<svg width="339px" height="241px" viewBox="0 0 339 241" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g transform="translate(-0.000865, 0.000000)" fill-rule="nonzero">\n            <g transform="translate(0.000865, 0.000000)" fill="#000000" class="bb-svg-path">\n                <path d="M339,0 L339,241 L0,241 L0,0 L339,0 Z M312.826351,26.168387 L26.1855674,26.168387 L26.1855674,214.41156 L312.826351,214.41156 L312.826351,26.168387 Z"></path>\n            </g>\n            <g transform="translate(0.000000, 83.206095)" fill="#EB144C" class="bb-pen-tip">\n                <path d="M0,0 L26.186,26.186 L26.1864325,131.205465 L131.204,131.205 L157.792,157.793 L0.000865118243,157.793905 L0,0 Z"></path>\n            </g>\n        </g>\n    </g>\n</svg>':"pointer"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n    <path d="m1050.7 508.95-225.94 157.5 160.31 160.31c4.4531 4.4531 6.9141 10.43 6.9141 16.758s-2.4609 12.305-6.9141 16.758l-126.09 126.09c-4.4531 4.4531-10.43 6.9141-16.758 6.9141-6.3281 0-12.188-2.4609-16.758-6.9141l-160.2-160.43-157.62 225.94c-3.3984 4.9219-9.0234 7.8516-14.883 7.8516-0.70313 0-1.5234 0-2.2266-0.11719-6.7969-0.82031-12.422-5.2734-14.766-11.719l-333.16-880.55c-2.5781-6.6797-0.9375-14.297 4.2188-19.336 5.0391-5.0391 12.656-6.6797 19.336-4.2188l880.66 333.05c6.3281 2.3438 10.781 8.0859 11.602 14.766 0.82031 6.7969-2.1094 13.359-7.7344 17.344z" fill="#333"/>\n   </svg>':"clip"===e?'<svg width="600px" height="1126px" viewBox="0 0 600 1126" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g transform="translate(-0.002000, 0.501000)" fill="#333333" fill-rule="nonzero">\n            <path d="M225.002,1124.999 C165.33,1124.999 108.102,1101.292 65.902,1059.097 C23.707,1016.902 5.68434189e-14,959.671 5.68434189e-14,899.997 L5.68434189e-14,299.997 C5.68434189e-14,220.431 31.605,144.127 87.867,87.867 C144.129,31.605 220.437,-4.26325641e-14 299.997,-4.26325641e-14 C379.557,-4.26325641e-14 455.867,31.605 512.127,87.867 C568.389,144.129 599.994,220.437 599.994,299.997 L599.994,1012.497 C599.994,1025.895 592.8456,1038.274 581.244,1044.974 C569.642,1051.6732 555.346,1051.6732 543.744,1044.974 C532.142,1038.2748 524.994,1025.896 524.994,1012.497 L524.994,299.997 C524.994,240.325 501.287,183.097 459.092,140.897 C416.897,98.702 359.666,74.995 299.992,74.995 C240.318,74.995 183.092,98.702 140.892,140.897 C98.697,183.092 74.99,240.323 74.99,299.997 L74.99,899.997 C74.99,953.587 103.58,1003.107 149.99,1029.897 C196.4,1056.694 253.58,1056.694 299.99,1029.897 C346.4,1003.104 374.99,953.585 374.99,899.997 L374.99,337.497 C374.99,310.704 360.697,285.942 337.49,272.544 C314.283,259.149 285.697,259.149 262.49,272.544 C239.283,285.942 224.99,310.704 224.99,337.497 L224.99,824.997 C224.99,838.395 217.8416,850.774 206.24,857.474 C194.638,864.1732 180.342,864.1732 168.74,857.474 C157.138,850.7748 149.99,838.396 149.99,824.997 L149.99,337.497 C149.99,283.907 178.58,234.387 224.99,207.597 C271.4,180.8 328.58,180.8 374.99,207.597 C421.4,234.39 449.99,283.909 449.99,337.497 L449.99,899.997 C449.99,959.669 426.283,1016.897 384.088,1059.097 C341.893,1101.292 284.662,1124.999 224.988,1124.999 L225.002,1124.999 Z" id="Path"></path>\n        </g>\n    </g>\n</svg>':"mic"===e?'<svg\n    width="1200pt"\n    height="1200pt"\n    version="1.1"\n    viewB
1ox="0 0 1200 1200"\n    xmlns="http://www.w3.org/2000/svg"\n  >\n    <g class="bb-svg-path">\n      <path\n        d="m600 862.5c144.75 0 262.5-117.75 262.5-262.5v-300c0-144.75-117.75-262.5-262.5-262.5s-262.5 117.75-262.5 262.5v300c0 144.75 117.75 262.5 262.5 262.5z"\n      />\n      <path\n        d="m1012.5 600c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 186.11-151.41 337.5-337.5 337.5s-337.5-151.39-337.5-337.5c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 214.8 165.08 391.57 375 410.6v114.4c0 20.727 16.793 37.5 37.5 37.5s37.5-16.773 37.5-37.5v-114.4c209.92-19.031 375-195.8 375-410.6z"\n      />\n    </g>\n  </svg>':"camera"===e?'<svg width="1155px" height="1004px" viewBox="0 0 1155 1004" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g fill="#333333" fill-rule="nonzero">\n            <g transform="translate(128.324095, 0.000000)">\n                <path d="M42.7803063,0.00413459787 C31.4357421,0.00413459787 20.5549853,4.41399115 12.5336107,12.2572687 C4.51223664,20.1005462 0.00420584816,30.741831 0.00420584816,41.8370305 L0.00420584816,251.00151 C-0.156199045,262.200455 4.27736739,272.989996 12.315738,280.963903 C20.3585574,288.938257 31.3288589,293.431222 42.7803063,293.431222 C54.2317532,293.431222 65.2018267,288.938592 73.2448746,280.963903 C81.2832452,272.989549 85.7172445,262.200455 85.5564062,251.00151 L85.5564062,83.6699265 L256.660808,83.6699265 C268.112255,83.8267939 279.145066,79.4909873 287.298762,71.6298611 C295.452913,63.7643845 300.04718,53.0359758 300.04718,41.8370305 C300.04718,30.6380854 295.453255,19.9098998 287.298762,12.0441998 C279.144611,4.18307356 268.112255,-0.153157091 256.660808,0.00413459787 L42.7803063,0.00413459787 Z"></path>\n                <path d="M983.227131,710.59444 C971.895913,710.764382 961.099907,715.326799 953.20401,723.279287 C945.312674,731.227538 940.964345,741.91668 941.119476,752.99849 L941.119476,920.330075 L770.015075,920.330075 C758.563631,920.173205 747.530815,924.509015 739.377123,932.370139 C731.222968,940.235615 726.628705,950.964028 726.628705,962.16297 C726.628705,973.361918 731.222627,984.090105 739.377123,991.955802 C747.531272,999.816926 758.563631,1004.15316 770.015075,1003.99587 L983.895579,1003.99587 C995.24014,1003.99587 1006.1209,999.586011 1014.14227,991.742733 C1022.16365,983.899455 1026.67168,973.258169 1026.67168,962.16297 L1026.67168,752.99849 C1026.83208,741.690223 1022.30053,730.801401 1014.11489,722.812989 C1005.93394,714.825472 994.790363,710.415949 983.227131,710.59444 L983.227131,710.59444 Z"></path>\n                <path d="M983.227131,375.93127 C971.895913,376.101212 961.099907,380.66363 953.20401,388.61612 C945.312674,396.56437 940.964345,407.253512 941.119476,418.335325 L941.119476,585.66691 C940.959072,596.865853 945.39264,607.655394 953.431008,615.629303 C961.47383,623.603658 972.444131,628.096618 983.895579,628.096618 C995.347023,628.096618 1006.3171,623.603989 1014.36015,615.629303 C1022.39852,607.654947 1026.83251,596.865853 1026.67168,585.66691 L1026.67168,418.335325 C1026.83208,407.027056 1022.30053,396.138232 1014.11489,388.149822 C1005.93394,380.162305 994.790363,375.752783 983.227131,375.93127 L983.227131,375.93127 Z"></path>\n                <path d="M769.974012,0.00413459787 C758.522563,-0.152733184 747.489752,4.18307356 739.336055,12.0441998 C731.181906,19.9096767 726.587637,30.6380854 726.587637,41.8370305 C726.587637,53.0359758 731.181564,63.7641611 739.336055,71.6298611 C747.490209,79.4909873 758.522563,83.8272181 769.974012,83.6699265 L941.078414,83.6699265 L941.078414,251.00151 C940.918009,262.200455 945.351572,272.989996 953.389945,280.963903 C961.432763,288.938257 972.403063,293.431222 983.854512,293.431222 C995.30596,293.431222 1006.27603,288.938592 1014.31908,280.963903 C1022.35745,272.989549 1026.79145,262.200455 1026.63061,251.00151 L1026.63061,41.8370305 C1026.63061,30.7426118 1022.12133,20.1017733 1014.10121,12.2572687 C1006.08109,4.41276405 995.199876,0.00413459787 983.854512,0.00413459787 L769.974012,0.00413459787 Z"></path>\n                <path d="M427.765208,0.00413459787 C416.31376,-0.152733184 405.280949,4.18307356 397.127256,12.0441998 C388.973102,19.9096767 384.378838,30.6380854 384.378838,41.8370305 C384.378838,53.0359758 388.972761,63.7641611 397.127256,71.
16298611 C405.281406,79.4909873 416.31376,83.8272181 427.765208,83.6699265 L598.86961,83.6699265 C610.321058,83.8267939 621.35387,79.4909873 629.507562,71.6298611 C637.661716,63.7643845 642.255985,53.0359758 642.255985,41.8370305 C642.255985,30.6380854 637.662058,19.9098998 629.507562,12.0441998 C621.353413,4.18307356 610.321058,-0.153157091 598.86961,0.00413459787 L427.765208,0.00413459787 Z"></path>\n            </g>\n            <g transform="translate(0.000000, 427.000000)">\n                <path d="M768.516184,22.1826583 C752.659627,13.73125 732.573775,13.73125 717.773442,24.29375 L562.379192,124.6375 L562.379192,31.6875 C562.379192,13.7330104 548.635081,0 530.666079,0 L31.7131123,0 C13.7441105,0 0,13.7330104 0,31.6875 L0,475.3125 C0,493.26699 13.7441105,507 31.7131123,507 L530.666079,507 C548.635081,507 562.379192,493.26699 562.379192,475.3125 L562.379192,382.3625 L717.773442,482.70625 C726.231681,487.9875 735.742444,491.157658 745.257258,491.157658 C753.715498,491.157658 761.113815,489.046567 769.572406,484.820862 C786.485185,475.313732 796,458.414612 796,439.400352 L796,68.6566021 C794.943601,48.5869719 785.428963,31.6878521 768.516184,22.1807219 L768.516184,22.1826583 Z"></path>\n            </g>\n        </g>\n    </g>\n</svg>':"recorderon"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g>\n            <circle fill="#E31810" cx="625.5" cy="625.5" r="625.5"></circle>\n            <circle fill="#F71008" cx="625" cy="625" r="507"></circle>\n            <g transform="translate(175.000000, 449.000000)" fill="#FFFFFF" fill-rule="nonzero">\n                <path d="M0,347.097493 L0,4.90250696 L135.528311,4.90250696 C161.471024,4.90250696 183.639743,9.49741034 202.034469,18.6872171 C220.429194,27.8770239 234.46286,40.8541449 244.135466,57.6185803 C253.808072,74.3830156 258.644376,94.0714804 258.644376,116.683975 C258.644376,139.40786 253.724206,158.929238 243.883867,175.248107 C234.043527,191.566976 219.814173,204.070682 201.195803,212.759227 C182.577434,221.447772 160.073248,225.792044 133.683247,225.792044 L42.9396629,225.792044 L42.9396629,167.64563 L121.941933,167.64563 C135.807866,167.64563 147.325536,165.751973 156.494943,161.964659 C165.66435,158.177344 172.51345,152.496373 177.042243,144.921744 C181.571035,137.347116 183.835432,127.934526 183.835432,116.683975 C183.835432,105.322032 181.571035,95.7423543 177.042243,87.9449425 C172.51345,80.1475308 165.636395,74.2159282 156.411077,70.1501349 C147.185759,66.0843416 135.584222,64.051445 121.606467,64.051445 L72.6284142,64.051445 L72.6284142,347.097493 L0,347.097493 Z M185.512762,191.37204 L270.888889,347.097493 L190.712487,347.097493 L107.181424,191.37204 L185.512762,191.37204 Z"></path>\n                <polygon points="309.166667 347.097493 309.166667 4.90250696 540.126846 4.90250696 540.126846 64.5527072 381.634607 64.5527072 381.634607 146.091356 528.244113 146.091356 528.244113 205.741556 381.634607 205.741556 381.634607 287.447293 540.796296 287.447293 540.796296 347.097493"></polygon>\n                <path d="M901,124.638783 L827.757943,124.638783 C826.420189,115.158428 823.68894,106.709759 819.564197,99.2927757 C815.439454,91.8757921 810.144176,85.5462611 803.678363,80.3041825 C797.212549,75.0621039 789.77129,71.0468948 781.354585,68.2585551 C772.93788,65.4702155 763.824427,64.0760456 754.014228,64.0760456 C736.288981,64.0760456 720.849065,68.4537389 707.69448,77.2091255 C694.539894,85.964512 684.339516,98.6793409 677.093346,115.353612 C669.847176,132.027883 666.224091,152.243346 666.224091,176 C666.224091,200.425856 669.875046,220.948035 677.176956,237.56654 C684.478866,254.185044 694.707113,266.732573 707.861699,275.209125 C721.016285,283.685678 736.233242,287.923954 753.51257,287.923954 C763.21129,287.923954 772.213263,286.641318 780.518488,284.076046 C788.823714,281.510773 796.209233,277.746515 802.675047,272.78327 C809.14086,267.820025 814.519748,261.769328 818.81171,254.631179 C823.103672,247.493029 826.08575,239.351077 827.757943,230.205323 L901,230.539924 C899.104848,246.26616 894.394837,261.406844 886.869968,275.961977 C879.3451,290.51711 869.256201,303.510773 856.603274,314.942966 C843.950346,326.375158 828.900608,335.409379 811.45406,342.045627 C794.007513,348.681876 774.303504,352 752.342035,352 C721.796641,352 694.512024,345.084918 670.488184,331.254753 C646.464343,317.424588 627.512821,297.404309 
1613.633619,271.193916 C599.754416,244.983523 592.814815,213.252218 592.814815,176 C592.814815,138.636248 599.838026,106.849176 613.884448,80.6387833 C627.93087,54.4283904 646.993871,34.4359949 671.073451,20.661597 C695.153031,6.88719899 722.242559,0 752.342035,0 C772.185393,0 790.607387,2.78833967 807.608016,8.36501901 C824.608646,13.9416984 839.686254,22.0557668 852.840839,32.7072243 C865.995425,43.3586819 876.72533,56.3802281 885.030556,71.7718631 C893.335782,87.1634981 898.65893,104.785805 901,124.638783 Z"></path>\n            </g>\n        </g>\n    </g>\n</svg>':"recorderoff"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n      <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n          <g class="bb-rec-on-circle" fill="#EEEEEE" fill-rule="nonzero">\n              <path d="M625.5,0 C970.954111,0 1251,280.045889 1251,625.5 C1251,970.954111 970.954111,1251 625.5,1251 C280.045889,1251 0,970.954111 0,625.5 C0,280.045889 280.045889,0 625.5,0 Z M626,124 C348.753056,124 124,348.753056 124,626 C124,903.246944 348.753056,1128 626,1128 C903.246944,1128 1128,903.246944 1128,626 C1128,348.753056 903.246944,124 626,124 Z"></path>\n          </g>\n          <g class="bb-rec-on-cont" fill="#E31810" transform="translate(86.000000, 86.000000)" fill-rule="nonzero">\n              <path d="M540,0 C241.2,0 0,241.2 0,540 C0,838.8 241.2,1080 540,1080 C838.8,1080 1080,838.8 1080,540 C1080,241.2 838.8,0 540,0 Z M777.6,741.6 C777.6,761.998 761.998,777.6 741.6,777.6 L338.4,777.6 C318.002,777.6 302.4,761.998 302.4,741.6 L302.4,338.4 C302.4,318.002 318.002,302.4 338.4,302.4 L741.6,302.4 C761.998,302.4 777.6,318.002 777.6,338.4 L777.6,741.6 Z"></path>\n          </g>\n      </g>\n  </svg>':"arrowdown"===e?'<svg class="bb-logo-arrowdown" fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n    <path d="m50 77.637c-1.3477 0-2.6953-0.51562-3.7266-1.543l-44.73-44.73c-2.0586-2.0586-2.0586-5.3945 0-7.4531 2.0586-2.0586 5.3945-2.0586 7.4531 0l41.004 41 41.004-41c2.0586-2.0586 5.3945-2.0586 7.4531 0 2.0586 2.0586 2.0586 5.3945 0 7.4531l-44.73 44.727c-1.0312 1.0312-2.3789 1.5469-3.7266 1.5469z"/>\n   </svg>'):"arrowleft"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n    <path d="m70.988 1.6211c2.1875-2.168 5.7344-2.168 7.9297 0 2.1836 2.168 2.1836 5.7227 0 7.8906l-46.016 40.445 46.016 40.5c2.1836 2.168 2.1836 5.668 0 7.8906-2.1953 2.168-5.7383 2.168-7.9297 0l-50.039-44.109c-1.168-1.168-1.668-2.7227-1.5898-4.2773-0.078125-1.5 0.42188-3.0547 1.5898-4.2227l50.039-44.109z" fill-rule="evenodd"/>\n   </svg>'):"close"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n    <path d="m72.812 33.02l-5.832-5.832-16.98 16.875-16.98-16.875-5.832 5.832 16.875 16.98-16.875 16.98 5.832 5.832 16.98-16.875 16.98 16.875 5.832-5.832-16.875-16.98z"/>\n   </svg>'):"undo"===e?'<svg width="62px" height="60px" viewBox="0 0 62 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n      <g class="bb-svg-path" transform="translate(-0.000500, 0.001926)" fill-rule="nonzero">\n        <path d="M28.0005,51.6270739 C24.9653,51.0684839 22.0825,49.8731739 19.5396,48.1192739 L13.8208,53.8380739 C17.9536,57.0060739 22.8403,59.0333739 28.0008,59.7286739 L28.0005,51.6270739 Z" id="Path"></path>\n        <path d="M2.2705,33.9980739 C2.96581,39.1582739 4.9932,44.0450739 8.1611,48.1780739 L13.8799,42.4592739 C12.126,39.9162739 10.9307,37.0334739 10.3721,33.9983739 L2.2705,33.9980739 Z" id="Path"></path>\n        <path d="M61.7305,33.9980739 L53.6289,33.9980739 C53.07031,37.0332739 51.875,39.9160739 50.1211,42.4589739 L55.8399,48.1777739 C59.0079,44.0449739 61.0352,39.1582739 61.7305,33.9977739 L61.7305,33.9980739 Z" id="Path"></path>
1\n        <path d="M4.0005,24.9980739 L24.0005,24.9980739 L24.0005,16.9980739 L14.27,16.9980739 C17.6762,12.3613739 22.7622,9.24417393 28.442,8.31057393 C34.1178,7.38088393 39.934,8.70901393 44.645,12.0175739 C49.352,15.3222739 52.5786,20.3417739 53.6294,25.9975739 L61.731,25.9975739 C60.6646,18.0834739 56.4888,10.9235739 50.129,6.09957393 C43.7657,1.27147393 35.746,-0.818426068 27.836,0.290973932 C19.9298,1.39647393 12.793,5.61127393 8,11.9979739 L8,0.997973932 L-3.55271368e-15,0.997973932 L-3.55271368e-15,20.9979739 C-3.55271368e-15,22.0604739 0.42188,23.0760739 1.1719,23.8260739 C1.92192,24.5760739 2.9375,24.9979739 4,24.9979739 L4.0005,24.9980739 Z" id="Path"></path>\n        <path d="M36.0005,51.6270739 L36.0005,59.7286739 C41.1607,59.0333639 46.0475,57.0059739 50.1805,53.8380739 L44.4617,48.1192739 C41.9187,49.8731739 39.0359,51.0684739 36.0008,51.6270739 L36.0005,51.6270739 Z" id="Path"></path>\n      </g>\n    </g>\n  </svg>':"circle-dot"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>'):"circle-question"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'):"circle-info"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216 192V224h24 48 24v24 88h8 24v48H296 216 192V336h24zm72-144H224V128h64v64z"/></svg>'):"circle-exclamation"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm24-384v24V264v24H232V264 152 128h48zM232 368V320h48v48H232z"/></svg>'):"circle-up"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM384 256H304V384H208V256H128V224L256 96 384 224v32z"/></svg>'):"circle-right"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM256 384l0-80-128 0 0-96 128 0 0-80 32 0L416 256 288 384l-32 0z"/></svg>'):""};function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R(r.key),r)}}function P(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=A(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==A(t)?t:String(t)}var _=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),P(this,"startTimestamp",Date.now()),P(this,"requestId",0),P(this,"requests",{}),P(this,"externalRequests",[]),P(this,"maxRequests",30),P(this,"filters",[]),P(this,"defaultBlacklist",["gleap.io"]),P(this,"blacklist",[]),P(this,"initialized",!1),P(this,"stopped",!1),P(this,"loadAllResources",!1)}
1return e=[{key:"setLoadAllResources",value:function(e){this.loadAllResources=e}},{key:"isContentTypeSupported",value:function(e){if("string"!=typeof e)return!1;if(""===e)return!0;e=e.toLocaleLowerCase();for(var t=["text/","xml","json"],n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1}},{key:"getRequests",value:function(){var e=JSON.parse(JSON.stringify(Object.values(this.requests)));if(this.externalRequests&&this.externalRequests.length>0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t<e.length;t++){var n=e[t];if(n&&n.request&&n.request.headers)for(var r=0;r<this.filters.length;r++)delete n.request.headers[this.filters[r]];if(n&&n.request&&n.request.payload){var o=n.request.payload;try{o=JSON.parse(n.request.payload)}catch(e){}if(o){for(r=0;r<this.filters.length;r++)delete o[this.filters[r]];n.request.payload=JSON.stringify(o)}}if(n&&n.response&&n.response.responseText)try{var i=JSON.parse(n.response.responseText);for(r=0;r<this.filters.length;r++)delete i[this.filters[r]];n.response.responseText=JSON.stringify(i)}catch(e){}}try{if("u">typeof window&&window.performance){var a=window.performance.getEntriesByType("resource");for(t=0;t<a.length;t++){var l=a[t];l&&l.name&&(this.loadAllResources||["xmlhttprequest","fetch"].indexOf(l.initiatorType)>-1)&&!e.find(function(e){return e.url===l.name})&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+l.startTime),url:l.name,duration:Math.round(l.duration),initiatorType:l.initiatorType})}}}catch(e){}var c=this.blacklist.concat(this.defaultBlacklist);if(c&&c.length>0)try{e=e.filter(function(e){for(var t=0;t<c.length;t++)if(e&&e.url&&e.url.includes(c[t]))return!1;return!0})}catch(e){}return e}},{key:"setMaxRequests",value:function(e){e>70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=this.filters.concat(e||[])}},{key:"setBlacklist",value:function(e){this.blacklist=this.blacklist.concat(e||[])}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n<t.length;n++)delete this.requests[t[n]]}},{key:"calcRequestTime",value:function(e){if(e&&this.requests&&this.requests[e]){var t=this.requests[e].date;t&&(this.requests[e].duration=(new Date).getTime()-t.getTime())}}},{key:"getTextContentSize",value:function(e){var t=0;try{t=(new TextEncoder).encode(e).length}catch(n){try{t=encodeURI(s).split(/%..|./).length-1}catch(n){try{t=new Blob([e]).size}catch(n){t=e.length}}}return t/1024/1024}},{key:"cleanupContentSize",value:function(e){return this.getTextContentSize(e)>.15?"<content_too_large>":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("u"<typeof TextDecoder?"undefined":A(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(e){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,r){if(!e.stopped&&r&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[r]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var o=n[1]&&n[1].method?n[1].method:"GET";e.requests[r]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:o,url:n[0],date:new Date}}else e.requests[r]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,r){if(!e.stopped&&r&&e.requests&&e.requests[r]){try{e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(r)}catch(e){}try{var o="";n.headers&&void 0!==n.headers.get&&(o=n.headers.get("content-type")),e.isContentTypeSupported(o)?n.text().then(function(o){e.requests[r]&&(e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(o)}),e.calcRequestTime(r),e.cleanRequests()}).catch(function(t){e.cleanRequests()}):(e.requests[r]&&(e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(r),e.cleanRequests())}catch(e){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var r=t.currentTarget,o=r.responseType,i="<"+o+">";""!==o&&"text"!==o||(i=e.cleanupContentSize(r.responseText)),e.requests[r.bbRequestId].success=!0,e.requests[r.bbRequestId].response={status:r.status,statusText:r.statusText,responseText:i},e.calcRequestTime(r.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,r=XMLHttpRequest.prototype.open,o=XMLHttpRequest.prototype.send;return void 0===XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.gleapSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader),XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.setRequestHeader=function(e,t){try{this.requestHeaders||(this.requestHeaders={}),this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t)}catch(e){}return this.gleapSetRequestHeader(e,t)}),XMLHttpRequest.prototype.open=function(){try{this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e))}catch(e){}return r.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){try{e.onSend&&e.onSend(this,arguments)}catch(e){}return o.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var r=++n.requestId;try{e.onFetch(arguments,r)}catch(e){}return t.apply(this,arguments).then(function(t){try{if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,r)}}catch(e){}return t}).catch(function(t){try{e.onFetchFailed(t,r)}catch(e){}throw t})}),e}},{key:"blobToTextPromise",value:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},r.onerror=function(e){n(e)},r.readAsText(e)})}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&M(n.prototype,e),t&&M(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();P(_,"instance",void 0);var D=function(e,t){if(e&&t){var n,r=function(){try{e.src=t}catch(e){}};try{if(!e.contentDocument)return r()}catch(e){return r()}try{n=new URL(t).origin+"/"}catch(e){return r()}fetch(t,{mode:"cors",credentials:"omit"}).then(function(e){if(!e.ok)throw Error("Bootstrap fetch failed: "+e.status);return e.text()}).then(function(o){var i=o.replace(/(\s(?:href|src)\s*=\s*["'])\/([^"'/][^"']*)/g,"$1"+n+"$2"),a="/";try{var l=new URL(t);a=l.pathname+l.search+l.hash}catch(e){}var c,u,d='<script>try{history.replaceState(null,"",'+JSON.stringify(a)+");}catch(e){}</script>";c=/<script\b/i.test(i)?i.replace(/<script\b/i,d+"<script"):/<\/head>/i.test(i)?i.replace(/<\/head>/i,d+"</head>"):i;try{u=e.contentDocument}catch(e){return r()}if(!u)return r();try{u.open(),u.write(c),u.close()}catch(e){r()}}).catch(function(){r()})}},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>
12&&void 0!==arguments[2]?arguments[2]:400;return new Promise(function(r,o){var i=0===e.indexOf("data:image/jpeg"),a=new Image;a.src=e,a.onerror=function(){o()},a.onload=function(){var e=document.createElement("canvas"),o=t,l=n;t>a.width/1.5&&(o=a.width/1.5),n>a.height/1.5&&(l=a.height/1.5);var c=a.width,u=a.height;c>u?c>o&&(u*=o/c,c=o):u>l&&(c*=l/u,u=l),e.width=c,e.height=u,e.getContext("2d").drawImage(a,0,0,c,u),r(i?e.toDataURL("image/jpeg",.7):e.toDataURL())}})},N=/(android|iphone|ipod|ipad|blackberry|iemobile|opera mini|webos)/i,F=function(){return B()?"mobile":"desktop"},B=function(){if("u"<typeof window)return!1;try{var e="u">typeof navigator?navigator:void 0;if(null!=e&&e.userAgentData&&"boolean"==typeof e.userAgentData.mobile&&null!==e.userAgentData.mobile)return e.userAgentData.mobile;if(e&&N.test(e.userAgent||e.vendor||""))return!0;if((null==e?void 0:e.maxTouchPoints)>1&&window.matchMedia){var t=window.matchMedia("(hover: none) and (pointer: coarse)");if(null!=t&&t.matches)return!0}}catch(e){}return!1},U=function(e){if(!e)return{};if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(e){return{}}return e},H=function(e,t){return e.length>t?e.slice(0,t)+"...":e},z=function(e){try{var t=e.split("."),n=!1,r=t[t.length-2];return"co"!==r&&"com"!==r&&"gv"!==r&&"ac"!==r&&"edu"!==r&&"gov"!==r&&"mil"!==r&&"net"!==r&&"org"!==r||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(e){}return e},q=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(e){}return null},W=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(e){}else localStorage.removeItem(n)},G=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",function(){e()})},V=!1;function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,X(r.key),r)}}function K(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){var t=function(e,t){if("object"!=J(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=J(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==J(t)?t:String(t)}var Z="success",$="error",Q=function(){var e,t;function n(){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),K(this,"validationRequests",new Map),K(this,"validationCache",new Map),K(this,"fetchRequests",new Map),K(this,"fetchCache",new Map),n.instance)return n.instance;n.instance=this}return e=[{key:"clearCache",value:function(){this.validationCache.clear(),this.fetchCache.clear(),this.validationRequests.clear(),this.fetchRequests.clear()}},{key:"_getQueryParams",value:function(){var e=tR.getInstance(),t=null==e?void 0:e.session,n=lT.getInstance().getActiveLanguage()||"en";return"gleapId=".concat((null==t?void 0:t.gleapId)||"","&gleapHash=").concat((null==t?void 0:t.gleapHash)||"","&lang=").concat(n)}},{key:"_getApiUrl",value:function(){var e=tR.getInstance();return(null==e?void 0:e.apiUrl)||null}},{key:"_makeRequest",value:function(e,t,n){return new Promise(function(r,o){var i=new XMLHttpRequest;i.open(e,t);var a=tR.getInstance();null==a||a.injectSession(i),n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{var e=i.responseText?JSON.parse(i.responseText):null;r(e)}catch(e){o({status:i.status,statusText:"JSON Parse Error",responseText:i.responseText,error:e})}else o({status:i.status,statusText:i.statusText,responseText:i.responseText})},i.onerror=function(){o({status:0,statusText:"Network Error",responseText:null})},i.send(n?JSON.stringify(n):null)})}},{key:"_createCacheKey",value:function(e,t){return t?"".concat(e,"::").concat(t):e}},{key:"validateChecklist",value:function(e,t){var n=this,r=this._createCacheKey(e,t),o=this.validationCache.get(r);if(o)return o.status===Z?Promise.resolve(o.internalId):Promise.reject(o.error);if(this.validationRequests.has(r))return this.validationRequests.get(r);var i=this._getApiUrl();if(!i){var a=Error("ChecklistNetworkManager: Gleap API URL not configured.");return this.validationCache.set(r,{status:$,error:a}),Promise.reject(a)}
1var l="".concat(i,"/outbound/checklists?").concat(this._getQueryParams()),c=this._makeRequest("POST",l,{outboundId:e,sharedKey:t}).then(function(e){if(e&&e.id)return n.validationCache.set(r,{status:Z,internalId:e.id}),e.id;var t=Error("Validation response missing checklist ID.");throw n.validationCache.set(r,{status:$,error:e||t}),t}).catch(function(e){throw n.validationCache.set(r,{status:$,error:e}),e}).finally(function(){n.validationRequests.delete(r)});return this.validationRequests.set(r,c),c}},{key:"fetchChecklist",value:function(e){var t=this,n=this.fetchCache.get(e);if(n)return n.status===Z?Promise.resolve(JSON.parse(JSON.stringify(n.data))):Promise.reject(n.error);if(this.fetchRequests.has(e))return this.fetchRequests.get(e).then(function(e){return JSON.parse(JSON.stringify(e))});var r=this._getApiUrl();if(!r){var o=Error("ChecklistNetworkManager: Gleap API URL not configured.");return this.fetchCache.set(e,{status:$,error:o}),Promise.reject(o)}var i="".concat(r,"/outbound/checklists/").concat(e,"?convertTipTap=true&").concat(this._getQueryParams()),a=this._makeRequest("GET",i,null).then(function(n){if(n)return t.fetchCache.set(e,{status:Z,data:n}),JSON.parse(JSON.stringify(n));var r=Error("Empty response received for checklist fetch.");throw t.fetchCache.set(e,{status:$,error:n||r}),r}).catch(function(n){throw t.fetchCache.set(e,{status:$,error:n}),n}).finally(function(){t.fetchRequests.delete(e)});return this.fetchRequests.set(e,a),a.then(function(e){return JSON.parse(JSON.stringify(e))})}}],t=[{key:"getInstance",value:function(){return n.instance||(n.instance=new n),n.instance}}],e&&Y(n.prototype,e),t&&Y(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(){et=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(t,n,r,i){var a,l,c,u,d=Object.create((n&&n.prototype instanceof v?n:v).prototype);return o(d,"_invoke",{value:(a=t,l=r,c=new T(i||[]),u=h,function(t,n){if(u===f)throw Error("Generator is already running");if(u===g){if("throw"===t)throw n;return{value:e,done:!0}}for(c.method=t,c.arg=n;;){var r=c.delegate;if(r){var o=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),m;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var l=a.arg;return l?l.done?(r[n.resultName]=l.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):l:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(r,c);if(o){if(o===m)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=g,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=f;var i=p(a,l,c);if("normal"===i.type){if(u=c.done?g:"suspendedYield",i.arg===m)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(u=g,c.method="throw",c.arg=i.arg)}})}),d}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};u(w,a,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,l){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==ee(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,l)})}l(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw TypeError(ee(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),u(I.prototype,l,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
1ise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),u(S,c,"Generator"),u(S,a,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function er(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}K(Q,"instance",null);var eo=function(e,t,n){var r,o,i,a,l,c,u;switch(e){case"meta":null==(r=n.onMeta)||r.call(n,t);break;case"token":null==(o=n.onToken)||o.call(n,t);break;case"tool_start":null==(i=n.onToolStart)||i.call(n,t);break;case"tool_end":null==(a=n.onToolEnd)||a.call(n,t);break;case"done":null==(l=n.onDone)||l.call(n,t);break;case"error":null==(c=n.onError)||c.call(n,t);break;case"handoff":null==(u=n.onHandoff)||u.call(n,t)}},ei=(nW=et().mark(function e(t,n){var r,o,i,a,l,c,u,d,p,h,f,g,m,v,y,b,w;return et().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.body){e.next=3;break}return null==(r=n.onError)||r.call(n,{message:"No response body."}),e.abrupt("return");case 3:o=t.body.getReader(),i=new TextDecoder,a="",l="",c="",e.prev=8;case 9:return e.next=12,o.read();case 12:if(p=(d=e.sent).done,h=d.value,!p){e.next=17;break}return e.abrupt("break",24);case 17:a+=i.decode(h,{stream:!0}),a=null!=(u=(f=a.split("\n")).pop())?u:"",g=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return en(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return en(e,void 0)}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(f);try{for(g.s();!(m=g.n()).done;)if((v=m.value.replace(/\r$/,"")).startsWith("event: "))l=v.slice(7).trim();else if(v.startsWith("data: "))c+=(c?"\n":"")+v.slice(6);else if(""===v){if(l&&c)try{y=JSON.parse(c),eo(l,y,n)}catch(e){}l="",c=""}}catch(e){g.e(e)}finally{g.f()}e.next=9;break;case 24:if(l&&c)try{b=JSON.parse(c),eo(l,b,n)}catch(e){}e.next=30;break;case 27:e.prev=27,e.t0=e.catch(8),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)&&(null==(w=n.onError)||w.call(n,{message:"Stream interrupted."}));case 30:case"end":return e.stop()}},e,null,[[8,27]])}),nG=function(){var e=this,t=arguments;return new Promise(function(n,r){var o=nW.apply(e,t);function i(e){er(o,n,r,i,a,"next",e)}function a(e){er(o,n,r,i,a,"throw",e)}i(void 0)})},function(e,t){return nG.apply(this,arguments)});function ea(e){return(ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function es(e,t){var n="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return el(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return el(e,void 0)}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function el(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ec(){ec=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(t,n,r,i){var a,l,c,u,d=Object.create((n&&n.prototype instanceof v?n:v).prototype);return o(d,"_invoke",{value:(a=t,l=r,c=new T(i||[]),u=h,function(t,n){if(u===f)throw Error("Generator is already running");if(u===g){if("throw"===t)throw n;return{value:e,done:!0}}for(c.method=t,c.arg=n;;){var r=c.delegate;if(r){var o=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),m;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var l=a.arg;return l?l.done?(r[n.resultName]=l.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):l:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(r,c);if(o){if(o===m)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=g,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=f;var i=p(a,l,c);if("normal"===i.type){if(u=c.done?g:"suspendedYield",i.arg===m)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(u=g,c.method="throw",c.arg=i.arg)}})}),d}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};u(w,a,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,l){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==ea(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,l)})}l(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw TypeError(ea(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),u(I.prototype,l,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
1ise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),u(S,c,"Generator"),u(S,a,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function eu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eu(Object(n),!0).forEach(function(t){ef(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ep(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function eh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eg(r.key),r)}}function ef(e,t,n){return(t=eg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eg(e){var t=function(e,t){if("object"!=ea(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ea(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ea(t)?t:String(t)}var em="success",ev=function(){var e,t,n,r;function o(){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),ef(this,"executeInFlight",new Map),ef(this,"messagesCache",new Map),ef(this,"messagesRequests",new Map),o.instance)return o.instance;o.instance=this}return e=[{key:"clearCache",value:function(){this.messagesCache.clear(),this.messagesRequests.clear(),this.executeInFlight.clear()}},{key:"_getApiUrl",value:function(){var e=tR.getInstance();return(null==e?void 0:e.apiUrl)||null}},{key:"_getHeaders",value:function(){var e,t,n=tR.getInstance(),r={"Content-Type":"application/json"};return null!=n&&n.sdkKey&&(r["Api-Token"]=n.sdkKey),null!=n&&null!=(e=n.session)&&e.gleapId&&(r["Gleap-Id"]=n.session.gleapId),null!=n&&null!=(t=n.session)&&t.gleapHash&&(r["Gleap-Hash"]=n.session.gleapHash),r}},{key:"_makeRequest",value:function(e,t,n){return new Promise(function(r,o){var i=new XMLHttpRequest;i.open(e,t);var a=tR.getInstance();null==a||a.injectSession(i),n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{r(i.responseText?JSON.parse(i.responseText):null)}catch(e){o({status:i.status,statusText:"JSON Parse Error",error:e})}else o({status:i.status,statusText:i.statusText,responseText:i.responseText})},i.onerror=function(){return o({status:0,statusText:"Network Error"})},i.send(n?JSON.stringify(n):null)})}},{key:"streamAgent",value:(n=ec().mark(function e(t,n,r,o){var i,a,l,c,u,d,p;return ec().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.executeInFlight.get(t)){e.next=2;break}return e.abrupt("return");case 2:if(this.executeInFlight.set(t,!0),i=this._getApiUrl()){e.next=8;break}return this.executeInFlight.delete(t),null==(a=r.onError)||a.call(r,{message:"Gleap API URL not configured."}),e.abrupt("return");case 8:return l="".concat(i,"/v3/shared/agents/").concat(t,"/stream"),c=ed(ed({},this._getHeaders()),{},{Accept:"text/event-stream"}),e.prev=10,e.next=13,fetch(l,{method:"POST",headers:c,body:JSON.stringify(n),signal:o});case 13:u=e.sent,e.next=23;break;case 16:if(e.prev=16,e.t0=e.catch(10),this.executeInFlight.delete(t),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=21;break}return e.abrupt("return");case 21:return null==(d=r.onError)||d.call(r,{message:"Failed to connect to agent."}),e.abrupt("return");case 23:if(u.ok){e.next=27;break}return this.executeInFlight.delete(t),null==(p=r.onError)||p.call(r,{message:"Server error: ".concat(u.status)}),e.abrupt("return");case 27:return e.next=29,ei(u,r);case 29:n.conversationId&&this._invalidateMessagesCache(n.conversationId),this.executeInFlight.delete(t);case 31:case"end":return e.stop()}},e,this,[[10,16]])}),r=function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){ep(i,r,o,a,l,"next",e)}function l(e){ep(i,r,o,a,l,"throw",e)}a(void 0)})},function(e,t,n,o){return r.apply(this,arguments)})},{key:"executeAgent",value:function(e,t){var n=this;if(this.executeInFlight.get(e))return Promise.reject(Error("Agent execution already in progress."));var r=this._getApiUrl();if(!r)return Promise.reject(Error("AgentNetworkManager: Gleap API URL not configured."));this.executeInFlight.set(e,!0);var o="".concat(r,"/v3/shared/agents/").concat(e,"/execute");
1return this._makeRequest("POST",o,t).then(function(e){return t.conversationId&&n._invalidateMessagesCache(t.conversationId),null!=e&&e.conversationId&&n._invalidateMessagesCache(e.conversationId),e}).finally(function(){n.executeInFlight.delete(e)})}},{key:"getConversationMessages",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("kai"===e)return Promise.resolve({messages:[]});var i="".concat(t,":").concat(r,":").concat(o),a=this.messagesCache.get(i);if(a)return a.status===em?Promise.resolve(JSON.parse(JSON.stringify(a.data))):Promise.reject(a.error);if(this.messagesRequests.has(i))return this.messagesRequests.get(i).then(function(e){return JSON.parse(JSON.stringify(e))});var l=this._getApiUrl();if(!l)return Promise.reject(Error("AgentNetworkManager: Gleap API URL not configured."));var c="".concat(l,"/v3/shared/agents/").concat(e,"/conversations/").concat(t,"/messages?limit=").concat(r,"&skip=").concat(o),u=this._makeRequest("GET",c,null).then(function(e){return n.messagesCache.set(i,{status:em,data:e}),JSON.parse(JSON.stringify(e))}).catch(function(e){throw n.messagesCache.set(i,{status:"error",error:e}),e}).finally(function(){n.messagesRequests.delete(i)});return this.messagesRequests.set(i,u),u.then(function(e){return JSON.parse(JSON.stringify(e))})}},{key:"getConversations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("kai"===e)return Promise.resolve({conversations:[]});var r=this._getApiUrl();return r?this._makeRequest("GET","".concat(r,"/v3/shared/agents/").concat(e,"/conversations?limit=").concat(t,"&skip=").concat(n),null):Promise.reject(Error("AgentNetworkManager: Gleap API URL not configured."))}},{key:"_invalidateMessagesCache",value:function(e){var t,n=es(this.messagesCache.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith(e+":")&&this.messagesCache.delete(r)}}catch(e){n.e(e)}finally{n.f()}var o,i=es(this.messagesRequests.keys());try{for(i.s();!(o=i.n()).done;){var a=o.value;a.startsWith(e+":")&&this.messagesRequests.delete(a)}}catch(e){i.e(e)}finally{i.f()}}}],t=[{key:"getInstance",value:function(){return o.instance||(o.instance=new o),o.instance}}],e&&eh(o.prototype,e),t&&eh(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}();ef(ev,"instance",null);let ey=Math.min,eb=Math.max,ew=Math.round,ek=Math.floor,ex=e=>({x:e,y:e}),eS={left:"right",right:"left",bottom:"top",top:"bottom"},eC={start:"end",end:"start"};function eI(e,t){return"function"==typeof e?e(t):e}function eE(e){return e.split("-")[0]}function eO(e){return e.split("-")[1]}function eT(e){return"x"===e?"y":"x"}function eL(e){return"y"===e?"height":"width"}let eA=new Set(["top","bottom"]);function eM(e){return eA.has(eE(e))?"y":"x"}function eP(e){return e.replace(/start|end/g,e=>eC[e])}let eR=["left","right"],e_=["right","left"],eD=["top","bottom"],ej=["bottom","top"];function eN(e){return e.replace(/left|right|bottom|top/g,e=>eS[e])}function eF(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function eB(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eU(e,t,n){let r,{reference:o,floating:i}=e,a=eM(t),l=eT(eM(t)),c=eL(l),u=eE(t),d="y"===a,p=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,f=o[c]/2-i[c]/2;switch(u){case"top":r={x:p,y:o.y-i.height};break;case"bottom":r={x:p,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:h};break;case"left":r={x:o.x-i.width,y:h};break;default:r={x:o.x,y:o.y}}switch(eO(t)){case"start":r[l]-=f*(n&&d?-1:1);break;case"end":r[l]+=f*(n&&d?-1:1)}return r}async function eH(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:f=0}=eI(t,e),g=eF(f),m=l[h?"floating"===p?"reference":"floating":p],v=eB(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y="floating"===p?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},k=eB(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:c}):y);return{top:(v.top-k.top+g.top)/w.y,bottom:(k.bottom-v.bottom+g.bottom)/w.y,left:(v.left-k.left+g.left)/w.x,right:(k.right-v.right+g.right)/w.x}}let ez=new Set(["left","top"]);function eq(){return"u">typeof window}function eW(e){return eJ(e)?(e.nodeName||"").toLowerCase():"#document"}function eG(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eV(e){var t;return null==(t=(eJ(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function eJ(e){return!!eq()&&(e instanceof Node||e instanceof eG(e).Node)}function eY(e){return!!eq()&&(e instanceof Element||e instanceof eG(e).Element)}function eK(e){return!!eq()&&(e instanceof HTMLElement||e instanceof eG(e).HTMLElement)}function eX(e){return!(!eq()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof eG(e).ShadowRoot)}let eZ=new Set(["inline","contents"]);function e$(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=e8(e);
1return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!eZ.has(o)}let eQ=new Set(["table","td","th"]),e0=[":popover-open",":modal"];function e1(e){return e0.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let e2=["transform","translate","scale","rotate","perspective"],e3=["transform","translate","scale","rotate","perspective","filter"],e4=["paint","layout","strict","content"];function e5(e){let t=e9(),n=eY(e)?e8(e):e;return e2.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||e3.some(e=>(n.willChange||"").includes(e))||e4.some(e=>(n.contain||"").includes(e))}function e9(){return!("u"<typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}let e7=new Set(["html","body","#document"]);function e6(e){return e7.has(eW(e))}function e8(e){return eG(e).getComputedStyle(e)}function te(e){return eY(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if("html"===eW(e))return e;let t=e.assignedSlot||e.parentNode||eX(e)&&e.host||eV(e);return eX(t)?t.host:t}function tn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=tt(t);return e6(n)?t.ownerDocument?t.ownerDocument.body:t.body:eK(n)&&e$(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=eG(o);if(i){let e=tr(a);return t.concat(a,a.visualViewport||[],e$(o)?o:[],e&&n?tn(e):[])}return t.concat(o,tn(o,[],n))}function tr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function to(e){let t=e8(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=eK(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=ew(n)!==i||ew(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function ti(e){return eY(e)?e:e.contextElement}function ta(e){let t=ti(e);if(!eK(t))return ex(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=to(t),a=(i?ew(n.width):n.width)/r,l=(i?ew(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let ts=ex(0);function tl(e){let t=eG(e);return e9()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ts}function tc(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),a=ti(e),l=ex(1);t&&(r?eY(r)&&(l=ta(r)):l=ta(e));let c=(void 0===(o=n)&&(o=!1),!(!r||o&&r!==eG(a))&&o)?tl(a):ex(0),u=(i.left+c.x)/l.x,d=(i.top+c.y)/l.y,p=i.width/l.x,h=i.height/l.y;if(a){let e=eG(a),t=r&&eY(r)?eG(r):r,n=e,o=tr(n);for(;o&&r&&t!==n;){let e=ta(o),t=o.getBoundingClientRect(),r=e8(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,d*=e.y,p*=e.x,h*=e.y,u+=i,d+=a,o=tr(n=eG(o))}}return eB({width:p,height:h,x:u,y:d})}function tu(e,t){let n=te(e).scrollLeft;return t?t.left+n:tc(eV(e)).left+n}function td(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-tu(e,n),y:n.top+t.scrollTop}}let tp=new Set(["absolute","fixed"]);function th(e,t,n){var r;let o;if("viewport"===t)o=function(e,t){let n=eG(e),r=eV(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;let e=e9();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}let u=tu(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else u<=25&&(i+=u);return{width:i,height:a,x:l,y:c}}(e,n);else if("document"===t){let t,n,i,a,l,c,u;r=eV(e),t=eV(r),n=te(r),i=r.ownerDocument.body,a=eb(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=eb(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),c=-n.scrollLeft+tu(r),u=-n.scrollTop,"rtl"===e8(i).direction&&(c+=eb(t.clientWidth,i.clientWidth)-a),o={width:a,height:l,x:c,y:u}}else if(eY(t)){let e,r,i,a;r=(e=tc(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,a=eK(t)?ta(t):ex(1),o={width:t.clientWidth*a.x,height:t.clientHeight*a.y,x:i*a.x,y:r*a.y}}else{let n=tl(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eB(o)}function tf(e){return"static"===e8(e).position}function tg(e,t){if(!eK(e)||"fixed"===e8(e).position)return null;if(t)return t(e);let n=e.offsetParent;return eV(e)===n&&(n=n.ownerDocument.body),n}function tm(e,t){var n;let r=eG(e);if(e1(e))return r;if(!eK(e)){let t=tt(e);for(;t&&!e6(t);){if(eY(t)&&!tf(t))return t;t=tt(t)}return r}let o=tg(e,t);for(;o&&(n=o,eQ.has(eW(n)))&&tf(o);)o=tg(o,t);return o&&e6(o)&&tf(o)&&!e5(o)?r:o||function(e){let t=tt(e);for(;eK(t)&&!e6(t);){if(e5(t))return t;if(e1(t))break;t=tt(t)}return null}(e)||r}let tv={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,a=eV(r),l=!!t&&e1(t.floating);if(r===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=ex(1),d=ex(0),p=eK(r);if((p||!p&&!i)&&(("body"!==eW(r)||e$(a))&&(c=te(r)),eK(r))){let e=tc(r);u=ta(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}
1let h=!a||p||i?ex(0):td(a,c);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}},getDocumentElement:eV,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?e1(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=tn(e,[],!1).filter(e=>eY(e)&&"body"!==eW(e)),o=null,i="fixed"===e8(e).position,a=i?tt(e):e;for(;eY(a)&&!e6(a);){let t=e8(a),n=e5(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&tp.has(o.position)||e$(a)&&!n&&function e(t,n){let r=tt(t);return!(r===n||!eY(r)||e6(r))&&("fixed"===e8(r).position||e(r,n))}(e,a))?r=r.filter(e=>e!==a):o=t,a=tt(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((e,n)=>{let r=th(t,n,o);return e.top=eb(r.top,e.top),e.right=ey(r.right,e.right),e.bottom=ey(r.bottom,e.bottom),e.left=eb(r.left,e.left),e},th(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:tm,getElementRects:async function(e){let t=this.getOffsetParent||tm,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=eK(t),o=eV(t),i="fixed"===n,a=tc(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=ex(0);if(r||!r&&!i)if(("body"!==eW(t)||e$(o))&&(l=te(t)),r){let e=tc(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=tu(o));i&&!r&&o&&(c.x=tu(o));let u=!o||r||i?ex(0):td(o,l);return{x:a.left+l.scrollLeft-c.x-u.x,y:a.top+l.scrollTop-c.y-u.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=to(e);return{width:t,height:n}},getScale:ta,isElement:eY,isRTL:function(e){return"rtl"===e8(e).direction}};function ty(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var tb=function(e,t,n){if(!e||!t||!n)return!0;var r=function(e){return e.replace(/\/$/,"")},o=function(e,t){if(!e||!t)return!1;try{if(e.includes(t))return!0}catch(e){}var n=function(e){if(!e)return null;try{e.startsWith("/")&&(e=e.substring(1));var t=e.replace(/{\w+}/g,"___PLACEHOLDER___");return t=(t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).replace(/___PLACEHOLDER___/g,"[^&?]+"),RegExp(t,"i")}catch(e){return null}}(t);if(!n)return!1;try{return n.test(e)}catch(e){return!1}},i=!1;switch(n){case"is":i=r(e)===r(t);break;case"isnot":i=r(e)!==r(t);break;case"contains":i=o(e,t);break;case"startswith":i=e.startsWith(t);break;case"endswith":i=e.endsWith(t);break;case"notcontains":i=!o(e,t);break;default:i=!1}return i},tw=function(e,t){var n=t.pageRules&&t.pageRules.length>0?t.pageRules:t.pageFilter?[{pageFilter:t.pageFilter,pageFilterType:t.pageFilterType}]:[];return 0===n.length||n.some(function(t){return tb(e,t.pageFilter,t.pageFilterType)})};function tk(e){return(tk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tI(r.key),r)}}function tC(e,t,n){return(t=tI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tI(e){var t=function(e,t){if("object"!=tk(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tk(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==tk(t)?t:String(t)}var tE=function(){var e,t;function n(){var e=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),tC(this,"tooltips",[]),tC(this,"filteredTooltips",[]),tC(this,"lastUrl",null),tC(this,"elementToFloatingUIMap",new WeakMap),tC(this,"elementToTooltipMap",new WeakMap),tC(this,"nextId",0),tC(this,"linkTooltip",function(t,n){if(!t.hasAttribute("data-gleap-tooltip")){var r=e.nextId++;if(t.setAttribute("data-gleap-tooltip",r),t){var o=null;if("hotspot"===n.mode){var i=document.createElement("div");i.setAttribute("data-gleap-tooltip-anchor",r),i.classList.add("gleap-tooltip-anchor"),t.setAttribute("data-gleap-tooltip-mode","hotspot"),e.canEmbed(t)?t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i):t.parentNode.insertBefore(i,t.nextSibling);var a=document.createElement("div");a.classList.add("gleap-tooltip-hotspot"),a.setAttribute("data-gleap-tooltip-hotspot",r),a.innerHTML="".concat(L(n.icon,n.color)).concat(n.animated?'<div style="background-color: '.concat(n.color,'" class="gleap-tooltip-hotspot-animation"></div>'):""),i.appendChild(a),e.repositionHotspot(t,n),o=a,e.elementToTooltipMap.set(t,n)}else o=t;var l=e.createTooltip(o,n.html,n);e.elementToFloatingUIMap.set(t,l)}}}),tC(this,"updateFilteredTooltips",function(){e.filteredTooltips=e.getFilteredTooltips(),e.checkForTooltips()}),tC(this,"getFilteredTooltips",function(){if(!e.tooltips)return[];var t=window.location.href;return e.tooltips.filter(function(e){return e.pageRules&&e.pageRules.length>0?tw(t,{pageRules:e.pageRules}):!e.page||0===e.page.length||!!tb(t,e.page,e.pageType)})}),tC(this,"checkForTooltips",function(){for(var t=0;t<e.filteredTooltips.length;t++){var n=e.filteredTooltips[t];try{for(var r=document.querySelectorAll(n.selector),o=0;o<r.length;o++){var i=r[o];i&&e.linkTooltip(i,n)}}catch(e){}}}),tC(this,"load",function(){var t=tR.getInstance(),n=new XMLHttpRequest;n.open("GET",t.apiUrl+"/config/"+t.sdkKey+"/tooltips"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.setRequestHeader("Api-Token",t.sdkKey);try{n.setRequestHeader("Gleap-Id",t.session.gleapId),n.setRequestHeader("Gleap-Hash",t.session.gleapHash)}catch(e){}n.onerror=function(){console.error("Failed to fetch tooltips")},n.onreadystatechange=function(t){if(4===n.readyState&&200===n.status)try{e.tooltips=JSON.parse(n.responseText),e.updateFilteredTooltips()}catch(e){console.error("Failed to parse tooltips",e)}},n.send()})}return e=[{key:"processNodeInsertion",value:function(e){var t=this;e.nodeType===Node.ELEMENT_NODE&&(this.checkNodeTooltip(e),e.childNodes&&e.childNodes.forEac
1h(function(e){t.processNodeInsertion(e)}))}},{key:"checkNodeTooltip",value:function(e){var t=this;this.filteredTooltips.length>0&&this.filteredTooltips.forEach(function(n){n.selector&&e.matches(n.selector)&&t.linkTooltip(e,n)})}},{key:"start",value:function(){var e=this,t=this;if(window){var n,r,o=(n=t.updateHotspotPositions.bind(t),r=null,function(){if(!r){var e=this,t=arguments;r=setTimeout(function(){n.call.apply(n,[e].concat(function(e){if(Array.isArray(e))return tx(e)}(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return tx(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tx(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),r=null},250)}});window.addEventListener("resize",o),window.requestAnimationFrame(function(){e.observer=new MutationObserver(function(n){t.lastUrl!==window.location.href&&(t.lastUrl=window.location.href,t.filteredTooltips=t.getFilteredTooltips()),n.forEach(function(n){if("attributes"===n.type){var r=n.target;r.nodeType===Node.ELEMENT_NODE&&(r.querySelector("[data-gleap-tooltip-hotspot]")||r.hasAttribute("data-gleap-tooltip-mode")||r.hasAttribute("data-gleap-tooltip"))&&t.updateHotspotPositions()}n.addedNodes.forEach(function(e){e.nodeType===Node.ELEMENT_NODE&&t.processNodeInsertion(e)}),n.removedNodes.forEach(function(t){if(t.nodeType===Node.ELEMENT_NODE&&e.elementToFloatingUIMap.has(t)){var n=e.elementToFloatingUIMap.get(t);n&&(n.tooltip&&n.tooltip.remove(),n.cleanup(),e.elementToFloatingUIMap.delete(t))}e.elementToTooltipMap.has(t)&&e.elementToTooltipMap.delete(t)})})}),e.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]})})}}},{key:"updateHotspotPositions",value:function(){var e=this;document.querySelectorAll("[data-gleap-tooltip-mode='hotspot']").forEach(function(t){var n=e.elementToTooltipMap.get(t);n&&e.repositionHotspot(t,n)})}},{key:"createTooltip",value:function(e,t,n){var r=document.createElement("div");r.className="gleap-tooltip",r.innerHTML='<div class="gleap-tooltip-inner">\n            '.concat(t,'\n            <div class="gleap-tooltip-arrow">\n                <svg width="116" height="56" viewBox="0 0 116 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n                    <path d="M57.75 0.74998L115.5 0.680177L66.8726 49.3076C61.7958 54.3844 53.5646 54.3844 48.4878 49.3076L4.05618e-05 0.819784L57.75 0.74998Z" fill="white"/>\n                </svg>\n            </div>\n        </div>'),document.body.appendChild(r);var o,i=r.querySelector(".gleap-tooltip-arrow"),a=function(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=ti(e),d=o||i?[...u?tn(u):[],...tn(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});let p=u&&l?function(e,t){let n,r=null,o=eV(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:f}=u;if(l||t(),!h||!f)return;let g={rootMargin:-ek(p)+"px "+-ek(o.clientWidth-(d+h))+"px "+-ek(o.clientHeight-(p+f))+"px "+-ek(d)+"px",threshold:eb(0,ey(1,c))||1},m=!0;function v(t){let r=t[0].intersectionRatio;if(r!==c){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||ty(u,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(v,{...g,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,g)}r.observe(e)}(!0),i}(u,n):null,h,f=-1,g=null;a&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let m=c?tc(e):null;return c&&function t(){let r=tc(e);m&&!ty(m,r)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;
1d.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==p||p(),null==(e=g)||e.disconnect(),g=null,c&&cancelAnimationFrame(h)}}(e,r,function(){var t,o,a;let l,c,u,d;(a={placement:"left"===n.posX?"left":"right",middleware:[{name:"offset",options:10,async fn(e){var t,n;let{x:r,y:o,placement:i,middlewareData:a}=e,l=await async function(e){let{placement:t,platform:n,elements:r}=e,o=await (null==n.isRTL?void 0:n.isRTL(r.floating)),i=eE(t),a=eO(t),l="y"===eM(t),c=ez.has(i)?-1:1,u=o&&l?-1:1,d=eI(10,e),{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(h="end"===a?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(e);return i===(null==(t=a.offset)?void 0:t.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}},(void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r,o,i,a,l;let c,u,d,{placement:p,middlewareData:h,rects:f,initialPlacement:g,platform:m,elements:v}=e,{mainAxis:y=!0,crossAxis:b=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...C}=eI(t,e);if(null!=(n=h.arrow)&&n.alignmentOffset)return{};let I=eE(p),E=eM(g),O=eE(g)===g,T=await (null==m.isRTL?void 0:m.isRTL(v.floating)),L=w||(O||!S?[eN(g)]:(c=eN(g),[eP(g),c,eP(c)])),A="none"!==x;!w&&A&&L.push(...(u=eO(g),d=function(e,t,n){switch(e){case"top":case"bottom":return n?t?e_:eR:t?eR:e_;case"left":case"right":return t?eD:ej;default:return[]}}(eE(g),"start"===x,T),u&&(d=d.map(e=>e+"-"+u),S&&(d=d.concat(d.map(eP)))),d));let M=[g,...L],P=await m.detectOverflow(e,C),R=[],_=(null==(r=h.flip)?void 0:r.overflows)||[];if(y&&R.push(P[I]),b){let e,t,n,r,o=(void 0===(l=T)&&(l=!1),e=eO(p),n=eL(t=eT(eM(p))),r="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",f.reference[n]>f.floating[n]&&(r=eN(r)),[r,eN(r)]);R.push(P[o[0]],P[o[1]])}if(_=[..._,{placement:p,overflows:R}],!R.every(e=>e<=0)){let e=((null==(o=h.flip)?void 0:o.index)||0)+1,t=M[e];if(t&&("alignment"!==b||E===eM(t)||_.every(e=>eM(e.placement)!==E||e.overflows[0]>0)))return{data:{index:e,overflows:_},reset:{placement:t}};let n=null==(i=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(k){case"bestFit":{let e=null==(a=_.filter(e=>{if(A){let t=eM(e.placement);return t===E||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=g}if(p!==n)return{reset:{placement:n}}}return{}}}),(void 0===o&&(o={}),{name:"shift",options:o,async fn(e){let{x:t,y:n,placement:r,platform:i}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=eI(o,e),d={x:t,y:n},p=await i.detectOverflow(e,u),h=eM(eE(r)),f=eT(h),g=d[f],m=d[h];if(a){let e="y"===f?"bottom":"right";g=eb(g+p["y"===f?"top":"left"],ey(g,g-p[e]))}if(l){let e="y"===h?"bottom":"right";m=eb(m+p["y"===h?"top":"left"],ey(m,m-p[e]))}let v=c.fn({...e,[f]:g,[h]:m});return{...v,data:{x:v.x-t,y:v.y-n,enabled:{[f]:a,[h]:l}}}}}),{name:"arrow",options:l={element:i},async fn(e){let{x:t,y:n,placement:r,rects:o,platform:i,elements:a,middlewareData:c}=e,{element:u,padding:d=0}=eI(l,e)||{};if(null==u)return{};let p=eF(d),h={x:t,y:n},f=eT(eM(r)),g=eL(f),m=await i.getDimensions(u),v="y"===f,y=v?"clientHeight":"clientWidth",b=o.reference[g]+o.reference[f]-h[f]-o.floating[g],w=h[f]-o.reference[f],k=await (null==i.getOffsetParent?void 0:i.getOffsetParent(u)),x=k?k[y]:0;x&&await (null==i.isElement?void 0:i.isElement(k))||(x=a.floating[y]||o.floating[g]);let S=x/2-m[g]/2-1,C=ey(p[v?"top":"left"],S),I=ey(p[v?"bottom":"right"],S),E=x-m[g]-I,O=x/2-m[g]/2+(b/2-w/2),T=eb(C,ey(O,E)),L=!c.arrow&&null!=eO(r)&&O!==T&&o.reference[g]/2-(O<C?C:I)-m[g]/2<0,A=L?O<C?O-C:O-E:0;return{[f]:h[f]+A,data:{[f]:T,centerOffset:O-T-A,...L&&{alignmentOffset:A}},reset:L}}}]},c=new Map,d={...(u={platform:tv,...a}).platform,_c:c},(async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}
1=n,l=i.filter(Boolean),c=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=eU(u,r,c),h=r,f={},g=0;for(let n=0;n<l.length;n++){var m;let{name:i,fn:v}=l[n],{x:y,y:b,data:w,reset:k}=await v({x:d,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:u,platform:{...a,detectOverflow:null!=(m=a.detectOverflow)?m:eH},elements:{reference:e,floating:t}});d=null!=y?y:d,p=null!=b?b:p,f={...f,[i]:{...f[i],...w}},k&&g<=50&&(g++,"object"==typeof k&&(k.placement&&(h=k.placement),k.rects&&(u=!0===k.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:p}=eU(u,h,c)),n=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:f}})(e,r,{...u,platform:d})).then(function(e){var t=e.x,n=e.y,o=e.middlewareData,a=e.placement;try{if(Object.assign(r.style,{left:"".concat(t,"px"),top:"".concat(n,"px")}),o.arrow){var l={left:"",top:"",transform:""};null!=o.arrow.x&&(l.left="".concat(o.arrow.x,"px"),"bottom"===a?(l.transform="translateY(-7px) rotate(180deg)",l.top="".concat(-20,"px")):"top"===a&&(l.transform="translateY(7px) rotate(0deg)",l.top="100%")),null!=o.arrow.y&&(l.top="".concat(o.arrow.y,"px"),"right"===a?(l.transform="translateX(-7px) rotate(90deg)",l.left="".concat(-20,"px")):"left"===a&&(l.transform="translateX(7px) rotate(270deg)",l.left="100%")),Object.assign(i.style,l)}}catch(e){}})});function l(){clearTimeout(o),r.style.visibility="visible",r.style.opacity="1",r.style.pointerEvents="auto"}function c(){o=setTimeout(function(){r.style.opacity="0",setTimeout(function(){r.style.visibility="hidden",r.style.pointerEvents="none"},200)},500)}return e.addEventListener("mouseenter",l),e.addEventListener("mouseleave",c),r.addEventListener("mouseenter",l),r.addEventListener("mouseleave",c),e.addEventListener("click",c),r.addEventListener("click",c),{cleanup:a,tooltip:r}}},{key:"canEmbed",value:function(e){var t=new Set(["area","base","br","embed","hr","img","input","source","track","wbr","canvas"]);return e&&!t.has(e.tagName.toLowerCase())}},{key:"destroy",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),document.querySelectorAll(".gleap-tooltip").forEach(function(e){return e.remove()}),document.querySelectorAll("[data-gleap-tooltip-anchor]").forEach(function(e){return e.remove()}),document.querySelectorAll("[data-gleap-tooltip-hotspot]").forEach(function(e){return e.remove()}),document.querySelectorAll("[data-gleap-tooltip]").forEach(function(e){return e.removeAttribute("data-gleap-tooltip")}),document.querySelectorAll("[data-gleap-tooltip-mode]").forEach(function(e){return e.removeAttribute("data-gleap-tooltip-mode")}),this.elementToFloatingUIMap=new WeakMap,this.elementToTooltipMap=new WeakMap,this.tooltips=[],this.filteredTooltips=[]}},{key:"repositionHotspot",value:function(e,t){if(e&&t){var n=e.getAttribute("data-gleap-tooltip");if(n){var r=document.querySelector('[data-gleap-tooltip-hotspot="'.concat(n,'"]'));if(r){t.posX||(t.posX="right"),t.posY||(t.posY="center"),t.offsetX||(t.offsetX=4),t.offsetY||(t.offsetY=0);var o=e.getBoundingClientRect();try{var i=document.createRange();i.selectNodeContents(e);var a=window.getComputedStyle(e),l=i.getBoundingClientRect().width+parseFloat(a.paddingLeft);l<o.width&&(o.width=l)}catch(e){}var c=document.querySelector('[data-gleap-tooltip-anchor="'.concat(n,'"]')).getBoundingClientRect(),u=c.left-o.left,d=c.top-o.top,p=0,h=0;switch(t.posX){case"left":h=-1*(t.offsetX+17);break;case"right":h=o.width+t.offsetX}switch(t.posY){case"top":p=0+t.offsetY;break;case"bottom":p=o.height-17+t.offsetY;break;case"center":p=o.height/2-8.5+t.offsetY}r&&(r.style.position="absolute",r.style.top=p-d+"px",r.style.left=h-u+"px")}}}}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n,this.instance.start()),this.instance}}],e&&tS(n.prototype,e),t&&tS(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function tO(e){return(tO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?tT(Object(n),!0).forEach(function(t){tM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tP(r.key),r)}}function tM(e,t,n){return(t=tP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tP(e){var t=function(e,t){if("object"!=tO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tO(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==tO(t)?t:String(t)}tC(tE,"instance",void 0);var tR=function(){var e,t;function n(){var e=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),tM(this,"apiUrl","https://api.gleap.io"),tM(this,"wsApiUrl","wss://ws.gleap.io"),tM(this,"sdkKey",null),tM(this,"updatingSession",!1),tM(this,"useCookies",!0),tM(this,"localStorageDisabled",!1),tM(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),tM(this,"ready",!1),tM(this,"onSessionReadyListener",[]),tM(this,"setOnSessionReady",function(t){e.ready?t():e.onSessionReadyListener.push(t)}),tM(this,"injectSession",function(t){t&&e.session&&(t.setRequestHeader("Api-Token",e.sdkKey),t.setRequestHeader("Gleap-Id",e.session.gleapId),t.setRequestHeader("Gleap-Hash",e.session.gleapHash))}),tM(this,"clearSession",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.session&&e.session.gleapHash&&nm.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(e.session.gleapHash));try{W("session-".concat(e.sdkKey),null)}catch(e){}if(e.useCookies)try{var r="session-".concat(e.sdkKey);try{var o=z(window.location.host.split(":")[0]);document.cookie=r+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+o}catch(e){}}catch(e){}e.ready=!1,e.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},nT.getInstance().sendMessage({name:"session-cleared"},!0),lz.getInstance().clearAllNotifications(!1),lz.getInstance().setNotificationCount(0),l3.getInstance().removeBannerUI(),ce.getInstance().hideModal(),n&&!isNaN(t)&&setTimeout(function(){e.startSession(t+1)},10*Math.pow(t,2)*1e3)}),tM(this,"validateSession",function(t){var n;if(t&&t.gleapId){var r=!1;(null==(n=e.session)?void 0:n.gleapId)!==(null==t?void 0:t.gleapId)&&(r=!0),e.session&&e.session.gleapHash&&nm.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(e.session.gleapHash)),e.localStorageDisabled||W("session-".concat(e.sdkKey),t),e.useCookies&&function(e,t){try{var n="",r=new Date;r.setTime(r.getTime()+31536e6),n="; expires="+r.toUTCString();var o=z(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+n+"; path=/; domain="+o}catch(e){}}("session-".concat(e.sdkKey),encodeURIComponent(JSON.stringify(t))),e.session=t,e.ready=!0,e.session&&e.session.gleapHash&&nm.notifyEvent("register-pushmessage-group","gleapuser-".concat(e.session.gleapHash)),r&&(setTimeout(function(){Q.getInstance().clearCache(),ev.getInstance().clearCache(),tF.getInstance().restart();var e=tE.getInstance();if(e){try{e.destroy()}catch(e){}e.load()}},0),"function"==typeof window.dispatchEvent&&window.dispatchEvent(new CustomEvent("session-updated"))),e.notifySessionReady()}}),tM(this,"startSession",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;try{if(e.useCookies){var n=function(e){try{for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}}catch(e){}return null}("session-".concat(e.sdkKey));if(n){var r=JSON.parse(decodeURIComponent(n));e.validateSession(r)}}}catch(e){}if(!(e.localStorageDisabled||e.session&&e.session.gleapId&&e.session.gleapId.length>0)){var o=q("session-".concat(e.sdkKey));o&&e.validateSession(o)}var i=new XMLHttpRequest;i.open("POST",e.apiUrl+"/sessions"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("Api-Token",e.sdkKey);try{e.session&&e.session.gleapId&&e.session.gleapHash&&(i.setRequestHeader("Gleap-Id",e.
1session.gleapId),i.setRequestHeader("Gleap-Hash",e.session.gleapHash))}catch(e){}i.onreadystatechange=function(n){if(4===i.readyState)if(200===i.status||201===i.status)try{var r=JSON.parse(i.responseText);e.validateSession(r)}catch(e){}else 429!==i.status&&e.clearSession(t,!0)},i.send(JSON.stringify({lang:lT.getInstance().getActiveLanguage(),deviceType:F(),platform:"web"}))}),tM(this,"checkIfSessionNeedsUpdate",function(t,n){if(!e.session||!e.session.userId||!t)return!0;try{if(e.session.userId.toString()!==t.toString())return!0}catch(e){}return e.checkIfSessionDataNeedsUpdate(n)}),tM(this,"checkIfSessionDataNeedsUpdate",function(t){if(t)for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r];if(JSON.stringify(e.session[o])!==JSON.stringify(t[o])&&(!e.session.customData||JSON.stringify(e.session.customData[o])!==JSON.stringify(t[o])))return!0}return!1}),tM(this,"updateSession",function(t){if(e.checkIfSessionDataNeedsUpdate(t))return new Promise(function(n,r){e.setOnSessionReady(function(){if(!e.session.gleapId||!e.session.gleapHash)return r("Session not ready yet.");var o=new XMLHttpRequest;o.open("POST",e.apiUrl+"/sessions/partialupdate"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("Api-Token",e.sdkKey);try{o.setRequestHeader("Gleap-Id",e.session.gleapId),o.setRequestHeader("Gleap-Hash",e.session.gleapHash)}catch(e){}o.onerror=function(){r()},o.onreadystatechange=function(t){if(4===o.readyState)if(200===o.status||201===o.status)try{var i=JSON.parse(o.responseText);e.validateSession(i),n(i)}catch(e){r(e)}else r()},o.send(JSON.stringify({data:tL(tL({},t),{},{lang:lT.getInstance().getActiveLanguage(),deviceType:F(),platform:"web"}),type:"js",sdkVersion:"16.1.1",ws:!0}))})})}),tM(this,"identifySession",function(t,n,r){if(e.checkIfSessionNeedsUpdate(t,n))return new Promise(function(o,i){e.setOnSessionReady(function(){if(!e.session.gleapId||!e.session.gleapHash)return i("Session not ready yet.");var a=new XMLHttpRequest;a.open("POST",e.apiUrl+"/sessions/identify"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",e.sdkKey);try{a.setRequestHeader("Gleap-Id",e.session.gleapId),a.setRequestHeader("Gleap-Hash",e.session.gleapHash)}catch(e){}a.onerror=function(){i()},a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);e.validateSession(n),o(n)}catch(e){i(e)}else i()};var l=tL({},n);n.customData&&(delete l.customData,l=tL(tL({},l),n.customData)),a.send(JSON.stringify(tL(tL({},l),{},{userId:t,userHash:r,lang:lT.getInstance().getActiveLanguage(),deviceType:F(),platform:"web"})))})})}),tM(this,"startProductTourConfig",function(t){return new Promise(function(n,r){e.setOnSessionReady(function(){if(!e.session.gleapId||!e.session.gleapHash)return r("Session not ready yet.");var o=new XMLHttpRequest;o.open("POST",e.apiUrl+"/outbound/producttours"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("Api-Token",e.sdkKey);try{o.setRequestHeader("Gleap-Id",e.session.gleapId),o.setRequestHeader("Gleap-Hash",e.session.gleapHash)}catch(e){}o.onerror=function(){r()},o.onreadystatechange=function(e){if(4===o.readyState)if(200===o.status||201===o.status)try{var t=JSON.parse(o.responseText);t&&t.config&&n(t.config)}catch(e){r(e)}else r()},o.send(JSON.stringify({outboundId:t}))})})}),tM(this,"validateProductTour",function(t){return new Promise(function(n,r){e.setOnSessionReady(function(){if(!e.session.gleapId||!e.session.gleapHash)return r("Session not ready yet.");var o,i=new XMLHttpRequest;i.open("POST",e.apiUrl+"/outbound/producttourvalidation"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("Api-Token",e.sdkKey);try{i.setRequestHeader("Gleap-Id",e.session.gleapId),i.setRequestHeader("Gleap-Hash",e.session.gleapHash)}catch(e){}i.onerror=function(){r()},i.onreadystatechange=function(e){if(4===i.readyState)if(200===i.status||201===i.status)try{var t=JSON.parse(i.responseText);t&&"live"===t.status&&t.passedPageFilter?n(t.config):r()}catch(e){r(e)}else r()},i.send(JSON.stringify({outboundId:t,currentUrl:null==(o=window)||null==(o=o.location)?void 0:o.href}))})})})}return e=[{key:"getName",value:function(){try{return this.session.name?this.session.name.split(" ")[0].split("@")[0].split(".")[0].split("+")[0]:""}catch(e){return this.session.name}}},{key:"getSession",value:function(){return this.session}},{key:"getGleapId",value:function(){return this.session&&this.session.gleapId?this.session.gleapId:null}},{key:"isUser",value:function(){return!(!this.session||!this.session.userId)}},{key:"notifySessionReady",value:function(){if(this.onSessionReadyListener.length>0)for(var e=0;e<this.onSessionReadyListener.length;e++)this.onSessionReadyListener[e]();this.onSessionReadyListener=[],nT.getInstance().sendSessionUpdate()}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&tA(n.prototype,e),t&&tA(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function t_(e){return(t_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tN(r.key),r)}}function tj(e,t,n){return(t=tN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tN(e){var t=function(e,t){if("object"!=t_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=t_(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==t_(t)?t:String(t)}tM(tR,"instance",void 0);var tF=function(){var e,t;function n(){var e=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),tj(this,"eventArray",[]),tj(this,"streamedEventArray",[]),tj(this,"eventMaxLength",500),tj(this,"errorCount",0),tj(this,"streamingEvents",!1),tj(this,"lastUrl",void 0),tj(this,"mainLoopTimeout",null),tj(this,"socket",null),tj(this,"connectedWebSocketGleapId",null),tj(this,"connectionTimeout",null),tj(this,"pingWS",null),tj(this,"handleOpenBound",null),tj(this,"handleErrorBound",null),tj(this,"handleMessageBound",null),tj(this,"handleCloseBound",null),tj(this,"runEventStreamLoop",function(){e.streamEvents(),e.mainLoopTimeout=setTimeout(function(){e.runEventStreamLoop()},2500)}),tj(this,"streamEvents",function(){if(!(!tR.getInstance().ready||e.streamingEvents||e.errorCount>2)&&0!==e.streamedEventArray.length&&e.socket&&e.socket.readyState===e.socket.OPEN){e.streamingEvents=!0;var t=new XMLHttpRequest;t.open("POST",tR.getInstance().apiUrl+"/sessions/events"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),tR.getInstance().injectSession(t),t.onerror=function(){e.errorCount++,e.streamingEvents=!1},t.onreadystatechange=function(n){4===t.readyState&&(200===t.status||201===t.status?e.errorCount=0:e.errorCount++,e.streamingEvents=!1)};var n=nR.getInstance().getSessionDuration();t.send(JSON.stringify({time:n,events:e.streamedEventArray,opened:nT.getInstance().isOpened(),type:"js",sdkVersion:"16.1.1",
1ws:!0})),e.streamedEventArray=[]}}),this.handleOpenBound=this.handleOpen.bind(this),this.handleErrorBound=this.handleError.bind(this),this.handleMessageBound=this.handleMessage.bind(this),this.handleCloseBound=this.handleClose.bind(this)}return e=[{key:"cleanupWebSocket",value:function(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null),this.pingWS&&clearInterval(this.pingWS),this.socket&&(this.socket.removeEventListener("open",this.handleOpenBound),this.socket.removeEventListener("error",this.handleErrorBound),this.socket.removeEventListener("message",this.handleMessageBound),this.socket.removeEventListener("close",this.handleCloseBound),this.socket.close(),this.socket=null)}},{key:"initWebSocket",value:function(){this.cleanupWebSocket(),this.connectedWebSocketGleapId=tR.getInstance().session.gleapId,tR.getInstance().session&&tR.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(tR.getInstance().wsApiUrl,"?gleapId=").concat(tR.getInstance().session.gleapId,"&gleapHash=").concat(tR.getInstance().session.gleapHash,"&apiKey=").concat(tR.getInstance().sdkKey,"&sdkVersion=").concat("16.1.1")),this.socket.addEventListener("open",this.handleOpenBound),this.socket.addEventListener("message",this.handleMessageBound),this.socket.addEventListener("error",this.handleErrorBound),this.socket.addEventListener("close",this.handleCloseBound))}},{key:"handleOpen",value:function(e){var t=this;this.pingWS=setInterval(function(){t.socket.readyState===t.socket.OPEN&&(t.socket.send("PING"),t.socket.send(9))},1e4),this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null)}},{key:"handleMessage",value:function(e){this.processMessage(JSON.parse(e.data))}},{key:"handleError",value:function(e){}},{key:"handleClose",value:function(e){var t=this;setTimeout(function(){t.initWebSocket()},5e3)}},{key:"processMessage",value:function(e){try{if(cF.getInstance().initialized)return;if("update"===e.name){var t,n=e.data,r=n.a,o=n.u,i=n.ai,a=nT.getInstance().isOpened();if(r){var l=["banner","modal"],c=r.filter(function(e){var t;return!a||l.includes(null==e||null==(t=e.actionType)?void 0:t.toLowerCase())});uH.getInstance().performActions(c)}i&&lX.getInstance().setConfig({enabled:null!=(t=i.e)&&t,placeholder:i.p,quickActions:i.a,style:i.s,agentId:i.g,agentName:i.n}),null!=o&&lz.getInstance().setNotificationCount(o)}if("checklist"===e.name&&null!=e&&e.data&&window){var u,d,p=e.data,h=null!=(u=p.completedSteps)?u:[],f=null!=(d=p.completedStepsBefore)?d:[];if(h.length>f.length)for(var g=function(e){var t,n=null==p||null==(t=p.steps)?void 0:t.find(function(t){return t.id===h[e]});if(!n)return 1;f.includes(n)||nm.notifyEvent("checklist-step-completed",{checklistId:p.id,outboundId:p.outboundId,stepId:n.id,stepIndex:e,step:n,completedSteps:p.completedSteps,status:p.status,data:p})},m=0;m<h.length;m++)g(m);"done"===p.status&&nm.notifyEvent("checklist-completed",{checklistId:p.id,outboundId:p.outboundId,completedSteps:p.completedSteps,status:p.status,data:p}),"function"==typeof window.dispatchEvent&&window.dispatchEvent(new CustomEvent("checkListUpdate",{detail:e.data}))}}catch(e){}}},{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.cleanupMainLoop()}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval(function(){e.errorCount=0},6e4)}},{key:"cleanupMainLoop",value:function(){this.mainLoopTimeout&&(clearInterval(this.mainLoopTimeout),this.mainLoopTimeout=null)}},{key:"restart",value:function(){this.connectedWebSocketGleapId!==tR.getInstance().session.gleapId&&this.initWebSocket(),this.cleanupMainLoop(),this.trackInitialEvents(),this.runEventStreamLoop()}},{key:"start",value:function(){this.startPageListener(),this.resetErrorCountLoop()}},{key:"trackInitialEvents",value:function(){n.getInstance().logEvent("sessionStarted"),n.getInstance().logCurrentPage()}},{key:"logCurrentPage",value:function(){if(!uH.getInstance().disablePageTracking){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}}},{key:"startPageListener",value:function(){var e=this;setInterval(function(){e.logCurrentPage()},1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=U(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&tD(n.prototype,e),t&&tD(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function tB(e){return(tB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tz(r.key),r)}}function tH(e,t,n){return(t=tz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tz(e){var t=function(e,t){if("object"!=tB(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tB(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==tB(t)?t:String(t)}tj(tF,"instance",void 0);var tq=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},tW=function(){var e,t;function n(){var e=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),tH(this,"flowConfig",null),tH(this,"projectActions",null),tH(this,"onConfigLoadedListener",[]),tH(this,"onConfigLoaded",function(t){null!==e.flowConfig?t():e.onConfigLoadedListener.push(t)}),tH(this,"start",function(){var t=tR.getInstance(),n=q("config-".concat(t.sdkKey,"-").concat(lT.getInstance().getActiveLanguage()));return n?(e.applyConfig(n),e.loadConfigFromServer().catch(function(e){}),Promise.resolve()):e.loadConfigFromServer()}),tH(this,"loadConfigFromServer",function(){return new Promise(function(t,n){var r=tR.getInstance(),o=new XMLHttpRequest,i=lT.getInstance().getActiveLanguage();o.open("GET",r.apiUrl+"/config/"+r.sdkKey+"?lang="+i),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.injectSession(o),o.onerror=function(){n()}
1,o.onreadystatechange=function(a){if(4===o.readyState){if(403===o.status&&(!function(e){try{localStorage.removeItem("gleap-widget-".concat(e))}catch(e){}}("config-".concat(r.sdkKey,"-").concat(i)),uH.destroy()),200===o.status||201===o.status)try{var l=JSON.parse(o.responseText);try{W("config-".concat(r.sdkKey,"-").concat(i),l)}catch(e){}return e.applyConfig(l),t()}catch(e){}n()}},o.send()})})}return e=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;uH.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",tq(e.borderRadius,20),tq(e.buttonX,20),tq(e.buttonY,20),e.feedbackButtonPosition)}},{key:"notifyConfigLoaded",value:function(){if(this.onConfigLoadedListener.length>0)for(var e=0;e<this.onConfigLoadedListener.length;e++)this.onConfigLoadedListener[e]();this.onConfigLoadedListener=[]}},{key:"applyConfig",value:function(e){try{var t=e.flowConfig;this.flowConfig=t,this.applyStylesFromConfig(),nT.getInstance().sendConfigUpdate(),I.getInstance().updateFeedbackButtonState(),lz.getInstance().updateContainerStyle(),t.enableWebReplays?ll.getInstance().start():ll.getInstance().stop(),t.enableNetworkLogs&&_.getInstance().start(),_.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&_.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&_.getInstance().setBlacklist(t.networkLogBlacklist),lT.getInstance().updateRTLSupport(),uH.enableShortcuts(!!t.enableShortcuts),e.aiBar&&lX.getInstance().setConfig(e.aiBar),this.notifyConfigLoaded()}catch(e){}}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&tU(n.prototype,e),t&&tU(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function tG(e){return(tG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tV(){tV=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(t,n,r,i){var a,l,c,u,d=Object.create((n&&n.prototype instanceof v?n:v).prototype);return o(d,"_invoke",{value:(a=t,l=r,c=new T(i||[]),u=h,function(t,n){if(u===f)throw Error("Generator is already running");if(u===g){if("throw"===t)throw n;return{value:e,done:!0}}for(c.method=t,c.arg=n;;){var r=c.delegate;if(r){var o=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),m;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var l=a.arg;return l?l.done?(r[n.resultName]=l.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):l:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(r,c);if(o){if(o===m)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=g,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=f;var i=p(a,l,c);if("normal"===i.type){if(u=c.done?g:"suspendedYield",i.arg===m)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(u=g,c.method="throw",c.arg=i.arg)}})}),d}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};u(w,a,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,l){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==tG(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,l)})}l(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw TypeError(tG(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),u(I.prototype,l,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
1ise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),u(S,c,"Generator"),u(S,a,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function tJ(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function tY(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){tJ(i,r,o,a,l,"next",e)}function l(e){tJ(i,r,o,a,l,"throw",e)}a(void 0)})}}tH(tW,"instance",void 0);var tK=function(e){var t="",n=window.document.doctype;if(n&&(t="<!DOCTYPE "+n.name+(n.publicId?' PUBLIC "'+n.publicId+'"':"")+(!n.publicId&&n.systemId?" SYSTEM":"")+(n.systemId?' "'+n.systemId+'"':"")+">"),e&&e.childNodes&&e.childNodes.length>0)for(var r=0;r<e.childNodes.length;r++)e.childNodes[r]&&(t+=e.childNodes[r].outerHTML);return t},tX=function(e,t,n){var r,o;return r=/url\((.*?)\)/g,o=function(e){return new Promise(function(r,o){if(!e)return r(e);var i=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===i.indexOf("http")||0===i.indexOf("//")||0===i.indexOf("data"))return r(e);try{var a=i;return t&&(a=new URL(i,t+"/").href),n?r("url("+a+")"):tZ(a).then(function(e){return r("url("+e+")")})}catch(t){return r(e)}})},new Promise(function(t,n){var i=[];e.replace(r,function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=o.apply(void 0,[e].concat(n));i.push(a)}),Promise.all(i).then(function(n){t(e.replace(r,function(){return n.shift()}))}).catch(function(){n()})})},tZ=function(e){return new Promise(function(t,n){if(e){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()}
1,e.readAsDataURL(r.response)},r.onerror=function(e){t()},r.open("GET",e),r.responseType="blob",r.send()}else t()})},t$=function(e){return new Promise(function(t,n){if(e&&e.src){if(function(e){var t=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"];if(!e)return!1;for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1}(e.src))return t();var r=new XMLHttpRequest;r.onload=function(){var n=new FileReader;n.onloadend=function(){var r;r=n.result,j(r,500,500).then(function(n){e.src=n,t()}).catch(function(){console.warn("BB: Image resize failed."),t()})},n.onerror=function(){t()},n.readAsDataURL(r.response)},r.onerror=function(e){t()};var o=e.src;r.open("GET",o),r.responseType="blob",r.send()}else t()})},tQ=function(e,t,n,r){var o=null;t.ownerNode&&(o=e.querySelector('[bb-styleid="'+r+'"]'));try{if(o){var i=null;if(""!=n){var a=e.querySelector("head"),l=window.document.createElement("style");a.appendChild(l),l.type="text/css",l.styleSheet?l.styleSheet.cssText=n:l.appendChild(window.document.createTextNode(n)),i=l}else{var c=window.document.createElement("link");c.rel="stylesheet",c.type=t.type,c.href=t.href,c.media=t.media,i=c}i&&(o.parentNode.insertBefore(i,o),o.remove())}}catch(e){}},t0=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(e){}var n="";if(t)for(var r in t)t[r].cssText&&(n+=t[r].cssText+"\n");for(var o=n,i="",a=0,l=0;l<o.length;l++)"{"===o[l]?(a++,i+=o[l]):"}"===o[l]?a>0&&(a--,i+=o[l]):i+=o[l];return i},t1=function(e,t){for(var n,r=[],o=0;o<document.styleSheets.length;o++)!function(){var e=document.styleSheets[o];if(!e.media||"print"!==e.media.mediaText){var i=t0(e);if(e&&e.ownerNode)if(""!=i){var a=document.getElementsByTagName("base");n=a.length?a[0].href.substr(location.origin.length,999):window.location.href.split(/[?#]/)[0],e.href&&(n=e.href);var l=n.substring(0,n.lastIndexOf("/"));r.push(tX(i,l,t).then(function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}}))}else r.push(Promise.resolve({styletext:i,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))}}();return Promise.all(r).then(function(t){if(t)for(var n=0;n<t.length;n++)tQ(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0})},t2=function(e,t){return new Promise(function(n,r){return t?t1(e,t).then(function(){n()}).catch(function(){n()}):(function(e){for(var t=e.querySelectorAll("img"),n=[],r=0;r<t.length;r++){var o=t[r];n.push(t$(o))}return Promise.all(n)})(e).then(function(){return t1(e,t).then(function(){n()})}).catch(function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()})})},t3=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var r=0;r<e.adoptedStyleSheets.length;r++){var o=t0(e.adoptedStyleSheets[r]),i=window.document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=o:i.appendChild(window.document.createTextNode(o)),n&&i.setAttribute("bb-shadow-child",n),t.insertBefore(i,t.firstElementChild)}},t4=function(e){if(e&&"function"==typeof e.getAnimations){var t=e.getAnimations(),n={};return t.forEach(function(t){var r,o=(null==(r=t.effect)?void 0:r.getKeyframes())||[];Object.keys(o[o.length-1]||{}).forEach(function(t){"offset"!==t&&(n[t]=getComputedStyle(e)[t])})}),0===Object.keys(n).length?null:JSON.stringify(n)}return null},t5=(nV=tY(tV().mark(function e(t){var n,r,o,i;return tV().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=1,r=function(){var e=tY(tV().mark(function e(t,o,i){var a,l,c,u,d,p,h,f,g;return tV().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(){var e=tY(tV().mark(function e(t,n,o){return tV().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=11;break}return e.prev=1,e.next=4,r(t,n,o);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:t=t.nextElementSibling&&(t.nextElementSibling.nextSibling===t.nextSibling||null===t.nextSibling)?t.nextElementSibling:t.nextSibling,e.next=0;break;case 11:case"end":return e.stop()}},e,null,[[1,6]])}));return function(t,n,r){return e.apply(this,arguments)}}(),l=t.cloneNode(),null!=(c=t4(t))&&l.setAttribute("bb-web-animations",c),void 0===l.setAttribute||(i&&l.setAttribute("bb-shadow-child",i),!(t instanceof HTMLCanvasElement))){e.
1next=20;break}return e.prev=7,u=t.getBoundingClientRect(),e.next=11,j(t.toDataURL(),1400,1400);case 11:d=e.sent,l.setAttribute("bb-canvas-data",d),l.setAttribute("bb-canvas-height",u.height),l.setAttribute("bb-canvas-width",u.width),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(7),console.warn("Gleap: Failed to clone canvas data.",e.t0);case 20:if(t.nodeType==Node.ELEMENT_NODE&&("IFRAME"!=(p=t.tagName?t.tagName.toUpperCase():t.tagName)&&"VIDEO"!=p&&"EMBED"!=p&&"IMG"!=p&&"SVG"!=p||(h=t.getBoundingClientRect(),l.setAttribute("bb-element",!0),l.setAttribute("bb-height",h.height),l.setAttribute("bb-width",h.width)),(t.scrollTop>0||t.scrollLeft>0)&&(l.setAttribute("bb-scrollpos",!0),l.setAttribute("bb-scrolltop",t.scrollTop),l.setAttribute("bb-scrollleft",t.scrollLeft)),"SELECT"!==p&&"TEXTAREA"!==p&&"INPUT"!==p||(f=t.value,("value"===t.getAttribute("gleap-ignore")||t.classList.contains("gl-mask"))&&(f=Array(f.length+1).join("*")),l.setAttribute("bb-data-value",f),("checkbox"===t.type||"radio"===t.type)&&t.checked&&l.setAttribute("bb-data-checked",!0))),o.appendChild(l),!t.shadowRoot){e.next=29;break}return g=n,n++,e.next=27,a(t.shadowRoot.firstChild,l,g);case 27:t3(t.shadowRoot,l,g),void 0!==l.setAttribute&&l.setAttribute("bb-shadow-parent",g);case 29:return e.next=31,a(t.firstChild,l);case 31:case"end":return e.stop()}},e,null,[[7,17]])}));return function(t,n,r){return e.apply(this,arguments)}}(),o=document.createDocumentFragment(),e.next=5,r(t,o);case 5:return(i=o.querySelector("head"))||(i=o),t3(window.document,i),e.abrupt("return",o);case 9:case"end":return e.stop()}},e)})),function(e){return nV.apply(this,arguments)}),t9=function(e){var t;return new Promise((t=tY(tV().mark(function t(n,r){var o,i,a,l,c,u,d,p,h,f,g,m,v,y,b;return tV().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(t.prev=0,o=window.document.querySelectorAll("style, link"),i=0;i<o.length;++i)o[i].setAttribute("bb-styleid",i);return t.next=5,t5(window.document.documentElement);case 5:for(l=(a=t.sent).querySelectorAll("link[rel=import]"),i=0;i<l.length;++i)if((c=l[i])&&c.childNodes&&c.childNodes.length>0){for(u=c.childNodes;u.length>0;)c.parentNode.insertBefore(u[0],c);c.remove()}for(d=a.querySelectorAll("script, noscript"),i=0;i<d.length;++i)d[i].remove();for(p="",h=a.querySelectorAll("base"),i=0;i<h.length;++i)h[i].href&&(p=h[i].href),h[i].remove();for(g=(f=window.location.href.substring(0,window.location.href.lastIndexOf("/")))+"/",p&&(p.startsWith("http")?g=p:(g=f+p).endsWith("/")||(g+="/")),(m=window.document.createElement("base")).href=g,(v=a.querySelector("head")).insertBefore(m,v.firstChild),y=a.querySelectorAll(".bb-feedback-dialog-container, .bb-capture-editor-borderlayer"),i=0;i<y.length;++i)y[i].remove();for(b=a.querySelectorAll("[bb-element=true]"),i=0;i<b.length;++i)b[i]&&(b[i].style.height=b[i].getAttribute("bb-height")+"px");t2(a,e).then(function(){n({html:tK(a),baseUrl:f,width:window.innerWidth,height:window.innerHeight,isMobile:B()})}),t.next=31;break;case 27:t.prev=27,t.t0=t.catch(0),console.warn("Gleap: Failed to capture screenshot",t.t0),n(null);case 31:case"end":return t.stop()}},t,null,[[0,27]])})),function(e,n){return t.apply(this,arguments)}))};function t7(e){return(t7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t6(){t6=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(t,n,r,i){var a,l,c,u,d=Object.create((n&&n.prototype instanceof v?n:v).prototype);return o(d,"_invoke",{value:(a=t,l=r,c=new T(i||[]),u=h,function(t,n){if(u===f)throw Error("Generator is already running");if(u===g){if("throw"===t)throw n;return{value:e,done:!0}}for(c.method=t,c.arg=n;;){var r=c.delegate;if(r){var o=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&
vendor: 5,139 bytes, line 1
1(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),m;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var l=a.arg;return l?l.done?(r[n.resultName]=l.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):l:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(r,c);if(o){if(o===m)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=g,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=f;var i=p(a,l,c);if("normal"===i.type){if(u=c.done?g:"suspendedYield",i.arg===m)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(u=g,c.method="throw",c.arg=i.arg)}})}),d}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};u(w,a,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,l){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==t7(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,l)})}l(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw TypeError(t7(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),u(I.prototype,l,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),u(S,c,"Generator"),u(S,a,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];
1if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function t8(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function ne(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){t8(i,r,o,a,l,"next",e)}function l(e){t8(i,r,o,a,l,"throw",e)}a(void 0)})}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,no(r.key),r)}}function nr(e,t,n){return(t=no(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(e){var t=function(e,t){if("object"!=t7(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=t7(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==t7(t)?t:String(t)}var ni=function(){var e,t,n,r,o;function i(e,t){var n=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),nr(this,"rerender",void 0),nr(this,"stream",void 0),nr(this,"mediaRecorder",void 0),nr(this,"audioMuted",!1),nr(this,"audioAvailable",!0),nr(this,"available",!0),nr(this,"isRecording",!1),nr(this,"file",null),nr(this,"maxRecordTime",i.MAX_RECORD_TIME),nr(this,"recordTime",0),nr(this,"recordingTimer",null),nr(this,"permissionErrorText",""),nr(this,"_displayVideoTrack",null),nr(this,"_displayStream",null),nr(this,"_micStream",null),this.rerender=e,this.permissionErrorText=t,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout(function(){n.rerender()},i.RERENDER_DELAY)}return e=[{key:"getSupportedMimeType",value:function(){var e,t=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return nt(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nt(e,void 0)}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(i.MIME_TYPES);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(window.MediaRecorder&&MediaRecorder.isTypeSupported(n))return n}}catch(e){t.e(e)}finally{t.f()}return"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9<e?":":":0")+e}},{key:"stopStreamTracks",value:function(e){if(e)try{e.getTracks().forEach(function(e){return e.stop()})}catch(e){}}},{key:"createMediaStream",value:function(e){return new MediaStream(e.filter(function(e){return null!==e}))}},{key:"getFirstVideoTrack",value:function(e){if(!e)return null;var t=e.getVideoTracks();return t.length>0?t[0]:null}},{key:"getFirstAudioTrack",value:function(e){if(!e)return null;var t=e.getAudioTracks();return t.length>0?t[0]:null}},{key:"startScreenRecording",value:(o=ne(t6().mark(function e(){var t,n;return t6().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia&&!this.isRecording){e.next=4;break}return this.available=!1,this.rerender(),e.abrupt("return");case 4:return e.prev=4,e.next=7,navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,i.MAX_WIDTH)},height:{ideal:Math.min(window.screen.height,i.MAX_HEIGHT)},frameRate:{ideal:i.IDEAL_FRAME_RATE,max:i.MAX_FRAME_RATE},displaySurface:"monitor"},audio:!1,selfBrowserSurface:"include"});
1case 7:if(t=e.sent,this._displayStream=t,this._displayVideoTrack=this.getFirstVideoTrack(t),this.audioMuted){e.next=15;break}return e.next=13,this.startAudioRecording();case 13:e.next=19;break;case 15:this.audioAvailable=!1,n=this.createMediaStream([this._displayVideoTrack]),this.stream=n,this.handleRecord({stream:n});case 19:this.rerender(),e.next=26;break;case 22:e.prev=22,e.t0=e.catch(4),window.alert(this.permissionErrorText),this.rerender();case 26:case"end":return e.stop()}},e,this,[[4,22]])})),function(){return o.apply(this,arguments)})},{key:"stopScreenRecording",value:function(){if(this.mediaRecorder&&this.stream&&this.isRecording){this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null);try{this.mediaRecorder.stop()}catch(e){}this.stopStreamTracks(this.stream),this._displayStream&&(this.stopStreamTracks(this._displayStream),this._displayStream=null),this._micStream&&(this.stopStreamTracks(this._micStream),this._micStream=null),this._displayVideoTrack=null,this.rerender()}}},{key:"startAudioRecording",value:(r=ne(t6().mark(function e(){var t,n,r,o;return t6().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._displayVideoTrack){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:!1});case 5:t=e.sent,this._micStream=t,n=this.getFirstAudioTrack(t),this.audioMuted=!1,this.audioAvailable=!!n,r=this.createMediaStream([this._displayVideoTrack,n]),this.stream=r,this.handleRecord({stream:r}),this.rerender(),e.next=23;break;case 16:e.prev=16,e.t0=e.catch(2),this.audioAvailable=!1,o=this.createMediaStream([this._displayVideoTrack]),this.stream=o,this.handleRecord({stream:o}),this.rerender();case 23:case"end":return e.stop()}},e,this,[[2,16]])})),function(){return r.apply(this,arguments)})},{key:"toggleAudio",value:function(){if(this.audioMuted=!this.audioMuted,this.rerender(),this.stream)for(var e=this.stream.getAudioTracks(),t=0;t<e.length;t++)e[t].enabled=!this.audioMuted}},{key:"clearPreview",value:function(){var e=document.querySelector(i.SELECTORS.PREVIEW_VIDEO);e&&(e.src=null),this.file=null,this.rerender()}},{key:"handleRecord",value:function(e){var t=e.stream,n=this,r=[];this.mediaRecorder=new MediaRecorder(t,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var o=document.querySelector(i.SELECTORS.TIMER_LABEL);this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.recordingTimer=setInterval(function(){n.recordTime++;var e=n.maxRecordTime-n.recordTime;o?e>0?o.innerHTML=n.formatTime(e):(o.innerHTML="2:00",n.stopScreenRecording()):e<=0&&n.stopScreenRecording()},i.TIMER_UPDATE_INTERVAL),this.mediaRecorder.ondataavailable=function(e){e.data&&e.data.size>0&&r.push(e.data)};var a=this.getFirstVideoTrack(t);a&&(a.onended=function(){n.prepareRecording(r)}),this.mediaRecorder.onstop=function(){n.prepareRecording(r)},this.mediaRecorder.start(i.CHUNK_INTERVAL),n.rerender()}},{key:"prepareRecording",value:function(e){var t=this.getSupportedMimeType(),n=new Blob(e,{type:t}),r=t.includes("mp4")?"mp4":"webm";this.file=new File([n],"screen-recording.".concat(r),{type:t});var o=document.querySelector(i.SELECTORS.PREVIEW_VIDEO);o&&(o.src=URL.createObjectURL(n),this.audioAvailable=this.stream?this.stream.getAudioTracks().length>0:this.audioAvailable,this.isRecording=!1,this.rerender())}}],t=[{key:"uploadScreenRecording",value:(n=ne(t6().mark(function e(t){return t6().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise(function(e,n){var r=new XMLHttpRequest;r.open("POST",tR.getInstance().apiUrl+"/uploads/sdk"),tR.getInstance().injectSession(r);var o=new FormData;o.append("file",t),r.onerror=function(){n(Error("Network error during file upload"))},r.onreadystatechange=function(){4==r.readyState&&(200==r.status?e(JSON.parse(r.response).fileUrl):n(Error("Upload failed with status ".concat(r.status))))},r.send(o)}));case 3:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})}],e&&nn(i.prototype,e),t&&nn(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}();function na(e){return(na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ns(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ns(Object(n),!0).forEach(function(t){nu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ns(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nd(r.key),r)}}function nu(e,t,n){return(t=nd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nd(e){var t=function(e,t){if("object"!=na(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=na(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==na(t)?t:String(t)}nr(ni,"MAX_RECORD_TIME",120),nr(ni,"MAX_WIDTH",3072),nr(ni,"MAX_HEIGHT",1728),nr(ni,"IDEAL_FRAME_RATE",10),nr(ni,"MAX_FRAME_RATE",24),nr(ni,"CHUNK_INTERVAL",200),nr(ni,"TIMER_UPDATE_INTERVAL",1e3),nr(ni,"RERENDER_DELAY",100),nr(ni,"MIME_TYPES",["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm","video/mp4"]),nr(ni,"SELECTORS",{PREVIEW_VIDEO:".bb-capture-preview video",TIMER_LABEL:".bb-capture-toolbar-item-timer"});var np=function(){var e,t;function n(e,t,r,o,i,a,l){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),nu(this,"excludeData",{}),nu(this,"type","BUG"),nu(this,"priority","LOW"),nu(this,"customData",{}),nu(this,"ticketAttributes",{}),nu(this,"metaData",{}),nu(this,"consoleLog",[]),nu(this,"networkLogs",[]),nu(this,"customEventLog",[]),nu(this,"formData",{}),nu(this,"isSilent",!1),nu(this,"outboundId",void 0),nu(this,"screenshotData",void 0),nu(this,"webReplay",void 0),nu(this,"screenRecordingUrl",void 0),nu(this,"spamToken",void 0),this.type=e,this.priority=t,this.formData=r,this.isSilent=o,this.excludeData=i,this.outboundId=a,this.spamToken=l}return e=[{key:"takeSnapshot",value:function(){var e=this,t=uH.getInstance();this.customData=n0.getInstance().getCustomData(),this.metaData=nR.getInstance().getMetaData(),this.consoleLog=nU.getInstance().getLogs(),this.networkLogs=_.getInstance().getRequests(),this.customEventLog=tF.getInstance().getEventArray(),this.ticketAttributes=n0.getInstance().getTicketAttributes();var n=[],r=t.getGlobalDataItem("webReplay");null!==r&&(this.webReplay=r);var o=t.getGlobalDataItem("screenRecordingData");if(null!=o){var i=ni.uploadScreenRecording(o).then(function(t){t&&(e.screenRecordingUrl=t)});n.push(i)}if(!this.excludeData||!this.excludeData.screenshot){var a=t9(t.isLiveMode()).then(function(n){if(n){var r=t.getGlobalDataItem("snapshotPosition");n.x=r.x,n.y=r.y,e.screenshotData=n}});n.push(a)}return Promise.all(n)}},{key:"getData",value:function(){var e={type:this.type,priority:this.priority,customData:this.customData,metaData:this.metaData,consoleLog:this.consoleLog,networkLogs:this.networkLogs,customEventLog:this.customEventLog,formData:nl(nl({},this.ticketAttributes),this.formData),isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=cc.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),r=0;r<n.length;r++){var o=n[r];!0===this.excludeData[o]&&(e[o]&&delete e[o],"screenshot"===o&&delete e.screenshotData,"replays"===o&&delete e.webReplay)}return e}},{key:"getTicketData",value:function(){var e=this;return new Promise(function(t,n){e.takeSnapshot().then(function(){t(e.getData())}).catch(function(e){console.log("Failed to take snapshot",e),n()})})}},{key:"sendFeedback",value:function(){var e=this;return new Promise(function(t,n){e.takeSnapshot().then(function(){var r=e.getData(),o=new XMLHttpRequest;o.open("POST",tR.getInstance().apiUrl+"/bugs/v2"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),tR.getInstance().injectSession(o),o.onerror=function(e){n()},o.onreadystatechange=function(e){if(4===o.readyState)if(200===o.status||201===o.status)try{var r=JSON.parse(o.responseText);t(r)}catch(e){n()}else n()},o.send(JSON.stringify(r))}).catch(function(e){console.log("Failed to take snapshot",e),n()})})}}],nc(n.prototype,e),t&&nc(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function nh(e){return(nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nf(e,t,n){return(t=ng(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ng(e){var t=function(e,t){if("object"!=nh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nh(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==nh(t)?t:String(t)}var nm=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),nf(this,"eventListeners",{})}return e=[{key:"getInstance",value:function(){return this.instance||(this.instance=new t),this.instance}},{key:"notifyEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=uH.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}
1var r=this.getInstance().eventListeners[e];if(r)for(var o=0;o<r.length;o++){var i=r[o];i&&i(t)}}},{key:"on",value:function(e,t){var n=this.getInstance();n.eventListeners[e]||(n.eventListeners[e]=[]),n.eventListeners[e].push(t)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ng(r.key),r)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function nv(e){return(nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ny(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nk(r.key),r)}}function nw(e,t,n){return(t=nk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nk(e){var t=function(e,t){if("object"!=nv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nv(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==nv(t)?t:String(t)}nf(nm,"instance",void 0);var nx=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),nw(this,"agentTools",[]),nw(this,"agentToolCallbacks",[])}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"setAgentTools",value:function(e){this.agentTools=e||[]}},{key:"getAgentTools",value:function(){return this.agentTools}},{key:"registerAgentToolAction",value:function(e){e&&this.agentToolCallbacks.push(e)}},{key:"triggerToolAction",value:function(e){if(e){nm.notifyEvent("agent-tool-executed",e);var t,n=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return ny(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ny(e,void 0)}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(this.agentToolCallbacks);try{for(n.s();!(t=n.n()).done;){var r=t.value;try{r(e)}catch(e){}}}catch(e){n.e(e)}finally{n.f()}}}}],nb(n.prototype,e),t&&nb(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function nS(e){return(nS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nO(r.key),r)}}function nE(e,t,n){return(t=nO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nO(e){var t=function(e,t){if("object"!=nS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nS(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==nS(t)?t:String(t)}nw(nx,"instance",void 0);var nT=function(){var e,t;function n(){var e=this;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),nE(this,"frameUrl","https://messenger-app.gleap.io"),nE(this,"gleapFrameContainer",null),nE(this,"gleapFrame",null),nE(this,"comReady",!1),nE(this,"injectedFrame",!1),nE(this,"widgetOpened",!1),nE(this,"listeners",[]),nE(this,"appMode","widget"),nE(this,"markerManager",void 0),nE(this,"escListener",void 0),nE(this,"frameHeight",0),nE(this,"sendingFeedback",!1),nE(this,"queue",[]),nE(this,"urlHandler",function(e,t){if(e&&e.length>0)if(t){var n=window.open(e,"_blank");n&&n.focus()}else window.location.href=e}),nE(this,"autoWhiteListCookieManager",function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])}),nE(this,"injectFrame",function(){e.injectedFrame||(e.injectedFrame=!0,e.autoWhiteListCookieManager(),G(function(){tW.getInstance().onConfigLoaded(function(){tW.getInstance().applyStylesFromConfig();var t=document.createElement("div");t.className="gleap-frame-container gleap-frame-container--hidden gl-block",t.innerHTML='<div class="gleap-frame-container-inner"><iframe class="gleap-frame" scrolling="yes" allow="autoplay; encrypted-media; fullscreen; microphone *; display-capture *; camera *;" frameborder="0"></iframe></div>',document.body.appendChild(t),e.gleapFrameContainer=t,e.gleapFrame=document.querySelector(".gleap-frame"),D(e.gleapFrame,e.frameUrl),e.updateFrameStyle(),"widget"===e.appMode&&e.showFrameContainer(!0)})}))}),nE(this,"showImage",function(e){G(function(){var t=document.createElement("div");t.className="gleap-image-view",t.innerHTML='<div class="gleap-image-view-close">\n      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm97.9-320l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z"/></svg>\n      </div><img class="gleap-image-view-image" src="'.concat(e,'" />'),document.body.appendChild(t);var n=function(){t.remove()};t.querySelector(".gleap-image-view-close").addEventListener("click",function(){n()}),t.addEventListener("click",function(e){e.target===t&&n()})})}),nE(this,"updateFrameStyle",function(){if(e.gleapFrameContainer){for(var t="gleap-frame-container--survey",n="gleap-frame-container--extended",r="gleap-frame-container--survey-full",o="gleap-frame-container--classic",i="gleap-frame-container--classic-left",a="gleap-frame-container--modern-left",l="gleap-frame-container--no-button",c=[o,i,n,a,l,t,r],u=0;u<c.length;u++)e.gleapFrameContainer.classList.remove(c[u]);var d=void 0,p=tW.getInstance().getFlowConfig();p.feedbackButtonPosition!==I.FEEDBACK_BUTTON_CLASSIC&&p.feedbackButtonPosition!==I.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(d=o),p.feedbackButtonPosition===I.FEEDBACK_BUTTON_CLASSIC_LEFT&&(d=i),p.feedbackButtonPosition===I.FEEDBACK_BUTTON_BOTTOM_LEFT&&(d=a),null===I.getInstance().buttonHidden?p.feedbackButtonPosition===I.FEEDBACK_BUTTON_NONE&&(d=l):I.getInstance().buttonHidden&&(d=l),d&&e.gleapFrameContainer.classList.add(d),"survey"===e.appMode&&e.gleapFrameContainer.classList.add(t),"survey_full"!==e.appMode&&"survey_web"!==e.appMode||e.gleapFrameContainer.classList.add(r),"extended"===e.appMode&&e.gleapFrameContainer.classList.add(n),e.gleapFrameContainer.setAttribute("dir",lT.getInstance().isRTLLayout?"rtl":"ltr")}}),this.startCommunication(),"u">typeof window){var t=function(){try{document.documentElement.style.setProperty("--glvh",.01*window.innerHeight+"px")}catch(e){}};try{window.addEventListener("resize",t),t()}catch(e){}}}return e=[{key:"setUrlHandler",value:function(e){this.urlHandler=e}},{key:"isSurvey",value:function(){return"survey"===this.appMode||"survey_full"===this.appMode||"survey_web"===this.appMode}},{key:"setAppMode",value:function(e){this.appMode=e,this.updateFrameStyle();var t=document.querySelector(".gleap-frame-container-inner");("widget"===this.appMode||"survey_full"===this.appMode||"survey_web"===this.appMode)&&t&&(t.style.maxHeight="".concat(700,"px"))}},{key:"registerEscListener",value:function(){var e=this;this.escListener||(this.escListener=function(t){"Escape"===(t=t||window.event).key&&e.hideWidget()},document.addEventListener("keydown",this.escListener))}},{key:"unregisterEscListener",value:function(){this.escListener&&(document.removeEventListener("keydown",this.escListener),this.escListener=null)}},{key:"destroy",value:function(){this.gleapFrame&&this.gleapFrame.remove(),this.gleapFrameContainer&&this.gleapFrameContainer.remove(),this.injectedFrame=!1,this.widgetOpened=!1,this.markerManager=void 0,this.gleapFrameContainer=null,this.gleapFrame=null}},{key:"isOpened",value:function(){return this.widgetOpened||null!=this.markerManager}},{key:"showFrameContainer",value:function(e){var t,n=this;if(this.gleapFrameContainer){var r=tW.getInstance().getFlowConfig(),o="gleap-frame-container--loading";null!=(t=this.gleapFrameContainer)&&t.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),r&&r.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),r&&r.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout(function(){var e;null==(e=n.gleapFrameContainer)||e.classList.add("gleap-frame-container--animate")},500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),uH.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}
1),this.showFrameContainer(!1),this.updateWidgetStatus(),nm.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){lz.getInstance().clearAllNotifications(this.isSurvey()),I.getInstance().updateNotificationBadge(0),I.getInstance().updateFeedbackButtonState()}},{key:"showWidget",value:function(){var e=this;setTimeout(function(){e.gleapFrameContainer?e.runWidgetShouldOpenCallback():n.getInstance().injectFrame(),e.updateUI()},0)}},{key:"updateWidgetStatus",value:function(){this.sendMessage({name:"widget-status-update",data:{isWidgetOpen:this.widgetOpened}})}},{key:"hideMarkerManager",value:function(){this.markerManager&&(this.markerManager.clear(),this.markerManager=null)}},{key:"hideWidget",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"survey_web"!==this.appMode&&(this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),e&&this.sendMessage({name:"reset-routes",data:{}}),this.widgetOpened=!1,this.updateWidgetStatus(),I.getInstance().updateFeedbackButtonState(),nm.notifyEvent("close"),lz.getInstance().reloadNotificationsFromCache(),this.unregisterEscListener(),"u">typeof window&&void 0!==window.focus&&window.focus())}},{key:"sendMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.comReady&&this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(e){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:tR.getInstance().getSession(),apiUrl:tR.getInstance().apiUrl,sdkKey:tR.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.comReady&&(this.sendMessage({name:"config-update",data:{config:tW.getInstance().getFlowConfig(),aiTools:nx.getInstance().getAgentTools(),agentTools:nx.getInstance().getAgentTools(),overrideLanguage:lT.getInstance().getOverrideLanguage()}}),this.updateFrameStyle())}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new lS(e),this.markerManager.show(function(e){e||t.hideMarkerManager(),t.showWidget()})}},{key:"workThroughQueue",value:function(){var e,t=function(e){if(Array.isArray(e))return nC(e)}(e=this.queue)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return nC(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nC(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();this.queue=[];for(var n=0;n<t.length;n++)this.sendMessage(t[n],!0)}},{key:"startCommunication",value:function(){var e=this;this.addMessageListener(function(t){if("ping"===t.name&&(e.comReady=!0,e.sendConfigUpdate(),e.sendSessionUpdate(),e.workThroughQueue(),setTimeout(function(){e.runWidgetShouldOpenCallback()},300)),"play-ping"===t.name&&co.ping(),"open-image"===t.name&&e.showImage(t.data.url),"page-changed"===t.name&&(t.data&&("newsdetails"===t.data.name||"appextended"===t.data.name)?e.setAppMode("extended"):"extended"===e.appMode&&e.setAppMode("widget")),"collect-ticket-data"===t.name){var n={customData:n0.getInstance().getCustomData(),metaData:nR.getInstance().getMetaData(),consoleLog:nU.getInstance().getLogs(),networkLogs:_.getInstance().getRequests(),customEventLog:tF.getInstance().getEventArray(),formData:n0.getInstance().getTicketAttributes()},r=cc.getInstance().getTags();r&&r.length>0&&(n.tags=r),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var o=document.querySelector(".gleap-frame-container-inner");("survey"===e.appMode||"survey_full"===e.appMode||"survey_web"===e.appMode)&&o&&(o.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&nm.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var i=t.data,a=!!t.newTab;e.urlHandler(i,a)}if("start-product-tour"===t.name&&uH.startProductTour(null==(l=t.data)?void 0:l.tourId,!0),"run-custom-action"===t.name&&n5.triggerCustomAction(t.data,{shareToken:t.shareToken}),"close-widget"===t.name&&e.hideWidget(),"video-call-joined"===t.name&&(I.getInstance().showingRedDot=!0,I.getInstance().updateRedDot(!0)),"video-call-left"===t.name&&(I.getInstance().showingRedDot=!1,I.getInstance().updateRedDot(!1)),"tool-execution"===t.name&&(nm.notifyEvent("tool-execution",t.data),nx.getInstance().triggerToolAction(t.data)),"checklist-loaded"===t.name){var l,c,u=t.data;nm.notifyEvent("checklist-loaded",{checklistId:u.id,outboundId:null==(c=u.outbound)?void 0:c.id,completedSteps:u.completedSteps,status:u.status,data:u})}if("checklist-step-completed"===t.name){var d,p=t.data,h=p.checklistData,f=p.step,g=p.index;
1nm.notifyEvent("checklist-step-completed",{checklistId:h.id,outboundId:null==(d=h.outbound)?void 0:d.id,stepId:f.id,stepIndex:g,step:f,completedSteps:h.completedSteps,status:h.status,data:h})}if("checklist-completed"===t.name){var m,v=t.data;nm.notifyEvent("checklist-completed",{checklistId:v.id,outboundId:null==(m=v.outbound)?void 0:m.id,completedSteps:v.completedSteps,status:v.status,data:v})}if("send-feedback"===t.name){if(e.sendingFeedback)return;e.sendingFeedback=!0;var y=t.data.formData,b=t.data.action,w=t.data.outboundId,k=t.data.spamToken;new np(b.feedbackType,"MEDIUM",y,!1,b.excludeData,w,k).sendFeedback().then(function(t){if(setTimeout(function(){e.sendingFeedback=!1},1e3),e.sendMessage({name:"feedback-sent",data:t}),nm.notifyEvent("feedback-sent",y),w&&w.length>0){nm.notifyEvent("outbound-sent",{outboundId:w,outbound:b,formData:y});try{delete y.reportedBy}catch(e){}uH.trackEvent("outbound-".concat(w,"-submitted"),y)}}).catch(function(t){setTimeout(function(){e.sendingFeedback=!1,e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),nm.notifyEvent("error-while-sending")},1e3)})}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)}),window.addEventListener("message",function(t){var n=l3.getInstance(),r=n.bannerContainer?n.bannerContainer.querySelector(".gleap-b-frame"):null,o=e.gleapFrame&&t.source===e.gleapFrame.contentWindow,i=r&&t.source===r.contentWindow,a=t.origin===e.frameUrl,l=t.origin===n.bannerUrl;if(o||i||a||l)try{var c=JSON.parse(t.data);if("MODAL"===(null==c?void 0:c.type)||"BANNER"===(null==c?void 0:c.type)||"CHATBAR"===(null==c?void 0:c.type)||"AGENT_CONVERSATION"===(null==c?void 0:c.type))return;for(var u=0;u<e.listeners.length;u++)e.listeners[u]&&e.listeners[u](c)}catch(e){}})}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&nI(n.prototype,e),t&&nI(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function nL(e){return(nL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nP(r.key),r)}}function nM(e,t,n){return(t=nP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nP(e){var t=function(e,t){if("object"!=nL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nL(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==nL(t)?t:String(t)}nE(nT,"instance",void 0);var nR=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),nM(this,"sessionStart",new Date),nM(this,"appBuildNumber",""),nM(this,"appVersionCode",""),nM(this,"environment","prod")}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}},{key:"setAppVersionCode",value:function(e){this.getInstance().appVersionCode=e}},{key:"setAppBuildNumber",value:function(e){this.getInstance().appBuildNumber=e}}],e=[{key:"getSessionDuration",value:function(){return Math.round(((new Date).getTime()-this.sessionStart.getTime())/1e3)}},{key:"getMetaData",value:function(){var e,t,n,r=navigator.userAgent,o=navigator.appName,i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10);-1!==(t=r.indexOf("Opera"))?(o="Opera",i=r.substring(t+6),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("MSIE"))?(o="Microsoft Internet Explorer",i=r.substring(t+5)):-1!==(t=r.indexOf("Chrome"))?(o="Chrome",i=r.substring(t+7)):-1!==(t=r.indexOf("Safari"))?(o="Safari",i=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("Firefox"))?(o="Firefox",i=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(o=r.substring(e,t),i=r.substring(t+1),o.toLowerCase()===o.toUpperCase()&&(o=navigator.appName)),-1!==(n=i.indexOf(";"))&&(i=i.substring(0,n)),-1!==(n=i.indexOf(" "))&&(i=i.substring(0,n)),isNaN(parseInt(""+i,10))&&(i=""+parseFloat(navigator.appVersion),parseInt(navigator.appVersion,10));var l="Unknown OS";return -1!==navigator.appVersion.indexOf("Win")&&(l="Windows"),-1!==navigator.appVersion.indexOf("Mac")&&(l="MacOS"),-1!==navigator.appVersion.indexOf("X11")&&(l="UNIX"),-1!==navigator.appVersion.indexOf("Linux")&&(l="Linux"),-1!==navigator.appVersion.indexOf("iPad")&&(l="iPad"),-1!==navigator.appVersion.indexOf("iPhone")&&(l="iPhone"),-1!==navigator.appVersion.indexOf("Android")&&(l="Android"),{browserName:o+"("+i+")",userAgent:r,browser:o,systemName:l,buildVersionNumber:this.appBuildNumber,releaseVersionNumber:this.appVersionCode,sessionDuration:this.getSessionDuration(),devicePixelRatio:window.devicePixelRatio,screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,currentUrl:window.location.href,language:navigator.language||navigator.userLanguage,mobile:B(),sdkVersion:"16.1.1",sdkType:"javascript",environment:this.environment}}}],nA(n.prototype,e),t&&nA(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function n_(e){return(n_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?nD(Object(n),!0).forEach(function(t){nF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nB(r.key),r)}}function nF(e,t,n){return(t=nB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nB(e){var t=function(e,t){if("object"!=n_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=n_(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==n_(t)?t:String(t)}nM(nR,"instance",void 0);var nU=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),nF(this,"logArray",[]),nF(this,"disabled",!1),nF(this,"originalConsoleLog",void 0),nF(this,"logMaxLength",500)}return e=[{key:"getLogs",value:function(){return this.logArray}},{key:"stop",value:function(){this.disabled=!0,this.originalConsoleLog&&(window.console=this.originalConsoleLog)}},{key:"addLog",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:H(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var r=0;r<e.length;r++)n+=e[r]+" "}catch(e){}this.addLog(n,t)}}},{key:"start",value:function(){if(!this.disabled){var e,t=this;window.console=(e=window.console,window.console&&e||(e={}),t.originalConsoleLog=e,nj(nj({},e),{},{log:function(){t.addLogWithArgs(arguments,"INFO"),e.log&&e.log.apply(e,arguments)},warn:function(){t.addLogWithArgs(arguments,"WARNING"),e.warn&&e.warn.apply(e,arguments)},error:function(){t.addLogWithArgs(arguments,"ERROR"),e.error&&e.error.apply(e,arguments)},info:function(n){t.addLogWithArgs(arguments,"INFO"),e.info&&e.info.apply(e,arguments)}}))}}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&nN(n.prototype,e),t&&nN(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function nH(e){return(nH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nq(r.key),r)}}function nq(e){var t=function(e,t){if("object"!=nH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nH(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==nH(t)?t:String(t)}nF(nU,"instance",void 0);var nW,nG,nV,nJ,nY,nK=function(){var e,t;function n(){if(!(this instanceof n))throw TypeError("Cannot call a class as a function")}return e=[{key:"start",value:function(){document.addEventListener("click",function(e){e.target&&("A"===e.target.tagName&&"gleap:"===e.target.protocol&&(e.preventDefault(),uU(e.target.href)),nT.getInstance().isOpened()||nU.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=H(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),r="",o="";if(void 0!==e.getAttribute){var i=e.getAttribute("id");i&&(r=' id="'.concat(i,'"'));var a=e.getAttribute("class");a&&(o=' class="'.concat(a,'"'))}var l=(e.tagName||"").toLowerCase(),c="<",u=">";return t||(c="[",u="]"),"".concat(c).concat(l).concat(r).concat(o).concat(u).concat(n).concat(c,"/").concat(l).concat(u)}(e.target),"CLICK"))})}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&nz(n.prototype,e),t&&nz(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function nX(e){return(nX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,nQ(r.key),r)}}function n$(e,t,n){return(t=nQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nQ(e){var t=function(e,t){if("object"!=nX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nX(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==nX(t)?t:String(t)}nY=void 0,(nJ=nq(nJ="instance"))in nK?Object.defineProperty(nK,nJ,{value:nY,enumerable:!0,configurable:!0,writable:!0}):nK[nJ]=nY;var n0=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),n$(this,"customData",{}),n$(this,"ticketAttributes",{})}return e=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,U(e))}},{key:"setCustomData",value:function(e,t){this.customData[e]=t}},{key:"removeCustomData",value:function(e){delete this.customData[e]}},{key:"clearCustomData",value:function(){this.customData={}}},{key:"setTicketAttribute",value:function(e,t){this.ticketAttributes[e]=t}},{key:"unsetTicketAttribute",value:function(e){delete this.ticketAttributes[e]}},{key:"clearTicketAttributes",value:function(){this.ticketAttributes={}}},{key:"getTicketAttributes",value:function(){return this.ticketAttributes}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&nZ(n.prototype,e),t&&nZ(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function n1(e){return(n1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n3(e,t,n){return(t=n4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n4(e){var t=function(e,t){if("object"!=n1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=n1(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==n1(t)?t:String(t)}n$(n0,"instance",void 0);var n5=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),n3(this,"customActionCallbacks",[])}return e=[{key:"getInstance",value:function(){return this.instance||(this.instance=new t),this.instance}},{key:"registerCustomAction",value:function(e){var t=this.getInstance();t.customActionCallbacks&&t.customActionCallbacks.push(e)}},{key:"triggerCustomAction",value:function(e,t){var n=this.getInstance();if(n.customActionCallbacks)for(var r=0;r<n.customActionCallbacks.length;r++){var o=n.customActionCallbacks[r];o&&o(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?n2(Object(n),!0).forEach(function(t){n3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({name:e},t||{}))}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n4(r.key),r)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();n3(n5,"instance",void 0);var n9,n7=Object.defineProperty,n6=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?n7(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},n8=Object.defineProperty,re=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?n8(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},rt=((o=rt||{})[o.Document=0]="Document",o[o.DocumentType=1]="DocumentType",o[o.Element=2]="Element",o[o.Text=3]="Text",o[o.CDATA=4]="CDATA",o[o.Comment=5]="Comment",o);let rn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},rr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ro={};function ri(e){if(ro[e])return ro[e];let t=globalThis[e],n=t.prototype,r=e in rn?rn[e]:void 0,o=!!(r&&r.every(e=>{var t,r;return!!(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in rr?rr[e]:void 0,a=!!(i&&i.every(e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(o&&a&&!globalThis.Zone)return ro[e]=t.prototype,t.prototype;try{let r=document.createElement("iframe");document.body.appendChild(r);let o=r.contentWindow;if(!o)return t.prototype;let i=o[e].prototype;return document.body.removeChild(r),i?ro[e]=i:n}catch{return n}}let ra={};function rs(e,t,n){var r;let o=`${e}.${String(n)}`;if(ra[o])return ra[o].call(t);let i=null==(r=Object.getOwnPropertyDescriptor(ri(e),n))?void 0:r.get;return i?(ra[o]=i,i.call(t)):t[n]}let rl=function(e){return rs("Node",e,"childNodes")},rc=function(e){return rs("Node",e,"parentNode")},ru=function(e){return rs("Node",e,"parentElement")},rd=function(e){return rs("Node",e,"textContent")},rp=function(e){return e&&"shadowRoot"in e?rs("Element",e,"shadowRoot"):null};function rh(e){return e.nodeType===e.ELEMENT_NODE}function rf(e){var t;let n=e&&"host"in e&&"mode"in e&&((t=e)&&"host"in t?rs("ShadowRoot",t,"host"):null)||null;return!!(n&&"shadowRoot"in n&&rp(n)===e)}function rg(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function rm(e){var t;try{let n=e.rules||e.cssRules;if(!n)return null;let r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),(t=Array.from(n,e=>rv(e,r)).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}}function rv(e,t){if("styleSheet"in e){let t;try{t=rm(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){t=e.cssText}return e.styleSheet.href?rT(t,e.styleSheet.href):t}{let n=e.cssText;return"selectorText"in e&&e.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?rT(n,t):n}}class ry{constructor(){re(this,"idNodeMap",new Map),re(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
1this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function rb({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:i}){let a=o||"",l=r&&rw(r);return(t[n.toLowerCase()]||l&&t[l])&&(a=i?i(a,e):"*".repeat(a.length)),a}function rw(e){return e.toLowerCase()}let rk="__rrweb_original__";function rx(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?rw(t):null}function rS(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}let r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}let rC=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rI=/^(?:[a-z+]+:)?\/\//i,rE=/^www\..*/i,rO=/^(data:)([^,]*),(.*)/i;function rT(e,t){return(e||"").replace(rC,(e,n,r,o,i,a)=>{let l=r||i||a,c=n||o||"";if(!l)return e;if(rI.test(l)||rE.test(l)||rO.test(l))return`url(${c}${l}${c})`;if("/"===l[0])return`url(${c}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+l}${c})`;let u=t.split("/"),d=l.split("/");for(let e of(u.pop(),d))"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`})}function rL(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}let rA=1,rM=RegExp("[^a-z0-9-_:]");function rP(){return rA++}let rR=/^[^ \t\n\r\u000c]+/,r_=/^[, \t\n\r\u000c]+/,rD=new WeakMap;function rj(e,t){return t&&""!==t.trim()?rN(e,t):t}function rN(e,t){let n=rD.get(e);if(n||(n=e.createElement("a"),rD.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function rF(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?rj(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}let o=[];for(;r(r_),!(n>=t.length);){let i=r(rR);if(","===i.slice(-1))i=rj(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=rj(e,i);let a=!1;for(;;){let e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?rT(r,rN(e)):"object"===t&&"data"===n?rj(e,r):r:r}function rB(e,t,n){return["video","audio"].includes(e)&&"autoplay"===t}function rU(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&rU(rc(e),t,n);for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!!n&&rU(rc(e),t,n)}function rH(e,t,n,r){let o;if(rh(e)){if(!rl(o=e).length)return!1}else{if(null===ru(e))return!1;o=ru(e)}try{if("string"==typeof t){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(rU(o,t,r))return!0;if(n){if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}}catch(e){}return!1}function rz(e){return null==e?"":e.toLowerCase()}function rq(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function rW(e,r){let o,{doc:i,mirror:a,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:g,maskInputFn:m,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:w=!1,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:O=!1,cssCaptured:T=!1}=r,{needsMask:L}=r,{preserveWhiteSpace:A=!0}=r;L||(L=rH(e,u,d,void 0===L));let M=function(e,r){let{doc:o,mirror:i,blockClass:a,blockSelector:l,needsMask:c,inlineStylesheet:u,maskInputOptions:d={},maskTextFn:p,maskInputFn:h,dataURLOptions:f={},inlineImages:g,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y=!1,cssCaptured:b=!1}=r,w=function(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return 1===n?void 0:n}(o,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:rt.Document,childNodes:[],compatMode:e.compatMode}:{type:rt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:rt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,r){let o,{doc:i,blockClass:a,blockSelector:l,inlineStylesheet:c,maskInputOptions:u={},maskInputFn:d,dataURLOptions:p={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:v}=r,y=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,a,l),b=function(e){if(e instanceof HTMLFormElement)return"form";let t=rw(e.tagName);return rM.test(t)?"div":t}(e),w={},k=e.attributes.length;for(let t=0;t<k;t++){let n=e.attributes[t];rB(b,n.name,n.value)||(w[n.name]=rF(i,b,rw(n.name),n.value))}if("link"===b&&c){let t=Array.from(i.styleSheets).find(t=>t.href===e.href),n=null;t&&(n=rm(t)),n&&(delete w.rel,delete w.href,w._cssText=n)}if("style"===b&&e.sheet){let t=rm(e.sheet);t&&(e.childNodes.length>1&&(t=(function(e,t,n=!1){let r=Array.from(t.childNodes),o=[],i=0;if(r.length>
11&&e&&"string"==typeof e){let t=rL(e,n),a=t.length/e.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&"string"==typeof r[l].textContent){let c=rL(r[l].textContent,n),u=3;for(;u<c.length&&(c[u].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,u),1));u++);for(;u<c.length;u++){let d=c.substring(0,u),p=t.split(d),h=-1;if(2===p.length)h=p[0].length;else if(p.length>2&&""===p[0]&&""!==r[l-1].textContent)h=t.indexOf(d,1);else if(1===p.length){if(d=d.substring(0,d.length-1),(p=t.split(d)).length<=1)return o.push(e),o;u=101}else u===c.length-1&&(h=t.indexOf(d));if(p.length>=2&&u>100){let e=r[l-1].textContent;if(e&&"string"==typeof e){let n=rL(e).length;h=t.indexOf(d,n)}-1===h&&(h=p[0].length)}if(-1!==h){let l=Math.floor(h/a);for(;l>0&&l<e.length;){if((i+=1)>50*r.length)return o.push(e),o;let c=rL(e.substring(0,l),n);if(c.length===h){o.push(e.substring(0,l)),e=e.substring(l),t=t.substring(h);break}c.length<h?l+=Math.max(1,Math.floor((h-c.length)/a)):l-=Math.max(1,Math.floor((c.length-h)*a))}break}}}}return o.push(e),o})(t,e).join("/* rr_split */")),w._cssText=t)}if(["input","textarea","select"].includes(b)){let t=e.value,n=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&t?w.value=rb({element:e,type:rx(e),tagName:b,value:t,maskInputOptions:u,maskInputFn:d}):n&&(w.checked=n)}if("option"===b&&(e.selected&&!u.select?w.selected=!0:delete w.selected),"dialog"===b&&e.open&&(w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===b&&f){if("2d"===e.__context)(function(e){let t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let o=t.getImageData;if(new Uint32Array((rk in o?o[rk]:o).call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let t=e.toDataURL(p.type,p.quality),n=i.createElement("canvas");n.width=e.width,n.height=e.height,t!==n.toDataURL(p.type,p.quality)&&(w.rr_dataURL=t)}}if("img"===b&&h){t||(n=(t=i.createElement("canvas")).getContext("2d"));let r=e.currentSrc||e.getAttribute("src")||"<unknown-src>",o=e.crossOrigin,a=()=>{e.removeEventListener("load",a);try{t.width=e.naturalWidth,t.height=e.naturalHeight,n.drawImage(e,0,0),w.rr_dataURL=t.toDataURL(p.type,p.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?a():e.addEventListener("load",a));console.warn(`Cannot inline img src=${r}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(o?w.crossOrigin=o:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?a():e.addEventListener("load",a)}if(["audio","video"].includes(b)){let t=w;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),y){let{width:t,height:n}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==b||g(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(b)&&(o=!0)}catch(e){}return{type:rt.Element,tagName:b,attributes:w,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:y,rootId:v,isCustom:o}}(e,{doc:o,blockClass:a,blockSelector:l,inlineStylesheet:u,maskInputOptions:d,maskInputFn:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,keepIframeSrcFn:v,newlyAddedElement:y,rootId:w});case e.TEXT_NODE:return function(e,t){let{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:i}=t,a=rc(e),l=a&&a.tagName,c="",u="STYLE"===l||void 0,d="SCRIPT"===l||void 0;return d?c="SCRIPT_PLACEHOLDER":i||(c=rd(e),u&&c&&(c=rT(c,rN(t.doc)))),!u&&!d&&c&&n&&(c=r?r(c,ru(e)):c.replace(/[\S]/g,"*")),{type:rt.Text,textContent:c||"",rootId:o}}(e,{doc:o,needsMask:c,maskTextFn:p,rootId:w,cssCaptured:b});case e.CDATA_SECTION_NODE:return{type:rt.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:rt.Comment,textContent:rd(e)||"",rootId:w};default:return!1}}(e,{doc:i,mirror:a,blockClass:l,blockSelector:c,needsMask:L,inlineStylesheet:h,maskInputOptions:f,maskTextFn:g,maskInputFn:m,dataURLOptions:y,inlineImages:b,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:O,cssCaptured:T});if(!M)return console.warn(e,"not serialized"),null;o=a.hasNode(e)?a.getId(e):!function(e,t){if(t.comment&&e.type===rt.Comment)return!0;
1if(e.type===rt.Element&&(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"===rS(e.attributes.href))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(rz(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===rz(e.attributes.name)||"icon"===rz(e.attributes.rel)||"apple-touch-icon"===rz(e.attributes.rel)||"shortcut icon"===rz(e.attributes.rel)))||"meta"===e.tagName&&(t.headMetaDescKeywords&&rz(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(rz(e.attributes.property).match(/^(og|twitter|fb):/)||rz(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===rz(e.attributes.name))||t.headMetaRobots&&("robots"===rz(e.attributes.name)||"googlebot"===rz(e.attributes.name)||"bingbot"===rz(e.attributes.name))||t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"]||t.headMetaAuthorship&&("author"===rz(e.attributes.name)||"generator"===rz(e.attributes.name)||"framework"===rz(e.attributes.name)||"publisher"===rz(e.attributes.name)||"progid"===rz(e.attributes.name)||rz(e.attributes.property).match(/^article:/)||rz(e.attributes.property).match(/^product:/))||t.headMetaVerification&&("google-site-verification"===rz(e.attributes.name)||"yandex-verification"===rz(e.attributes.name)||"csrf-token"===rz(e.attributes.name)||"p:domain_verify"===rz(e.attributes.name)||"verify-v1"===rz(e.attributes.name)||"verification"===rz(e.attributes.name)||"shopify-checkout-api-token"===rz(e.attributes.name)))))return!0;return!1}(M,v)&&(A||M.type!==rt.Text||M.textContent.replace(/^\s+|\s+$/gm,"").length)?rP():-2;let P=Object.assign(M,{id:o});if(a.add(e,P),-2===o)return null;k&&k(e);let R=!p;if(P.type===rt.Element){R=R&&!P.needBlock,delete P.needBlock;let t=rp(e);t&&rg(t)&&(P.isShadowHost=!0)}if((P.type===rt.Document||P.type===rt.Element)&&R){v.headWhitespace&&P.type===rt.Element&&"head"===P.tagName&&(A=!1);let t={doc:i,mirror:a,blockClass:l,blockSelector:c,needsMask:L,maskTextClass:u,maskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:f,maskTextFn:g,maskInputFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:w,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:E,cssCaptured:!1};if(P.type===rt.Element&&"textarea"===P.tagName&&void 0!==P.attributes.value);else for(let n of(P.type===rt.Element&&void 0!==P.attributes._cssText&&"string"==typeof P.attributes._cssText&&(t.cssCaptured=!0),Array.from(rl(e)))){let e=rW(n,t);e&&P.childNodes.push(e)}let n=null;if(rh(e)&&(n=rp(e)))for(let e of Array.from(rl(n))){let r=rW(e,t);r&&(rg(n)&&(r.isShadow=!0),P.childNodes.push(r))}}let _=rc(e);return _&&rf(_)&&rg(_)&&(P.isShadow=!0),P.type===rt.Element&&"iframe"===P.tagName&&function(e,t,n){let r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){let r=setTimeout(()=>{i||(t(),i=!0)},n);return e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}let a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&x){let n=rW(t,{doc:t,mirror:a,blockClass:l,blockSelector:c,needsMask:L,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:g,maskInputFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:w,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:E});n&&x(e,n)}},S),P.type===rt.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===rS(P.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;let i=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),o=!0,t()})}(e,()=>{if(C){let t=rW(e,{doc:i,mirror:a,blockClass:l,blockSelector:c,needsMask:L,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:g,maskInputFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:w,preserveWhiteSpace:A,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:E});t&&C(e,t)}},I),P}var rG={exports:{}},rV=String,rJ=function(){return{isColorSupported:!1,reset:rV,bold:rV,dim:rV,italic:rV,underline:rV,inverse:rV,hidden:rV,strikethrough:rV,black:rV,red:rV,green:rV,yellow:rV,blue:rV,magenta:rV,cyan:rV,white:rV,gray:rV,bgBlack:rV,bgRed:rV,bgGreen:rV,bgYellow:rV,bgBlue:rV,bgMagenta:rV,bgCyan:rV,bgWhite:rV}};rG.exports=rJ(),rG.exports.createColors=rJ;var rY=rG.exports;let rK=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}
1))),rX=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=rY.isColorSupported),rK&&e&&(t=rK(t));let n,r,o=t.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;if(e){let{bold:e,gray:t,red:o}=rY.createColors(!0);n=t=>e(o(t)),r=e=>t(e)}else n=r=e=>e;return o.slice(i,a).map((e,t)=>{let o=i+1+t,a=" "+(" "+o).slice(-l)+" | ";if(o===this.line){let t=r(a.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(a)+e+"\n "+t+n("^")}return" "+r(a)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};rX.default=rX;var rZ={};rZ.isClean=Symbol("isClean"),rZ.my=Symbol("my");let r$={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},rQ=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let n;n="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");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){var r;let o;if(n||(n=t),t&&void 0!==(o=e.raws[t]))return o;let i=e.parent;if("before"===n&&(!i||"root"===i.type&&i.first===e||i&&"document"===i.type))return"";if(!i)return r$[n];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[n])return a.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let i="raw"+((r=n)[0].toUpperCase()+r.slice(1));this[i]?o=this[i](a,e):a.walk(e=>{if(void 0!==(o=e.raws[t]))return!1})}return void 0===o&&(o=r$[n]),a.rawCache[n]=o,o}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function r0(e,t){new rQ(t).stringify(e)}rQ.default=rQ,r0.default=r0;let{isClean:r1,my:r2}=rZ,r3=class{constructor(e={}){for(let t in this.raws={},this[r1]=!1,this[r2]=!0,e)if("nodes"===t)for(let n of(this.nodes=[],e[t]))"function"==typeof n.clone?this.append(n.clone()):this.append(n);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,n){let r=new t.constructor;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||"proxyCache"===o)continue;let i=t[o],a=typeof i;"parent"===o&&"object"===a?n&&(r[o]=n):"source"===o?r[o]=i:Array.isArray(i)?r[o]=i.map(t=>e(t,r)):("object"===a&&null!==i&&(i=e(i)),r[o]=i)}return r}(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
vendor: 4,322 bytes, line 1
1error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new rX(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[r1]){this[r1]=!1;let e=this;for(;e=e.parent;)e[r1]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let t=0;t<e;t++)"\n"===n[t]?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);-1!==o&&(t=this.positionInside(o,r),n=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new rQ).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)n[e]=r.toJSON(null,t);else if("source"===e){let i=t.get(r.input);null==i&&(i=o,t.set(r.input,o),o++),n[e]={end:r.end,inputId:i,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=r0){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}};r3.default=r3;let r4=r3,r5=class extends r4{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};r5.default=r5;let{SourceMapConsumer:r9,SourceMapGenerator:r7}=rK,{existsSync:r6,readFileSync:r8}=rK,{dirname:oe,join:ot}=rK,on=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=oe(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new r9(this.text)),this.consumerCache}decodeInline(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),y.Buffer.from(t,"base64").toString();throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
1if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=oe(e),r6(e))return this.mapFile=e,r8(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r9)return r7.fromSourceMap(t).toString();if(t instanceof r7)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ot(oe(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};on.default=on;let{SourceMapConsumer:or,SourceMapGenerator:oo}=rK,{fileURLToPath:oi,pathToFileURL:oa}=rK,{isAbsolute:os,resolve:ol}=rK,{nanoid:oc}={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=n;for(;o--;)r+=e[Math.random()*e.length|0];return r}}
1,ou=Symbol("fromOffsetCache"),od=!!(or&&oo),op=!!(ol&&os),oh=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw 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&&(!op||/^\w+:\/\//.test(t.from)||os(t.from)?this.file=t.from:this.file=ol(t.from)),op&&od){let e=new on(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+oc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,a=e.col}else i=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,a);return(o=l?new rX(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,r.plugin):new rX(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:a,line:i},this.css,this.file,r.plugin)).input={column:n,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(oa&&(o.input.url=oa(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[ou])n=this[ou];else{let e=this.css.split("\n");n=Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[ou]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(e<n[t=r+(o-r>>1)])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ol(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),l=a.originalPositionFor({column:t,line:e});if(!l.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=os(l.source)?oa(l.source):new URL(l.source,this.map.consumer().sourceRoot||oa(this.map.mapFile));let c={column:l.column,endColumn:o&&o.column,endLine:o&&o.line,line:l.line,url:i.toString()};if("file:"===i.protocol){if(!oi)throw Error("file: protocol is not available in this PostCSS build");c.file=oi(i)}let u=a.sourceContentFor(l.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};oh.default=oh,rK&&rK.registerInput&&rK.registerInput(oh);let{SourceMapConsumer:of,SourceMapGenerator:og}=rK,{dirname:om,relative:ov,resolve:oy,sep:ob}=rK,{pathToFileURL:ow}=rK,ok=!!(of&&og),ox=!!(om&&oy&&ov&&ob);var oS=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||om(e.file);!1===this.mapOpts.sourcesContent?(t=new of(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;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,""))}generate(){if(this.clearAnnotation(),ox&&ok&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=og.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new og({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new og({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,l,c)=>{if(this.css+=a,l&&"end"!==c&&(i.generated.line=n,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1):(i.source=o,i.original.line=1,i.original.column=0),this.map.addMapping(i)),(e=a.match(/\n/g))?(n+=e.length,t=a.lastIndexOf("\n"),r=a.length-t):r+=a.length,l&&"start"!==c){let e=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==e.last||e.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=r-2):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1),this.map.addMapping(i))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?om(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=om(oy(n,this.mapOpts.annotation)));let r=ov(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new oh(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}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))}toBase64(e){return y.Buffer.from(e).toString("base64")}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;
1if(ow){let t=ow(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ob&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let oC=r3,oI=class extends oC{constructor(e){super(e),this.type="comment"}};oI.default=oI;let oE,oO,oT,oL,{isClean:oA,my:oM}=rZ,oP=r3,oR=class e extends oP{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map(e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e)):"every"===t||"some"===t?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();for(let t of(r=this.index(e),o))this.proxyOf.nodes.splice(r+1,0,t);for(let e in this.indexes)r<(n=this.indexes[e])&&(this.indexes[e]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();for(let t of(r=this.index(e),i))this.proxyOf.nodes.splice(r,0,t);for(let e in this.indexes)r<=(n=this.indexes[e])&&(this.indexes[e]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(oE(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new r5(t)]}else if(t.selector)t=[new oO(t)];else if(t.name)t=[new oT(t)];else{if(!t.text)throw Error("Unknown node type in node creation");t=[new oI(t)]}return t.map(t=>(t[oM]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[oA]&&function e(t){if(t[oA]=!1,t.proxyOf.nodes)for(let n of t.proxyOf.nodes)e(n)}(t),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("atrule"===e.type)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if("comment"===t.type)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("decl"===e.type)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("rule"===e.type)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};oR.registerParse=e=>{oE=e},oR.registerRule=e=>{oO=e},oR.registerAtRule=e=>{oT=e},oR.registerRoot=e=>{oL=e},oR.default=oR,oR.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,oT.prototype):"rule"===e.type?Object.setPrototypeOf(e,oO.prototype):"decl"===e.type?Object.setPrototypeOf(e,r5.prototype):"comment"===e.type?Object.setPrototypeOf(e,oI.prototype):"root"===e.type&&Object.setPrototypeOf(e,oL.prototype),e[oM]=!0,e.nodes&&e.nodes.forEac
1h(e=>{oR.rebuild(e)})};let o_,oD,oj=oR,oN=class extends oj{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o_(new oD,this,e).stringify()}};oN.registerLazyResult=e=>{o_=e},oN.registerProcessor=e=>{oD=e},oN.default=oN;let oF=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};oF.default=oF;let oB=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new oF(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};oB.default=oB;let oU=/[\t\n\f\r "#'()/;[\\\]{}]/g,oH=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,oz=/.[\r\n"'(/\\]/,oq=/[\da-f]/i,oW=oR,oG=class extends oW{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};oG.default=oG,oW.registerAtRule(oG);let oV,oJ,oY=oR,oK=class extends oY{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t){if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new oV(new oJ,this,e).stringify()}};oK.registerLazyResult=e=>{oV=e},oK.registerProcessor=e=>{oJ=e},oK.default=oK,oY.registerRoot(oK);let oX={comma:e=>oX.split(e,[","],!0),space:e=>oX.split(e,[" ","\n","	"]),split(e,t,n){let r=[],o="",i=!1,a=0,l=!1,c="",u=!1;for(let n of e)u?u=!1:"\\"===n?u=!0:l?n===c&&(l=!1):'"'===n||"'"===n?(l=!0,c=n):"("===n?a+=1:")"===n?a>0&&(a-=1):0===a&&t.includes(n)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=n;return(n||""!==o)&&r.push(o.trim()),r}};oX.default=oX;let oZ=oR,o$=class extends oZ{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return oX.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};o$.default=o$,oZ.registerRule(o$);let oQ=function(e,t={}){let n,r,o,i,a,l,c,u,d,p,h=e.css.valueOf(),f=t.ignoreErrors,g=h.length,m=0,v=[],y=[];function b(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=g},nextToken:function(e){if(y.length)return y.pop();if(m>=g)return;let t=!!e&&e.ignoreUnclosed;switch(n=h.charCodeAt(m)){case 10:case 32:case 9:case 13:case 12:r=m;do r+=1,n=h.charCodeAt(r);while(32===n||10===n||9===n||13===n||12===n)p=["space",h.slice(m,r)],m=r-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(n);p=[e,e,m];break}case 40:if(u=v.length?v.pop()[1]:"",d=h.charCodeAt(m+1),"url"===u&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){r=m;do{if(l=!1,-1===(r=h.indexOf(")",r+1))){if(f||t){r=m;break}b("bracket")}for(c=r;
192===h.charCodeAt(c-1);)c-=1,l=!l}while(l)p=["brackets",h.slice(m,r+1),m,r],m=r}else r=h.indexOf(")",m+1),i=h.slice(m,r+1),-1===r||oz.test(i)?p=["(","(",m]:(p=["brackets",i,m,r],m=r);break;case 39:case 34:o=39===n?"'":'"',r=m;do{if(l=!1,-1===(r=h.indexOf(o,r+1))){if(f||t){r=m+1;break}b("string")}for(c=r;92===h.charCodeAt(c-1);)c-=1,l=!l}while(l)p=["string",h.slice(m,r+1),m,r],m=r;break;case 64:oU.lastIndex=m+1,oU.test(h),r=0===oU.lastIndex?h.length-1:oU.lastIndex-2,p=["at-word",h.slice(m,r+1),m,r],m=r;break;case 92:for(r=m,a=!0;92===h.charCodeAt(r+1);)r+=1,a=!a;if(n=h.charCodeAt(r+1),a&&47!==n&&32!==n&&10!==n&&9!==n&&13!==n&&12!==n&&(r+=1,oq.test(h.charAt(r)))){for(;oq.test(h.charAt(r+1));)r+=1;32===h.charCodeAt(r+1)&&(r+=1)}p=["word",h.slice(m,r+1),m,r],m=r;break;default:47===n&&42===h.charCodeAt(m+1)?(0===(r=h.indexOf("*/",m+2)+1)&&(f||t?r=h.length:b("comment")),p=["comment",h.slice(m,r+1),m,r]):(oH.lastIndex=m+1,oH.test(h),r=0===oH.lastIndex?h.length-1:oH.lastIndex-2,p=["word",h.slice(m,r+1),m,r],v.push(p)),m=r}return m++,p},position:function(){return m}}},o0={empty:!0,space:!0};var o1=class{constructor(e){this.input=e,this.root=new oK,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new oG;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!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){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(r=l.length-1,n=l[r];n&&"space"===n[0];)n=l[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&("space"===(n=e[o])[0]||2!==(r+=1));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r=0;for(let[o,i]of e.entries()){if("("===(t=i[0])&&(r+=1),")"===t&&(r-=1),0===r&&":"===t){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(i)}n=i}return!1}comment(e){let t=new oI;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=oQ(this.input)}decl(e,t){let n=new r5;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;e.length&&("space"===(i=e[0][0])||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){n.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(n.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),o="";for(let e=t;e>0;e--){let t=r[e][0];if(0===o.trim().indexOf("!")&&"space"!==t)break;o=r.pop()[1]+o}0===o.trim().indexOf("!")&&(n.important=!0,n.raws.important=o,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o$;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}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)}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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}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)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(n=c[0],l.push(c),"("===n||"["===n)o||(o=c),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=c),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(l,a);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));c=this.tokenizer.nextToken()}
1if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;l.length&&("space"===(c=l[l.length-1][0])||"comment"===c);)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,l,c=n.length,u="",d=!0;for(let e=0;e<c;e+=1)"space"!==(i=(o=n[e])[0])||e!==c-1||r?"comment"===i?(l=n[e-1]?n[e-1][0]:"empty",a=n[e+1]?n[e+1][0]:"empty",o0[l]||o0[a]||","===u.slice(-1)?d=!1:u+=o[1]):u+=o[1]:d=!1;if(!d){let r=n.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:u}}e[t]=u}rule(e){e.pop();let t=new o$;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function o2(e,t){let n=new o1(new oh(e,t));try{n.parse()}catch(e){throw e}return n.root}o2.default=o2,oR.registerParse(o2);let{isClean:o3,my:o4}=rZ,o5={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o9={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},o7={Once:!0,postcssPlugin:!0,prepare:!0};function o6(e){return"object"==typeof e&&"function"==typeof e.then}function o8(e){let t=!1,n=o5[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function ie(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:o8(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function it(e){return e[o3]=!1,e.nodes&&e.nodes.forEach(e=>it(e)),e}let ir={},io=class e{constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof oB)o=it(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=o2;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(e){this.processed=!0,this.error=e}o&&!o[o4]&&oR.rebuild(o)}else o=it(n);this.result=new oB(t,o,r),this.helpers={...ir,postcss:ir,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};
vendor: 4,389 bytes, line 1
1let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!o9[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!o7[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(o6(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o3];){e[o3]=!0;let t=[ie(e)];for(;t.length>0;){let e=this.visitTick(t);if(o6(e))try{await e}catch(n){let e=t[t.length-1].node;throw this.handleError(n,e)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return o6(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r0;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new oS(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(o6(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o3];)e[o3]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(o6(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[o3])return r[o3]=!0,void e.push(ie(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[o3]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){for(let t of(e[o3]=!0,o8(e)))if(0===t)e.nodes&&e.each(e=>{e[o3]||this.walkSync(e)});else{let n=this.listeners[t];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};io.registerPostcss=e=>{ir=e},io.default=io,oK.registerLazyResult(io),oN.registerLazyResult(io);let ii=class{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0,this.result=new oB(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new oS(r0,r,this._opts,t);
1if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=o2(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};ii.default=ii;let ia=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else if("object"!=typeof n||!n.parse&&!n.stringify)throw Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new io(this,e,t):new ii(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function is(e,t){if(Array.isArray(e))return e.map(e=>is(e));let{inputs:n,...r}=e;if(n)for(let e of(t=[],n)){let n={...e,__proto__:oh.prototype};n.map&&(n.map={...n.map,__proto__:on.prototype}),t.push(n)}if(r.nodes&&(r.nodes=e.nodes.map(e=>is(e,t))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new oK(r);if("decl"===r.type)return new r5(r);if("rule"===r.type)return new o$(r);if("comment"===r.type)return new oI(r);if("atrule"===r.type)return new oG(r);throw Error("Unknown node type: "+e.type)}function il(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ia(e)}ia.default=ia,oK.registerProcessor(ia),oN.registerProcessor(ia),is.default=is,il.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),m.default.env.LANG&&m.default.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...n);return i.postcssPlugin=e,i.postcssVersion=(new ia).version,i}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return il([o(n)]).process(e,t)},o},il.stringify=r0,il.parse=o2,il.fromJSON=is,il.list=oX,il.comment=e=>new oI(e),il.atRule=e=>new oG(e),il.decl=e=>new r5(e),il.rule=e=>new o$(e),il.root=e=>new oK(e),il.document=e=>new oN(e),il.CssSyntaxError=rX,il.Declaration=r5,il.Container=oR,il.Processor=ia,il.Document=oN,il.Comment=oI,il.Warning=oF,il.AtRule=oG,il.Result=oB,il.Input=oh,il.Rule=o$,il.Root=oK,il.Node=r3,io.registerPostcss(il),il.default=il;let ic=il&&il.__esModule&&Object.prototype.hasOwnProperty.call(il,"default")?il.default:il;ic.stringify,ic.fromJSON,ic.plugin,ic.parse,ic.list,ic.document,ic.comment,ic.atRule,ic.rule,ic.decl,ic.root,ic.CssSyntaxError,ic.Declaration,ic.Container,ic.Processor,ic.Document,ic.Comment,ic.Warning,ic.AtRule,ic.Result,ic.Input,ic.Rule,ic.Root,ic.Node;var iu=Object.defineProperty,id=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?iu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},ip={exports:{}},ih=String,ig=function(){return{isColorSupported:!1,reset:ih,bold:ih,dim:ih,italic:ih,underline:ih,inverse:ih,hidden:ih,strikethrough:ih,black:ih,red:ih,green:ih,yellow:ih,blue:ih,magenta:ih,cyan:ih,white:ih,gray:ih,bgBlack:ih,bgRed:ih,bgGreen:ih,bgYellow:ih,bgBlue:ih,bgMagenta:ih,bgCyan:ih,bgWhite:ih}};ip.exports=ig(),ip.exports.createColors=ig;var im=ip.exports;let iv=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}
1))),iy=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=im.isColorSupported),iv&&e&&(t=iv(t));let n,r,o=t.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;if(e){let{bold:e,gray:t,red:o}=im.createColors(!0);n=t=>e(o(t)),r=e=>t(e)}else n=r=e=>e;return o.slice(i,a).map((e,t)=>{let o=i+1+t,a=" "+(" "+o).slice(-l)+" | ";if(o===this.line){let t=r(a.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(a)+e+"\n "+t+n("^")}return" "+r(a)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};iy.default=iy;var ib={};ib.isClean=Symbol("isClean"),ib.my=Symbol("my");let iw={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},ik=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let n;n="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");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){var r;let o;if(n||(n=t),t&&void 0!==(o=e.raws[t]))return o;let i=e.parent;if("before"===n&&(!i||"root"===i.type&&i.first===e||i&&"document"===i.type))return"";if(!i)return iw[n];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[n])return a.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let i="raw"+((r=n)[0].toUpperCase()+r.slice(1));this[i]?o=this[i](a,e):a.walk(e=>{if(void 0!==(o=e.raws[t]))return!1})}return void 0===o&&(o=iw[n]),a.rawCache[n]=o,o}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function ix(e,t){new ik(t).stringify(e)}ik.default=ik,ix.default=ix;let{isClean:iS,my:iC}=ib,iI=class{constructor(e={}){for(let t in this.raws={},this[iS]=!1,this[iC]=!0,e)if("nodes"===t)for(let n of(this.nodes=[],e[t]))"function"==typeof n.clone?this.append(n.clone()):this.append(n);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,n){let r=new t.constructor;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||"proxyCache"===o)continue;let i=t[o],a=typeof i;"parent"===o&&"object"===a?n&&(r[o]=n):"source"===o?r[o]=i:Array.isArray(i)?r[o]=i.map(t=>e(t,r)):("object"===a&&null!==i&&(i=e(i)),r[o]=i)}return r}(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
vendor: 4,322 bytes, line 1
1error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new iy(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[iS]){this[iS]=!1;let e=this;for(;e=e.parent;)e[iS]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let t=0;t<e;t++)"\n"===n[t]?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);-1!==o&&(t=this.positionInside(o,r),n=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new ik).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof r&&r.toJSON)n[e]=r.toJSON(null,t);else if("source"===e){let i=t.get(r.input);null==i&&(i=o,t.set(r.input,o),o++),n[e]={end:r.end,inputId:i,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ix){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}};iI.default=iI;let iE=iI,iO=class extends iE{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};iO.default=iO;let{SourceMapConsumer:iT,SourceMapGenerator:iL}=iv,{existsSync:iA,readFileSync:iM}=iv,{dirname:iP,join:iR}=iv,i_=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=iP(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new iT(this.text)),this.consumerCache}decodeInline(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),y.Buffer.from(t,"base64").toString();throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
1if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=iP(e),iA(e))return this.mapFile=e,iM(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof iT)return iL.fromSourceMap(t).toString();if(t instanceof iL)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=iR(iP(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};i_.default=i_;let{SourceMapConsumer:iD,SourceMapGenerator:ij}=iv,{fileURLToPath:iN,pathToFileURL:iF}=iv,{isAbsolute:iB,resolve:iU}=iv,{nanoid:iH}={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=n;for(;o--;)r+=e[Math.random()*e.length|0];return r}}
vendor: 9,128 bytes, line 1
1,iz=Symbol("fromOffsetCache"),iq=!!(iD&&ij),iW=!!(iU&&iB),iG=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw 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&&(!iW||/^\w+:\/\//.test(t.from)||iB(t.from)?this.file=t.from:this.file=iU(t.from)),iW&&iq){let e=new i_(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+iH(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,a=e.col}else i=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,a);return(o=l?new iy(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,r.plugin):new iy(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:a,line:i},this.css,this.file,r.plugin)).input={column:n,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(iF&&(o.input.url=iF(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[iz])n=this[iz];else{let e=this.css.split("\n");n=Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[iz]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(e<n[t=r+(o-r>>1)])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:iU(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),l=a.originalPositionFor({column:t,line:e});if(!l.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=iB(l.source)?iF(l.source):new URL(l.source,this.map.consumer().sourceRoot||iF(this.map.mapFile));let c={column:l.column,endColumn:o&&o.column,endLine:o&&o.line,line:l.line,url:i.toString()};if("file:"===i.protocol){if(!iN)throw Error("file: protocol is not available in this PostCSS build");c.file=iN(i)}let u=a.sourceContentFor(l.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};iG.default=iG,iv&&iv.registerInput&&iv.registerInput(iG);let{SourceMapConsumer:iV,SourceMapGenerator:iJ}=iv,{dirname:iY,relative:iK,resolve:iX,sep:iZ}=iv,{pathToFileURL:i$}=iv,iQ=!!(iV&&iJ),i0=!!(iY&&iX&&iK&&iZ);var i1=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||iY(e.file);!1===this.mapOpts.sourcesContent?(t=new iV(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;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,""))}generate(){if(this.clearAnnotation(),i0&&iQ&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=iJ.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new iJ({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new iJ({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,l,c)=>{if(this.css+=a,l&&"end"!==c&&(i.generated.line=n,i.generated.column=r-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1):(i.source=o,i.original.line=1,i.original.column=0),this.map.addMapping(i)),(e=a.match(/\n/g))?(n+=e.length,t=a.lastIndexOf("\n"),r=a.length-t):r+=a.length,l&&"start"!==c){let e=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==e.last||e.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=r-2):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1),this.map.addMapping(i))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?iY(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=iY(iX(n,this.mapOpts.annotation)));let r=iK(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new iG(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}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))}toBase64(e){return y.Buffer.from(e).toString("base64")}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i$){let t=i$(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===iZ&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let i2=iI,i3=class extends i2{constructor(e){super(e),this.type="comment"}};i3.default=i3;let i4,i5,i9,i7,{isClean:i6,my:i8}=ib,ae=iI,at=class e extends ae{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map(e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e)):"every"===t||"some"===t?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):"root"===t?()=>
1e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();for(let t of(r=this.index(e),o))this.proxyOf.nodes.splice(r+1,0,t);for(let e in this.indexes)r<(n=this.indexes[e])&&(this.indexes[e]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();for(let t of(r=this.index(e),i))this.proxyOf.nodes.splice(r,0,t);for(let e in this.indexes)r<=(n=this.indexes[e])&&(this.indexes[e]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(i4(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new iO(t)]}else if(t.selector)t=[new i5(t)];else if(t.name)t=[new i9(t)];else{if(!t.text)throw Error("Unknown node type in node creation");t=[new i3(t)]}return t.map(t=>(t[i8]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[i6]&&function e(t){if(t[i6]=!1,t.proxyOf.nodes)for(let n of t.proxyOf.nodes)e(n)}(t),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("atrule"===e.type)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if("comment"===t.type)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("decl"===e.type)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("rule"===e.type)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};at.registerParse=e=>{i4=e},at.registerRule=e=>{i5=e},at.registerAtRule=e=>{i9=e},at.registerRoot=e=>{i7=e},at.default=at,at.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,i9.prototype):"rule"===e.type?Object.setPrototypeOf(e,i5.prototype):"decl"===e.type?Object.setPrototypeOf(e,iO.prototype):"comment"===e.type?Object.setPrototypeOf(e,i3.prototype):"root"===e.type&&Object.setPrototypeOf(e,i7.prototype),e[i8]=!0,e.nodes&&e.nodes.forEac
1h(e=>{at.rebuild(e)})};let an,ar,ao=at,ai=class extends ao{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new an(new ar,this,e).stringify()}};ai.registerLazyResult=e=>{an=e},ai.registerProcessor=e=>{ar=e},ai.default=ai;let aa=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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}};aa.default=aa;let as=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new aa(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};as.default=as;let al=/[\t\n\f\r "#'()/;[\\\]{}]/g,ac=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,au=/.[\r\n"'(/\\]/,ad=/[\da-f]/i,ap=at,ah=class extends ap{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};ah.default=ah,ap.registerAtRule(ah);let af,ag,am=at,av=class extends am{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t){if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new af(new ag,this,e).stringify()}};av.registerLazyResult=e=>{af=e},av.registerProcessor=e=>{ag=e},av.default=av,am.registerRoot(av);let ay={comma:e=>ay.split(e,[","],!0),space:e=>ay.split(e,[" ","\n","	"]),split(e,t,n){let r=[],o="",i=!1,a=0,l=!1,c="",u=!1;for(let n of e)u?u=!1:"\\"===n?u=!0:l?n===c&&(l=!1):'"'===n||"'"===n?(l=!0,c=n):"("===n?a+=1:")"===n?a>0&&(a-=1):0===a&&t.includes(n)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=n;return(n||""!==o)&&r.push(o.trim()),r}};ay.default=ay;let ab=at,aw=class extends ab{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ay.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};aw.default=aw,ab.registerRule(aw);let ak=function(e,t={}){let n,r,o,i,a,l,c,u,d,p,h=e.css.valueOf(),f=t.ignoreErrors,g=h.length,m=0,v=[],y=[];function b(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=g},nextToken:function(e){if(y.length)return y.pop();if(m>=g)return;let t=!!e&&e.ignoreUnclosed;switch(n=h.charCodeAt(m)){case 10:case 32:case 9:case 13:case 12:r=m;do r+=1,n=h.charCodeAt(r);while(32===n||10===n||9===n||13===n||12===n)p=["space",h.slice(m,r)],m=r-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(n);p=[e,e,m];break}case 40:if(u=v.length?v.pop()[1]:"",d=h.charCodeAt(m+1),"url"===u&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){r=m;do{if(l=!1,-1===(r=h.indexOf(")",r+1))){if(f||t){r=m;break}b("bracket")}for(c=r;
192===h.charCodeAt(c-1);)c-=1,l=!l}while(l)p=["brackets",h.slice(m,r+1),m,r],m=r}else r=h.indexOf(")",m+1),i=h.slice(m,r+1),-1===r||au.test(i)?p=["(","(",m]:(p=["brackets",i,m,r],m=r);break;case 39:case 34:o=39===n?"'":'"',r=m;do{if(l=!1,-1===(r=h.indexOf(o,r+1))){if(f||t){r=m+1;break}b("string")}for(c=r;92===h.charCodeAt(c-1);)c-=1,l=!l}while(l)p=["string",h.slice(m,r+1),m,r],m=r;break;case 64:al.lastIndex=m+1,al.test(h),r=0===al.lastIndex?h.length-1:al.lastIndex-2,p=["at-word",h.slice(m,r+1),m,r],m=r;break;case 92:for(r=m,a=!0;92===h.charCodeAt(r+1);)r+=1,a=!a;if(n=h.charCodeAt(r+1),a&&47!==n&&32!==n&&10!==n&&9!==n&&13!==n&&12!==n&&(r+=1,ad.test(h.charAt(r)))){for(;ad.test(h.charAt(r+1));)r+=1;32===h.charCodeAt(r+1)&&(r+=1)}p=["word",h.slice(m,r+1),m,r],m=r;break;default:47===n&&42===h.charCodeAt(m+1)?(0===(r=h.indexOf("*/",m+2)+1)&&(f||t?r=h.length:b("comment")),p=["comment",h.slice(m,r+1),m,r]):(ac.lastIndex=m+1,ac.test(h),r=0===ac.lastIndex?h.length-1:ac.lastIndex-2,p=["word",h.slice(m,r+1),m,r],v.push(p)),m=r}return m++,p},position:function(){return m}}},ax={empty:!0,space:!0};var aS=class{constructor(e){this.input=e,this.root=new av,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new ah;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!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){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(r=l.length-1,n=l[r];n&&"space"===n[0];)n=l[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&("space"===(n=e[o])[0]||2!==(r+=1));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r=0;for(let[o,i]of e.entries()){if("("===(t=i[0])&&(r+=1),")"===t&&(r-=1),0===r&&":"===t){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(i)}n=i}return!1}comment(e){let t=new i3;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=ak(this.input)}decl(e,t){let n=new iO;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;e.length&&("space"===(i=e[0][0])||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){n.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(n.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),o="";for(let e=t;e>0;e--){let t=r[e][0];if(0===o.trim().indexOf("!")&&"space"!==t)break;o=r.pop()[1]+o}0===o.trim().indexOf("!")&&(n.important=!0,n.raws.important=o,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new aw;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}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)}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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}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)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(n=c[0],l.push(c),"("===n||"["===n)o||(o=c),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=c),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(l,a);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));c=this.tokenizer.nextToken()}
1if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;l.length&&("space"===(c=l[l.length-1][0])||"comment"===c);)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!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()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,l,c=n.length,u="",d=!0;for(let e=0;e<c;e+=1)"space"!==(i=(o=n[e])[0])||e!==c-1||r?"comment"===i?(l=n[e-1]?n[e-1][0]:"empty",a=n[e+1]?n[e+1][0]:"empty",ax[l]||ax[a]||","===u.slice(-1)?d=!1:u+=o[1]):u+=o[1]:d=!1;if(!d){let r=n.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:u}}e[t]=u}rule(e){e.pop();let t=new aw;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function aC(e,t){let n=new aS(new iG(e,t));try{n.parse()}catch(e){throw e}return n.root}aC.default=aC,at.registerParse(aC);let{isClean:aI,my:aE}=ib,aO={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},aT={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},aL={Once:!0,postcssPlugin:!0,prepare:!0};function aA(e){return"object"==typeof e&&"function"==typeof e.then}function aM(e){let t=!1,n=aO[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function aP(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:aM(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function aR(e){return e[aI]=!1,e.nodes&&e.nodes.forEach(e=>aR(e)),e}let a_={},aD=class e{constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof as)o=aR(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=aC;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(e){this.processed=!0,this.error=e}o&&!o[aE]&&at.rebuild(o)}else o=aR(n);this.result=new as(t,o,r),this.helpers={...a_,postcss:a_,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};
vendor: 4,389 bytes, line 1
1let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!aT[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!aL[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(aA(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[aI];){e[aI]=!0;let t=[aP(e)];for(;t.length>0;){let e=this.visitTick(t);if(aA(e))try{await e}catch(n){let e=t[t.length-1].node;throw this.handleError(n,e)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return aA(t[0])?Promise.all(t):t}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)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ix;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i1(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(aA(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[aI];)e[aI]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(aA(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[aI])return r[aI]=!0,void e.push(aP(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[aI]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){for(let t of(e[aI]=!0,aM(e)))if(0===t)e.nodes&&e.each(e=>{e[aI]||this.walkSync(e)});else{let n=this.listeners[t];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};aD.registerPostcss=e=>{a_=e},aD.default=aD,av.registerLazyResult(aD),ai.registerLazyResult(aD);let aj=class{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0,this.result=new as(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new i1(ix,r,this._opts,t);
1if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=aC(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};aj.default=aj;let aN=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else if("object"!=typeof n||!n.parse&&!n.stringify)throw Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new aD(this,e,t):new aj(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function aF(e,t){if(Array.isArray(e))return e.map(e=>aF(e));let{inputs:n,...r}=e;if(n)for(let e of(t=[],n)){let n={...e,__proto__:iG.prototype};n.map&&(n.map={...n.map,__proto__:i_.prototype}),t.push(n)}if(r.nodes&&(r.nodes=e.nodes.map(e=>aF(e,t))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new av(r);if("decl"===r.type)return new iO(r);if("rule"===r.type)return new aw(r);if("comment"===r.type)return new i3(r);if("atrule"===r.type)return new ah(r);throw Error("Unknown node type: "+e.type)}function aB(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new aN(e)}aN.default=aN,av.registerProcessor(aN),ai.registerProcessor(aN),aF.default=aF,aB.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),m.default.env.LANG&&m.default.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...n);return i.postcssPlugin=e,i.postcssVersion=(new aN).version,i}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return aB([o(n)]).process(e,t)},o},aB.stringify=ix,aB.parse=aC,aB.fromJSON=aF,aB.list=ay,aB.comment=e=>new i3(e),aB.atRule=e=>new ah(e),aB.decl=e=>new iO(e),aB.rule=e=>new aw(e),aB.root=e=>new av(e),aB.document=e=>new ai(e),aB.CssSyntaxError=iy,aB.Declaration=iO,aB.Container=at,aB.Processor=aN,aB.Document=ai,aB.Comment=i3,aB.Warning=aa,aB.AtRule=ah,aB.Result=as,aB.Input=iG,aB.Rule=aw,aB.Root=av,aB.Node=iI,aD.registerPostcss(aB),aB.default=aB;let aU=aB&&aB.__esModule&&Object.prototype.hasOwnProperty.call(aB,"default")?aB.default:aB;aU.stringify,aU.fromJSON,aU.plugin,aU.parse,aU.list,aU.document,aU.comment,aU.atRule,aU.rule,aU.decl,aU.root,aU.CssSyntaxError,aU.Declaration,aU.Container,aU.Processor,aU.Document,aU.Comment,aU.Warning,aU.AtRule,aU.Result,aU.Input,aU.Rule,aU.Root,aU.Node;class aH{constructor(...e){id(this,"parentElement",null),id(this,"parentNode",null),id(this,"ownerDocument"),id(this,"firstChild",null),id(this,"lastChild",null),id(this,"previousSibling",null),id(this,"nextSibling",null),id(this,"ELEMENT_NODE",1),id(this,"TEXT_NODE",3),id(this,"nodeType"),id(this,"nodeName"),id(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof aH)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}let az={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},aq={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},aW={};function aG(e){if(aW[e])return aW[e];let t=globalThis[e],n=t.prototype,r=e in az?az[e]:void 0,o=!!(r&&r.every(e=>{var t,r;return!!(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in aq?aq[e]:void 0,a=!!(i&&i.every(e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(o&&a&&!globalThis.Zone)return aW[e]=t.prototype,t.prototype;try{let r=document.createElement("iframe");document.body.appendChild(r);let o=r.contentWindow;if(!o)return t.prototype;let i=o[e].prototype;return document.body.removeChild(r),i?aW[e]=i:n}catch{return n}}let aV={};function aJ(e,t,n){var r;let o=`${e}.${String(n)}`;if(aV[o])return aV[o].call(t);let i=null==(r=Object.getOwnPropertyDescriptor(aG(e),n))?void 0:r.get;return i?(aV[o]=i,i.call(t)):t[n]}let aY={};function aK(e,t,n){let r=`${e}.${String(n)}`;if(aY[r])return aY[r].bind(t);let o=aG(e)[n];return"function"!=typeof o?t[n]:(aY[r]=o,o.bind(t))}function aX(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let aZ=function(e){return aJ("Node",e,"ownerDocument")},a$=function(e){return aJ("Node",e,"childNodes")},aQ=function(e){return aJ("Node",e,"parentNode")},a0=function(e){return aJ("Node",e,"parentElement")},a1=function(e){return aJ("Node",e,"textContent")},a2=function(e,t){return aK("Node",e,"contains")(t)},a3=function(e){return aK("Node",e,"getRootNode")()},a4=function(e){return e&&"host"in e?aJ("ShadowRoot",e,"host"):null},a5=function(e){return e&&"shadowRoot"in e?aJ("Element",e,"shadowRoot"):null};function a9(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let a7="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",a6={map:{},getId:()=>(console.error(a7),-1),getNode:()=>(console.error(a7),null),removeNodeFromMap(){console.error(a7)},has:()=>(console.error(a7),!1),reset(){console.error(a7)}};function a8(e,t,n={}){let r=null,o=0;return function(...i){let a=Date.now();o||!1!==n.leading||(o=a);let l=t-(a-o),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,i)):r||!1===n.trailing||(r=setTimeout(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,i)},l))}}function se(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>se(e,t,i||{},!0)}"u">typeof window&&window.Proxy&&window.Reflect&&(a6=new Proxy(a6,{get:(e,t,n)=>("map"===t&&console.error(a7),Reflect.get(e,t,n))}));let st=Date.now;function sn(e){var t,n,r,o;let i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=a0(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=a0(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function sr(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function so(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function si(e){return e?e.nodeType===e.ELEMENT_NODE?e:a0(e):null}function sa(e,t,n,r){if(!e)return!1;let o=si(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t)||r&&null!==o.closest("."+t))return!0}else if(rU(o,t,r))return!0}catch(e){}return!!(n&&(o.matches(n)||r&&null!==o.closest(n)))||!1}function ss(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)}function sl(e){return!!e.changedTouches}
1function sc(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function su(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function sd(e){return!!e&&(e instanceof aH&&"shadowRoot"in e?!!e.shadowRoot:!!a5(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(st=()=>(new Date).getTime());class sp{constructor(){n6(this,"id",1),n6(this,"styleIDMap",new WeakMap),n6(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let n;return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function sh(e){var t;let n=null;return"getRootNode"in e&&(null==(t=a3(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a4(a3(e))&&(n=a4(a3(e))),n}function sf(e){var t;let n,r=aZ(e);return!!r&&(a2(r,e)||!!(n=aZ(t=e))&&a2(n,function(e){let t,n=e;for(;t=sh(n);)n=t;return n}(t)))}var sg=((i=sg||{})[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i),sm=((a=sm||{})[a.Mutation=0]="Mutation",a[a.MouseMove=1]="MouseMove",a[a.MouseInteraction=2]="MouseInteraction",a[a.Scroll=3]="Scroll",a[a.ViewportResize=4]="ViewportResize",a[a.Input=5]="Input",a[a.TouchMove=6]="TouchMove",a[a.MediaInteraction=7]="MediaInteraction",a[a.StyleSheetRule=8]="StyleSheetRule",a[a.CanvasMutation=9]="CanvasMutation",a[a.Font=10]="Font",a[a.Log=11]="Log",a[a.Drag=12]="Drag",a[a.StyleDeclaration=13]="StyleDeclaration",a[a.Selection=14]="Selection",a[a.AdoptedStyleSheet=15]="AdoptedStyleSheet",a[a.CustomElement=16]="CustomElement",a),sv=((l=sv||{})[l.MouseUp=0]="MouseUp",l[l.MouseDown=1]="MouseDown",l[l.Click=2]="Click",l[l.ContextMenu=3]="ContextMenu",l[l.DblClick=4]="DblClick",l[l.Focus=5]="Focus",l[l.Blur=6]="Blur",l[l.TouchStart=7]="TouchStart",l[l.TouchMove_Departed=8]="TouchMove_Departed",l[l.TouchEnd=9]="TouchEnd",l[l.TouchCancel=10]="TouchCancel",l),sy=((c=sy||{})[c.Mouse=0]="Mouse",c[c.Pen=1]="Pen",c[c.Touch=2]="Touch",c),sb=((u=sb||{})[u["2D"]=0]="2D",u[u.WebGL=1]="WebGL",u[u.WebGL2=2]="WebGL2",u),sw=((d=sw||{})[d.Play=0]="Play",d[d.Pause=1]="Pause",d[d.Seeked=2]="Seeked",d[d.VolumeChange=3]="VolumeChange",d[d.RateChange=4]="RateChange",d),sk=((p=sk||{})[p.Document=0]="Document",p[p.DocumentType=1]="DocumentType",p[p.Element=2]="Element",p[p.Text=3]="Text",p[p.CDATA=4]="CDATA",p[p.Comment=5]="Comment",p);class sx{constructor(){n6(this,"length",0),n6(this,"head",null),n6(this,"tail",null)}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let sS=(e,t)=>`${e}@${t}`;class sC{constructor(){n6(this,"frozen",!1),n6(this,"locked",!1),n6(this,"texts",[]),n6(this,"attributes",[]),n6(this,"attributeMap",new WeakMap),n6(this,"removes",[]),n6(this,"mapRemoves",[]),n6(this,"movedMap",{}),n6(this,"addedSet",new Set),n6(this,"movedSet",new Set),n6(this,"droppedSet",new Set),n6(this,"removesSubTreeCache",new Set),n6(this,"mutationCb"),n6(this,"blockClass"),n6(this,"blockSelector"),n6(this,"maskTextClass"),n6(this,"maskTextSelector"),n6(this,"inlineStylesheet"),n6(this,"maskInputOptions"),n6(this,"maskTextFn"),n6(this,"maskInputFn"),n6(this,"keepIframeSrcFn"),n6(this,"recordCanvas"),n6(this,"inlineImages"),n6(this,"slimDOMOptions"),n6(this,"dataURLOptions"),n6(this,"doc"),n6(this,"mirror"),n6(this,"iframeManager"),n6(this,"stylesheetManager"),n6(this,"shadowDomManager"),n6(this,"canvasManager"),n6(this,"processedNodeManager"),n6(this,"unattachedDoc"),n6(this,"processMutations",e=>
1{e.forEach(this.processMutation),this.emit()}),n6(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new sx,r=e=>{let t=e,n=-2;for(;-2===n;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},o=o=>{let i=aQ(o);if(!i||!sf(o))return;let a=!1;if(o.nodeType===Node.TEXT_NODE){let e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(a=!0)}let l=rf(i)?this.mirror.getId(sh(o)):this.mirror.getId(i),c=r(o);if(-1===l||-1===c)return n.addNode(o);let u=rW(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{sc(e,this.mirror)&&this.iframeManager.addIframe(e),su(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),sd(o)&&this.shadowDomManager.addShadowRoot(a5(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:a});u&&(e.push({parentId:l,nextId:c,node:u}),t.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)sE(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(aQ(e))||o(e);for(let e of this.addedSet)sO(this.droppedSet,e)||sE(this.removesSubTreeCache,e,this.mirror)?sO(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let i=null;for(;n.length;){let e=null;if(i){let t=this.mirror.getId(aQ(i.value)),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(aQ(n.value));if(-1===r(n.value))continue;if(-1!==t){e=n;break}{let t=aQ(n.value);if(t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=a4(t);if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}let a={texts:this.texts.map(e=>{let t=e.node,n=aQ(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(a))}),n6(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(a$(e),e=>a1(e)||"").join("");t.attributes.value=rb({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:rx(e),value:n,maskInputFn:this.maskInputFn})}),n6(this,"processMutation",e=>{if(!ss(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=a1(e.target);sa(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:rH(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,si(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){let e=rx(t);r=rb({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:r,maskInputFn:this.maskInputFn})}if(sa(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!rB(t.tagName,n))if(o.attributes[n]=rF(this.doc,rw(t.tagName),rw(n),r),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");for(let r of(e.oldValue&&n.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),i=t.style.getPropertyPriority(r);e!==n.style.getPropertyValue(r)||i!==n.style.getPropertyPriority(r)?o.styleDiff[r]=""===i?e:[e,i]:o._unchangedStyles[r]=[e,i]}for(let e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}else"open"===n&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":if(sa(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=rf(e.target)?this.mirror.getId(a4(e.target)):this.mirror.getId(e.target);sa(e.target,this.blockClass,this.blockSelector,!1)||ss(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(sI(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||function e(t,n){if(rf(t))return!1;let r=n.getId(t);if(!n.has(r))return!0;let o=aQ(t);return(!o||o.nodeType!==t.DOCUMENT_NODE)&&(!o||e(o,n))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[sS(n,r)]?sI(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:!(!rf(e.target)||!rg(e.target))||void 0}),function(e,t){let n=[e];for(;n.length;){let e=n.pop();t.has(e)||(t.add(e),a$(e).forEach(e=>n.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),n6(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ss(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[sS(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);sa(e,this.blockClass,this.blockSelector,!1)||(a$(e).forEach(e=>this.genAdds(e)),sd(e)&&a$(a5(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function sI(e,t){e.delete(t),a$(t).forEach(t=>sI(e,t))}function sE(e,t,n){let r;return 0!==e.size&&!!(r=aQ(t))&&e.has(r)}function sO(e,t){return 0!==e.size&&function e(t,n){let r=aQ(n);return!!r&&(!!t.has(r)||e(t,r))}(e,t)}let sT=e=>r?(...t)=>{try{return e(...t)}catch(e){if(r&&!0===r(e))return;throw e}}:e,sL=[];function sA(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function sM(e,t){let n=new sC;sL.push(n),n.init(e);let r=new(aG("MutationObserver")).constructor(sT(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function sP({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){return a9("scroll",sT(a8(sT(i=>{let a=sA(i);if(!a||sa(a,r,o,!0))return;let l=n.getId(a);if(a===t&&t.defaultView){let n=sn(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}let sR=["INPUT","TEXTAREA","SELECT"],s_=new WeakMap;function sD(e){var t;return t=[],sB("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||sB("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||sB("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||sB("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)):e.parentStyleSheet&&t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)),t}function sj(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function sN({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;a="#document"===n.nodeName?e.getId(n):e.getId(a4(n));let l="#document"===n.nodeName?null==(r=n.defaultView)?void 0:r.Document:null==(i=null==(o=n.ownerDocument)?void 0:o.defaultView)?void 0:i.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&l&&c?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var n;let r=null==(n=c.set)?void 0:n.call(this,e);if(null!==a&&-1!==a)try{t.adoptStyleSheets(e,a)}catch(e){}return r}}),sT(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})):()=>{}}function sF(e,t={}){let n,r=e.doc.defaultView;if(!r)return()=>{};!function(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:d,canvasMutationCb:p,fontCb:h,selectionCb:f,customElementCb:g}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),a(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),l(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),u(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),d(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),p(...e)}
1,e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),f(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),g(...e)}}(e,t),e.recordDOM&&(n=sM(e,e.doc));let o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};let o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a,l=[],c=a8(sT(t=>{let n=Date.now()-a;e(l.map(e=>(e.timeOffset-=n,e)),t),l=[],a=null}),i),u=sT(a8(sT(e=>{let t=sA(e),{clientX:n,clientY:o}=sl(e)?e.changedTouches[0]:e;a||(a=st()),l.push({x:n,y:o,id:r.getId(t),timeOffset:st()-a}),c("u">typeof DragEvent&&e instanceof DragEvent?sm.Drag:e instanceof MouseEvent?sm.MouseMove:sm.TouchMove)}),o,{trailing:!1})),d=[a9("mousemove",u,n),a9("touchmove",u,n),a9("drag",u,n)];return sT(()=>{d.forEach(e=>e())})}(e),i=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};let a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,l=[],c=null;return Object.keys(sv).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=rw(i),u=t=>{let a=sA(t);if(sa(a,r,o,!0))return;let l=null,u=i;if("pointerType"in t){switch(t.pointerType){case"mouse":l=sy.Mouse;break;case"touch":l=sy.Touch;break;case"pen":l=sy.Pen}l===sy.Touch?sv[i]===sv.MouseDown?u="TouchStart":sv[i]===sv.MouseUp&&(u="TouchEnd"):sy.Pen}else sl(t)&&(l=sy.Touch);null!==l?(c=l,(u.startsWith("Touch")&&l===sy.Touch||u.startsWith("Mouse")&&l===sy.Mouse)&&(l=null)):sv[i]===sv.Click&&(l=c,c=null);let d=sl(t)?t.changedTouches[0]:t;if(!d)return;let p=n.getId(a),{clientX:h,clientY:f}=d;sT(e)({type:sv[u],id:p,x:h,y:f,...null!==l&&{pointerType:l}})};if(window.PointerEvent)switch(sv[i]){case sv.MouseDown:case sv.MouseUp:a=a.replace("mouse","pointer");break;case sv.TouchStart:case sv.TouchEnd:return}l.push(a9(a,u,t))}),sT(()=>{l.forEach(e=>e())})}(e),a=sP(e),l=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return a9("resize",sT(a8(sT(()=>{let t=sr(),o=so();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200)),t)}(e,{win:r}),c=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d}){function p(e){let n=sA(e),u=e.isTrusted,p=n&&n.tagName;if(n&&"OPTION"===p&&(n=a0(n)),!n||!p||0>sR.indexOf(p)||sa(n,r,o,!0)||n.classList.contains(i)||a&&n.matches(a))return;let f=n.value,g=!1,m=rx(n)||"";"radio"===m||"checkbox"===m?g=n.checked:(l[p.toLowerCase()]||l[m])&&(f=rb({element:n,maskInputOptions:l,tagName:p,type:m,value:f,maskInputFn:c})),h(n,d?{text:f,isChecked:g,userTriggered:u}:{text:f,isChecked:g});let v=n.name;"radio"===m&&v&&g&&t.querySelectorAll(`input[type="radio"][name="${v}"]`).forEach(e=>{if(e!==n){let t=e.value;h(e,d?{text:t,isChecked:!g,userTriggered:!1}:{text:t,isChecked:!g})}})}function h(t,r){let o=s_.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){s_.set(t,r);let o=n.getId(t);sT(e)({...r,id:o})}}let f=("last"===u.input?["change"]:["input","change"]).map(e=>a9(e,sT(p),t)),g=t.defaultView;if(!g)return()=>{f.forEach(e=>e())};let m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),v=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&f.push(...v.map(e=>se(e[0],e[1],{set(){sT(p)({target:this,isTrusted:!1})}},!1,g))),sT(()=>{f.forEach(e=>e())})}(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:i}){let a=sT(i=>a8(sT(o=>{let a=sA(o);if(!a||sa(a,t,n,!0))return;let{currentTime:l,volume:c,muted:u,playbackRate:d,loop:p}=a;e({type:i,id:r.getId(a),currentTime:l,volume:c,muted:u,playbackRate:d,loop:p})}),o.media||500)),l=[a9("play",a(sw.Play),i),a9("pause",a(sw.Pause),i),a9("seeked",a(sw.Seeked),i),a9("volumechange",a(sw.VolumeChange),i),a9("ratechange",a(sw.RateChange),i)];return sT(()=>
1{l.forEach(e=>e())})}(e),d=()=>{},p=()=>{},h=()=>{},f=()=>{};e.recordDOM&&(d=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let o,i;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let a=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:sT((r,o,i)=>{let[a,l]=i,{id:c,styleId:u}=sj(o,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:a,index:l}]}),r.apply(o,i)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){let o=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[o,n])};let l=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:sT((r,o,i)=>{let[a]=i,{id:l,styleId:c}=sj(o,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,removes:[{index:a}]}),r.apply(o,i)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:sT((r,o,i)=>{let[a]=i,{id:l,styleId:c}=sj(o,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,replace:a}),r.apply(o,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(i=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(i,{apply:sT((r,o,i)=>{let[a]=i,{id:l,styleId:c}=sj(o,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,replaceSync:a}),r.apply(o,i)})}));let c={};sU("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(sU("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),sU("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),sU("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([r,o])=>{u[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[r].insertRule,{apply:sT((r,o,i)=>{let[a,l]=i,{id:c,styleId:u}=sj(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,adds:[{rule:a,index:[...sD(o),l||0]}]}),r.apply(o,i)})}),o.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:sT((r,o,i)=>{let[a]=i,{id:l,styleId:c}=sj(o.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,removes:[{index:[...sD(o),a]}]}),r.apply(o,i)})})}),sT(()=>{r.CSSStyleSheet.prototype.insertRule=a,r.CSSStyleSheet.prototype.deleteRule=l,o&&(r.CSSStyleSheet.prototype.replace=o),i&&(r.CSSStyleSheet.prototype.replaceSync=i),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:r}),p=sN(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:sT((o,a,l)=>{var c;let[u,d,p]=l;if(n.has(u))return i.apply(a,[u,d,p]);let{id:h,styleId:f}=sj(null==(c=a.parentRule)?void 0:c.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||f&&-1!==f)&&e({id:h,styleId:f,set:{property:u,value:d,priority:p},index:sD(a.parentRule)}),o.apply(a,l)})});let a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:sT((o,i,l)=>{var c;let[u]=l;if(n.has(u))return a.apply(i,[u]);let{id:d,styleId:p}=sj(null==(c=i.parentRule)?void 0:c.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,remove:{property:u},index:sD(i.parentRule)}),o.apply(i,l)})}),sT(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a})}(e,{win:r}),e.collectFonts&&(f=function({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){let r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let a=aX(t.fonts,"add",function(t){return function(n){return setTimeout(sT(()=>{let t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=i}),r.push(a),sT(()=>
1{r.forEach(e=>e())})}(e)));let g=function(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,l=sT(()=>{let e=t.getSelection();if(!e||a&&(null==e?void 0:e.isCollapsed))return;a=e.isCollapsed||!1;let l=[],c=e.rangeCount||0;for(let t=0;t<c;t++){let{startContainer:i,startOffset:a,endContainer:c,endOffset:u}=e.getRangeAt(t);sa(i,r,o,!0)||sa(c,r,o,!0)||l.push({start:n.getId(i),startOffset:a,end:n.getId(c),endOffset:u})}i({ranges:l})});return l(),a9("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){let n=e.defaultView;return n&&n.customElements?aX(n.customElements,"define",function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){console.warn(`Custom element callback failed for ${n}`)}return e.apply(this,[n,r,o])}}):()=>{}}(e),v=[];for(let t of e.plugins)v.push(t.observer(t.callback,r,t.options));return sT(()=>{sL.forEach(e=>e.reset()),null==n||n.disconnect(),o(),i(),a(),l(),c(),u(),d(),p(),h(),f(),g(),m(),v.forEach(e=>e())})}function sB(e){return void 0!==window[e]}function sU(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class sH{constructor(e){n6(this,"iframeIdToRemoteIdMap",new WeakMap),n6(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){let o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e),a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
1getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){e?(this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class sz{constructor(e){n6(this,"iframes",new WeakMap),n6(this,"crossOriginIframeMap",new WeakMap),n6(this,"crossOriginIframeMirror",new sH(rP)),n6(this,"crossOriginIframeStyleMirror"),n6(this,"crossOriginIframeRootIdMap",new WeakMap),n6(this,"mirror"),n6(this,"mutationCb"),n6(this,"wrappedEmit"),n6(this,"loadListener"),n6(this,"stylesheetManager"),n6(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new sH(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case sg.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:sg.IncrementalSnapshot,data:{source:sm.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case sg.Meta:case sg.Load:case sg.DomContentLoaded:break;case sg.Plugin:return t;case sg.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case sg.IncrementalSnapshot:switch(t.data.source){case sm.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case sm.Drag:case sm.TouchMove:case sm.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case sm.ViewportResize:return!1;case sm.MediaInteraction:case sm.MouseInteraction:case sm.Scroll:case sm.CanvasMutation:case sm.Input:return this.replaceIds(t.data,e,["id"]),t;case sm.StyleSheetRule:case sm.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case sm.Font:return t;case sm.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case sm.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEac
1h(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(let o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===sk.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class sq{constructor(e){n6(this,"shadowDoms",new WeakSet),n6(this,"mutationCb"),n6(this,"scrollCb"),n6(this,"bypassOptions"),n6(this,"mirror"),n6(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!rg(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=sM({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(sP({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(a4(e))),this.restoreHandlers.push(sN({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(aX(e.prototype,"attachShadow",function(e){return function(r){let o=e.call(this,r),i=a5(this);return i&&sf(this)&&n.addShadowRoot(i,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var sW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sG="u"<typeof Uint8Array?[]:new Uint8Array(256),sV=0;sV<64;sV++)sG[sW.charCodeAt(sV)]=sV;let sJ=new Map,sY=(e,t,n)=>{var r;let o;if(!e||!sX(e,t)&&"object"!=typeof e)return;let i=(r=e.constructor.name,(o=sJ.get(n))||(o=new Map,sJ.set(n,o)),o.has(r)||o.set(r,[]),o.get(r)),a=i.indexOf(e);return -1===a&&(a=i.length,i.push(e)),a},sK=(e,t,n)=>e.map(e=>(function e(t,n,r){if(t instanceof Array)return t.map(t=>e(t,n,r));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=sW[n[t]>>2],o+=sW[(3&n[t])<<4|n[t+1]>>4],o+=sW[(15&n[t+1])<<2|n[t+2]>>6],o+=sW[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,n,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,n,r),t.width,t.height]}:sX(t,n)||"object"==typeof t?{rr_type:t.constructor.name,index:sY(t,n,r)}:t})(e,t,n)),sX=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(n=>e instanceof t[n]);function sZ(e,t,n,r){let o=[];try{let i=aX(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...i){if(!sa(this,t,n,!0)){let e="experimental-webgl"===o?"webgl":o;if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){let e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
1{o.forEach(e=>e())}}function s$(e,t,n,r,o,i){let a=[];for(let l of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;let c=aX(e,l,function(e){return function(...a){let c=e.apply(this,a);if(sY(c,i,this),"tagName"in this.canvas&&!sa(this.canvas,r,o,!0)){let e=sK(a,i,this),r={type:t,property:l,args:e};n(this.canvas,r)}return c}});a.push(c)}catch{let r=se(e,l,{set(e){n(this.canvas,{type:t,property:l,args:[e],setter:!0})}});a.push(r)}return a}let sQ="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
1hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",s0="u">typeof window&&window.Blob&&new Blob([Uint8Array.from(atob(sQ),e=>e.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function s1(e){let t;try{if(!(t=s0&&(window.URL||window.webkitURL).createObjectURL(s0)))throw"";let n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch(t){return new Worker("data:text/javascript;base64,"+sQ,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class s2{constructor(e){n6(this,"pendingCanvasMutations",new Map),n6(this,"rafStamps",{latestId:0,invokeId:null}),n6(this,"mirror"),n6(this,"mutationCb"),n6(this,"resetObservers"),n6(this,"frozen",!1),n6(this,"locked",!1),n6(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){let i=sZ(t,n,r,!0),a=new Map,l=new s1;l.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:sb["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};let c=1e3/e,u,d=0,p=e=>{let i;d&&e-d<c||(d=e,(i=[],t.document.querySelectorAll("canvas").forEach(e
1=>{sa(e,n,r,!0)||i.push(e)}),i).forEach(async e=>{var t;let n=this.mirror.getId(e);if(a.get(n)||0===e.width||0===e.height)return;if(a.set(n,!0),["webgl","webgl2"].includes(e.__context)){let n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}let r=await createImageBitmap(e);l.postMessage({id:n,bitmap:r,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[r])})),u=requestAnimationFrame(p)};u=requestAnimationFrame(p),this.resetObservers=()=>{i(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){var r;let o;this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=sZ(e,t,n,!1),a=function(e,t,n,r){let o=[];for(let i of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;let a=aX(t.CanvasRenderingContext2D.prototype,i,function(o){return function(...a){return sa(this.canvas,n,r,!0)||setTimeout(()=>{let n=sK(a,t,this);e(this.canvas,{type:sb["2D"],property:i,args:n})},0),o.apply(this,a)}});o.push(a)}catch{let n=se(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:sb["2D"],property:i,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n),l=(r=this.processMutation.bind(this),(o=[]).push(...s$(e.WebGLRenderingContext.prototype,sb.WebGL,r,t,n,e)),void 0!==e.WebGL2RenderingContext&&o.push(...s$(e.WebGL2RenderingContext.prototype,sb.WebGL2,r,t,n,e)),()=>{o.forEach(e=>e())});this.resetObservers=()=>{i(),a(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class s3{constructor(e){n6(this,"trackedLinkElements",new WeakSet),n6(this,"mutationCb"),n6(this,"adoptedStyleSheetCb"),n6(this,"styleMirror",new sp),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,n)=>({rule:rv(e,t.href),index:n}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class s4{constructor(){n6(this,"nodeMap",new WeakMap),n6(this,"active",!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let s5,s9,s7,s6=!1;try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(n9=e.contentWindow)?void 0:n9.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let s8=new ry;function le(e={}){let t,{emit:n,checkoutEveryNms:o,checkoutEveryNth:i,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:c="rr-ignore",ignoreSelector:u=null,maskTextClass:d="rr-mask",maskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:m,maskInputFn:v,maskTextFn:y,hooks:b,packFn:w,sampling:k={},dataURLOptions:x={},mousemoveWait:S,recordDOM:C=!0,recordCanvas:I=!1,recordCrossOriginIframes:E=!1,recordAfter:O="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:T=!1,collectFonts:L=!1,inlineImages:A=!1,plugins:M,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:R=new Set([]),errorHandler:_}=e;r=_;let D=!E||window.parent===window,j=!1;if(!D)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(D&&!n)throw Error("emit function is required");if(!D&&!j)return()=>{};
1void 0!==S&&void 0===k.mousemove&&(k.mousemove=S),s8.reset();let N=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==g?g:{password:!0},F=rq(m);!function(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)}();let B=0,U=e=>{for(let t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!j&&(e=w(e)),e};s5=(e,r)=>{var a;if(e.timestamp=st(),(null==(a=sL[0])?void 0:a.isFrozen())&&e.type!==sg.FullSnapshot&&(e.type!==sg.IncrementalSnapshot||e.data.source!==sm.Mutation)&&sL.forEach(e=>e.unfreeze()),D)null==n||n(U(e),r);else if(j){let t={type:"rrweb",event:U(e),origin:window.location.origin,isCheckout:r};window.parent.postMessage(t,"*")}if(e.type===sg.FullSnapshot)t=e,B=0;else if(e.type===sg.IncrementalSnapshot){if(e.data.source===sm.Mutation&&e.data.isAttachIframe)return;B++;let n=i&&B>=i,r=o&&e.timestamp-t.timestamp>o;(n||r)&&s9(!0)}};let H=e=>{s5({type:sg.IncrementalSnapshot,data:{source:sm.Mutation,...e}})},z=e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.Scroll,...e}}),q=e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.CanvasMutation,...e}}),W=new s3({mutationCb:H,adoptedStyleSheetCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.AdoptedStyleSheet,...e}})}),G=new sz({mirror:s8,mutationCb:H,stylesheetManager:W,recordCrossOriginIframes:E,wrappedEmit:s5});for(let e of M||[])e.getMirror&&e.getMirror({nodeMirror:s8,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});let V=new s4;s7=new s2({recordCanvas:I,mutationCb:q,win:window,blockClass:a,blockSelector:l,mirror:s8,sampling:k.canvas,dataURLOptions:x});let J=new sq({mutationCb:H,scrollCb:z,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:d,maskTextSelector:p,inlineStylesheet:h,maskInputOptions:N,dataURLOptions:x,maskTextFn:y,maskInputFn:v,recordCanvas:I,inlineImages:A,sampling:k,slimDOMOptions:F,iframeManager:G,stylesheetManager:W,canvasManager:s7,keepIframeSrcFn:P,processedNodeManager:V},mirror:s8});s9=(e=!1)=>{if(!C)return;s5({type:sg.Meta,data:{href:window.location.href,width:so(),height:sr()}},e),W.reset(),J.init(),sL.forEach(e=>e.lock());let t=function(e,t){let{mirror:n=new ry,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:d=!1,maskTextFn:p,maskInputFn:h,slimDOM:f=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x=()=>!1}=t||{};return rW(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:!0===d?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===d?{password:!0}:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:rq(f),dataURLOptions:g,inlineImages:c,recordCanvas:u,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x,newlyAddedElement:!1})}(document,{mirror:s8,blockClass:a,blockSelector:l,maskTextClass:d,maskTextSelector:p,inlineStylesheet:h,maskAllInputs:N,maskTextFn:y,maskInputFn:v,slimDOM:F,dataURLOptions:x,recordCanvas:I,inlineImages:A,onSerialize:e=>{sc(e,s8)&&G.addIframe(e),su(e,s8)&&W.trackLinkElement(e),sd(e)&&J.addShadowRoot(a5(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");s5({type:sg.FullSnapshot,data:{node:t,initialOffset:sn(window)}},e),sL.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,s8.getId(document))};try{let e=[],t=e=>{var t;return sT(sF)({mutationCb:H,mousemoveCb:(e,t)=>
1s5({type:sg.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.MouseInteraction,...e}}),scrollCb:z,viewportResizeCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.ViewportResize,...e}}),inputCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.Input,...e}}),mediaInteractionCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.MediaInteraction,...e}}),styleSheetRuleCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.StyleSheetRule,...e}}),styleDeclarationCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.StyleDeclaration,...e}}),canvasMutationCb:q,fontCb:e=>s5({type:sg.IncrementalSnapshot,data:{source:sm.Font,...e}}),selectionCb:e=>{s5({type:sg.IncrementalSnapshot,data:{source:sm.Selection,...e}})},customElementCb:e=>{s5({type:sg.IncrementalSnapshot,data:{source:sm.CustomElement,...e}})},blockClass:a,ignoreClass:c,ignoreSelector:u,maskTextClass:d,maskTextSelector:p,maskInputOptions:N,inlineStylesheet:h,sampling:k,recordDOM:C,recordCanvas:I,inlineImages:A,userTriggeredOnInput:T,collectFonts:L,doc:e,maskInputFn:v,maskTextFn:y,keepIframeSrcFn:P,blockSelector:l,slimDOMOptions:F,dataURLOptions:x,mirror:s8,iframeManager:G,stylesheetManager:W,shadowDomManager:J,processedNodeManager:V,canvasManager:s7,ignoreCSSAttributes:R,plugins:(null==(t=null==M?void 0:M.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>s5({type:sg.Plugin,data:{plugin:e.name,payload:t}})})))||[]},b)};G.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{s9(),e.push(t(document)),s6=!0};return["interactive","complete"].includes(document.readyState)?n():(e.push(a9("DOMContentLoaded",()=>{s5({type:sg.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()})),e.push(a9("load",()=>{s5({type:sg.Load,data:{}}),"load"===O&&n()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),V.destroy(),s6=!1,r=void 0}}catch(e){console.warn(e)}}function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ln(e){return(ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach(function(t){la(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function li(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ls(r.key),r)}}function la(e,t,n){return(t=ls(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ls(e){var t=function(e,t){if("object"!=ln(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ln(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ln(t)?t:String(t)}le.addCustomEvent=(e,t)=>{if(!s6)throw Error("please add custom event after start recording");s5({type:sg.Custom,data:{tag:e,payload:t}})},le.freezePage=()=>{sL.forEach(e=>e.freeze())},le.takeFullSnapshot=e=>{if(!s6)throw Error("please take full snapshot after start recording");s9(e)},le.mirror=s8,(g=f||(f={}))[g.NotStarted=0]="NotStarted",g[g.Running=1]="Running",g[g.Stopped=2]="Stopped";var ll=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),la(this,"startDate",void 0),la(this,"events",[]),la(this,"bufferSize",0),la(this,"stopFunction",void 0),la(this,"customOptions",{})}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"setOptions",value:function(e){this.customOptions=e}},{key:"start",value:function(){this.stop(),this.startDate=Date.now();var e=this.events;try{this.stopFunction=le(lo(lo(lo({},{inlineStylesheet:!0,blockClass:"gl-block",ignoreClass:"gl-ignore",maskTextClass:"gl-mask",dataURLOptions:{quality:.7},recordCanvas:!1,sampling:{scroll:150,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!0,TouchEnd:!1}},collectFonts:!1,recordCrossOriginIframes:!1}),this.customOptions),{},{emit:function(t){var n=function(e){var t=JSON.stringify(e);if(t.length>4e6){var n,r=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return lt(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return lt(e,void 0)}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(r.s();!(n=r.n()).done;){var o=n.value;t="image/"===o[1].toLocaleLowerCase().slice(0,6)?t.replace(o[0],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAQSURBVHgBAQUA+v8ABRg5/wHSAVZN1mnaAAAAAElFTkSuQmCC"):t.replace(o[0],"")}}catch(e){r.e(e)}finally{r.f()}}return{event:JSON.parse(t),size:t.length}}(t).event;e.push(n)}}))}catch(e){console.error(e)}}},{key:"stop",value:function(){this.stopFunction&&this.stopFunction(),this.startDate=void 0,this.events=[],this.bufferSize=0}},{key:"getReplayData",value:function(){return{startDate:this.startDate,events:this.events,baseUrl:window.location.origin,width:window.innerWidth,height:window.innerHeight,isMobile:B(),type:"rrweb"}}}],li(n.prototype,e),t&&li(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lc(e){return(lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lp(r.key),r)}}function ld(e,t,n){return(t=lp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lp(e){var t=function(e,t){if("object"!=lc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lc(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lc(t)?t:String(t)}la(ll,"instance",void 0);var lh=function(){var e,t;function n(e){var t=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),ld(this,"rerender",void 0),ld(this,"svgElement",null),ld(this,"path",null),ld(this,"strPath",void 0),ld(this,"strokeWidth",12),ld(this,"strokeWidthRect",6),ld(this,"bufferSize",4),ld(this,"buffer",[]),ld(this,"startPoint",null),ld(this,"tool","rect"),ld(this,"color","#EB144C"),ld(this,"mouseDown",null),ld(this,"mouseMove",null),ld(this,"mouseUp",null),ld(this,"resizeListener",null),ld(this,"pathBuffer",[]);var r=this;this.rerender=e,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){r.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px")},window.addEventListener("resize",this.resizeListener,!0),this.mouseDown=function(e){e.preventDefault();var t=document.querySelector(".bb-capture-toolbar-item-colorpicker");t&&(t.style.display="none"),r.fadeOutToolbar(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseDownPen(e),"rect"===r.tool&&r.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseMovePen(e),"rect"===r.tool&&r.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),r.fadeInToolbar(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseUpPen(e),"rect"===r.tool&&r.mouseUpRect(e)},this.svgElement.addEventListener("mousedown",this.mouseDown),this.svgElement.addEventListener("mousemove",this.mouseMove),this.svgElement.addEventListener("mouseup",this.mouseUp),this.svgElement.addEventListener("touchstart",this.mouseDown,!1),this.svgElement.addEventListener("touchmove",this.mouseMove,!1),this.svgElement.addEventListener("touchend",this.mouseUp,!1),setTimeout(function(){t.rerender()},100)}return e=[{key:"clear",value:function(){if(this.svgElement)for(;this.svgElement.firstChild;)this.svgElement.firstChild.remove()}},{key:"destroy",value:function(){this.svgElement.removeEventListener("mousedown",this.mouseDown),this.svgElement.removeEventListener("mousemove",this.mouseMove),this.svgElement.removeEventListener("mouseup",this.mouseUp),this.svgElement.removeEventListener("touchstart",this.mouseDown),this.svgElement.removeEventListener("touchmove",this.mouseMove),this.svgElement.removeEventListener("touchend",this.mouseUp),window.removeEventListener("resize",this.resizeListener)}},{key:"mouseUpPen",value:function(){this.path&&(this.path=null)}},{key:"mouseUpRect",value:function(){this.path&&(this.path=null)}},{key:"mouseMovePen",value:function(e){this.path&&(this.appendToBuffer(this.getMousePosition(e)),this.updateSvgPath())}},{key:"mouseMoveRect",value:function(e){if(this.path){var t=this.getMousePosition(e),n=Math.abs(t.x-this.startPoint.x),r=Math.abs(t.y-this.startPoint.y),o=t.x,i=t.y;t.x>this.startPoint.x&&(o=this.startPoint.x),t.y>this.startPoint.y&&(i=this.startPoint.y),this.path.setAttributeNS(null,"x",o),this.path.setAttributeNS(null,"y",i),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",r)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var r=this.getMousePosition(e);this.appendToBuffer(r),this.strPath="M"+r.x+" "+r.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,r,o=0,i=0,a=0;for(r=e;r<t;r++)a++,o+=(n=this.buffer[r]).x,i+=n.y;return{x:o/a,y:i/a}}return null}},{key:"updateSvgPath",value:function(){var e=this.getAveragePoint(0);if(e){this.strPath+=" L"+e.x+" "+e.y;for(var t="",n=2;n<this.buffer.length;n+=2)t+=" L"+(e=this.getAveragePoint(n)).x+" "+e.y;this.path.setAttribute("d",this.strPath+t)}}},{key:"appendToBuffer",value:function(e){for(this.buffer.push(e);this.buffer.length>this.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}],lu(n.prototype,e),t&&lu(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lf(e){return(lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lv(r.key),r)}}function lm(e,t,n){return(t=lv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lv(e){var t=function(e,t){if("object"!=lf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lf(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lf(t)?t:String(t)}var ly=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),lm(this,"keys",{37:1,38:1,39:1,40:1}
1),lm(this,"supportsPassive",!1),lm(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),lm(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),lm(this,"scrollDisabled",!1);var e=this;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e.supportsPassive=!0,e.wheelOpt=!!e.supportsPassive&&{passive:!1}}}))}catch(e){}}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}},{key:"disableScroll",value:function(){var e=this.getInstance();e.scrollDisabled||(e.scrollDisabled=!0,window.addEventListener("DOMMouseScroll",e.preventDefault,!1),window.addEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.addEventListener("touchmove",e.preventDefault,e.wheelOpt),window.addEventListener("keydown",e.preventDefaultForScrollKeys,!1))}},{key:"enableScroll",value:function(){var e=this.getInstance();e.scrollDisabled&&(e.scrollDisabled=!1,window.removeEventListener("DOMMouseScroll",e.preventDefault,!1),window.removeEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.removeEventListener("touchmove",e.preventDefault,e.wheelOpt),window.removeEventListener("keydown",e.preventDefaultForScrollKeys,!1))}}],e=[{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"preventDefaultForScrollKeys",value:function(e){if(this.keys&&this.keys[e.keyCode])return this.preventDefault(e),!1}}],lg(n.prototype,e),t&&lg(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lb(e){return(lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lx(r.key),r)}}function lk(e,t,n){return(t=lx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lx(e){var t=function(e,t){if("object"!=lb(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lb(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lb(t)?t:String(t)}lm(ly,"instance",void 0);var lS=function(){var e,t;function n(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),lk(this,"type","screenshot"),lk(this,"dragCursor",null),lk(this,"screenRecorder",null),lk(this,"callback",null),lk(this,"screenDrawer",null),lk(this,"escListener",null),lk(this,"pageLeaveListener",null),lk(this,"overrideLanguage",uH.getInstance().overrideLanguage),lk(this,"showNextStep",function(){this.showWidgetUI(),this.callback&&(nT.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))}),this.type=e}return e=[{key:"hideWidgetUI",value:function(){var e=document.querySelector(".bb-feedback-button");e&&(e.style.display="none");var t=document.querySelector(".bb-feedback-dialog-container");t&&(t.style.display="none")}},{key:"showWidgetUI",value:function(){"screenshot"===this.type&&ly.enableScroll(),this.screenRecorder&&this.screenRecorder.stopScreenRecording(),this.unregisterListeners(),this.cleanupMousePointer(),this.screenDrawer&&this.screenDrawer.destroy();var e=document.querySelector(".bb-capture-toolbar");e&&e.remove();var t=document.querySelector(".bb-capture-svg");t&&t.classList.add("bb-capture-svg--preview");var n=document.querySelector(".bb-capture-preview");n&&n.remove();var r=document.querySelector(".bb-feedback-button");r&&(r.style.display="flex");var o=document.querySelector(".bb-feedback-dialog-container");o&&(o.style.display="block");var i=document.querySelector(".bb-capture-dismiss");i&&(i.style.display="none");var a=document.querySelector(".bb-capture-toolbar-item-colorpicker");a&&(a.style.display="none");var l=document.querySelector(".bb-capture-editor-borderlayer");l&&(l.style.display="none")}},{key:"clear",value:function(){var e=document.querySelector(".bb-capture-editor");e&&e.remove()}},{key:"setMouseMove",value:function(e,t){this.dragCursor&&(this.dragCursor.style.left="".concat(e+6,"px"),this.dragCursor.style.top="".concat(t-26,"px"),this.dragCursor.style.right=null)}},{key:"mouseMoveEventHandler",value:function(e){var t=e.clientX,n=e.clientY;this.setMouseMove(t,n)}},{key:"touchMoveEventHandler",value:function(e){var t=e.touches[0].clientX,n=e.touches[0].clientY;this.setMouseMove(t,n)}},{key:"setupMousePointer",value:function(){var e=this;
1this.dragCursor=document.querySelector(".bb-capture-editor-drag-info");var t=document.querySelector(".bb-capture-svg");t.addEventListener("mouseenter",function(t){e.dragCursor.style.opacity=1}),t.addEventListener("mouseleave",function(t){e.dragCursor.style.opacity=0}),document.documentElement.addEventListener("mousemove",this.mouseMoveEventHandler.bind(this)),document.documentElement.addEventListener("touchmove",this.touchMoveEventHandler.bind(this))}},{key:"cleanupMousePointer",value:function(){document.documentElement.removeEventListener("mousemove",this.mouseMoveEventHandler),document.documentElement.removeEventListener("touchmove",this.touchMoveEventHandler);var e=document.querySelector(".bb-capture-toolbar-item[data-type='drag']");e&&(e.removeEventListener("mousedown",this.dragStart),e.removeEventListener("touchstart",this.dragStart),document.removeEventListener("mousemove",this.drag),document.removeEventListener("touchmove",this.drag),document.removeEventListener("mouseup",this.dragEnd),document.removeEventListener("touchend",this.dragEnd)),this.dragCursor&&this.dragCursor.remove()}},{key:"createEditorUI",value:function(){var e=document.createElement("div");e.className="bb-capture-editor",e.innerHTML='\n          <div class="bb-capture-editor-borderlayer"></div>\n          <svg class="bb-capture-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xml:space="preserve"></svg>\n          <div class="bb-capture-dismiss">'.concat(L("dismiss"),"</div>\n          <div class='bb-capture-editor-drag-info'>").concat(L("rect"),'</div>\n          <div class="bb-capture-toolbar">\n            <div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-tool drag-handle-item" data-type="drag">\n              ').concat(L("drag"),"\n            </div>\n            ").concat("capture"===this.type?'<div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-recording" data-type="recording">\n                  '.concat(L("recorderon"),"\n                  ").concat(L("recorderoff"),'\n                  <span class="bb-tooltip bb-tooltip-screen-recording"></span>\n                </div>\n                <div class="bb-capture-toolbar-item bb-capture-item-rec" data-type="mic">\n                  ').concat(L("mic"),'\n                  <span class="bb-tooltip bb-tooltip-audio-recording"></span>\n                </div>\n                <div class="bb-capture-toolbar-item-timer bb-capture-item-rec">2:00</div>\n                <div class="bb-capture-toolbar-item-spacer"></div>\n                <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pointer">\n                  ').concat(L("pointer"),"\n                </div>"):"",'\n            <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool bb-capture-toolbar-item--active" data-type="rect">\n              ').concat(L("rect"),'\n            </div>\n            <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pen">\n              ').concat(L("pen"),'\n            </div>\n            <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="blur">\n              ').concat(L("blur"),'\n            </div>\n            <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem" data-type="colorpicker">\n              <div class="bb-capture-toolbar-item-selectedcolor"></div>\n              <span class="bb-tooltip">').concat(lT.translateText("pickAColor"),'</span>\n            </div>\n            <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="undo">\n              ').concat(L("undo"),'\n              <span class="bb-tooltip">').concat(lT.translateText("undo"),"</span>\n            </div>\n            ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(lT.translateText("next"),"</div>"):"",'\n          </div>\n          <div class="bb-capture-toolbar-item-colorpicker">\n            <div class="bb-capture-toolbar-item-color" data-color="#EB144C"></div>\n            <div class="bb-capture-toolbar-item-color" data-color="#FF6705"></div>\n            <div class="bb-capture-toolbar-item-color" data-color="#FD
1B903"></div>\n            <div class="bb-capture-toolbar-item-color" data-color="#9900EE"></div>\n            <div class="bb-capture-toolbar-item-color" data-color="#00D082"></div>\n            <div class="bb-capture-toolbar-item-color" data-color="#0A93E4"></div>\n            <div class="bb-capture-toolbar-item-color" data-color="#CCCCCC"></div>\n          </div>\n          <div class="bb-capture-preview">\n            <div class="bb-capture-preview-inner">\n              <video controls muted autoplay></video>\n              <div class="bb-capture-preview-buttons">\n                <div class="bb-capture-preview-retrybutton">').concat(lT.translateText("retry"),'</div>\n                <div class="bb-capture-preview-sendbutton">').concat(lT.translateText("next"),"</div>\n              </div>\n            </div>\n          </div>\n        "),document.body.appendChild(e),e.setAttribute("dir",lT.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,r=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,r="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&r&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(uH.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),ly.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new lh(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var e=this,t=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),r=document.querySelectorAll(".bb-capture-toolbar-item-color"),o=document.querySelector(".bb-capture-toolbar-item-colorpicker"),i=0;i<r.length;i++)!function(){var a=r[i],l=a.getAttribute("data-color");a.style.backgroundColor=l,a.onclick=function(){a&&(e.screenDrawer.setColor(l),o&&(o.style.display="none"),t.style.backgroundColor=a.style.backgroundColor,n.setPenColor(l))}}()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e,t,n,r,o=this,i=document.querySelector(".bb-capture-toolbar"),a=!1,l=0,c=0;this.dragStart=function(e){var t=function(){var e=window.getComputedStyle(i).transform;if("none"===e)return{x:0,y:0};var t=new DOMMatrix(e);return{x:t.m41,y:t.m42}}(),o=t.x,u=t.y;l=o,c=u,"mousedown"===e.type?(n=e.clientX-l,r=e.clientY-c):(n=e.touches[0].clientX-l,r=e.touches[0].clientY-c),a=!0},this.dragEnd=function(){a=!1},this.drag=function(o){a&&(o.preventDefault(),"mousemove"===o.type?(e=o.clientX-n,t=o.clientY-r):(e=o.touches[0].clientX-n,t=o.touches[0].clientY-r),l=e,c=t,i.style.transform="translate(".concat(e,"px, ").concat(t,"px)"))};var u=document.querySelector(".bb-capture-toolbar-item[data-type='drag']");u.addEventListener("mousedown",this.dragStart),u.addEventListener("touchstart",this.dragStart),document.addEventListener("mousemove",this.drag),document.addEventListener("touchmove",this.drag),document.addEventListener("mouseup",this.dragEnd),document.addEventListener("touchend",this.dragEnd),document.querySelector(".bb-capture-dismiss").onclick=function(){o.dismiss()};var d=document.querySelector(".bb-capture-button-next");d&&(d.onclick=this.showNextStep.bind(this));for(var p=document.querySelector(".bb-capture-toolbar-item-colorpicker"),h=document.querySelector(".bb-capture-svg"),f=function(e,t){for(var n=document.querySelectorAll(".bb-capture-toolbar-item-tool"),r=0;r<n.length;r++)n[r].classList.remove("bb-capture-toolbar-item--active");if(t.classList.add("bb-capture-toolbar-item--active"),o.screenDrawer.setTool(e),o.dragCursor.innerHTML="","pointer"===e)h.style.pointerEvents="none";else{h.style.pointerEvents="auto";
1try{var i=t.querySelector("svg").cloneNode(!0);i&&o.dragCursor&&o.dragCursor.appendChild(i)}catch(e){}}},g=document.querySelectorAll(".bb-capture-toolbar-item"),m=0;m<g.length;m++)!function(){var e=g[m];e.onclick=function(){var t=e.getAttribute("data-type");p&&"colorpicker"!==t&&(p.style.display="none"),"mic"===t&&o.screenRecorder.toggleAudio(),"recording"===t&&(o.screenRecorder.isRecording?o.screenRecorder.stopScreenRecording():(o.screenRecorder.startScreenRecording(),f("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==o.type||o.screenRecorder.isRecording)&&("pen"!==t&&"blur"!==t&&"rect"!==t&&"pointer"!==t||f(t,e),"colorpicker"===t&&("flex"===p.style.display?p.style.display="none":p.style.display="flex"),"undo"===t&&o.screenDrawer.removeLastAddedPathFromSvg())}}()}},{key:"captureScreenDrawerRerender",value:function(){if(this.screenDrawer)for(var e="bb-capture-editor-item-inactive",t=document.querySelectorAll(".bb-capture-toolbar-item"),n=0;n<t.length;n++){var r=t[n];"undo"===r.getAttribute("data-type")&&(null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?r.classList.remove(e):r.classList.add(e))}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&uH.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),r=document.querySelector(".bb-tooltip-screen-recording"),o=document.querySelector(".bb-tooltip-audio-recording"),i=document.querySelector(".bb-capture-editor"),a="bb-capture-editor-recording",l="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(i.classList.add(a),i.classList.remove(l)):(i.classList.add(l),i.classList.remove(a));var c=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",c.style.display=this.screenRecorder.file?"none":"flex";for(var u=0;u<n.length;u++){var d=n[u];switch(d.getAttribute("data-type")){case"mic":this.screenRecorder.audioAvailable&&this.screenRecorder.available?(d.classList.remove(e),this.screenRecorder.audioMuted?(d.classList.add("bb-capture-toolbar-item--inactivecross"),o.innerHTML=lT.translateText("unmute")):(d.classList.remove("bb-capture-toolbar-item--inactivecross"),o.innerHTML=lT.translateText("mute"))):(d.classList.add(e),d.classList.add("bb-capture-toolbar-item--inactivecross"),o.innerHTML=lT.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(d.classList.remove(e),this.screenRecorder.isRecording?(d.setAttribute("data-active","true"),r.innerHTML=lT.translateText("stopRecording"),t.style.display="block"):(d.setAttribute("data-active","false"),r.innerHTML=lT.translateText("startRecording"),t.style.display="none")):(d.classList.add(e),r.innerHTML=lT.translateText("browserNotSupported"))}}}}},{key:"setupScreenRecording",value:function(){var e=this;document.querySelector(".bb-capture-preview-sendbutton").onclick=this.showNextStep.bind(this),document.querySelector(".bb-capture-preview-retrybutton").onclick=function(){e.screenRecorder.clearPreview(),e.screenDrawer&&e.screenDrawer.clear()},this.screenRecorder=new ni(this.captureRenderer.bind(this),lT.translateText("accessToScreenSharingDenied"))}}],t=[{key:"setPenColor",value:function(e){for(var t=document.querySelectorAll(".bb-pen-tip"),n=0;n<t.length;n++)t[n].style.fill=e}}],e&&lw(n.prototype,e),t&&lw(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lC(e){return(lC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lO(r.key),r)}}function lE(e,t,n){return(t=lO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lO(e){var t=function(e,t){if("object"!=lC(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lC(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lC(t)?t:String(t)}var lT=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),lE(this,"overrideLanguage",""),lE(this,"isRTLLayout",!1)}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=tW.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}},{key:"translateTextWithVars",value:function(e,t){if(!e)return"";var n=this.translateText(e);return n?n.replace(/{(\w+)}/g,function(e,n){return t[n]}):""}}],e=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=tW.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),I.getInstance().updateFeedbackButtonState(),nT.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";if("u">typeof navigator&&(e=navigator.language.toLowerCase()),"u">typeof document&&document.documentElement){var t=document.documentElement.lang;t&&""!==t.trim()&&(e=t.toLowerCase().trim())}return this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}],lI(n.prototype,e),t&&lI(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lL(e){return(lL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lP(r.key),r)}}function lM(e,t,n){return(t=lP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lP(e){var t=function(e,t){if("object"!=lL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lL(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lL(t)?t:String(t)}lE(lT,"instance",void 0);var lR=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),lM(this,"shortCutListener",void 0)}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"start",value:function(){this.shortCutListener||(this.shortCutListener=document.addEventListener("keyup",function(e){var t,n=(void 0!==e.ke
1y?t=e.key:void 0!==e.keyIdentifier?t=e.keyIdentifier:void 0!==e.keyCode&&(t=e.keyCode),t);e.ctrlKey&&("u"===n||"U"===n||85===n)&&uH.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})}))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}],lA(n.prototype,e),t&&lA(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function l_(e){return(l_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lD(e,t,n){return(t=lj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lj(e){var t=function(e,t){if("object"!=l_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l_(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==l_(t)?t:String(t)}lM(lR,"instance",void 0);var lN=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),lD(this,"formPreFill",{})}return e=[{key:"getInstance",value:function(){return this.instance||(this.instance=new t),this.instance}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lj(r.key),r)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function lF(e){return(lF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lH(r.key),r)}}function lU(e,t,n){return(t=lH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lH(e){var t=function(e,t){if("object"!=lF(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lF(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lF(t)?t:String(t)}lD(lN,"instance",void 0);var lz=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),lU(this,"notificationContainer",null),lU(this,"notifications",[]),lU(this,"unreadCount",0),lU(this,"unreadNotificationsKey","unread-notifications"),lU(this,"isTabActive",!0),lU(this,"showNotificationBadge",!0),lU(this,"currentNewsIndex",0)}return e=[{key:"updateTabBarNotificationCount",value:function(){nm.notifyEvent("unread-count-changed",this.unreadCount)}},{key:"injectNotificationUI",value:function(){if(!this.notificationContainer){var e=document.createElement("div");e.className="gleap-notification-container gleap-font",document.body.appendChild(e),this.notificationContainer=e,this.updateContainerStyle(),this.reloadNotificationsFromCache()}}},{key:"reloadNotificationsFromCache",value:function(){try{var e=q(this.unreadNotificationsKey);if(e&&e.length>0){var t=e.filter(function(e){return new Date(e.createdAt)>new Date(Date.now()-36e5)});t.length>2?this.notifications=t.splice(0,t.length-2):this.notifications=t,this.renderNotifications()}}catch(e){}}},{key:"setNotificationCount",value:function(e){this.unreadCount=e,this.updateTabBarNotificationCount(),I.getInstance().updateNotificationBadge(this.unreadCount)}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find(function(t){return e.outbound===t.outbound})||(this.notifications.push(e),e.sound&&co.ping()),this.notifications.length>2&&this.notifications.shift(),W(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");
1t.onclick=function(){e.clearAllNotifications(),e.currentNewsIndex=0},t.className="gleap-notification-close",t.innerHTML=L("dismiss"),this.notificationContainer.appendChild(t);var n=this.notifications.filter(function(e){return e.data.news}).sort(function(e,t){return new Date(e.createdAt)-new Date(t.createdAt)}),r=this.notifications.filter(function(e){return!e.data.news});if(n.length>0){var o=this.currentNewsIndex<n.length?this.currentNewsIndex:0,i=n[o],a=document.createElement("div");a.className="gleap-notification-item-news";var l=document.createElement("div");if(l.className="gleap-notification-item-news-container",i.data.coverImageUrl&&""!==i.data.coverImageUrl&&!i.data.coverImageUrl.includes("NewsImagePlaceholder")){var c=document.createElement("img");c.className="gleap-notification-item-news-image",c.src=i.data.coverImageUrl,c.onclick=function(t){t.stopPropagation(),e.openNews(i)},l.appendChild(c)}var u=document.createElement("div");u.className="gleap-notification-item-news-content";var d=document.createElement("div");d.className="gleap-notification-item-news-content-title";var p=i.data.text||"";d.innerText=p=p.replaceAll("{{name}}",tR.getInstance().getName()),d.onclick=function(t){t.stopPropagation(),e.openNews(i)},u.appendChild(d);var h=this.renderDescription(i);if(h){var f=document.createElement("div");f.className="gleap-notification-item-news-preview",f.innerHTML=h,u.appendChild(f)}if(n.length>1){var g=document.createElement("div");g.className="gleap-news-pagination";var m=document.createElement("span");m.className="gleap-news-page-indicator",m.innerText="".concat(o+1," / ").concat(n.length),g.appendChild(m);var v=document.createElement("button");v.className="gleap-news-next-button",o<n.length-1?(v.innerText=lT.translateText("next"),v.onclick=function(t){t.stopPropagation(),e.currentNewsIndex++,e.renderNotifications()}):(v.innerText=lT.translateText("done"),v.onclick=function(t){t.stopPropagation(),e.clearAllNotifications(),e.currentNewsIndex=0}),g.appendChild(v),u.appendChild(g)}l.appendChild(u),a.appendChild(l),this.notificationContainer.appendChild(a)}for(var y=0;y<r.length;y++)!function(){var t=r[y],n=t.data.text||"";n=n.replaceAll("{{name}}",tR.getInstance().getName());var o=document.createElement("div");if(o.onclick=function(){t.data.conversation?uH.openConversation(t.data.conversation.shareToken,!0):t.data.checklist?uH.openChecklist(t.data.checklist.id,!0):uH.open()},t.data.checklist){var i=Math.round(t.data.currentStep/t.data.totalSteps*100);i<100&&(i+=4),o.className="gleap-notification-item-checklist",o.innerHTML='\n          <div class="gleap-notification-item-checklist-container">\n            <div class="gleap-notification-item-checklist-content">\n              <div class="gleap-notification-item-checklist-content-title">\n                '.concat(t.data.text,'\n              </div>\n              <div class="gleap-notification-item-checklist-content-progress">\n                <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(i,'%;"></div>\n              </div>\n              <div class="gleap-notification-item-checklist-content-next">\n                <svg width="24" height="24" viewBox="0 0 24 24"\n                  fill="none" xmlns="http://www.w3.org/2000/svg">\n                  <path d="M4 12H20M20 12L14 6M20 12L14 18"\n                    stroke="currentColor" stroke-width="2"\n                    stroke-linecap="round" stroke-linejoin="round"/>\n                </svg>\n                ').concat(t.data.nextStepTitle,"\n              </div>\n            </div>\n          </div>")}else o.className="gleap-notification-item",o.innerHTML="\n          ".concat(t.data.sender&&t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />'),'\n          <div class="gleap-notification-item-container">\n            ').concat(t.data.sender?'<div class="gleap-notification-item-sender">\n                     '.concat(t.data.sender.name,"\n                   </div>"):"",'\n            <div class="gleap-notification-item-content">').concat(n,"</div>\n          </div>");e.notificationContainer.appendChild(o)}();n.length>0||r.length>0||this.clearAllNotifications(!0)}}},{key:"openNews",value:function(e){e.data.news?uH.openNewsArticle(e.data.news.id,!0):uH.open()}},{key:"renderDescription",value:function(e){var t=e.data,n=t.previewText,r=t.sender;return n&&n.length>0?n:r?'\n        <div class="gleap-notification-item-news-sender">\n          '.concat(r.profileImageUrl?'<img src="'.concat(r.profileImageUrl,'" alt="').concat(r.name,'" />'):"","\n          ").concat(r.name,"\n        </div>\n      "):""}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],this.currentNewsIndex=0,W(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=tW.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==I.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==I.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===I.getInstance().buttonHidden?e.feedbackButtonPosition===I.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):I.getInstance().buttonHidden&&this.notificationContainer.classList.add(n),this.notificationContainer.setAttribute("dir",lT.getInstance().isRTLLayout?"rtl":"ltr")}}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&lB(n.prototype,e),t&&lB(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lq(e){return(lq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?lG(Object(n),!0).forEach(function(t){lY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lK(r.key),r)}}function lY(e,t,n){return(t=lK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lK(e){var t=function(e,t){if("object"!=lq(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lq(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lq(t)?t:String(t)}lU(lz,"instance",void 0);var lX=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),lY(this,"chatbarUrl","https://outboundmedia.gleap.io/chatbar"),lY(this,"chatbarContainer",null),lY(this,"chatbarFrame",null),lY(this,"config",null),lY(this,"agentId","kai"),lY(this,"agentContext",null),lY(this,"isHidden",!0),lY(this,"manuallyHidden",!1),lY(this,"manuallyShown",!1),lY(this,"iframeReady",!1),lY(this,"pendingMessages",[]),lY(this,"chatbarStyle",null),this._listenForMessages(),this._listenForOutsideClicks()}return e=[{key:"_listenForOutsideClicks",value:function(){var e=this;document.addEventListener("click",function(t){e.chatbarContainer&&(e.chatbarContainer.contains(t.target)||e._suppressOutsideClick||e._postMessage({name:"chatbar-outside-click"}))})}},{key:"_listenForMessages",value:function(){var e=this;window.addEventListener("message",function(t){if(!e.chatbarUrl||e.chatbarUrl.includes(t.origin))try{var n=JSON.parse(t.data);if("CHATBAR"!==(null==n?void 0:n.type))return;"chatbar-loaded"===n.name&&(e.iframeReady=!0,e._sendChatbarData(),e._flushPendingMessages()),"chatbar-resize"===n.name&&n.data&&e._resizeFrame(n.data),"chatbar-message-sent"===n.name&&nm.notifyEvent("agent-message-sent",n.data),"chatbar-conversation-created"===n.name&&nm.notifyEvent("agent-conversation-created",n.data),"chatbar-reply-received"===n.name&&nm.notifyEvent("agent-reply-received",n.data),"chatbar-tool-executed"===n.name&&n.data&&nx.getInstance().triggerToolAction(n.data),"chatbar-error"===n.name&&nm.notifyEvent("agent-error",n.data),"chatbar-panel-blur"===n.name&&n.data&&e._updateBlurBackdrop(n.data)}catch(e){}})}},{key:"_postMessage",value:function(e){try{var t;if(!this.iframeReady||null==(t=this.chatbarFrame)||!t.contentWindow)return void this.pendingMessages.push(e);this.chatbarFrame.contentWindow.postMessage(JSON.stringify(lV(lV({},e),{},{type:"chatbar"})),"*")}catch(e){}}},{key:"_flushPendingMessages",value:function(){var e=this.pendingMessages;this.pendingMessages=[];var t,n=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return lW(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return lW(e,void 0)}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._postMessage(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"_sendChatbarData",value:function(){var e,t,n,r,o;if(this.chatbarContainer){var i={},a="https://api.gleap.io",l="",c="",u="";try{i=tW.getInstance().getFlowConfig()||{}}catch(e){}try{var d,p,h=tR.getInstance();a=h.apiUrl||a,l=h.sdkKey||"",c=(null==(d=h.session)?void 0:d.gleapId)||"",u=(null==(p=h.session)?void 0:p.gleapHash)||""}catch(e){}var f=(null==(e=this.config)?void 0:e.agentName)||"Kai";this._postMessage({name:"chatbar-data",data:{agentId:this.agentId,defaultAgentName:f,placeholder:(null==(t=this.config)?void 0:t.placeholder)||"Ask me anything...",quickActions:(null==(n=this.config)?void 0:n.quickActions)||[],style:(null==(r=this.config)?void 0:r.style)||"glow",primaryColor:(null==(o=i)?void 0:o.color)||"#485BFF",agentTools:nx.getInstance().getAgentTools(),apiUrl:a,sdkKey:l,gleapId:c,gleapHash:u}})}}}
1,{key:"_resizeFrame",value:function(e){var t=e.width,n=e.height;this.chatbarContainer&&(this.chatbarContainer.style.width=Math.ceil(t)+"px",this.chatbarContainer.style.height=Math.ceil(n)+"px",this.isHidden||(this.chatbarContainer.style.display="block"))}},{key:"_updateBlurBackdrop",value:function(e){var t=e.visible,n=e.height,r=e.borderRadius;this.blurBackdrop&&(t?(this.blurBackdrop.style.height=n+"px",this.blurBackdrop.style.borderRadius=r+"px",this.blurBackdrop.style.display="block"):this.blurBackdrop.style.display="none")}},{key:"setConfig",value:function(e){this.config=e,"kai"!==this.agentId&&this.agentId||(e.agentId&&"default"!==e.agentId?this.agentId=e.agentId:this.agentId="kai"),e.enabled?this.show():this.manuallyShown||this.hide(),this._sendChatbarData()}},{key:"setPlaceholder",value:function(e){this.config||(this.config={}),this.config.placeholder=e,this._sendChatbarData()}},{key:"setQuickActions",value:function(e){this.config||(this.config={}),this.config.quickActions=e,this._sendChatbarData()}},{key:"sendAgentToolsUpdate",value:function(){this._postMessage({name:"chatbar-set-agent-tools",data:{tools:nx.getInstance().getAgentTools()}})}},{key:"updateUIVisibility",value:function(){var e;nT.getInstance().isOpened()?this.hide():null!=(e=this.config)&&e.enabled||this.manuallyShown?this.show():this.hide()}},{key:"show",value:function(){this.manuallyHidden||(this.isHidden=!1,this._preloadIframe(),this.chatbarContainer&&(this.chatbarContainer.style.display="block"))}},{key:"hide",value:function(){this.isHidden=!0,this._removeUI()}},{key:"_removeUI",value:function(){this.chatbarContainer&&(document.body&&document.body.contains(this.chatbarContainer)&&document.body.removeChild(this.chatbarContainer),this.chatbarStyle&&this.chatbarStyle.parentNode&&this.chatbarStyle.parentNode.removeChild(this.chatbarStyle),this.chatbarContainer=null,this.chatbarFrame=null,this.blurBackdrop=null,this.chatbarStyle=null,this.iframeReady=!1,this.pendingMessages=[])}},{key:"_resolveAgentId",value:function(e){return e&&"default"!==e?e:"kai"}},{key:"_sendAgentCommand",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this._resolveAgentId(e);this.agentId=o,n.context&&(this.agentContext=n.context),this.manuallyHidden=!1;var i={agentId:this.agentId,context:this.agentContext,primaryColor:n.primaryColor||void 0,initialMessage:n.initialMessage||void 0};this._suppressOutsideClick=!0,setTimeout(function(){t._suppressOutsideClick=!1},0),this.show(),this._postMessage({name:r?"chatbar-show-agent":"chatbar-set-agent",data:i})}},{key:"setAgent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._sendAgentCommand(e,t,!1)}},{key:"showWithAgent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._sendAgentCommand(e,t,!0)}},{key:"_preloadIframe",value:function(){var e=this;this.chatbarContainer||G(function(){return e._injectUI()})}},{key:"_injectUI",value:function(){if(document.body&&!this.chatbarContainer){try{tW.getInstance().getFlowConfig()}catch(e){}var e=document.createElement("div");e.className="gleap-chatbar";var t=document.createElement("style");t.textContent="\n      @media (max-width: 768px) {\n        .gleap-chatbar {\n          width: 70% !important;\n          left: 40% !important;\n        }\n      }\n    ",e.style.cssText="\n      position: fixed;\n      bottom: 10px;\n      z-index: 2147483000;\n      border: 0;\n      width: 280px;\n      overflow: hidden;\n      height: 80px;\n      display: none;\n      transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n      left: 50%;\n      transform: translateX(-50%);\n    ";var n=document.createElement("iframe");n.src=this.chatbarUrl,n.className="gleap-chatbar-frame",n.title="Gleap AI Chatbar",n.setAttribute("role","dialog"),n.setAttribute("frameborder","0"),n.setAttribute("allow","autoplay; encrypted-media; microphone *;"),n.style.cssText="\n      position: relative;\n      width: 100%;\n      height: 100%;\n      border: 0;\n      background: transparent;\n      z-index: 1;\n    ";var r=document.createElement("div");r.style.cssText="\n      position: absolute;\n      bottom: 70px;\n      left: 20px;\n      right: 20px;\n      height: 0;\n      display: none;\n      backdrop-filter: blur(40px) saturate(180%);\n      -webkit-backdrop-filter: blur(40px) saturate(180%);\n      border-radius: 20px;\n      pointer-events: none;\n      z-index: 0;
1\n    ",e.appendChild(r),e.appendChild(n),(document.head||document.body).appendChild(t),document.body.appendChild(e),this.chatbarContainer=e,this.chatbarFrame=n,this.blurBackdrop=r,this.chatbarStyle=t}}},{key:"destroy",value:function(){this._removeUI(),this.config=null,this.agentId=null,this.agentContext=null,this.isHidden=!0,this.iframeReady=!1,this.pendingMessages=[],n.instance=null}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&lJ(n.prototype,e),t&&lJ(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function lZ(e){return(lZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l$(Object(n),!0).forEach(function(t){l1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l2(r.key),r)}}function l1(e,t,n){return(t=l2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l2(e){var t=function(e,t){if("object"!=lZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lZ(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==lZ(t)?t:String(t)}lY(lX,"instance",void 0);var l3=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),l1(this,"bannerUrl","https://outboundmedia.gleap.io"),l1(this,"bannerContainer",null),l1(this,"bannerData",null),l1(this,"disabled",!1),this.startCommunication()}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"setBannerUrl",value:function(e){this.bannerUrl=e}},{key:"startCommunication",value:function(){var e=this;window.addEventListener("message",function(t){var n,r=e.bannerContainer?e.bannerContainer.querySelector(".gleap-b-frame"):null,o=r&&t.source===r.contentWindow,i=null==(n=e.bannerUrl)?void 0:n.includes(t.origin);if(o||i)try{var a,l,c,u,d,p,h,f,g,m,v,y=JSON.parse(t.data);if("BANNER"!==(null==y?void 0:y.type))return;if("banner-loaded"===y.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===y.name&&document.documentElement.style.setProperty("--gleap-margin-top",y.data.height+"px"),"banner-data-set"===y.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null==(a=e.bannerData)?void 0:a.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===y.name&&e.removeBannerUI(),"start-conversation"===y.name&&uH.startBot(null==(l=y.data)?void 0:l.botId),"start-custom-action"===y.name&&uH.triggerCustomAction(null==(c=y.data)?void 0:c.action),"start-product-tour"===y.name&&uH.startProductTour(null==(u=y.data)?void 0:u.tourId,!0),"open-url"===y.name){var b=y.data,w=!!y.newTab;nT.getInstance().urlHandler(b,w)}"show-form"===y.name&&uH.startFeedbackFlow(null==(d=y.data)?void 0:d.formId),"show-survey"===y.name&&uH.showSurvey(null==(p=y.data)?void 0:p.formId,null==(h=y.data)?void 0:h.surveyFormat),"show-news-article"===y.name&&uH.openNewsArticle(null==(f=y.data)?void 0:f.articleId),"show-help-article"===y.name&&uH.openHelpCenterArticle(null==(g=y.data)?void 0:g.articleId),"show-checklist"===y.name&&uH.startChecklist(null==(m=y.data)?void 0:m.checklistId,!0,null==(v=y.data)?void 0:v.sharedKey)}catch(e){}})}},{key:"removeBannerUI",value:function(){this.bannerContainer&&(document.body.removeChild(this.bannerContainer),this.bannerContainer=null),document.body.classList.remove("gleap-b-shown"),document.body.classList.remove("gleap-b-f")}},{key:"disable",value:function(){this.disabled=!0,this.removeBannerUI()}},{key:"injectBannerUI",value:function(e){if(!document.body||this.disabled)return!1;this.bannerContainer&&this.removeBannerUI(),this.bannerData=e;var t=document.createElement("div");t.className="gleap-b",t.innerHTML='<iframe class="gleap-b-frame" scrolling="no" title="Gleap Banner" role="dialog" frameborder="0"></iframe>',document.body.appendChild(t),this.bannerContainer=t;var n=t.querySelector(".gleap-b-frame");n&&D(n,this.bannerUrl)}},{key:"sendMessage",value:function(e){try{var t=document.querySelector(".gleap-b-frame");t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(lQ(lQ({},e),{},{type:"banner"})),"*")}catch(e){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}],l0(n.prototype,e),t&&l0(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function l4(e){return(l4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?l5(Object(n),!0).forEach(function(t){l6(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l8(r.key),r)}}function l6(e,t,n){return(t=l8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l8(e){var t=function(e,t){if("object"!=l4(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l4(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==l4(t)?t:String(t)}l1(l3,"instance",void 0);var ce=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),l6(this,"modalUrl","https://outboundmedia.gleap.io/modal"),l6(this,"modalContainer",null),l6(this,"modalData",null),l6(this,"modalBackdropClickListener",null),l6(this,"disabled",!1),this._listenForMessages()}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"setModalUrl",value:function(e){this.modalUrl=e}},{key:"disable",value:function(){this.disabled=!0,this.hideModal()}},{key:"_listenForMessages",value:function(){var e=this;window.addEventListener("message",function(t){var n,r=e.modalContainer?e.modalContainer.querySelector(".gleap-modal-frame"):null,o=r&&t.source===r.contentWindow,i=null==(n=e.modalUrl)?void 0:n.includes(t.origin);if(o||i)try{var a,l,c,u,d,p,h,f,g,m,v=JSON.parse(t.data);if("MODAL"!==(null==v?void 0:v.type))return;if("modal-loaded"===v.name&&e.modalData){var y=tW.getInstance().getFlowConfig(),b=y.color?y.color:"#485BFF",w=y.backgroundColor?y.backgroundColor:"#FFFFFF";e._postMessage({name:"modal-data",data:l9(l9({},e.modalData),{},{primaryColor:b,backgroundColor:w})})}if("modal-height"===v.name){var k,x=null==v||null==(k=v.data)?void 0:k.height;if(x){var S=e.modalContainer.querySelector(".gleap-modal-frame");S&&(S.style.height="".concat(x,"px"))}}if(v.name,"modal-close"===v.name&&e.hideModal(),"start-conversation"===v.name&&uH.startBot(null==(a=v.data)?void 0:a.botId),"start-custom-action"===v.name&&uH.triggerCustomAction(null==(l=v.data)?void 0:l.action),"start-product-tour"===v.name&&uH.startProductTour(null==(c=v.data)?void 0:c.tourId,!0),"open-url"===v.name){var C=v.data,I=!!v.newTab;nT.getInstance().urlHandler(C,I)}"show-form"===v.name&&uH.startFeedbackFlow(null==(u=v.data)?void 0:u.formId),"show-survey"===v.name&&uH.showSurvey(null==(d=v.data)?void 0:d.formId,null==(p=v.data)?void 0:p.surveyFormat),"show-news-article"===v.name&&uH.openNewsArticle(null==(h=v.data)?void 0:h.articleId),"show-help-article"===v.name&&uH.openHelpCenterArticle(null==(f=v.data)?void 0:f.articleId),"show-checklist"===v.name&&uH.startChecklist(null==(g=v.data)?void 0:g.checklistId,!0,null==(m=v.data)?void 0:m.sharedKey)}catch(e){}})}},{key:"_injectModalUI",value:function(e){var t=this;if(!document.body||this.disabled)return!1;this.modalContainer&&this.hideModal(),this.modalData=e;var n=document.createElement("div");n.className="gleap-modal-wrapper",n.innerHTML='\n      <div class="gleap-modal-backdrop"></div>\n      <div class="gleap-modal">\n        <iframe\n          class="gleap-modal-frame"\n          scrolling="no"\n          title="Gleap Modal"\n          role="dialog"\n          frameborder="0"\n          allow="autoplay; encrypted-media; fullscreen; microphone *;"\n        ></iframe>\n      </div>\n    ',document.body.appendChild(n),this.modalContainer=n;var r=n.querySelector(".gleap-modal-frame");r&&D(r,this.modalUrl),this.modalBackdropClickListener=this.modalContainer.querySelector(".gleap-modal-backdrop").addEventListener("click",function(){var e,n;(null==(e=null==(n=t.modalData)?void 0:n.showCloseButton)||e)&&t.hideModal()}),document.body.classList.add("gleap-modal-open")}},{key:"_postMessage",value:function(e){try{var t=this.modalContainer.querySelector(".gleap-modal-frame");null!=t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(l9(l9({},e),{},{type:"modal"})),"*")}catch(e){}}},{key:"showModal",value:function(e){e&&e.config&&this._injectMod
1alUI(e.config)}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalBackdropClickListener&&this.modalContainer.querySelector(".gleap-modal-backdrop").removeEventListener("click",this.modalBackdropClickListener),document.body.removeChild(this.modalContainer),this.modalContainer=null,document.body.classList.remove("gleap-modal-open"))}}],l7(n.prototype,e),t&&l7(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function ct(e){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cn(e,t,n){return(t=cr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(e){var t=function(e,t){if("object"!=ct(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ct(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ct(t)?t:String(t)}l6(ce,"instance",void 0);var co=function(){function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cr(r.key),r)}}(e,[{key:"playSound",value:function(e){this.settings.play=e}},{key:"ping",value:function(){try{if(!this.settings.play)return;this.audio||(this.audio=new Audio("https://js.gleap.io/res/ping.mp3"));var e=this.audio.play();void 0!==e&&e.then(function(e){}).catch(function(e){})}catch(e){}}}]),Object.defineProperty(e,"prototype",{writable:!1}),e}();function ci(e){return(ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cl(r.key),r)}}function cs(e,t,n){return(t=cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cl(e){var t=function(e,t){if("object"!=ci(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ci(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ci(t)?t:String(t)}cn(co,"audio",void 0),cn(co,"settings",{play:!0});var cc=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),cs(this,"tags",[])}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"getTags",value:function(){return this.tags}},{key:"setTags",value:function(e){this.tags=e}}],ca(n.prototype,e),t&&ca(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function cu(e){var t=e.getAttribute("id");return null!==t&&""!==t?t.match(/(?:^\d|:)/)?'[id="'.concat(t,'"]'):"#"+t:null}function cd(e){return(function(e){if(!e.hasAttribute("class"))return[];try{return Array.prototype.slice.call(e.classList).filter(function(e){return/^[a-z_-][a-z\d_-]*$/i.test(e)?e:null})}catch(n){var t=e.getAttribute("class");return(t=t.trim().replace(/\s+/g," ")).split(" ")}})(e).filter(Boolean).map(function(e){return".".concat(e)})}function cp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ch(e){return(ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cf(e){return"object"===("u"<typeof HTMLElement?"undefined":ch(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===ch(e)&&1===e.nodeType&&"string"==typeof e.nodeName}function cg(e){var t,n,r=0,o=e.parentNode;if(o){var i=o.childNodes,a=i.length;for(t=0;t<a;t++)if(cf(n=i[t])&&(r++,n===e))return":nth-child(".concat(r,")")}return null}function cm(e){return e.tagName.toLowerCase().replace(/:/g,"\\:")}function cv(e,t){var n="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return cy(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cy(e,void 0)}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function cy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cb(e,t){try{var n=e.parentNode.querySelectorAll(t);return 1===n.length&&n[0]===e}catch(e){return!1}}function cw(e,t){return t.find(cb.bind(null,e))}function ck(e,t,n){var r=function(e){for(var t=[],n=e.length,r=[],o=1;o<=3;++o)!function e(t,n,r,o,i,a,l){if(a!==l)for(var c=o;c<=i&&i-c+1>=l-a;++c)r[a]=n[c],e(t,n,r,c+1,i,a+1,l);else t.push(r.slice(0,a).join(""))}(t,e,r,0,n-1,0,o);return t}(t),o=cw(e,r);return o||n&&(o=cw(e,r=r.map(function(e){return n+e})))?o:null}function cx(e){return(cx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cS(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function cC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=cx(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cx(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==cx(t)?t:String(t)}(r.key),r)}}function cI(e,t,n){return t&&cC(e.prototype,t),n&&cC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}cs(cc,"instance",void 0);var cE=function(){function e(t){cS(this,e),this.overlay=document.createElement("div"),this.overlay.className=t.className||"_ext-element-overlay",this.overlay.style.background=t.style&&t.style.background||"rgba(250, 240, 202, 0.2)",this.overlay.style.borderColor=t.style&&t.style.borderColor||"#F95738",this.overlay.style.borderStyle=t.style&&t.style.borderStyle||"solid",this.overlay.style.borderRadius=t.style&&t.style.borderRadius||"1px",this.overlay.style.borderWidth=t.style&&t.style.borderWidth||"1px",this.overlay.style.boxSizing=t.style&&t.style.boxSizing||"border-box",this.overlay.style.cursor=t.style&&t.style.cursor||"crosshair",this.overlay.style.position=t.style&&t.style.position||"absolute",this.overlay.style.zIndex=t.style&&t.style.zIndex||"2147483647",this.overlay.style.margin=t.style&&t.style.margin||"0px",this.overlay.style.padding=t.style&&t.style.padding||"0px",this.shadowContainer=document.createElement("div"),this.shadowContainer.className="_ext-element-overlay-container",this.shadowContainer.style.position="absolute",this.shadowContainer.style.top="0px",this.shadowContainer.style.left="0px",this.shadowContainer.style.margin="0px",this.shadowContainer.style.padding="0px",this.shadowRoot=this.shadowContainer.attachShadow({mode:"open"})}return cI(e,[{key:"addToDOM",value:function(e,t){this.usingShadowDOM=t,t?(e.insertBefore(this.shadowContainer,e.firstChild),this.shadowRoot.appendChild(this.overlay)):e.appendChild(this.overlay)}},{key:"removeFromDOM",value:function(){this.setBounds({x:0,y:0,width:0,height:0}),this.overlay.remove?this.overlay.remove():this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.usingShadowDOM&&(this.shadowContainer.remove?this.shadowContainer.remove():this.shadowContainer.parentNode&&this.shadowContainer.parentNode.removeChild(this.shadowContainer))}},{key:"captureCursor",value:function(){this.overlay.style.pointerEvents="auto"}},{key:"ignoreCursor",value:function(){this.overlay.style.pointerEvents="none"}},{key:"setBounds",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height;this.overlay.style.left=t+"px",this.overlay.style.top=n+"px",this.overlay.style.width=r+"px",this.overlay.style.height=o+"px"}}]),e}(),cO=function(){function e(t){cS(this,e),this.active=!1,this.overlay=new cE(t||{}),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleClick=this.handleClick.bind(this),this.tick=this.tick.bind(this)}return cI(e,[{key:"start",value:function(e){if(this.active)return!1;this.active=!0,this.options=e,document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("click",this.handleClick,!0);var t=e.parentElement||document.body,n=void 0===e.useShadowDOM||e.useShadowDOM;return this.overlay.addToDOM(t,n),this.tick(),!0}},{key:"stop",value:function(){this.active=!1,this.options=void 0,document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("click",this.handleClick,!0),this.overlay.removeFromDOM(),this.target=void 0,this.mouseX=void 0,this.mouseY=void 0,this.tickReq&&window.cancelAnimationFrame(this.tickReq)}},{key:"handleMouseMove",value:function(e){this.mouseX=e.clientX,this.mouseY=e.clientY}},{key:"handleClick",value:function(e){var t=document.elementFromPoint(e.clientX,e.clientY);this.options&&this.options.elementFilter&&t&&!this.options.elementFilter(t)||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.target&&this.options&&this.options.onClick&&this.options.onClick(this.target))}},{key:"tick",value:function(){this.updateTarget(),this.tickReq=window.requestAnimationFrame(this.tick)}},{key:"updateTarget",value:function(){if(void 0!==this.mouseX&&void 0!==this.mouseY){this.overlay.ignoreCursor(
1);var e=document.elementFromPoint(this.mouseX,this.mouseY);if(this.overlay.captureCursor(),e&&e!==this.target){if(this.options&&this.options.elementFilter&&!this.options.elementFilter(e))return this.target=void 0,void this.overlay.setBounds({x:0,y:0,width:0,height:0});this.target=e;var t,n=(t=e.getBoundingClientRect(),{x:window.pageXOffset+t.left,y:window.pageYOffset+t.top,width:e.offsetWidth,height:e.offsetHeight});this.overlay.setBounds(n),this.options&&this.options.onHover&&this.options.onHover(e)}}}}]),e}();function cT(e){return(cT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cL(e,t,n){return(t=cA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cA(e){var t=function(e,t){if("object"!=cT(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cT(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==cT(t)?t:String(t)}var cM=(Object.defineProperty(h=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),cL(this,"picker",null),cL(this,"onElementPicked",null),cL(this,"stopPicker",function(){if(t.picker)return t.picker.stop(),void(t.picker=null)}),cL(this,"startPicker",function(){t.stopPicker(),t.picker=new cO({style:{borderColor:"#2142E7",background:"transparent",borderWidth:"4px",borderRadius:"5px"}}),t.picker.start({useShadowDOM:!1,onClick:function(e){try{for(var n,r=null,o=e,i=0;o&&i<=3;i++){if(o.getAttribute&&o.getAttribute("data-gleap-tour")){r=o;break}o=o.parentElement}if(r){var a=r.getAttribute("data-gleap-tour");n='[data-gleap-tour="'.concat(a,'"]')}else n=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.selectorTypes,o=void 0===r?["ID","Class","Tag","NthChild"]:r,i=n.attributesToIgnore,a=void 0===i?["id","class","length"]:i,l=n.excludeRegex,c=void 0===l?null:l,u=[],d=cv(function(e){for(var t=[],n=e;cf(n);)t.push(n),n=n.parentNode;return t}(e));try{for(d.s();!(t=d.n()).done;){var p=function(e,t,n,r){var o,i,a=(o={Tag:cm,NthChild:cg,Attributes:function(e){return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","class","length"];return((function(e){if(Array.isArray(e))return cp(e)})(t=e.attributes)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return cp(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cp(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).reduce(function(e,t){return n.indexOf(t.nodeName)>-1||e.push("[".concat(t.nodeName,'="').concat(t.value,'"]')),e},[])}(e,n)},Class:cd,ID:cu},t.reduce(function(t,n){return t[n]=o[n](e),t},{}));r&&r instanceof RegExp&&(a.ID=r.test(a.ID)?null:a.ID,a.Class=a.Class.filter(function(e){return!r.test(e)}));var l,c=cv(t);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=a.ID,p=a.Tag,h=a.Class,f=a.Attributes,g=a.NthChild;switch(u){case"ID":if(d&&cb(e,d))return d;break;case"Tag":if(p&&cb(e,p))return p;break;case"Class":if(h&&h.length&&(i=ck(e,h,p)))return i;break;case"Attributes":if(f&&f.length&&(i=ck(e,f,p)))return i;break;case"NthChild":if(g)return g}}}catch(e){c.e(e)}finally{c.f()}return"*"}(t.value,o,a,c);p&&u.push(p)}}catch(e){d.e(e)}finally{d.f()}for(var h=[],f=0;f<u.length;f++){var g=u[f];h.unshift(g);var m=h.join(" > ");if(function(e,t){if(!t)return!1;var n=e.ownerDocument.querySelectorAll(t);return 1===n.length&&n[0]===e}(e,m))return m}return null}(e);t.onElementPicked&&t.onElementPicked(n)}catch(e){console.error("Error while getting unique selector",e)}},elementFilter:function(e){return!e.classList.contains("gleap-admin-collapse-ui")&&!e.closest(".gleap-admin-collapse-ui")}})}),cL(this,"setMode",function(e){t.mode=e,"navigate"===e&&t.stopPicker(),"picker"===e&&t.startPicker()})},"prototype",{writable:!1}),h);function cP(e){return(cP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?cR(Object(n),!0).forEach(function(t){cj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cN(r.key),r)}}function cj(e,t,n){return(t=cN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cN(e){var t=function(e,t){if("object"!=cP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cP(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==cP(t)?t:String(t)}var cF=function(){var e,t;function n(){var e=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),cj(this,"libraryInstance",null),cj(this,"lastUrl",void 0),cj(this,"injectedFrame",!1),cj(this,"gleapFrameContainer",null),cj(this,"gleapCollapseUI",null),cj(this,"injectedCollapseUI",!1),cj(this,"gleapFrame",null),cj(this,"configData",null),cj(this,"adminHelper",null),cj(this,"status","navigate"),cj(this,"initialized",!1),cj(this,"toggleCollapseUI",function(){var t="gleap-admin-collapse-ui-active",n="gleap-admin-frame-container-active",r=function(e,t){return e&&e.classList.contains(t)};(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||r(e.gleapCollapseUI,t)&&r(e.gleapFrameContainer,n))&&(e.gleapCollapseUI&&e.gleapCollapseUI.classList.toggle(t),e.gleapFrameContainer&&e.gleapFrameContainer.classList.toggle(n))}),cj(this,"injectCollapseUI",function(){if(!e.injectedCollapseUI){e.injectedCollapseUI=!0;var t=document.createElement("div");t.className="gleap-admin-collapse-ui",t.innerHTML='<div class="gleap-admin-collapse-ui-icon">\n    '.concat(L("arrowdown"),"\n    </div>"),document.body.appendChild(t),e.gleapCollapseUI=t,t.addEventListener("click",function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e.toggleCollapseUI()})}}),cj(this,"injectFrame",function(){var t;if(!e.injectedFrame){e.injectedFrame=!0;var n=document.createElement("div");n.className="gleap-admin-frame-container",n.innerHTML='<iframe src="https://app.gleap.io/'.concat("tooltips"===(null==e||null==(t=e.configData)?void 0:t.type)?"tooltipbuilder":"producttourbuilder",'" class="gleap-admin-frame" scrolling="no" title="Gleap Admin Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe>'),document.body.appendChild(n),e.gleapFrameContainer=n,e.gleapFrame=document.querySelector(".gleap-admin-frame")}})}return t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e=[{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.sendMessageToTourBuilder({name:"page-changed",data:{page:e}}))}},{key:"startPageListener",value:function(){var e=this;setInterval(function(){e.logCurrentPage()},1e3)}},{key:"initAdminHelper",value:function(){var e=this;this.initialized=!0,c8.getInstance().disable(),l3.getInstance().disable(),ce.getInstance().disable(),uH.close(),uH.showFeedbackButton(!1),e.adminHelper=new cM;try{e.adminHelper.onElementPicked=function(t){e.toggleCollapseUI(!0),e.sendMessageToTourBuilder({name:"element-picked",data:{selector:t}})}}catch(e){console.log(e)}e.injectFrame(),e.injectCollapseUI(),e.setFrameHeight("loading")}},{key:"setFrameHeight",value:function(e){if(this.gleapFrameContainer){var t="";t="picker"===e||"navigate"===e?"65px":"editor"===e?"100vh":"0px",this.gleapFrameContainer.style.height=t}}},{key:"start",value:function(){var e=this;if("u">typeof window&&!window.gleapAdminDisabled){var t=this;window.addEventListener("message",function(n){if("https://app.gleap.io"===n.origin)try{var r=JSON.parse(n.data);if("admin"===r.type&&("load"===r.name&&(t.configData=r.data,t.initAdminHelper()),"smartlink-search-result"===r.name&&e.sendMessageToTourBuilder({name:"smartlink-search-result",data:r.data}),"translate-complete"===r.name&&e.sendMessageToTourBuilder({name:"translate-complete",data:r.data}
1)),"tourbuilder"===r.type){if("loaddata"===r.name&&e.sendMessageToTourBuilder({name:"data",data:c_(c_({},t.configData),{},{currentPage:window.location.href})}),"highlight-element"===r.name&&(document.querySelectorAll(".gleap-admin-highlight").forEach(function(e){e.classList.remove("gleap-admin-highlight")}),null!=r&&null!=(o=r.data)&&o.selector)){var o,i,a=document.querySelector(null==r||null==(i=r.data)?void 0:i.selector);a&&a.classList.add("gleap-admin-highlight")}if("smartlink-search"===r.name&&e.sendMessage({name:"smartlink-search",data:r.data}),"product-tour-started"===r.name&&e.sendMessage({name:"product-tour-started",data:r.data}),"translate"===r.name&&e.sendMessage({name:"translate",data:r.data}),"save"===r.name&&e.sendMessage({name:"save",data:r.data}),"update-steps"===r.name&&e.sendMessage({name:"update-steps",data:r.data}),"click"===r.name)try{document.querySelector(r.data.selector).click()}catch(e){console.log(e)}"status-changed"===r.name&&(t.status=r.data,e.setFrameHeight(t.status),t.adminHelper.stopPicker(),"picker"===t.status&&t.adminHelper.startPicker())}}catch(e){}}),this.sendMessage({name:"init"}),this.startPageListener()}}},{key:"sendMessage",value:function(e){try{window&&window.opener&&window.opener.postMessage(JSON.stringify(c_(c_({},e),{},{type:"admin"})),"*")}catch(e){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify(c_(c_({},e),{},{type:"tourbuilder"})),"*")}catch(e){}}}],cD(n.prototype,e),t&&cD(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function cB(e){return(cB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cU(e){return function(e){if(Array.isArray(e))return cH(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return cH(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cH(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cz(Object(n),!0).forEach(function(t){!function(e,t,n){var r;r=function(e,t){if("object"!=cB(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cB(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t,"string"),(t="symbol"==cB(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}cj(cF,"instance",void 0);var cW=function(){var e={};function t(){e=cq({animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function n(t){return t?e[t]:e}function r(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function o(e){var t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(function(e){var n=e.matches(t),r=Array.from(e.querySelectorAll(t));return[].concat(cU(n?[e]:[]),r)}).filter(function(e){return"none"!==getComputedStyle(e).pointerEvents&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)})}function i(e){if(e&&!((t=e.getBoundingClientRect()).top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth))){var t,r=n("smoothScroll");e.scrollIntoView({behavior:!r||function(e){if(e&&e.parentElement){var t=e.parentElement;return t.scrollHeight>t.clientHeight}}(e)?"auto":"smooth",inline:"center",block:"center"})}}var a={};function l(e){return e?a[e]:a}var c={};function u(e){var t;null==(t=c[e])||t.call(c)}function d(e){if(e){var t=e.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};a.__activeStagePosition=n,p(n)}}function p(e){var t,r,o,i,c=l("__overlaySvg");if(c){var d=c.firstElementChild;if("path"!==(null==d?void 0:d.tagName))throw Error("no path element found in stage svg");d.setAttribute("d",h(e))}else t=window.innerWidth,r=window.innerHeight,(o=document.createElementNS("http://www.w3.org/2000/svg","svg")).classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),o.setAttribute("viewBox","0 0 ".concat(t," ").concat(r)),o.setAttribute("xmlSpace","preserve"),o.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),o.setAttribute("version","1.1"),o.setAttribute("preserveAspectRatio","xMinYMin slice"),o.style.fillRule="evenodd",o.style.clipRule="evenodd",o.style.strokeLinejoin="round",o.style.strokeMiterlimit="2",o.style.zIndex="10000",o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",(i=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("d",h(e)),i.style.fill=n("overlayColor")||"rgb(0,0,0)",i.style.opacity="".concat(n("overlayOpacity")),i.style.pointerEvents="auto",i.style.cursor="auto",o.appendChild(i),document.body.appendChild(o),b(o,function(e){"path"===e.target.tagName&&u("overlayClick")}),a.__overlaySvg=o}function h(e){var t=window.innerWidth,r=window.innerHeight,o=n("stagePadding")||0,i=n("stageRadius")||0,a=e.width+2*o,l=e.height+2*o,c=Math.floor(Math.max(Math.min(i,a/2,l/2),0)),u=e.x-o+c,d=e.y-o,p=a-2*c,h=l-2*c;return"M".concat(t,",0L0,0L0,").concat(r,"L").concat(t,",").concat(r,"L").concat(t,",0Z\n    M").concat(u,",").concat(d," h").concat(p," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",").concat(c," v").
1concat(h," a").concat(c,",").concat(c," 0 0 1 -").concat(c,",").concat(c," h-").concat(p," a").concat(c,",").concat(c," 0 0 1 -").concat(c,",-").concat(c," v-").concat(h," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",-").concat(c," z")}function f(e){var t,o,c,u,h,g,m,v,y,b,x,S,C,I,E,O,T,L,A,M=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,P=e.element,R=P;if("string"==typeof R)try{R=document.querySelector(P)}catch(e){var _=P.replace(/(#[^#\s]+)/g,function(e){return e.replace(/:/g,"\\:")});R=document.querySelector(_)}if(P&&!R&&M>=0)setTimeout(function(){w(),f(e,M-100)},100);else{if(!R){if(e.element){try{console.warn("[Gleap] Product tour selector did not match:",e.element)}catch(e){}return n("onElementNotFound")(e)}R=function(){var e=document.getElementById("gleap-tour-dummy-element");if(e)return e;var t=document.createElement("div");return t.id="gleap-tour-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()}t=R,u=Date.now(),h=l("__activeStep"),m=!(g=l("__activeElement")||t)||g===t,v="gleap-tour-dummy-element"===t.id,y="gleap-tour-dummy-element"===g.id,b=n("animate"),x=e.onHighlightStarted||n("onHighlightStarted"),S=(null==e?void 0:e.onHighlighted)||n("onHighlighted"),C=(null==h?void 0:h.onDeselected)||n("onDeselected"),I=n(),E=l(),!m&&C&&C(y?void 0:g,h,{config:I,state:E}),x&&x(v?void 0:t,e,{config:I,state:E}),O=!m&&b,T=!1,w(),a.previousStep=h,a.previousElement=g,a.activeStep=e,a.activeElement=t,A=L=function o(){if(l("__transitionCallback")===o){var i,c,f,m,y=Date.now()-u,b=400-y<=200;e.popover&&b&&!T&&O&&(k(t,e),T=!0),n("animate")&&y<400?(c=(i=l("__activeStagePosition"))||g.getBoundingClientRect(),f=t.getBoundingClientRect(),p(i={x:r(y,c.x,f.x-c.x,400),y:r(y,c.y,f.y-c.y,400),width:r(y,c.width,f.width-c.width,400),height:r(y,c.height,f.height-c.height,400)}),m=i,a.__activeStagePosition=m):(d(t),S&&S(v?void 0:t,e,{config:n(),state:l()}),a.__transitionCallback=void 0,a.__previousStep=h,a.__previousElement=g,a.__activeStep=e,a.__activeElement=t),window.requestAnimationFrame(o)}},a.__transitionCallback=A,window.requestAnimationFrame(L),i(t),!O&&e.popover&&k(t,e),g.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),g.removeAttribute("aria-haspopup"),g.removeAttribute("aria-expanded"),g.removeAttribute("aria-controls"),null!=(o=null!=(c=e.disableActiveInteraction)?c:n("disableActiveInteraction"))&&o&&t.classList.add("gleap-tour-no-interaction"),t.classList.add("gleap-tour-active-element"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-controls","gleap-tour-popover-content")}}function g(){var e=l("__activeElement"),t=l("__activeStep");if(e&&t){if(!document.body.contains(e)&&t.element&&"string"==typeof t.element)try{var n,r,o=document.querySelector(t.element);if(!o){var i=t.element.replace(/(#[^#\s]+)/g,function(e){return e.replace(/:/g,"\\:")});o=document.querySelector(i)}o&&(e=o,n=o,a.__activeElement=n,r=o,a.activeElement=r,o.classList.add("gleap-tour-active-element"))}catch(e){}d(e),function(){var e=l("__activeStagePosition"),t=l("__overlaySvg");if(e)if(t){var n=window.innerWidth,r=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(r))}else console.warn("No stage svg found.")}(),I(e,t)}}function m(){var e,t=l("__resizeTimeout");t&&window.cancelAnimationFrame(t),e=window.requestAnimationFrame(g),a.__resizeTimeout=e}function v(e){var t;if(l("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=l("__activeElement"),r=null==(t=l("popover"))?void 0:t.wrapper,i=o([].concat(cU(r?[r]:[]),cU(n?[n]:[]))),a=i[0],c=i[i.length-1];if(e.preventDefault(),e.shiftKey){var u=i[i.indexOf(document.activeElement)-1]||c;null==u||u.focus()}else{var d=i[i.indexOf(document.activeElement)+1]||a;null==d||d.focus()}}}function y(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?u("escapePress"):"ArrowRight"===e.key?u("arrowRightPress"):"ArrowLeft"===e.key&&u("arrowLeftPress"))}function b(e,t,n){var r=function(t,r){var o=t.target;e.contains(o)&&(n&&!n(o)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==r||r(t))};document.addEventListener("pointerdown",r,!0),document.addEventListener("mousedown",r,!0),document.addEventListener("pointerup",r,!0),document.addEventListener("mouseup",r,!0),document.addEventListener("click",function(e){r(e,t)},!0)}function w(){var e=l("popover");e&&(e.wrapper.style.display="none")}function k(e,t){var r,c,d,p,h,f,g,m,v,y,w,k,x,S=l("popover");
1S&&document.body.removeChild(S.wrapper),(r=document.createElement("div")).classList.add("gleap-tour-popover"),(c=document.createElement("div")).classList.add("gleap-tour-popover-arrow"),(d=document.createElement("div")).id="gleap-tour-popover-title",d.classList.add("gleap-tour-popover-title"),d.style.display="none",d.innerText="Popover Title",(p=document.createElement("div")).id="gleap-tour-popover-description",p.classList.add("gleap-tour-popover-description"),p.style.display="none",p.innerText="Popover description is here",(h=document.createElement("button")).type="button",h.classList.add("gleap-tour-popover-close-btn"),h.setAttribute("aria-label","Close"),h.innerHTML="&times;",(f=document.createElement("div")).classList.add("gleap-tour-popover-footer"),(g=document.createElement("span")).classList.add("gleap-tour-popover-progress-text"),g.innerText="",(m=document.createElement("span")).classList.add("gleap-tour-popover-navigation-btns"),(v=document.createElement("button")).type="button",v.classList.add("gleap-tour-popover-prev-btn"),v.innerHTML="&larr; Previous",(y=document.createElement("button")).type="button",y.classList.add("gleap-tour-popover-next-btn"),y.innerHTML="Next &rarr;",m.appendChild(v),m.appendChild(y),f.appendChild(g),f.appendChild(m),r.appendChild(h),r.appendChild(c),r.appendChild(d),r.appendChild(p),r.appendChild(f),S={wrapper:r,arrow:c,title:d,description:p,footer:f,previousButton:v,nextButton:y,closeButton:h,footerButtons:m,progress:g},document.body.appendChild(S.wrapper);var C=t.popover||{},E=C.title,O=C.description,T=C.showButtons,L=C.disableButtons,A=C.showProgress,M=C.nextBtnText,P=void 0===M?n("nextBtnText")||"Next":M,R=C.prevBtnText,_=void 0===R?n("prevBtnText")||"Previous":R,D=C.progressText,j=void 0===D?n("progressText")||"{current} of {total}":D;S.nextButton.innerHTML=P,S.previousButton.innerHTML=_,S.progress.innerHTML=j,E?(S.title.innerHTML=E,S.title.style.display="block"):S.title.style.display="none",O?(S.description.innerHTML=O,S.description.style.display="block"):S.description.style.display="none";var N=T||n("showButtons"),F=A||n("showProgress")||!1,B=(null==N?void 0:N.includes("next"))||(null==N?void 0:N.includes("previous"))||F;S.closeButton.style.display=N.includes("close")?"block":"none",B?(S.footer.style.display="flex",S.progress.style.display=F?"block":"none",S.nextButton.style.display=N.includes("next")?"block":"none",S.previousButton.style.display=N.includes("previous")?"block":"none"):S.footer.style.display="none";var U=L||n("disableButtons")||[];(null==U?void 0:U.includes("next"))&&(S.nextButton.disabled=!0,S.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==U?void 0:U.includes("previous"))&&(S.previousButton.disabled=!0,S.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==U?void 0:U.includes("close"))&&(S.closeButton.disabled=!0,S.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var H=S.wrapper;H.style.display="block",H.style.left="",H.style.top="",H.style.bottom="",H.style.right="",H.id="gleap-tour-popover-content",H.setAttribute("role","dialog"),H.setAttribute("aria-labelledby","gleap-tour-popover-title"),H.setAttribute("aria-describedby","gleap-tour-popover-description"),S.arrow.className="gleap-tour-popover-arrow";var z=(null==(k=t.popover)?void 0:k.popoverClass)||n("popoverClass")||"";H.className="gleap-tour-popover ".concat(z).trim(),b(S.wrapper,function(r){var o,i,a,c=r.target,d=(null==(o=t.popover)?void 0:o.onNextClick)||n("onNextClick"),p=(null==(i=t.popover)?void 0:i.onPrevClick)||n("onPrevClick"),h=(null==(a=t.popover)?void 0:a.onCloseClick)||n("onCloseClick");return c.classList.contains("gleap-tour-popover-next-btn")?d?d(e,t,{config:n(),state:l()}):u("nextClick"):c.classList.contains("gleap-tour-popover-prev-btn")?p?p(e,t,{config:n(),state:l()}):u("prevClick"):c.classList.contains("gleap-tour-popover-close-btn")?h?h(e,t,{config:n(),state:l()}):u("closeClick"):void 0},function(e){return!(null==S?void 0:S.description.contains(e))&&!(null==S?void 0:S.title.contains(e))&&"string"==typeof e.className&&e.className.includes("gleap-tour-popover")}),w=S,a.popover=w;
1var q=(null==(x=t.popover)?void 0:x.onPopoverRender)||n("onPopoverRender");q&&q(S,{config:n(),state:l()}),I(e,t),i(H);var W=o([H].concat(cU(e.classList.contains("gleap-tour-dummy-element")?[]:[e])));W.length>0&&W[0].focus()}function x(){var e=l("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),r=n("stagePadding")||0,o=n("popoverOffset")||0;return{width:t.width+r+o,height:t.height+r+o,realWidth:t.width,realHeight:t.height}}}function S(e,t){var n=t.elementDimensions,r=t.popoverDimensions,o=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-o,window.innerHeight-r.realHeight-i.width),i.width):"end"===e?Math.max(Math.min(n.top-(null==r?void 0:r.realHeight)+n.height+o,window.innerHeight-(null==r?void 0:r.realHeight)-i.width),i.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==r?void 0:r.realHeight)/2,window.innerHeight-(null==r?void 0:r.realHeight)-i.width),i.width):0}function C(e,t){var n=t.elementDimensions,r=t.popoverDimensions,o=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-o,window.innerWidth-r.realWidth-i.width),i.width):"end"===e?Math.max(Math.min(n.left-(null==r?void 0:r.realWidth)+n.width+o,window.innerWidth-(null==r?void 0:r.realWidth)-i.width),i.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==r?void 0:r.realWidth)/2,window.innerWidth-(null==r?void 0:r.realWidth)-i.width),i.width):0}function I(e,t){var r=l("popover");if(r){var o=(null==t?void 0:t.popover)||{},i=o.align,a=o.side,c=void 0===i?"start":i,u="gleap-tour-dummy-element"===e.id?"over":void 0===a?"left":a,d=n("stagePadding")||0,p=x(),h=r.arrow.getBoundingClientRect(),f=e.getBoundingClientRect(),g=f.top-p.height,m=g>=0,v=window.innerHeight-(f.bottom+p.height),y=v>=0,b=f.left-p.width,w=b>=0,k=window.innerWidth-(f.right+p.width),I=k>=0,E=!(m||y||w||I),O=u;if("top"===u&&m?I=w=y=!1:"bottom"===u&&y?I=w=m=!1:"left"===u&&w?I=m=y=!1:"right"===u&&I&&(w=m=y=!1),"over"===u){var T=window.innerWidth/2-p.realWidth/2,L=window.innerHeight/2-p.realHeight/2;r.wrapper.style.left="".concat(T,"px"),r.wrapper.style.right="auto",r.wrapper.style.top="".concat(L,"px"),r.wrapper.style.bottom="auto"}else if(E){var A=window.innerWidth/2-(null==p?void 0:p.realWidth)/2;r.wrapper.style.left="".concat(A,"px"),r.wrapper.style.right="auto",r.wrapper.style.bottom="".concat(10,"px"),r.wrapper.style.top="auto"}else if(w){var M=Math.min(b,window.innerWidth-(null==p?void 0:p.realWidth)-h.width),P=S(c,{elementDimensions:f,popoverDimensions:p,popoverPadding:d,popoverArrowDimensions:h});r.wrapper.style.left="".concat(M,"px"),r.wrapper.style.top="".concat(P,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.right="auto",O="left"}else if(I){var R=Math.min(k,window.innerWidth-(null==p?void 0:p.realWidth)-h.width),_=S(c,{elementDimensions:f,popoverDimensions:p,popoverPadding:d,popoverArrowDimensions:h});r.wrapper.style.right="".concat(R,"px"),r.wrapper.style.top="".concat(_,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.left="auto",O="right"}else if(m){var D=Math.min(g,window.innerHeight-p.realHeight-h.width),j=C(c,{elementDimensions:f,popoverDimensions:p,popoverPadding:d,popoverArrowDimensions:h});r.wrapper.style.top="".concat(D,"px"),r.wrapper.style.left="".concat(j,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.right="auto",O="top"}else if(y){var N=Math.min(v,window.innerHeight-(null==p?void 0:p.realHeight)-h.width),F=C(c,{elementDimensions:f,popoverDimensions:p,popoverPadding:d,popoverArrowDimensions:h});r.wrapper.style.left="".concat(F,"px"),r.wrapper.style.bottom="".concat(N,"px"),r.wrapper.style.top="auto",r.wrapper.style.right="auto",O="bottom"}E?r.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var r=l("popover");if(r){var o=n.getBoundingClientRect(),i=x(),a=r.arrow,c=i.width,u=window.innerWidth,d=o.width,p=o.left,h=i.height,f=window.innerHeight,g=o.top,m=o.height;a.className="gleap-tour-popover-arrow";var v=t,y=e;"top"===t?(p+d<=0?(v="right",y="end"):p+d-c<=0&&(v="top",y="start"),p>=u?(v="left",y="end"):p+c>=u&&(v="top",y="end")):"bottom"===t?(p+d<=0?(v="right",y="start"):p+d-c<=0&&(v="bottom",y="start"),p>=u?(v="left",y="start"):p+c>=u&&(v="bottom",y="end")):"left"===t?(g+m<=0?(v="bottom",y="end"):g+m-h<=0&&(v="left",y="start"),g>=f?(v="top",y="end"):g+h>=f&&(v="left",y="end")):"right"===t&&(g+m<=0?(v="bottom",y="start"):g+m-h<=0&&(v="right",y="start"),g>=f?(v="top",y="start"):g+h>=f&&(v="right",y="end")),v?(a.classList.add("gleap-tour-popover-arrow-side-".concat(v)),a.classList.add("gleap-tour-popover-arrow-align-".concat(y))):a.classList.add("gleap-tour-popover-arrow-none")}}(c,O,e)}}return function(){function e(){n("allowClose")&&h()}function r(){var e=l("activeIndex"),t=n("steps")||[];if(void 0!==e){var r=e+1;t[r]?p(r):h()}}function o(){var e=l("activeIndex"),t=n("steps")||[];if(void 0!==e){var r=e-1;t[r]?p(r):h()}}function i(){var e;if(!l("__transitionCallback")){var t=l("activeIndex"),r=l("__activeStep"),i=l("__activeElement");
1if("CLICK"!==r.mode&&void 0!==t&&void 0!==r&&void 0!==l("activeIndex")){var a=(null==(e=r.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(a)return a(i,r,{config:n(),state:l()});o()}}}function u(){var e;if(!l("__transitionCallback")){var t=l("activeIndex"),o=l("__activeStep"),i=l("__activeElement");if("CLICK"!==o.mode&&void 0!==t&&void 0!==o){var a=(null==(e=o.popover)?void 0:e.onNextClick)||n("onNextClick");if(a)return a(i,o,{config:n(),state:l()});r()}}}function d(){var t;l("isInitialized")||(a.isInitialized=!0,document.body.classList.add("gleap-tour-active",n("animate")?"gleap-tour-fade":"gleap-tour-simple"),window.addEventListener("keyup",y,!1),window.addEventListener("keydown",v,!1),window.addEventListener("resize",m),window.addEventListener("scroll",m),t=setInterval(function(){l("isInitialized")&&m()},1e3),a.__positionInterval=t,c.overlayClick=e,c.escapePress=e,c.arrowLeftPress=i,c.arrowRightPress=u)}function p(){var e,t,r,o,i,l,c,u,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,g=n("steps");if(!g)return console.error("No steps to drive through"),void h();if(g[d]){m=document.activeElement,a.__activeOnDestroyed=m,a.activeIndex=d;var m,v=g[d],y=g[d+1],b=g[d-1],w=(null==(e=v.popover)?void 0:e.doneBtnText)||n("doneBtnText")||"Done",k=n("allowClose"),x=void 0!==(null==(t=v.popover)?void 0:t.showProgress)?null==(r=v.popover)?void 0:r.showProgress:n("showProgress"),S=((null==(o=v.popover)?void 0:o.progressText)||n("progressText")||"{{current}} of {{total}}").replace("{{current}}","".concat(d+1)).replace("{{total}}","".concat(g.length)),C=(null==(i=v.popover)?void 0:i.showButtons)||n("showButtons"),I=["next","previous"].concat(cU(k?["close"]:[])).filter(function(e){return!(null==C?void 0:C.length)||C.includes(e)}),E=(null==(l=v.popover)?void 0:l.onNextClick)||n("onNextClick"),O=(null==(c=v.popover)?void 0:c.onPrevClick)||n("onPrevClick"),T=(null==(u=v.popover)?void 0:u.onCloseClick)||n("onCloseClick");f(cq(cq({},v),{},{popover:cq({showButtons:I,nextBtnText:y?void 0:w,disableButtons:cU(b?[]:["previous"]),showProgress:x,progressText:S,onNextClick:E||function(){y?p(d+1):h()},onPrevClick:O||function(){p(d-1)},onCloseClick:T||function(){h()}},(null==v?void 0:v.popover)||{})}))}else h()}function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=l("__activeElement"),r=l("__activeStep"),o=l("__activeOnDestroyed"),i=n("onDestroyStarted");if(e&&i)i(t&&"gleap-tour-dummy-element"!==(null==t?void 0:t.id)?t:void 0,r,{config:n(),state:l()});else{var u,d,p,h,f,g=(null==r?void 0:r.onDeselected)||n("onDeselected"),v=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),window.removeEventListener("keyup",y),window.removeEventListener("resize",m),window.removeEventListener("scroll",m),(u=l("__positionInterval"))&&clearInterval(u),(p=l("popover"))&&(null==(d=p.wrapper.parentElement)||d.removeChild(p.wrapper)),null==(h=document.getElementById("gleap-tour-dummy-element"))||h.remove(),document.querySelectorAll(".gleap-tour-active-element").forEach(function(e){e.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}),(f=l("__overlaySvg"))&&f.remove(),c={},a={},t&&r){var b="gleap-tour-dummy-element"===t.id;g&&g(b?void 0:t,r,{config:n(),state:l()}),v&&v(b?void 0:t,r,{config:n(),state:l()})}o&&o.focus()}}return t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{isActive:function(){return l("isInitialized")||!1},refresh:m,drive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;d(),p(e)},setConfig:t,setSteps:function(e){a={},t(cq(cq({},n()),{},{steps:e}))},getConfig:n,getState:l,getActiveIndex:function(){return l("activeIndex")},isFirstStep:function(){return 0===l("activeIndex")},isLastStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&t===e.length-1},getActiveStep:function(){return l("activeStep")},getActiveElement:function(){return l("activeElement")},getPreviousElement:function(){return l("previousElement")},getPreviousStep:function(){return l("previousStep")},moveNext:r,movePrevious:o,moveTo:function(e){(n("steps")||[])[e]?p(e):h()},hasNextStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&e[t+1]},hasPreviousStep:function(){var e=n("steps")||[],t=l("activeIndex");return void 0!==t&&e[t-1]},highlight:function(e){d(),f(cq(cq({},e),{},{popover:e.popover?cq({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){h(!1)}}}}();function cG(e){return(cG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cV(){cV=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(t,n,r,i){var a,l,c,u,d=Object.create((n&&n.prototype instanceof v?n:v).prototype);return o(d,"_invoke",{value:(a=t,l=r,c=new T(i||[]),u=h,function(t,n){if(u===f)throw Error("Generator is already running");if(u===g){if("throw"===t)throw n;return{value:e,done:!0}}for(c.method=t,c.arg=n;;){var r=c.delegate;if(r){var o=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&
vendor: 5,139 bytes, line 1
1(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),m;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var l=a.arg;return l?l.done?(r[n.resultName]=l.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):l:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(r,c);if(o){if(o===m)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=g,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=f;var i=p(a,l,c);if("normal"===i.type){if(u=c.done?g:"suspendedYield",i.arg===m)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(u=g,c.method="throw",c.arg=i.arg)}})}),d}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};u(w,a,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,l){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==cG(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,l)})}l(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw TypeError(cG(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),u(I.prototype,l,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),u(S,c,"Generator"),u(S,a,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];
1if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function cJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cK(r.key),r)}}function cY(e,t,n){return(t=cK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cK(e){var t=function(e,t){if("object"!=cG(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cG(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==cG(t)?t:String(t)}function cX(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}var cZ="gleap-tour-data",c$="copilot-pointer-container",cQ="copilot-tour-styles",c0="copilot-joined-container";function c1(){var e;return e=cV().mark(function e(){var t;return cV().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("u">typeof window){e.next=2;break}return e.abrupt("return");case 2:return t=new Audio("data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAABCxAgAEABAAZGF0YQAAAAA="),e.prev=3,e.next=6,t.play();case 6:return e.abrupt("return",!0);case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("return",!1);case 12:case"end":return e.stop()}},e,null,[[3,9]])}),(c1=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){cX(i,r,o,a,l,"next",e)}function l(e){cX(i,r,o,a,l,"throw",e)}a(void 0)})}).apply(this,arguments)}var c2=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),cY(this,"productTourData",void 0),cY(this,"productTourId",void 0),cY(this,"currentActiveIndex",void 0),cY(this,"lastArrowPositionX",void 0),cY(this,"lastArrowPositionY",void 0),cY(this,"onCompleteCallback",void 0),cY(this,"audioMuted",!1),cY(this,"currentAudio",void 0),cY(this,"_pointerContainer",null),cY(this,"_scrollListeners",[]),cY(this,"_currentAnchor",null),cY(this,"_currentStep",null),cY(this,"_scrollDebounceTimer",null);var e=this;"u">typeof window&&(this._scrollListeners=[],this._currentAnchor=null,this._currentStep=null,this._scrollDebounceTimer=null,window.addEventListener("resize",function(){if(e.productTourId&&e.currentActiveIndex>=0&&e.productTourData&&e.productTourData.steps){var t=e.productTourData.steps[e.currentActiveIndex];t&&t.selector&&""!==t.selector&&e.updatePointerPosition(document.querySelector(t.selector),t)}}))}return e=[{key:"disable",value:function(){this.disabled=!0,this.cleanup()}},{key:"startWithConfig",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;"u">typeof window&&(this.productTourId||this.disabled||(this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,this.onCompleteCallback=n,this.start()))}},{key:"storeUncompletedTour",value:function(){if("u">typeof window)if(this.productTourId&&this.productTourData)try{var e=JSON.parse(JSON.stringify({tourData:this.productTourData,tourId:this.productTourId}));e.tourData.steps=e.tourData.steps.slice(this.currentActiveIndex||0,e.tourData.steps.length),localStorage.setItem(cZ,JSON.stringify(e))}catch(e){}else localStorage.removeItem(cZ)}},{key:"attachScrollListeners",value:function(e,t){var n=this;if("u">typeof window&&e){var r=function(e){if("u">typeof window){for(var t=[],n=e.parentElement;n;){var r=window.getComputedStyle(n);("auto"===r.overflowY||"scroll"===r.overflowY)&&n.scrollHeight>n.clientHeight&&t.push(n),n=n.parentElement}return t}}(e);r.push(window),r.forEach(function(r){var o=function(){clearTimeout(n._scrollDebounceTimer),n._scrollDebounceTimer=setTimeout(function(){n.updatePointerPosition(e,t)},150)};r.addEventListener("scroll",o,{passive:!0}),n._scrollListeners.push({el:r,handler:o})})}}},{key:"removeScrollListeners",value:function(){"u">typeof window&&(this._scrollListeners&&this._scrollListeners.length>
10&&(this._scrollListeners.forEach(function(e){var t=e.el,n=e.handler;t.removeEventListener("scroll",n)}),this._scrollListeners=[]),this._scrollDebounceTimer&&(clearTimeout(this._scrollDebounceTimer),this._scrollDebounceTimer=null))}},{key:"updatePointerPosition",value:function(e,t){var n=this;if("u">typeof window)try{var r=this._pointerContainer||document.getElementById(c$);if(!r)return;if(!e)return r.style.position="fixed",r.style.left="50%",r.style.top="50%",r.style.transform="translate(-50%, -50%)",function(e){if("u">typeof window){var t=e-window.innerHeight/2;window.scrollTo({top:t,behavior:"smooth"})}}(window.innerHeight/2),this.removeScrollListeners(),this._currentAnchor=null,void(this._currentStep=null);"u">typeof window&&e&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});var o=0;!function i(){if(function(e){if("u">typeof window){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}}(e)||o>=20){var a=e.getBoundingClientRect(),l=a.left+a.width/2,c=a.top+a.height/2+10;r.style.position="fixed",r.style.left="".concat(l,"px"),r.style.top="".concat(c,"px"),r.style.transform="translate(-50%, -50%)";var u=350;350>window.innerWidth-40&&(u=window.innerWidth-40),l+u>window.innerWidth-20?r.classList.add("copilot-pointer-container-right"):r.classList.remove("copilot-pointer-container-right"),n._currentAnchor===e&&n._currentStep===t||(n.removeScrollListeners(),n._currentAnchor=e,n._currentStep=t,n.attachScrollListeners(e,t))}else o++,setTimeout(i,100)}()}catch(e){}}},{key:"cleanup",value:function(){var e=this;"u">typeof window&&(document.body.classList.add("gl-copilot-fade-out"),this.currentAudio&&this.currentAudio.pause(),setTimeout(function(){if(e._pointerContainer)e._pointerContainer.remove(),e._pointerContainer=null;else{var t=document.getElementById(c$);t&&t.remove()}var n=document.getElementById(c0);n&&n.remove();var r=document.getElementById(cQ);r&&r.remove(),document.body.classList.remove("gl-copilot-fade-out")},800),this.productTourId=void 0,this.productTourData=void 0,this.removeScrollListeners())}},{key:"toggleAudio",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.audioMuted=e,this.currentAudio&&(this.currentAudio.muted=this.audioMuted),document.querySelector(".".concat(c0,"-mute")).innerHTML=L(this.audioMuted?"unmute":"mute")}},{key:"setupCopilotTour",value:function(){var e,t,n,r,o,i,a=this;if("u">typeof window){var l,c,u=null!=(e=null==(t=tW.getInstance().flowConfig)?void 0:t.color)?e:"#485BFF",d=T(u),p=document.getElementById(cQ);p||((p=document.createElement("style")).id=cQ,p.type="text/css",p.textContent="\n        #".concat(c$," {\n          position: absolute;\n          top: 0;\n          left: 0;\n          display: flex;\n          align-items: flex-start;\n          pointer-events: none;\n          z-index: 2147483610;\n          transition: all 0.5s ease;\n        }\n        .").concat(c$,"-clickmode {\n          cursor: pointer;\n          pointer-events: all !important;\n        }\n        .").concat(c$,"-clickmode #copilot-info-bubble-content {\n          display: flex !important;\n        }\n        .").concat(c$,"-clickmode svg {\n          display: none !important;\n        }\n        #").concat(c$," svg {\n          width: 20px;\n          height: auto;\n          fill: none;\n        }\n        #copilot-info-bubble {\n          position: relative;\n        }\n        #copilot-info-bubble-content-container {\n          position: absolute;\n          top: 0px;\n          left: 0px;\n          min-width: min(300px, 80vw);\n          display: flex;\n          flex-direction: column;\n          align-items: flex-start;\n        }\n        .").concat(c$,"-right #copilot-info-bubble-content-container {\n          left: auto !important;\n          right: 0px !important;\n          align-items: flex-end;\n        }\n        .").concat(c$,"-right .copilot-info-bubble-content {\n          margin-right: 5px;\n        }\n        .").concat(c$,"-right svg {\n          transform: scaleX(-1);\n        }\n        #copilot-info-bubble-content svg {\n          width: 16px;\n          height: 16px;\n          display: inline-block !important;\n          margin-left: 5px;\n        }\n        #copilot-info-bubble-content {\n          margin-top: 18px;\n          margin-left: 5px;\n          padding: 10px 15px;\n          border-radius: 20px;\n          background-color: black;\n          color: white;\n          font-family: Arial, sans-serif;\n          font-size: 14px;\n          box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n          max-width: 100%;\n          white-space: normal;\n          overflow-wrap: break-word;\n          word-break: normal;\n          hyphens: none;\n        }\n        .").concat(c$,"-right #copilot-info-bubble-content {\n          margin-top: 30px;\n          margin-left: 0px;\n          margin-right: 5px;\n        }\n        .click-wave {\n          position: absolute;\n          width: 34px;\n          height: 34px;\n          border-radius: 50%;\n          background-color: rgba(0, 0, 0, 0.5);\n          pointer-events: none;\n          z-index: 2147483611;\n          animation: click-wave-animation 0.8s ease forwards;\n        }\n        @keyframes click-wave-animation {\n          0% {\n            transform: scale(0.2);\n            opacity: 1;\n          }\n          100% {\n            transform: scale(2);\n            opacity: 0;\n          }\n        }\n        @keyframes slideInFromTop {\n          0% {\n            transform: translateY(-100%);\n            opacity: 0;\n          }\n          100% {\n            transform: translateY(0);\n            opacity: 1;\n          }\n        }\n        .").concat(c0," {\n          position: fixed;\n          top: 20px;\n          right: 20px;\n          z-index: 2147483610;\n          background: #fff;\n          padding: 6px;\n          border-radius: 10px;\n          box-shadow: 0 0 20px 0 #C294F2;\n          display: flex;\n          align-items: center;\n          gap: 8px;\n          border: 1px solid rgba(192, 146, 242, 0.5);\n          animation: slideInFromTop 0.5s ease-out forwards;\n        }\n        .").concat(c0," span {\n          font-size: 13px;\n          color: #000;\n          font-family: sans-serif;\n        }\n        .").concat(c0,"-avatar {\n          width: 24px;\n          height: 24px;\n          flex-shrink: 0;\n          border-radius: 6px;\n        }\n        .").concat(c0,"-mute {\n          display: flex;\n          align-items: center;\n          justify-content: center;\n        }
1\n        .").concat(c0,"-mute svg {\n          width: 20px;\n          height: auto;\n          cursor: pointer;\n          animation: pulsate 2s infinite;\n        }\n        .").concat(c0,"-mute svg:hover {\n          opacity: 0.8;\n        }\n        .").concat(c0,"-dismiss {\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          padding-right: 3px;\n        }\n        .").concat(c0,"-dismiss svg {\n          width: 15px;\n          height: auto;\n          cursor: pointer;\n        }\n        .").concat(c0,"-dismiss svg:hover {\n          opacity: 0.8;\n        }\n        @keyframes pulsate {\n          0% {\n            transform: scale(1);\n            opacity: 1;\n          }\n          50% {\n            transform: scale(1.1);\n            opacity: 0.8;\n          }\n          100% {\n            transform: scale(1);\n            opacity: 1;\n          }\n        }\n        @keyframes glCoFadeIn {\n          0% {\n            opacity: 0;\n          }\n          100% {\n            opacity: 1;\n          }\n        }\n        @keyframes glCoFadeOut {\n          0% {\n            opacity: 1;\n          }\n          100% {\n            opacity: 0;\n          }\n        }\n\n        .gleap-audio-unmute-modal-overlay {\n          position: fixed;\n          top: 0;\n          left: 0;\n          width: 100vw;\n          height: 100vh;\n          background-color: rgba(0, 0, 0, 0.5);\n          display: flex;\n          justify-content: center;\n          align-items: center;\n          z-index: 2147483620;\n        }\n\n        .gleap-audio-unmute-modal {\n          background-color: #fff;\n          padding: 20px;\n          border-radius: 8px;\n          box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n          text-align: center;\n          max-width: 90%;\n          width: 400px;\n        }\n\n        .gleap-audio-unmute-modal p {\n          margin-bottom: 20px;\n          font-size: 16px;\n          line-height: 22px;\n          font-weight: normal;\n        }\n\n        .gleap-audio-unmute-button {\n          background: ").concat(u,";\n          color: ").concat(d,";\n          outline: none;\n          border: none;\n          padding: 10px 14px;\n          border-radius: 12px;\n          font-size: 14px;\n          font-weight: bold;\n          cursor: pointer;\n        }\n\n        .gleap-audio-unmute-button:hover {\n          opacity: 0.8;\n        }\n\n        .gleap-tour-continue-button {\n          color: ").concat(u,";\n          text-decoration: none;\n          cursor: pointer;\n          font-size: 14px;\n          font-weight: bold;\n          border: none;\n          background: none;\n          padding: 0;\n          margin: 0;\n          margin-left: 20px;\n        }\n\n        .gleap-tour-continue-button:hover {\n          opacity: 0.8;\n        }\n\n        body.gl-copilot-fade-out::before,\n        body.gl-copilot-fade-out::after,\n        body.gl-copilot-fade-out #").concat(c0," {\n          animation: glCoFadeOut 0.8s ease-out forwards;\n        }\n        ").concat(null==(l=null==(c=this.productTourData)?void 0:c.playVoice)||l?"":"\n          .".concat(c0,"-mute {\n            display: none;\n          }\n        "),"\n        ").concat(this.productTourData.gradient?'body::before {\n          content: "";\n          position: fixed;\n          top: 0;\n          left: 0;\n          width: 100vw;\n          height: 100vh;\n          pointer-events: all;\n          z-index: 2147483609;\n          box-sizing: border-box;\n          border: 18px solid transparent;\n          filter: blur(25px);\n          border-image-slice: 1;\n          border-image-source: linear-gradient(45deg, #ED5587, #FBE6A9, #a6e3f8, #C294F2);\n          animation: glCoFadeIn 1.5s ease-out forwards;\n        }\n  \n        body::after {\n          content: "";\n          position: fixed;\n          top: 0;\n          left: 0;\n          width: 100vw;\n          height: 100vh;\n          pointer-events: all;\n          z-index: 2147483609;\n          opacity: 0.5;\n          box-sizing: border-box;\n          border: 3px solid transparent;\n          border-image-slice: 1;\n          border-image-source: linear-gradient(45deg, #ED5587, #FBE6A9, #a6e3f8, #C294F2);\n          animation: glCoFadeIn 1.5s ease-out forwards;\n        }':'body::after {\n          content: "";\n          position: fixed;\n          top: 0;\n          left: 0;\n          width: 100vw;\n          height: 100vh;\n          pointer-events: all;\n          z-index: 2147483609;\n          opacity: 0;\n        }',"\n      "),document.head.appendChild(p));var h=document.createElement("div");h.id=c$,h.style.opacity=0,this._pointerContainer=h;var f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("viewBox","0 0 380 476"),f.innerHTML='<path d="M352.595 268.315L352.581 268.302L352.566 268.29L78.6092 24.7278C71.6245 18.433 62.5487 15 53.2 15C32.1157 15 15 32.1157 15 53.2V424C15 444.34 31.4714 461 52 461C62.6797 461 72.8089 456.467 79.8863 448.38C79.8871 448.379 79.8879 448.378 79.8886 448.378L180.804 333.1H327.9C348.384 333.1 365 316.484 365 296C365 285.404 360.46 275.344 352.595 268.315Z" fill="black" stroke="white" stroke-width="30"/>';var g=document.createElement("div");g.id="copilot-info-bubble",g.innerHTML="<div id='copilot-info-bubble-content-container'><div id='copilot-info-bubble-content'></div></div>";var m=document.createElement("div");m.id=c0,m.classList.add(c0),m.innerHTML='\n      <img class="'.concat(c0,'-avatar" src="').concat(null==(n=this.productTourData)?void 0:n.kaiAvatar,'" />
1\n      <span>').concat(null==(r=this.productTourData)?void 0:r.kaiSlug,'</span>\n      <div class="').concat(c0,'-mute">\n        ').concat(L(this.audioMuted?"unmute":"mute"),"\n      </div>\n      ").concat(null!=(o=this.productTourData)&&o.allowClose?'<div class="'.concat(c0,'-dismiss">\n               ').concat(L("dismiss"),"\n             </div>"):"","\n    "),document.body.appendChild(m),document.querySelector(".".concat(c0,"-mute")).addEventListener("click",function(){a.toggleAudio(!a.audioMuted)}),null!=(i=this.productTourData)&&i.allowClose&&document.querySelector(".".concat(c0,"-dismiss")).addEventListener("click",function(){a.completeTour(!1)}),h.appendChild(f),h.appendChild(g),document.body.appendChild(h)}}},{key:"start",value:function(){var e=this;if("u">typeof window&&!this.disabled){var t=this.productTourData;t&&(function(){return c1.apply(this,arguments)})().then(function(n){e.audioMuted=!n,e.setupCopilotTour(),e.audioMuted&&null!=t&&t.showUnmuteModal?e.showAudioUnmuteModal():setTimeout(function(){e.renderNextStep()},1500)})}}},{key:"showAudioUnmuteModal",value:function(){var e,t,n,r=this,o=document.createElement("div");o.classList.add("gleap-audio-unmute-modal-overlay");var i=document.createElement("div");i.classList.add("gleap-audio-unmute-modal");var a=document.createElement("p");a.textContent=null==(e=this.productTourData)?void 0:e.unmuteModalTitle,i.appendChild(a);var l=document.createElement("button");l.classList.add("gleap-audio-unmute-button"),l.textContent=null==(t=this.productTourData)?void 0:t.unmuteModalButton,l.addEventListener("click",function(){r.toggleAudio(!1),o.parentNode&&o.parentNode.removeChild(o),setTimeout(function(){r.renderNextStep()},1e3)}),i.appendChild(l);var c=document.createElement("button");c.classList.add("gleap-tour-continue-button"),c.textContent=null==(n=this.productTourData)?void 0:n.unmuteModalContinue,c.addEventListener("click",function(){o.parentNode&&o.parentNode.removeChild(o),setTimeout(function(){r.renderNextStep()},1e3)}),i.appendChild(c),o.appendChild(i),document.body.appendChild(o)}},{key:"completeTour",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];"u">typeof window&&(this.cleanup(),this.onCompleteCallback&&this.onCompleteCallback(e))}},{key:"renderNextStep",value:function(){var e=this;if("u">typeof window&&!this.disabled){var t=this,n=this.productTourData.steps;if(this.currentActiveIndex>=n.length)setTimeout(function(){e.completeTour()},500);else{var r=n[this.currentActiveIndex],o=function(n){if(e._pointerContainer.style.display="flex",r.selector&&r.selector.length>0&&!n)e.completeTour(!1);else{var o=function(){if("INPUT"===r.mode&&n){var e,o=function(){document.querySelector("#".concat(c$)).classList.remove("copilot-pointer-container-clickmode"),n.classList.remove("gleap-input-highlight"),document.getElementById(c$).style.display="none",t.currentActiveIndex++,t.storeUncompletedTour(),t.renderNextStep()};if("default"===(null!=(e=r.inputType)?e:"default")){var i=function e(t){var r;if(0!==(null==t||null==(r=t.target)||null==(r=r.value)?void 0:r.length)){var i=document.getElementById("copilot-info-bubble-content");i&&(i.innerHTML="".concat(lT.translateText("next"),' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\n  <path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>\n</svg>'),i.addEventListener("click",o,{once:!0}),n.classList.add("gleap-input-highlight"),document.querySelector("#".concat(c$)).classList.add("copilot-pointer-container-clickmode"),n.removeEventListener("input",e))}};n.addEventListener("input",i,{once:!1}),n.hasAttribute("contenteditable")&&n.addEventListener("keyup",i,{once:!1}),n.addEventListener("blur",function(){n.focus()},{once:!0}),n.focus()}else{var a,l=null!=(a=r.inputValue)?a:"",c=0;!function e(){c<l.length?(n.value+=l[c],c++,setTimeout(e,100)):setTimeout(function(){o()},1200)}()}}else{if(t.currentActiveIndex++,t.storeUncompletedTour(),"CLICK"===r.mode&&n){var u=n.getBoundingClientRect(),d=window.scrollX||0,p=window.scrollY||0;!function(e,t){if("u">typeof window){var n=document.createElement("div");
1n.className="click-wave",n.style.left="".concat(e-17,"px"),n.style.top="".concat(t-17,"px"),document.body.appendChild(n),setTimeout(function(){n.remove()},800)}}(u.left+u.width/2+d,u.top+u.height/2+p),n.click()}t.renderNextStep()}};e.updatePointerPosition(n,r);var i=null!=r&&r.message?function(e){if("u">typeof window){var t=document.createElement("div");return t.innerHTML=e,t.textContent||""}}(r.message):"🤔";document.getElementById("copilot-info-bubble-content").textContent=i,e._pointerContainer.style.opacity=1;var a=function(e){if("u">typeof window)return Math.ceil(e.split(/\s+/).filter(function(e){return e.length>0}).length/3.6)+1}(i),l=function(){e.currentAudio=void 0,setTimeout(function(){o()},1e3*a)};r.voice&&r.voice.length>0?(e.currentAudio=new Audio(r.voice),e.audioMuted&&(e.currentAudio.muted=!0),e.currentAudio.addEventListener("ended",function(){setTimeout(function(){o()},1e3)}),e.currentAudio.play().then(function(){}).catch(function(e){l()})):l()}};(r.selector?function(e){if("u">typeof window){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3)/100,n=0;return new Promise(function(r,o){var i=setInterval(function(){var a=document.querySelector(e);a?(clearInterval(i),r(a)):n>=t&&(clearInterval(i),o(Error("Element not found for selector: ".concat(e)))),n++},100)})}}(r.selector):Promise.resolve(null)).then(o).catch(function(){return o(null)})}}}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&cJ(n.prototype,e),t&&cJ(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function c3(e){return(c3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c7(r.key),r)}}function c9(e,t,n){return(t=c7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c7(e){var t=function(e,t){if("object"!=c3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=c3(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==c3(t)?t:String(t)}cY(c2,"instance",void 0);var c6="gleap-tour-data",c8=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),c9(this,"productTourData",void 0),c9(this,"productTourId",void 0),c9(this,"unmuted",!1),c9(this,"currentActiveIndex",void 0),c9(this,"gleapTourObj",void 0),c9(this,"disabled",!1);var e=this;"u">typeof window&&"u">typeof window&&window.addEventListener("beforeunload",function(t){var n;(null==e||!e.disabled)&&null!=e&&e.productTourId&&null!=e&&e.productTourData&&"cobrowse"!==(null==e||null==(n=e.productTourData)?void 0:n.tourType)&&e.storeUncompletedTour()})}return e=[{key:"disable",value:function(){this.gleapTourObj&&this.gleapTourObj.destroy(),c2.getInstance().disable(),this.gleapTourObj=void 0,this.disabled=!0}},{key:"startWithConfig",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.productTourId&&!this.disabled)if(this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,o)this.start();else{var i=this;tR.getInstance().validateProductTour(e).then(function(){return r>0?setTimeout(function(){i.start()},r):n.start()}).catch(function(e){console.log("Product tour is not live. Cleaning up..."),console.error(e),i.onComplete(!1)})}}},{key:"onComplete",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={tourId:this.productTourId};e?(nm.notifyEvent("productTourCompleted",t),uH.trackEvent("tour-".concat(this.productTourId,"-completed"),t)):(nm.notifyEvent("productTourQuit",t),uH.trackEvent("tour-".concat(this.productTourId,"-quit"),t)),this.gleapTourObj&&this.gleapTourObj.destroy(),this.gleapTourObj=void 0,this.productTourData=void 0,this.productTourId=void 0,this.currentActiveIndex=void 0,this.clearUncompletedTour()}},{key:"loadUncompletedTour",value:function(){try{var e=JSON.parse(localStorage.getItem(c6));if(null!=e&&e.tourData&&null!=e&&e.tourId)return e}catch(e){}return null}},{key:"storeUncompletedTour",value:function(){if(this.productTourId&&this.productTourData)try{var e=JSON.parse(JSON.stringify({tourData:this.productTourData,tourId:this.productTourId}));e.tourData.steps=e.tourData.steps.slice(this.currentActiveIndex||0,e.tourData.steps.length),localStorage.setItem(c6,JSON.stringify(e))}catch(e){}else this.clearUncompletedTour()}},{key:"clearUncompletedTour",value:function(){try{localStorage.removeItem(c6)}catch(e){}}},{key:"start",value:function(){var e=this,t=this.productTourData;if(t){if("cobrowse"===t.tourType)return c2.getInstance().startWithConfig(this.productTourId,t,function(t){e.onComplete(t)});this.unmuted=!1;for(var n=t.steps,r=this,o=[],i=0;i<n.length;i++){var a=n[i],l="CLICK"===a.mode,c="INPUT"===a.mode,u="INTERACTION"===a.mode,d="",p=!1;if("video-pointer"===a.type)d='<div class="gleap-tour-video">\n              <video class="gleap-tour-video-obj" muted autoplay>\n                <source src="'.concat(a.videoUrl,'" type="video/mp4">\n              </video>\n              <div class="gleap-tour-video-playpause">').concat(L("unmute"),"</div>\n            </div>");else{var h="";t.sender&&t.sender.firstName&&(p=!0,h='<div class="gleap-tour-sender">\n                <div class="gleap-tour-sender-image" style="background-image: url(\''.concat(t.sender.profileImageUrl,'\');"></div>\n                <div class="gleap-tour-sender-name">').concat(t.sender.firstName,"</div>\n              </div>")),d="".concat(h,'<div class="gleap-tour-message">').concat(a.message,"</div>")}var f={disableActiveInteraction:!l&&!c&&!u,mode:a.mode,popover:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?c4(Object(n),!0).forEach(function(t){c9(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({description:d,popoverClass:"gleap-tour-popover-".concat(a.type," ").concat(!p&&"gleap-tour-popover-no-sender"," ").concat(t.allowClose&&"gleap-tour-popover-can-close")},l?{showButtons:[]}:{})};a.selector&&a.selector.length>0&&(f.element=a.selector),o.push(f)}var g=["next","close"];t.backButton&&g.push("previous"),this.gleapTourObj=cW(c9(c9(c9(c9(c9(c9(c9(c9(c9(c9({showProgress:!0,allowKeyboardControl:!1,steps:o},"showProgress",n.length>1),"allowClose",t.allowClose),"nextBtnText",t.nextText),"doneBtnText",t.doneText),"prevBtnText",t.prevText),"showButtons",g),"onHighlightStarted",function(t,n,r){var o;e.currentActiveIndex=null==r||null==(o=r.state)?void 0:o.activeIndex,e.storeUncompletedTour()}),"onElementNotFound",function(t){document.removeEventListener("click",m),e.onComplete(!1)}),"onDestroyStarted",function(){e.gleapTourObj.hasNextStep()?e.onComplete(!1):e.onComplete(!0),document.removeEventListener("click",m)}),"onPopoverRender",function(t){if(t)for(var n=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),o=function(){setTimeout(function(){e.gleapTourObj.refresh()},500),setTimeout(function(){e.gleapTourObj.refresh()},750)},i=0;i<n.length;i++){var a=n[i];"IMG"===a.tagName?(a.addEventListener("load",function(){o()}),a.addEventListener("error",function(){o()})):"VIDEO"===a.tagName&&(a.addEventListener("canplaythrough",function(){o()}),a.addEventListener("error",function(){o()}))}var l="gleap-tour-video--playing",c=document.querySelector(".gleap-tour-video-playpause"),u=document.querySelector(".gleap-tour-video-obj");if(u){var d=u.closest(".gleap-tour-video");r.unmuted&&u&&(u.pause(),u.muted=!1,u.play(),d.classList.add(l)),u.addEventListener("ended",function(){c.innerHTML=L("replay"),c.classList.add("gleap-tour-video-svg--fullscreen"),d.classList.remove(l)}),u.addEventListener("play",function(){c.classList.remove("gleap-tour-video-svg--fullscreen")}),c&&c.addEventListener("click",function(){return p()});var p=function(){u.muted?(r.unmuted=!0,u.pause(),u.currentTime=0,u.muted=!1,u.play(),c.innerHTML=L("mute"),d.classList.add(l)):u.paused?(u.muted=!1,u.play(),c.innerHTML=L("mute"),d.classList.add(l)):(u.pause(),c.innerHTML=L("unmute"),d.classList.remove(l))}}})),this.gleapTourObj.drive(),document.addEventListener("click",m,!0)}function m(e){try{var t=document.querySelector(".gleap-tour-popover");if(t&&!t.contains(e.target)){var o,i=n[r.gleapTourObj.getActiveIndex()],a=r.gleapTourObj.getActiveElement();if("CLICK"===(null==i?void 0:i.mode)&&(null==e?void 0:e.target)!==a&&!a.contains(null==e?void 0:e.target))return;r.currentActiveIndex=(r.currentActiveIndex||0)+1,r.storeUncompletedTour(),a&&"INPUT"===a.tagName||"INPUT"===i.mode||"INTERACTION"===i.mode||null!=e&&null!=(o=e.target)&&o.id.includes("tooltip-svg")||r.gleapTourObj.moveNext()}}catch(e){}}}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}}],e&&c5(n.prototype,e),t&&c5(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e){return function(e){if(Array.isArray(e))return un(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return un(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return un(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uu(r.key),r)}}function uo(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ui(e){var t="function"==typeof Map?new Map:void 0;return(ui=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,n)}function n(){return function(e,t,n){if(ua())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&us(o,n.prototype),o}(e,arguments,ul(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),us(n,e)})(e)}function ua(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ua=function(){return!!e})()}
1function us(e,t){return(us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ul(e){return(ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uc(e,t,n){return(t=uu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uu(e){var t=function(e,t){if("object"!=ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ue(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ue(t)?t:String(t)}function ud(e){return(ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function up(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ub(r.key),r)}}function uh(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uf(e){var t="function"==typeof Map?new Map:void 0;return(uf=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,n)}function n(){return function(e,t,n){if(ug())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&um(o,n.prototype),o}(e,arguments,uv(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),um(n,e)})(e)}function ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ug=function(){return!!e})()}function um(e,t){return(um=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function uv(e){return(uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uy(e,t,n){return(t=ub(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ub(e){var t=function(e,t){if("object"!=ud(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ud(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ud(t)?t:String(t)}function uw(e){return(uw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uk(){uk=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(t,n,r,i){var a,l,c,u,d=Object.create((n&&n.prototype instanceof v?n:v).prototype);return o(d,"_invoke",{value:(a=t,l=r,c=new T(i||[]),u=h,function(t,n){if(u===f)throw Error("Generator is already running");if(u===g){if("throw"===t)throw n;return{value:e,done:!0}}for(c.method=t,c.arg=n;;){var r=c.delegate;if(r){var o=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),m;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var l=a.arg;return l?l.done?(r[n.resultName]=l.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):l:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,m)}(r,c);if(o){if(o===m)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===h)throw u=g,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=f;var i=p(a,l,c);if("normal"===i.type){if(u=c.done?g:"suspendedYield",i.arg===m)continue;return{value:i.arg,done:c.done}}
vendor: 4,319 bytes, line 1
1"throw"===i.type&&(u=g,c.method="throw",c.arg=i.arg)}})}),d}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};u(w,a,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){var n;o(this,"_invoke",{value:function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,l){var c=p(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==uw(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,l)})}l(c.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw TypeError(uw(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),u(I.prototype,l,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new I(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(S),u(S,c,"Generator"),u(S,a,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];
1if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function ux(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ux(Object(n),!0).forEach(function(t){var r,o,i;r=e,o=t,i=n[t],(o=uT(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ux(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uC(e){return function(e){if(Array.isArray(e))return uI(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return uI(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return uI(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uE(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function uO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uT(r.key),r)}}function uT(e){var t=function(e,t){if("object"!=uw(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uw(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==uw(t)?t:String(t)}c9(c8,"instance",void 0);var uL=function(){var e,t,n,r;function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),this._agentId=e.agentId||"kai",this._context=e.context||null,this._onChange=e.onChange||null,this._onError=e.onError||null,this._onReplyReceived=e.onReplyReceived||null,this._onConversationCreated=e.onConversationCreated||null,this._onToken=e.onToken||null,this._messages=[],this._conversationId=e.conversationId||null,this._isExecuting=!1,this._error=null,this._destroyed=!1,this._abortController=null;try{this._networkManager=ev.getInstance()}catch(e){this._networkManager=null}}return e=[{key:"sendMessage",value:(n=uk().mark(function e(t){var n,r,o,i,a,l=this;return uk().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=(t||"").trim())&&!this._isExecuting&&!this._destroyed){e.next=3;break}return e.abrupt("return");case 3:return this._messages=[].concat(uC(this._messages),[{id:"user-".concat(Date.now()),role:"user",content:n,createdAt:(new Date).toISOString()}]),r="stream-".concat(Date.now()),this._messages=[].concat(uC(this._messages),[{id:r,role:"assistant",content:"",createdAt:(new Date).toISOString(),isStreaming:!0}]),this._isExecuting=!0,this._error=null,this._notify(),o={messages:"kai"===this._agentId?this._messages.filter(function(e){return!e.isStreaming&&e.content}).map(function(e){return{role:e.role,content:e.content}}):[{role:"user",content:n}]},this._conversationId&&(o.conversationId=this._conversationId),this._context&&(o.additionalContext=this._context),this._abortController=new AbortController,i=!this._conversationId,a=this._messages.length-1,e.next=19,this._networkManager.streamAgent(this._agentId,o,{onMeta:function(e){l._destroyed||(e.conversationId&&(l._conversationId=e.conversationId,l._networkManager._invalidateMessagesCache(e.conversationId),i&&l._onConversationCreated&&l._onConversationCreated(e.conversationId)),e.runId&&l._messages[a]&&(l._messages[a]=uS(uS({},l._messages[a]),{},{id:e.runId})))},onToken:function(e){if(!l._destroyed){var t=l._messages[a];t&&(t.content+=e.content||""),l._notify(),l._onToken&&l._onToken(e)}},onDone:function(e){if(!l._destroyed){var t=l._messages[a];t&&(t.isStreaming=!1,e.response&&!t.content&&(t.content=e.response)),l._isExecuting=!1,l._abortController=null,l._notify(),l._onReplyReceived&&l._onReplyReceived(e)}},onError:function(e){if(!l._destroyed){var t=l._messages[a];t&&!t.content?l._messages.splice(a,1):t&&(t.isStreaming=!1),l._isExecuting=!1,l._error=e,l._abortController=null,l._notify(),l._onError&&l._onError(e)}},onToolStart:function(){},onToolEnd:function(){}},this._abortController.signal);case 19:case"end":return e.stop()}},e,this)}
1),r=function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){uE(i,r,o,a,l,"next",e)}function l(e){uE(i,r,o,a,l,"throw",e)}a(void 0)})},function(e){return r.apply(this,arguments)})},{key:"cancelStream",value:function(){this._abortController&&(this._abortController.abort(),this._abortController=null),this._messages=this._messages.map(function(e){return e.isStreaming?uS(uS({},e),{},{isStreaming:!1}):e}),this._messages=this._messages.filter(function(e){return e.content||"user"===e.role}),this._isExecuting=!1,this._notify()}},{key:"clearMessages",value:function(){this._messages=[],this._conversationId=null,this._isExecuting=!1,this._error=null,this.cancelStream(),ev.getInstance().clearCache(),this._notify()}},{key:"setContext",value:function(e){this._context=e}},{key:"getState",value:function(){return{messages:this._messages,isExecuting:this._isExecuting,error:this._error,conversationId:this._conversationId}}},{key:"destroy",value:function(){this.cancelStream(),this._destroyed=!0,this._onChange=null,this._onError=null,this._onReplyReceived=null,this._onConversationCreated=null,this._onToken=null}},{key:"_notify",value:function(){this._onChange&&!this._destroyed&&this._onChange(this.getState())}}],uO(o.prototype,e),t&&uO(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}();function uA(e){return(uA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uD(r.key),r)}}function uP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uP(Object(n),!0).forEach(function(t){u_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u_(e,t,n){return(t=uD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uD(e){var t=function(e,t){if("object"!=uA(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=uA(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==uA(t)?t:String(t)}"u">typeof window&&"u">typeof HTMLCanvasElement&&HTMLCanvasElement.prototype&&void 0===HTMLCanvasElement.prototype.__originalGetContext&&(HTMLCanvasElement.prototype.__originalGetContext=HTMLCanvasElement.prototype.getContext,HTMLCanvasElement.prototype.getContext=function(e,t){return this.__originalGetContext(e,uR(uR({},t),{},{preserveDrawingBuffer:!0}))}),"u">typeof customElements&&"u">typeof HTMLElement&&"u">typeof window&&(function(){if("u">typeof customElements&&"u">typeof HTMLElement&&"u">typeof window){var e=function(e){var t,n;function r(){var e,t;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),uc(uo((t=ul(t=r),e=function(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return uo(e)}(this,ua()?Reflect.construct(t,[],ul(this).constructor):t.apply(this,void 0)))),"activeStep",-1),uc(uo(e),"checklistData",null),uc(uo(e),"_isInitialLoad",!1),uc(uo(e),"_initialActiveSet",!1),uc(uo(e),"_hasLoaded",!1),uc(uo(e),"_isSessionReady",!1),uc(uo(e),"_boundHandleChecklistUpdate",e.handleChecklistUpdate.bind(uo(e))),uc(uo(e),"_boundHandleSessionUpdate",e.handleSessionUpdate.bind(uo(e))),e.attachShadow({mode:"open"});try{e._networkManager=void 0!==tR&&void 0!==Q?Q.getInstance():null}catch(t){e._networkManager=null}return e._boundFloatingLauncherClick=e.handleFloatingLauncherClick.bind(uo(e)),e._boundFloating
1CloseClick=e.handleFloatingCloseClick.bind(uo(e)),e._floatingHideTimeout=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&us(e,t)}(r,ui(HTMLElement)),n=[{key:"observedAttributes",get:function(){return["checklistId","info","progressbar","dark","floating","sharedKey"]}}],t=[{key:"connectedCallback",value:function(){window.addEventListener("checkListUpdate",this._boundHandleChecklistUpdate),window.addEventListener("session-updated",this._boundHandleSessionUpdate),window.addEventListener("resize",this._boundResizeHandler=this.handleResize.bind(this)),this._checkSessionAndLoad()}},{key:"disconnectedCallback",value:function(){window.removeEventListener("checkListUpdate",this._boundHandleChecklistUpdate),window.removeEventListener("session-updated",this._boundHandleSessionUpdate),window.removeEventListener("resize",this._boundResizeHandler),this.removeFloatingClickListeners(),this._floatingHideTimeout&&(clearTimeout(this._floatingHideTimeout),this._floatingHideTimeout=null),this.checklistData=null,this.activeStep=-1,this._hasLoaded=!1,this._isSessionReady=!1,this._initialActiveSet=!1,this.renderResponse()}},{key:"handleResize",value:function(){this.updateActiveTaskMaxHeight()}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&("checklistId"===e&&this._isSessionReady?this.loadChecklist():"checklistId"!==e&&this._hasLoaded&&this.checklistData&&this.renderChecklist(this.checklistData))}},{key:"_checkSessionAndLoad",value:function(){var e=this._getGleapSessionInstance(),t=this.getAttribute("checklistId");e.ready&&t?(this._isSessionReady=!0,this._networkManager=Q.getInstance(),this.loadChecklist()):(this._isSessionReady=!1,this._hasLoaded=!1,this.checklistData=null,this.activeStep=-1,this._initialActiveSet=!1,this.renderResponse())}},{key:"handleSessionUpdate",value:function(){this._checkSessionAndLoad()}},{key:"_getGleapSessionInstance",value:function(){try{return void 0!==tR?tR.getInstance():null}catch(e){return null}}},{key:"infoEnabled",get:function(){var e=this.getAttribute("info");return null===e||"false"!==e.toLowerCase()}},{key:"progressbarEnabled",get:function(){var e=this.getAttribute("progressbar");return null===e||"false"!==e.toLowerCase()}},{key:"floatingEnabled",get:function(){return"true"===this.getAttribute("floating")}},{key:"_translate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return lT.translateText(e)||t}},{key:"_translateWithVars",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return lT.translateTextWithVars(e,t)||n}},{key:"getCheckIcon",value:function(){return'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n                    <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7071 5.29289C21.0976 5.68342 21.0976 6.31658 20.7071 6.70711L9.70711 17.7071C9.31658 18.0976 8.68342 18.0976 8.29289 17.7071L3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929C3.68342 10.9024 4.31658 10.9024 4.70711 11.2929L9 15.5858L19.2929 5.29289C19.6834 4.90237 20.3166 4.90237 20.7071 5.29289Z" fill="currentColor"/>\n                  </svg>'}},{key:"loadChecklist",value:function(){if(this._isSessionReady&&this._networkManager){var e=this.getAttribute("checklistId");e?(this.activeStep=-1,this._initialActiveSet=!1,this.validateChecklist(e)):(this.renderResponse(),this.checklistData=null,this._hasLoaded=!1)}}},{key:"getQueryParams",value:function(){var e=this._getGleapSessionInstance();if(null==e||!e.session)return"";var t=e.session,n="en";try{void 0!==lT&&(n=lT.getInstance().getActiveLanguage()||"en")}catch(e){}return"gleapId=".concat(t.gleapId||"","&gleapHash=").concat(t.gleapHash||"","&lang=").concat(n)}},{key:"makeRequest",value:function(e,t,n,r){var o=this._getGleapSessionInstance();if(null!=o&&o.session){var i=new XMLHttpRequest;i.open(e,t);try{o.injectSession(i)}catch(e){}n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){4===i.readyState&&r(i)},i.onerror=function(){r(i)},i.send(n?JSON.stringify(n):null)}else r({readyState:4,status:0,responseText:"Session unavailable",_isMock:!0})}},{key:"validateChecklist",value:function(e){var t=this;if(this._isSessionReady&&this._networkManager){this.checklistData=null,this._hasLoaded=!1,this.renderResponse();var n=this.getAttribute("sharedKey");this._networkManager.validateChecklist(e,n).then(function(e){t.isConnected&&t._isSessionReady&&e&&t.fetchChecklist(e)}
1).catch(function(e){t.renderResponse(),t.checklistData=null,t._hasLoaded=!1})}}},{key:"fetchChecklist",value:function(e){var t=this;this._isSessionReady&&this._networkManager&&(this._isInitialLoad=!this._hasLoaded,this._networkManager.fetchChecklist(e).then(function(e){var n;if(!t.isConnected||!t._isSessionReady||!e)return t._hasLoaded=!1,t.checklistData=null,void t._checkSessionAndLoad();if(t.checklistData=e,t._hasLoaded=!0,"done"!==e.status){if(t._isInitialLoad&&!t._initialActiveSet){var r,o=(null==(r=e.outbound)||null==(r=r.config)?void 0:r.steps)||[],i=e.completedSteps||[],a=o.findIndex(function(e){return!i.includes(e.id)});t.activeStep=a>=0?a:-1,-1!==t.activeStep&&(t._initialActiveSet=!0)}t.renderChecklist(t.checklistData),nm.notifyEvent("checklist-loaded",{checklistId:t.checklistData.id,outboundId:null==(n=t.checklistData.outbound)?void 0:n.id,completedSteps:t.checklistData.completedSteps,status:t.checklistData.status,data:t.checklistData})}else t.renderResponse()}).catch(function(e){t.renderResponse(),t.checklistData=null,t._hasLoaded=!1}))}},{key:"updateChecklist",value:function(e,t){var n,r,o=this._getGleapSessionInstance();if(null!=o&&o.session){var i=o.apiUrl;if(i){var a=o.session,l=null!=(n=null==a?void 0:a.gleapId)?n:"",c=null!=(r=null==a?void 0:a.gleapHash)?r:"",u="en";try{void 0!==lT&&(u=lT.getInstance().getActiveLanguage()||"en")}catch(e){}var d="".concat(i,"/outbound/checklists/").concat(e);t.checkedStep&&(d+="/increment/".concat(t.checkedStep)),d+="?gleapId=".concat(l,"&gleapHash=").concat(c,"&lang=").concat(u),this.makeRequest("PUT",d,t,function(e){e._isMock||200!==e.status&&e.status})}}}},{key:"handleChecklistUpdate",value:function(e){if(this._hasLoaded&&this.checklistData){var t=e.detail;if(t&&t.id===this.checklistData.id){var n,r=ut(this.checklistData.completedSteps||[]),o=!1,i=!1,a=this.activeStep;if(t.completedSteps&&JSON.stringify(t.completedSteps)!==JSON.stringify(r)&&(this.checklistData.completedSteps=ut(t.completedSteps),o=!0,-1!==a)){var l,c=null==(l=this.checklistData.outbound)||null==(l=l.config)||null==(l=l.steps)||null==(l=l[a])?void 0:l.id;c&&this.checklistData.completedSteps.includes(c)&&!r.includes(c)&&(i=!0)}if(t.status&&t.status!==this.checklistData.status&&(this.checklistData.status=t.status,o=!0),i){for(var u,d=(null==(u=this.checklistData.outbound)||null==(u=u.config)?void 0:u.steps)||[],p=-1,h=a+1;h<d.length;h++)if(!this.checklistData.completedSteps.includes(d[h].id)){p=h;break}this.activeStep!==p&&this.setActiveStep(p),o=!0}o&&(this.renderChecklist(this.checklistData),nm.notifyEvent("checklist-update",{checklistId:this.checklistData.id,outboundId:null==(n=this.checklistData.outbound)?void 0:n.id,completedSteps:this.checklistData.completedSteps,status:this.checklistData.status,data:this.checklistData}))}}}},{key:"handleFloatingLauncherClick",value:function(e){if(e.stopPropagation(),"done"!==this.checklistData.status){var t=this.shadowRoot.querySelector(".checklist-tasks");t&&(t.style.display="block"===t.style.display?"none":"block")}}},{key:"handleFloatingCloseClick",value:function(e){e.stopPropagation();var t=this.shadowRoot.querySelector(".checklist-tasks");t&&(t.style.display="none")}},{key:"addFloatingClickListeners",value:function(){var e=this.shadowRoot.querySelector(".checklist-floating-launcher");e&&e.addEventListener("click",this._boundFloatingLauncherClick);var t=this.shadowRoot.querySelector(".checklist-floating-header");t&&t.addEventListener("click",this._boundFloatingCloseClick)}},{key:"removeFloatingClickListeners",value:function(){var e=this.shadowRoot.querySelector(".checklist-floating-launcher");e&&e.removeEventListener("click",this._boundFloatingLauncherClick);var t=this.shadowRoot.querySelector(".checklist-floating-header");t&&t.removeEventListener("click",this._boundFloatingCloseClick)}},{key:"renderResponse",value:function(){this.shadowRoot.innerHTML=""}},{key:"renderFloatingLauncher",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"checklist-floating",o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(null==(t=e.config)?void 0:t.steps)||[],a=(null==(n=this.checklistData)?void 0:n.completedSteps)||[],l=0;if(this.progressbarEnabled&&i.length>0){var c=i.length,u=a.length;l=c>0?u/c*100:0}var d,p,h=i.find(function(e){return!a.includes(e.id)}),f=i.length>0?h?h.title||this._translateWithVars("stepDefaultTitle",{index:i.indexOf(h)+1},"Step ".concat(i.indexOf(h)+1)):"":e.subject||"",g=i.length>0?h&&h.description||"":e.message||"";o&&(f=(null==(d=e.config)?void 0:d.successTitle)||"",g=(null==(p=e.config)?void 0:p.successMessage)||"",l=100);var m=2*Math.PI*7,v=m-l/100*m,y="checklist-floating-header"===r;return'\n          <div part="'.concat(r,'" class="').concat(y?"checklist-floating-header":"checklist-floating-launcher"," ").concat(o?"checklist-floating-launcher--done":"",'">\n            <div class="floating-header">\n              <div class="floating-circular-progress">\n                <svg viewBox="0 0 20 20">\n                  <circle class="track" cx="10" cy="10" r="7"></circle>\n                  <circle class="progress" cx="10" cy="10" r="7" stroke-dasharray="').concat(m.toFixed(2),'" stroke-dashoffset="').concat(v.toFixed(2),'"></circle>\n                </svg>\n              </div>\n              <div class="floating-title">').concat(f,"</div>\n              ").concat(o?"":'<span class="floating-icon">'.concat(y?'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n               <line x1="18" y1="6" x2="6" y2="18"></line>\n               <line x1="6" y1="6" x2="18" y2="18"></line>\n             </svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n               <polyline points="6 9 12 15 18 9"></polyline>\n             </svg>',"</span>"),'\n            </div>\n            <div class="floating-subtitle">').concat(g,"</div>\n          </div>\n        ")}},{key:"renderInfoSection",value:function(e){if(!this.infoEnabled||!e)return"";var t,n=e.subject||this._translate("checklistDefaultTitle","Checklist"),r=e.message||"",o="";return null!=(t=e.sender)&&t.profileImageUrl&&(o='\n            <div part="sender" class="checklists-sender">\n              <img part="sender-image" src="'.concat(e.sender.profileImageUrl,'" alt="').concat(e.sender.firstName||"Sender",'\'s profile picture" style="object-fit: cover;" />
1\n              <span part="sender-name">').concat(e.sender.firstName||"","</span>\n            </div>")),'\n          <div part="info" class="checklists-info">\n            '.concat(n?'<div part="info-title" class="checklists-title">'.concat(n,"</div>"):"","\n            ").concat(r?'<div part="info-description" class="checklists-description">'.concat(r,"</div>"):"","\n            ").concat(o,"\n          </div>")}},{key:"renderProgressSection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!this.progressbarEnabled||!e.length)return"";var n=e.length,r=t.length,o=n>0?r/n*100:0,i=0;e.forEach(function(e){!t.includes(e.id)&&e.duration>0&&(i+=e.duration)});var a=this._translateWithVars("taskProgress",{a:r,b:n},"".concat(r," of ").concat(n," done")),l=i>0?this._translateWithVars("aboutMinutes",{a:i},"About ".concat(i," min left")):"";return'\n          <div part="progress-labels" class="checklist-progress-labels">\n            <div part="progress-label-primary" class="checklist-progress-label">'.concat(a,"</div>\n            ").concat(l?'<div part="progress-label-secondary" class="checklist-progress-label">'.concat(l,"</div>"):"",'\n          </div>\n          <div part="progress-bar" class="checklist-progress-bar">\n            <div part="progress-bar-progress" class="checklist-progress-bar-progress" style="width: ').concat(o,'%;"></div>\n          </div>')}},{key:"renderTasks",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t&&0!==t.length?t.map(function(t,r){var o=n.includes(t.id),i=e.activeStep===r,a=o?'<span part="task-badge" class="checklist-task-header--badge checklist-task-header--badge-done">'.concat(e.getCheckIcon(),"</span>"):'<span part="task-badge" class="checklist-task-header--badge">
1'.concat(r+1,"</span>"),l=t.title||e._translateWithVars("stepDefaultTitle",{index:r+1},"Step ".concat(r+1)),c=t.description||"",u=t.actionTitle||e._translate("actionDefaultTitle","Action"),d=t.action&&"none"!==t.action?'<div part="task-action" class="checklist-task-body-action" data-action-index="'.concat(r,'">\n                      <button type="button" class="action-button form-send-button">').concat(u,"</button>\n                   </div>"):"",p=e._translate("markAsDone","Mark as done"),h=t.allowMarkDone&&!o?'<div part="task-mark-done" class="checklist-task-body-markdone" data-markdone-index="'.concat(r,'">\n                      ').concat(e.getCheckIcon(),'\n                      <div class="checklist-task-body-markdone-label">').concat(p,"</div>\n                   </div>"):"",f=["checklist-task",o?"checklist-task--done":"",i?"checklist-task--active":""].filter(Boolean).join(" ");return'\n              <div part="task" class="'.concat(f,'" data-task-index="').concat(r,'">\n                <div part="task-header" class="checklist-task-header" role="button" aria-expanded="').concat(i,'" aria-controls="task-body-').concat(r,'">\n                  ').concat(a,'\n                  <div part="task-header-title" class="checklist-task-header--title">').concat(l,'</div>\n                  <span part="task-header-chevron" class="checklist-task-header--chevron">\n                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n                      <polyline points="6 9 12 15 18 9"></polyline>\n                    </svg>\n                  </span>\n                </div>\n                <div part="task-body" class="checklist-task-body" id="task-body-').concat(r,'">\n                  <div part="task-body-inner" class="checklist-task-body-inner">\n                    ').concat(c?'<div part="task-body-content" class="checklist-task-body-content">'.concat(c,"</div>"):"","\n                    ").concat(d,"\n                    ").concat(h,"\n                  </div>\n                </div>\n              </div>")}).join(""):"<p>".concat(this._translate("noStepsDefined","No steps defined."),"</p>")}},{key:"renderChecklist",value:function(e){var t;if(this._hasLoaded&&e&&e.outbound){var n=e.outbound,r=(null==(t=n.config)?void 0:t.steps)||[],o=e.completedSteps||[],i="";if("done"===e.status||r.length>0&&o.length>=r.length){var a,l,c=(null==(a=n.config)?void 0:a.successTitle)||"",u=(null==(l=n.config)?void 0:l.successMessage)||"";i=this.floatingEnabled?this.renderFloatingLauncher(n,"checklist-floating-launcher",!0):'\n              <div part="content" class="checklists-content checklists-content--done">\n                <div part="success-icon" class="checklists-success-icon">\n                  <span part="success-icon-circle" class="checklists-success-icon--circle">'.concat(this.getCheckIcon(),'</span>\n                </div>\n                <div part="success-title" class="checklists-title">').concat(c,'</div>\n                <div part="success-description" class="checklists-description">').concat(u,"</div>\n              </div>"),-1!==this.activeStep&&(this.activeStep=-1)}else i='\n            <div part="content" class="checklists-content">\n              '.concat(this.floatingEnabled?"":this.renderInfoSection(n),"\n              ").concat(this.floatingEnabled?"":this.renderProgressSection(r,o),"\n              ").concat(this.floatingEnabled?this.renderFloatingLauncher(n):"",'\n              <div part="tasks" class="checklist-tasks">\n                ').concat(this.floatingEnabled?this.renderFloatingLauncher(n,"checklist-floating-header"):"","\n                ").concat(this.renderTasks(r,o),"\n              </div>\n            </div>");var d=tW.getInstance().getFlowConfig(),p=d.color?d.color:"#485BFF",h="\n          <style>\n            :host {\n              display: block;\n              --color-bg: #ffffff;\n              --color-font-title: #1f2937;\n              --color-font-text: #4b5563;\n              --color-font-light: #6b7280;\n              --color-primary: ".concat(p,";\n              --color-primary-light: ").concat(p,'22;\n              --color-primary-contrast: #ffffff;\n              --color-border: #e5e7eb;\n              --color-gray-light: #f3f4f6;\n              --color-gray-lighter: #f9fafb;\n              --color-gray-dark: #6b7280;\n              --color-success: #10b981;\n              --color-success-light: #ffffff;\n              --radius-sm: 4px;\n              --radius-lg: 12px;\n              --radius-full: 9999px;\n              --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n              --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);\n              --shadow-lg: rgba(0, 0, 0, 0.2) 0px 7px 29px 0px;\n              --animation-duration: 0.2s;\n              --animation-timing: ease-in-out;\n              font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n              box-sizing: border-box;\n            }\n            :host([dark]) {\n              --color-bg: #1f2937;\n              --color-font-title: #f9fafb;\n              --color-font-text: #d1d5db;\n              --color-font-light: #9ca3af;\n              --color-primary: ').concat(p,";\n              --color-primary-light: ").concat(p,'22;\n              --color-primary-contrast: #ffffff;\n              --color-border: #374151;\n              --color-gray-light: #374151;\n              --color-gray-lighter: #111827;\n              --color-gray-dark: #9ca3af;\n              --color-success: #34d399;\n              --color-success-light: #1f2937;\n            }\n            *, *:before, *:after { box-sizing: inherit; }\n            .checklists-content { color: var(--color-font-text); }\n            .checklists-content--done { text-align: center; }\n            .checklists-info { margin-bottom: 24px; text-align: center; }\n            .checklists-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; color: var(--color-font-title); }\n            .checklists-description { font-size: 0.9rem; margin-bottom: 16px; color: var(--color-font-text); line-height: 1.5; }\n            .checklists-sender { display: flex; align-items: center; justify-content: center; gap: 8px; }\n            .checklists-sender img { width: 28px; height: 28px; border-radius: var(--radius-full); object-fit: cover; }\n            .checklists-sender span { font-size: 0.875rem; color: var(--color-font-light); font-weight: 500; }\n            .checklists-success-icon { margin-bottom: 16px; line-height: 0; }\n            .checklists-success-icon--circle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-full); background-color: var(--color-success); color: var(--color-success-light); font-size: 22px; }\n            .checklist-progress-labels { display: flex; justify-content: space-between; margin-bottom: 8px; }\n            .checklist-progress-label { font-size: 0.75rem; color: var(--color-font-light); font-weight: 500; }\n            .checklist-progress-bar { width: 100%; height: 6px; background-color: var(--color-gray-light); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 20px; }\n            .checklist-progress-bar-progress { height: 100%; background-color: var(--color-primary); transition: width var(--animation-duration) var(--animation-timing); border-radius: var(--radius-full); }\n            .checklist-tasks { display: flex; flex-direction: column; gap: 12px; }\n            .checklist-task { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background-color: var(--color-bg); box-shadow: var(--shadow-sm); overflow: hidden; transition: background-color var(--animation-duration) var(--animation-timing), border-color var(--animation-duration) var(--animation-timing); }\n            .checklist-task-header { display: flex; align-items: center; padding: 15px 20px; cursor: pointer; gap: 12px; position: relative; }\n            .checklist-task-header:hover { background: var(--color-gray-lighter); }\n            .checklist-task-header:hover .checklist-task-header--chevron {\n              color: var(--color-font-title);\n            }\n            .checklist-task-header--badge { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-full); background-color: var(--color-primary-light); color: var(--color-primary); font-size: 0.875rem; font-weight: 600; flex-shrink: 0; transition: background-color var(--animation-duration) var(--animation-timing), color var(--animation-duration) var(--animation-timing); line-height: 1; }\n            .checklist-task-header--badge svg { width: 16px; height: 16px; }\n            .checklist-task-header--title { flex-grow: 1; font-size: 0.9rem; font-weight: 500; color: var(--color-font-title); transition: font-weight var(--animation-duration) var(--animation-timing), color var(--animation-duration) var(--animation-timing), text-decoration var(--animation-duration) var(--animation-timing); }\n            .checklist-task-header--chevron { color: var(--color-font-light); transition: transform var(--animation-duration) var(--animation-timing); flex-shrink: 0; margin-left: auto; }\n            .checklist-task-header--chevron svg { display: block; width: 18px; height: 18px; }\n            .checklist-task-body {\n              overflow: hidden;\n              transition: max-height var(--animation-duration) var(--animation-timing), opacity var(--animation-duration) var(--animation-timing);\n              max-height: 0;\n              opacity: 0;\n            }\n            .checklist-task--active .checklist-task-body {\n              max-height: var(--task-body-active-height, 200px);\n              opacity: 1;\n            }\n            .checklist-task-body-inner { padding: 4px 16px 20px 60px; font-size: 0.875rem; color: var(--color-font-text); line-height: 1.5; }\n            .checklist-task-body-content { margin-bottom: 16px; }\n            .checklist-task-body-content p:first-child { margin-top: 0; }\n            .checklist-task-body-content p:last-child { margin-bottom: 0; }\n            .checklist-task-body-content iframe { width: 100%; height: 315px; object-fit: contain; border: none; }\n            .checklist-task-body-action { margin-top: 16px; }\n            .action-button { display: inline-flex; align-items: center; justify-content: center; background-color: var(--color-primary); color: var(--color-primary-contrast); padding: 10px 18px; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-lg); border: none; text-align: center; cursor: pointer; transition: background-color var(--animation-duration) var(--animation-timing), box-shadow var(--animation-duration) var(--animation-timing); box-shadow: var(--shadow-sm); }\n            .action-button:hover { background-color: color-mix(in srgb, var(--color-primary) 90%, black); box-shadow: var(--shadow-md); }\n            .action-button:focus { outline: 2px solid color-mix(in srgb, var(--color-primary) 50%, transparent); outline-offset: 2px; }\n            .checklist-task-body-markdone { margin-top: 20px; border-top: 1px solid var(--color-border); padding: 16px 0 0px 0; display: flex; align-items: center; cursor: pointer; color: var(--color-primary); transition: color var(--animation-duration) var(--animation-timing); }\n            .checklist-task-body-markdone:hover { color: color-mix(in srgb, var(--color-primary) 80%, black); }\n            .checklist-task-body-markdone svg { width: 18px; height: 18px; margin-right: 6px; flex-shrink: 0; font-size: 18px; }\n            .checklist-task-body-markdone-label { font-size: 0.875rem; font-weight: 500; line-height: 1; }\n            .checklist-task--active .checklist-task-header--title { font-weight: 600; }\n            .checklist-task--active .checklist-task-header--chevron { transform: rotate(180deg); }\n            .checklist-task--active .checklist-task-header:hover { background: linear-gradient(180deg, var(--color-gray-lighter), transparent); }\n            .checklist-task--done { background-color: var(--color-gray-lighter); border-color: var(--color-gray-light); box-shadow: none; }\n            .checklist-task--done .checklist-task-header--badge { background-color: var(--color-success); color: var(--color-success-light); }\n            .checklist-task--done .checklist-task-header--title { color: var(--color-font-light); }\n            .checklist-task--done .checklist-task-body-inner { color: var(--color-font-light); }\n            .checklist-task--done .checklist-task-header--title {\n              text-decoration: line-through;\n            }\n  \n            /* -------------------------\n               Floating style addition\n               Only applies if floating="true"\n               ------------------------- */\n            :host([floating="true"]) .checklists-content {\n              position: relative;\n            }\n            :host([floating="true"]) .checklist-tasks {\n              position: absolute;\n              bottom: 0;\n              left: 0;\n              z-index: 1000;\n              max-height: 90vh;\n              display: none;\n              padding: 0px;\n              min-width: min(380px, 90vw);\n              background-color: var(--color-bg);\n              border-radius: var(--radius-lg);\n              box-shadow: var(--shadow-lg);\n              overflow: hidden;\n            }\n            :host([floating="true"]) .checklist-task {\n              border-radius: 0px;\n              border: none;\n              box-shadow: none;\n              border-bottom: 1px solid var(--color-border);\n            }\n            :host([floating="true"]) .checklist-task:last-child {\n              border-bottom: none;\n            }\n            :host([floating="true"]) .checklist-task--done {\n              background-color: transparent;\n            }\n            :host([floating="true"]) .checklist-task-header:hover {\n              background: linear-gradient(180deg, var(--color-gray-lighter), transparent);\n            }\n  \n            /* -------------------------\n               Floating Launcher Styles\n               ------------------------- */\n            .checklist-floating-launcher {\n              padding: 12px;\n              background-color: var(--color-bg);\n              border: 1px solid var(--color-border);\n              border-radius: var(--radius-lg);\n              box-shadow: var(--shadow-md);\n              transition: transform 0.3s ease;\n              cursor: pointer;\n            }\n            .checklist-floating-launcher--done {\n              cursor: default !important;\n            }\n            .checklist-floating-header {\n              padding: 20px;\n              padding-bottom: 16px;\n              border-bottom: 1px solid var(--color-border);\n              cursor: pointer;\n            }\n            .checklist-floating-header:hover .floating-icon,\n            .checklist-floating-launcher:hover .floating-icon {\n              color: var(--color-font-title);\n            }\n            .floating-header {\n              display: flex;\n              align-items: center;\n              justify-content: flex-start;\n            }\n            .floating-title {\n              font-size: 0.875rem;\n              font-weight: 600;\n              color: var(--color-font-title);\n              max-width: calc(100% - 32px);\n              display: -webkit-box;\n              -webkit-line-clamp: 1;\n              -webkit-box-orient: vertical;\n              overflow: hidden;\n            }\n            .floating-subtitle {\n              font-size: 0.875rem;\n              color: var(--color-font-text);\n              margin-top: 8px;\n              max-width: 100%;\n              display: -webkit-box;\n              -webkit-line-clamp: 1;\n              -webkit-box-orient: vertical;\n              overflow: hidden;\n            }\n            .floating-circular-progress {\n              width: 26px;
1\n              height: 26px;\n              margin-right: 6px;\n            }\n            .floating-circular-progress svg {\n              width: 100%;\n              height: 100%;\n              transform: rotate(-90deg);\n            }\n            .floating-circular-progress .track {\n              fill: none;\n              stroke: var(--color-gray-light);\n              stroke-width: 3;\n            }\n            .floating-circular-progress .progress {\n              fill: none;\n              stroke: var(--color-primary);\n              stroke-width: 3;\n              stroke-linecap: round;\n              transition: stroke-dashoffset var(--animation-duration) var(--animation-timing);\n            }\n            .checklist-floating-launcher--done .floating-circular-progress .progress {\n              stroke: var(--color-success);\n            }\n            .floating-icon {\n              margin-left: auto;\n              color: var(--color-font-light);\n            }\n          </style>\n        ');this.shadowRoot.innerHTML=h+i,this.addTaskEventListeners(),this.floatingEnabled&&this.addFloatingClickListeners(),-1!==this.activeStep&&this.toggleTask(this.activeStep,!0)}else this._checkSessionAndLoad()}},{key:"updateActiveTaskMaxHeight",value:function(){if(-1!==this.activeStep){var e=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(this.activeStep,'"] .checklist-task-body-inner')),t=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(this.activeStep,'"] .checklist-task-body'));if(e&&t){var n=e.offsetHeight;t.style.setProperty("--task-body-active-height","".concat(n,"px"))}}}},{key:"addTaskEventListeners",value:function(){var e=this;this.shadowRoot.querySelectorAll(".checklist-task").forEach(function(t){var n=t.querySelector(".checklist-task-header"),r=parseInt(t.getAttribute("data-task-index"),10);n&&n.addEventListener("click",function(){var t=e.activeStep===r?-1:r;e.setActiveStep(t)});var o=t.querySelector(".checklist-task-body-markdone");o&&o.addEventListener("click",function(t){var n;if(t.stopPropagation(),null!=(n=e.checklistData)&&null!=(n=n.outbound)&&null!=(n=n.config)&&n.steps){var o=e.checklistData.outbound.config.steps[r];if(o){var i=e.activeStep;if(e.checklistData.completedSteps||(e.checklistData.completedSteps=[]),!e.checklistData.completedSteps.includes(o.id)){e.checklistData.completedSteps.push(o.id);var a=e.checklistData.outbound.config.steps,l=-1;if(i===r){for(var c=r+1;c<a.length;c++)if(!e.checklistData.completedSteps.includes(a[c].id)){l=c;break}e.setActiveStep(l)}setTimeout(function(){var t=!1;if(e.floatingEnabled){var n=e.shadowRoot.querySelector(".checklist-tasks");t=n&&"block"===n.style.display}if(e.renderChecklist(e.checklistData),e.floatingEnabled&&t){var r=e.shadowRoot.querySelector(".checklist-tasks");r&&(r.style.display="block")}},300);var u={checkedStep:o.id};a.length>0&&e.checklistData.completedSteps.length>=a.length&&(e.checklistData.status="done",u.status="done"),e.updateChecklist(e.checklistData.id,u)}}}});var i=t.querySelector(".checklist-task-body-action .action-button");i&&i.addEventListener("click",function(t){var n;if(t.stopPropagation(),null!=(n=e.checklistData)&&null!=(n=n.outbound)&&null!=(n=n.config)&&n.steps&&void 0!==uH){var o=e.checklistData.outbound.config.steps[r];if(o&&o.action&&"none"!==o.action)try{"BOT"===o.action?uH.startBot(o.botId):"CUSTOM_ACTION"===o.action?uH.triggerCustomAction(o.actionBody):"REDIRECT_URL"===o.action?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),uH.openURL(o.actionBody,!!o.actionOpenInNewTab)):"FEEDBACK_FLOW"===o.action?uH.startFeedbackFlow(o.formId):"NEWS_ARTICLE"===o.action?uH.openNewsArticle(o.articleId):"HELP_ARTICLE"===o.action?uH.openHelpCenterArticle(o.articleId):"CHECKLIST"===o.action?uH.startChecklist(o.outboundId,!0,null==o?void 0:o.sharedKey):"PRODUCT_TOUR"===o.action&&uH.startProductTour(o.productTourId,!0)}catch(e){}}})})}},{key:"setActiveStep",value:function(e){var t=this,n=this.activeStep;this.activeStep=e;var r=[];-1!==n&&n!==this.activeStep&&r.push({index:n,open:!1}),-1!==this.activeStep&&this.activeStep!==n&&r.push({index:this.activeStep,open:!0}),r.forEach(function(e){var n=e.index,r=e.open;t.toggleTask(n,r)})}},{key:"toggleTask",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(e,'"]'));if(r){var o=r.querySelector(".checklist-task-header");if(o){var i=r.classList.contains("checklist-task--active"),a=null!==n?n:!i;if(a){i||(r.classList.add("checklist-task--active"),o.setAttribute("aria-expanded","true"));var l=r.querySelector(".checklist-task-body-inner");if(l){var c=l.offsetHeight,u=r.querySelector(".checklist-task-body");u&&u.style.setProperty("--task-body-active-height","".concat(c,"px"))}r.querySelectorAll("iframe").forEach(function(n){n._heightListenerAdded||(n._heightListenerAdded=!0,n.addEventListener("load",function(){t.activeStep===e&&t.updateActiveTaskMaxHeight()}))})}else!a&&i&&(r.classList.remove("checklist-task--active"),o.setAttribute("aria-expanded","fal
1se"))}}}}],ur(r.prototype,t),n&&ur(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}();"u"<typeof customElements||customElements.get("gleap-checklist")||customElements.define("gleap-checklist",e)}}(),function(){if("u">typeof customElements&&"u">typeof HTMLElement&&"u">typeof window&&!customElements.get("gleap-agent-conversation")){var e=function(e){var t,n;function r(){var e,t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return uy(uh((t=r,n=[].concat(i),t=uv(t),e=function(e,t){if(t&&("object"===ud(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return uh(e)}(this,ug()?Reflect.construct(t,n||[],uv(this).constructor):t.apply(this,n)))),"_iframe",null),uy(uh(e),"_agentConvUrl","https://outboundmedia.gleap.io/agent-conversation"),uy(uh(e),"_messageListener",null),uy(uh(e),"_config",{}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&um(e,t)}(r,uf(HTMLElement)),n=[{key:"observedAttributes",get:function(){return["agentId","conversationId","dark","placeholder","agentColor","emptyText","context"]}}],t=[{key:"connectedCallback",value:function(){this._injectIframe(),this._listenForMessages()}},{key:"disconnectedCallback",value:function(){this._messageListener&&window.removeEventListener("message",this._messageListener),this._messageListener=null}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&this._iframe&&this._sendConfig()}},{key:"_injectIframe",value:function(){if(!this._iframe){this.style.display="block",this.style.width="100%",this.style.height="100%";var e=document.createElement("iframe");e.style.cssText="width: 100%; height: 100%; border: 0; background: transparent;",e.setAttribute("frameborder","0"),e.setAttribute("allow","autoplay; encrypted-media; microphone *;"),e.title="Gleap Agent Conversation",this.appendChild(e),this._iframe=e,D(e,this._agentConvUrl)}}},{key:"_listenForMessages",value:function(){var e=this;this._messageListener||(this._messageListener=function(t){var n,r,o=!1,i=!1;try{o=!(!e._iframe||t.source!==e._iframe.contentWindow);var a=new URL(e._agentConvUrl);i=t.origin===a.origin}catch(e){return}if(o||i){try{n=JSON.parse(t.data)}catch(e){return}"AGENT_CONVERSATION"===(null==(r=n)?void 0:r.type)&&("agent-conv-loaded"===n.name&&e._sendConfig(),"agent-conv-conversation-created"===n.name&&e.dispatchEvent(new CustomEvent("gleap-agent-conversation-created",{bubbles:!0,composed:!0,detail:n.data})),"agent-conv-message-sent"===n.name&&e.dispatchEvent(new CustomEvent("gleap-agent-message-sent",{bubbles:!0,composed:!0,detail:n.data})),"agent-conv-reply-received"===n.name&&e.dispatchEvent(new CustomEvent("gleap-agent-reply-received",{bubbles:!0,composed:!0,detail:n.data})),"agent-conv-error"===n.name&&e.dispatchEvent(new CustomEvent("gleap-agent-error",{bubbles:!0,composed:!0,detail:n.data})))}},window.addEventListener("message",this._messageListener))}},{key:"_sendConfig",value:function(){var e,t=this;if(null!=(e=this._iframe)&&e.contentWindow){var n="https://api.gleap.io",r="",o="",i="";try{var a,l,c=tR.getInstance();n=c.apiUrl||n,r=c.sdkKey||"",o=(null==(a=c.session)?void 0:a.gleapId)||"",i=(null==(l=c.session)?void 0:l.gleapHash)||""}catch(e){}var u={agentId:this.getAttribute("agentId")||"",conversationId:this.getAttribute("conversationId")||null,dark:"true"===this.getAttribute("dark")||""===this.getAttribute("dark"),placeholder:this.getAttribute("placeholder")||"Type a message...",agentColor:this.getAttribute("agentColor")||null,emptyText:this.getAttribute("emptyText")||"How can I help you today?",context:function(){try{var e=t.getAttribute("context");return e?JSON.parse(e):null}catch(e){return null}}(),apiUrl:n,sdkKey:r,gleapId:o,gleapHash:i};this._config=u,this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-data",data:u}),"*")}}},{key:"sendMessage",value:function(e){var t;null!=(t=this._iframe)&&t.contentWindow&&null!=e&&e.trim()&&this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-send-message",data:{content:e}}),"*")}},{key:"clearConversation",value:function(){var e;null!=(e=this._iframe)&&e.contentWindow&&this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-clear",data:{}}),"*")}}],up(r.prototype,t),n&&up(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}();customElements.define("gleap-agent-conversation",e)}}());var uj=function(){var e,t;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),u_(this,"initialized",!1),u_(this,"offlineMode",!1),u_(this,"disablePageTracking",!1),u_(this,"disableInAppNotifications",!1),u_(this,"disableQueryParams",!1),u_(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"u">typeof window&&(nR.getInstance(),nU.getInstance().start(),nK.getInstance().start(),cF.getInstance().start())}return e=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){nT.getInstance().destroy(),tW.getInstance().start().then(function(){I.getInstance().refresh(),lz.getInstance().injectNotificationUI()}).catch(function(e){console.warn("Failed to initialize Gleap.")})}},{key:"performActions",value:function(e){for(var t=0;t<e.length;t++){var r,o,i=e[t];if(i&&i.actionType){if(((null==(r=i.pageRules)?void 0:r.length)>0||i.pageFilter)&&window&&window.location&&!tw(window.location.href,i))continue;"notification"===i.actionType?"widget"===(null==i||null==(o=i.data)||null==(o=o.checklist)?void 0:o.popupType)?n.openChecklist(i.data.checklist.id,!0):this.disableInAppNotifications||n.showNotification(i):"banner"===i.actionType?n.showBanner(i):"modal"===i.actionType?n.showModal(i):"tour"===i.actionType?n.startProductTourWithConfig(i.outbound,i.data,!1):n.showSurvey(i.actionType,i.format)}}}},{key:"setGlobalDataItem",value:function(e,t){this.globalData[e]=t}},{key:"getGlobalDataItem",value:function(e){return this.globalData[e]}},{key:"takeCurrentReplay",value:function(){var e=ll.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}],t=[{key:"getInstance",value:function(){return this.instance||(this.instance=new n),this.instance}},{key:"setEnvironment",value:function(e){nR.getInstance().environment=e}},{key:"setTags",value:function(e){cc.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){nT.getInstance().setUrlHandler(e)}},{key:"setOfflineMode",value:function(e){this.getInstance().offlineMode=e}},{key:"setDisableInAppNotifications",value:function(e){this.getInstance().disableInAppNotifications=e}},{key:"setDisablePageTracking",value:function(e){this.getInstance().disablePageTracking=e}},{key:"disableConsoleLogOverwrite",value:function(){nU.getInstance().stop()}},{key:"setAiTools",value:function(e){nx.getInstance().setAgentTools(e),lX.getInstance().sendAgentToolsUpdate(),nT.getInstance().sendConfigUpdate()}},{key:"attachNetworkLogs",value:function(e){_.getInstance().externalRequests=U(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";nU.getInstance().addLog(e,t)}},{key:"initialize",value:function(e){var t=this.getInstance();if(t.initialized)console.warn("Gleap already initialized.");else{t.initialized=!0;try{!function(){try{var e=function(){try{var e=document.querySelector(".gleap-frame-container-inner iframe");
1if(!e)return;r(e);var t=window.visualViewport,n=l(window.innerHeight)-l(t.height);!d&&n>=i?(e.style.setProperty("max-height",t.height+"px","important"),e.style.setProperty("transform","translateY("+t.offsetTop+"px)","important")):(e.style.removeProperty("max-height"),e.style.removeProperty("transform"))}catch(e){}},t=function(){try{window.setTimeout(function(){try{var e=p&&p.activeElement;if(e&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable))return;d=!0;var t=document.querySelector(".gleap-frame-container-inner iframe");t&&(t.style.removeProperty("max-height"),t.style.removeProperty("transform")),o()}catch(e){}},100)}catch(e){}},n=function(){d=!1,o()},r=function(e){try{var r=e.contentDocument;if(!r||r===p)return;p=r,r.addEventListener("focusout",t,!0),r.addEventListener("focusin",n,!0)}catch(e){}},o=function(){try{u||(u=!0,window.requestAnimationFrame(function(){u=!1,e()})),c&&clearTimeout(c),c=setTimeout(e,a)}catch(e){}};if(!("visualViewport"in window)||!window.visualViewport||!/iPad|iPhone|iPod/.test(navigator.userAgent)||V)return;V=!0;var i=150,a=350,l=function(e){return Math.round(e)},c=null,u=!1,d=!1,p=null,h=window.visualViewport;h.addEventListener("resize",o),h.addEventListener("scroll",o),window.addEventListener("orientationchange",function(){try{o()}catch(e){}}),e()}catch(e){}}()}catch(e){}var r=tR.getInstance();r.sdkKey=e,r.setOnSessionReady(function(){setTimeout(function(){tW.getInstance().start().then(function(){tF.getInstance().start(),G(function(){I.getInstance().injectFeedbackButton(),lz.getInstance().injectNotificationUI(),n.checkForUncompletedTour(),n.checkForUrlParams(),nm.notifyEvent("initialized")})}).catch(function(e){console.warn("Failed to initialize Gleap.")})},0)}),r.startSession()}}},{key:"openURL",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];nT.getInstance().urlHandler(e,t)}},{key:"disableQueryParams",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.getInstance().disableQueryParams=e}},{key:"checkForUrlParams",value:function(){if(this.getInstance().disableQueryParams)console.log("Query params are disabled.");else if("u">typeof window&&window.location.search)try{var e=new URLSearchParams(window.location.search),t=e.get("gleap_widget");t&&t.length>0&&n.open();var r=e.get("gleap_conversation");r&&r.length>0&&("true"===r?n.startConversation(!0):n.startBot(r,!0));var o=e.get("gleap_feedback");o&&o.length>0&&n.startFeedbackFlow(o);var i=e.get("gleap_survey"),a=e.get("gleap_survey_format");i&&i.length>0&&n.showSurvey(i,"survey_full"===a?"survey_full":"survey");var l=e.get("gleap_tour");if(l&&l.length>0){var c=parseInt(e.get("gleap_tour_delay"));isNaN(c)&&(c=2),setTimeout(function(){n.startProductTour(l)},1e3*c)}}catch(e){}}},{key:"destroy",value:function(){ll.getInstance().stop(),tF.getInstance().stop(),nT.getInstance().destroy(),I.getInstance().destroy(),lz.getInstance().clearAllNotifications(!0),lX.getInstance().destroy(),tR.getInstance().clearSession(0,!1),l3.getInstance().removeBannerUI(),this.instance=null}},{key:"closeBanner",value:function(){l3.getInstance().removeBannerUI()}},{key:"closeModal",value:function(){ce.getInstance().hideModal()}},{key:"showAiChatbar",value:function(){var e=lX.getInstance();e.manuallyHidden=!1,e.manuallyShown=!0,e.show()}},{key:"hideAiChatbar",value:function(){var e=lX.getInstance();e.manuallyHidden=!0,e.manuallyShown=!1,e.hide()}},{key:"setAiChatbarQuickActions",value:function(e){lX.getInstance().setQuickActions(e)}},{key:"setAiChatbarPlaceholder",value:function(e){lX.getInstance().setPlaceholder(e)}},{key:"setUseCookies",value:function(e){tR.getInstance().useCookies=e}},{key:"disableLocalStorage",value:function(){tR.getInstance().localStorageDisabled=!0}},{key:"identify",value:function(e,t,n){return tR.getInstance().identifySession(e,U(t),n)}},{key:"updateContact",value:function(e){return tR.getInstance().updateSession(U(e))}},{key:"clearIdentity",value:function(){tR.getInstance().clearSession()}},{key:"getIdentity",value:function(){return tR.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=tR.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return nT.getInstance().isOpened()}},{key:"hide",value:function(){nT.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){_.getInstance().setMa
1xRequests(e)}},{key:"startNetworkLogger",value:function(){_.getInstance().start()}},{key:"setNetworkLogsBlacklist",value:function(e){_.getInstance().setBlacklist(e)}},{key:"setNetworkLogPropsToIgnore",value:function(e){_.getInstance().setFilters(e)}},{key:"setReplayOptions",value:function(e){ll.getInstance().setOptions(e)}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];nT.getInstance().hideWidget(e)}},{key:"open",value:function(){nT.getInstance().setAppMode("widget"),nT.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){tF.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){tF.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=U(e);lN.getInstance().formPreFill=t,nT.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){nm.on(e,t)}},{key:"enableShortcuts",value:function(e){e?lR.getInstance().start():lR.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){I.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){nR.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){nR.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){tR.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){tR.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){l3.getInstance().setBannerUrl(e)}},{key:"setModalUrl",value:function(e){ce.getInstance().setModalUrl(e)}},{key:"setFrameUrl",value:function(e){nT.getInstance().frameUrl=e}},{key:"setTicketAttribute",value:function(e,t){n0.getInstance().setTicketAttribute(e,t)}},{key:"unsetTicketAttribute",value:function(e){n0.getInstance().unsetTicketAttribute(e)}},{key:"clearTicketAttributes",value:function(){n0.getInstance().clearTicketAttributes()}},{key:"attachCustomData",value:function(e){n0.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){n0.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){n0.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){n0.getInstance().clearCustomData()}},{key:"playSound",value:function(e){co.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=lz.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(e){lT.getInstance().setOverrideLanguage(e),n.getInstance().initialized&&setTimeout(function(){n.getInstance().softReInitialize(),n.updateContact({lang:e})},1e3)}},{key:"registerAgentToolAction",value:function(e){nx.getInstance().registerAgentToolAction(e)}},{key:"registerCustomAction",value:function(e){n5.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){n5.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:I.FEEDBACK_BUTTON_BOTTOM_LEFT;G(function(){var c,u,d,p,h,f,g,m,v,y,b,w,k,x,S,C,E,L,A;c=o,u=T(e),d=T(n),p=T(r),h=T(t),f="#ffffff"===p,g=O(t,"#ffffff"===h?-35:-15),m=O(r,f?100:-120),v=O(r,f?30:-12),y=O(r,f?80:-30),b=Math.round(1.05*(c=parseInt(c,10))),w=Math.round(.8*c),k=Math.round(.6*c),x=Math.round(.4*c),S=Math.round(.25*c),C=57+a,l===I.FEEDBACK_BUTTON_CLASSIC_BOTTOM?C=a+15:(l&&l.includes("CLASSIC")||l===I.FEEDBACK_BUTTON_NONE)&&(C=a),E='\n    .gleap-font, .gleap-font * {\n      font-style: normal;\n      font-variant-caps: normal;\n      font-variant-ligatures: normal;\n      font-variant-numeric: normal;\n      font-variant-east-asian: normal;\n      font-weight: normal;\n      font-stretch: normal;\n      font-size: 100%;\n      line-height: 1;\n      font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n    }\n    .gleap-ai-ui-widget {\n      display: none;\n    }\n    .gleap-input-highlight {\n      box-shadow: 0 0 0 3px '.concat(e," !important;\n    }\n    .gleap-frame-container {\n      right: ").concat(i,"px;\n      bottom: ").concat(61+a,"px;\n      width: calc(100% - 40px);\n      max-width: 410px;\n      position: fixed;\n      z-index: ").concat(0x7fffffef,";\n      visibility: visible;\n      box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n      border-radius: ").concat(1.5*w,"px;\n      overflow: hidden;\n      animation-duration: .3s;\n      animation-fill-mode: both;\n      animation-name: gleapFadeInUp;\n      user-select: none;\n      pointer-events: none;\n      transition: max-width 0.3s ease-out;\n    }\n\n    .gleap-admin-highlight {\n      box-shadow: 0px 0px 0px 4px red;\n    }\n\n    :root {\n      --gleap-margin-top: 50px;\n    }\n\n    .gleap-tooltip-anchor {\n      position: relative;\n      display: inline-block;\n      float: left;\n      max-width: 0px;\n      width: 17px;\n    }\n\n    .gleap-tooltip-hotspot {\n      position: absolute;\n      display: block;\n      width: 17px;\n      height: 17px;\n      cursor: pointer;\n      top: 0px;\n      left: 0px;\n    }\n\n    @keyframes gleap-pulse {\n      0% {\n        transform: scale(0);\n        opacity: 0.25;\n      }\n      45% {\n        transform: scale(2.5);\n        opacity: 0;\n      }\n      100% {\n        transform: scale(0);\n        opacity: 0;\n      }\n    }\n\n    .gleap-tooltip-hotspot-animation {\n      position: absolute;
1\n      border-radius: 17px;\n      opacity: 0.25;\n      display: block;\n      width: 17px;\n      height: 17px;\n      cursor: pointer;\n      top: 0px;\n      left: 0px;\n      animation: gleap-pulse 5s infinite;\n    }\n\n    .gleap-tooltip-hotspot svg {\n      width: 17px;\n      height: 17px;\n      object-fit: contain;\n      display: block;\n    }\n\n    .gleap-tooltip-inner {\n      position: relative;\n      overflow: visible;\n      font-size: 14px;\n      font-weight: normal;\n      color: #000;\n      line-height: 1.3;\n    }\n\n    .gleap-tooltip {\n      position: absolute;\n      background-color: #fff;\n      color: #000;\n      font-size: 15px;\n      line-height: 18px;\n      padding: 16px;\n      padding-top: 8px;\n      padding-bottom: 8px;\n      border-radius: 4px;\n      max-width: min(350px, 80vw);\n      box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n      opacity: 0;\n      visibility: hidden;\n      transition: opacity 0.2s, visibility 0.2s;\n      z-index: ").concat(0x80000034,";\n    }\n\n    .gleap-tooltip a {\n      color: ").concat(e,";\n      text-decoration: underline;\n      display: inline !important;\n      margin: 0px !important;\n      padding: 0px !important;\n      word-break: break-word;\n    }\n\n    .gleap-tooltip ul {\n      padding-left: 16px;\n    }\n\n    .gleap-tooltip b {\n      font-weight: 600;\n    }\n\n    .gleap-tooltip h2 {\n      font-size: 18px;\n      line-height: 20px;\n      font-weight: 600;\n      margin-top: 8px;\n      margin-bottom: 8px;\n    }\n\n    .gleap-tooltip h3 {\n      font-size: 16px;\n      line-height: 18px;\n      font-weight: 600;\n      margin-top: 8px;\n      margin-bottom: 8px;\n    }\n\n    .gleap-tooltip p {\n      padding: 0px;\n      margin-top: 8px;\n      margin-bottom: 8px;\n    }\n\n    .gleap-tooltip img {\n      max-width: 100%;\n      max-height: 300px;\n      width: 100%;\n      height: auto;\n      object-fit: cover;\n      margin-top: 8px;\n      margin-bottom: 8px;\n      border-radius: 4px;\n    }\n\n    .gleap-tooltip iframe,\n    .gleap-tooltip video {\n      max-width: 100%;\n      width: 100%;\n      height: auto;\n      min-height: 200px;\n      display: block;\n      border: none;\n      outline: none;\n      padding: 0px;\n      margin-top: 8px;\n      margin-bottom: 8px;\n      border-radius: 4px;\n    }\n\n    .gleap-tooltip-arrow {\n      position: absolute;\n      width: 20px;\n      height: 20px;\n    }\n\n    .gleap-tooltip-arrow svg {\n      width: 20px;\n      height: 20px;\n      object-fit: contain;\n    }\n\n    .gleap-b-frame {\n      width: 100%;\n      height: 100%;\n      border: none;\n      pointer-events: auto;\n      padding: 0px;\n      margin: 0px;\n    }\n\n    .gleap-b-shown {\n      transition: margin 0.3s ease-out;\n      margin-top: var(--gleap-margin-top);\n      position: relative;\n      z-index: 10000;\n    }\n\n    .gleap-b-f {\n      margin-top: 0px;\n    }\n\n    .gleap-b {\n      display: none;\n      position: absolute;\n      top: calc(-1 * var(--gleap-margin-top));\n      left: 0px;\n      width: 100vw;\n      height: var(--gleap-margin-top);\n      z-index: ").concat(0x80000033,";\n    }\n\n    @keyframes gleapSlideIn {\n      from {\n          top: calc(-1 * var(--gleap-margin-top));\n      }\n      to {\n          top: 10px;\n      }\n    }\n\n    .gleap-b-f .gleap-b {\n      position: fixed;\n      top: 10px;\n      animation: gleapSlideIn .25s ease-out forwards;\n      max-width: 800px;\n      width: calc(100% - 20px);\n      left: 50%;\n      z-index: ").concat(0x80000033,";\n      transform: translateX(-50%);\n      border-radius: ").concat(x,"px;\n      overflow: hidden;\n      box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 5px 5px rgba(0, 0, 0, 0.05);\n    }\n\n    .gleap-b-shown .gleap-b {\n      display: block;\n    }\n\n    .gleap-image-view {\n      position: fixed;\n      top: 0px;\n      left: 0px;\n      width: 100vw;\n      height: 100vh;\n      z-index: ").concat(0x80000033,";\n      background-color: ").concat(p,"cc;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n\n    .gleap-image-view-image {\n      width: 90%;\n      height: auto;\n      max-width: 90%;\n      max-height: 90%;\n      object-fit: contain;\n    }\n\n    .gleap-image-view-close {\n      position: fixed;\n      top: 20px;\n      right: 20px;\n      width: 32px;\n      height: 32px;\n      opacity: 0.8;\n      z-index: ").concat(0x8000005c,";\n      box-shadow: 0px 5px 18px rgba(0, 0, 0, 0.16);\n      cursor: pointer;\n    }\n\n    .gleap-image-view-close:hover {\n      opacity: 1;\n    }\n\n    .gleap-image-view-close svg path {\n      fill: ").concat(r,";\n    }\n\n    [dir=rtl].gleap-frame-container {\n      right: auto;\n      left: ").concat(i,"px;\n      bottom: ").concat(61+a,'px;\n    }\n\n    .gleap-frame-container--loading iframe {\n      opacity: 0;\n    }\n\n    .gleap-frame-container--loading::before {\n      content: " ";\n      position: fixed;\n      top: 0px;\n      left: 0px;\n      right: 0px;\n      height: 100%;\n      max-height: 380px;\n      background: linear-gradient(\n        130deg,\n        ').concat(g," 0%,\n        ").concat(t,' 100%\n      );\n    }\n    \n    .gleap-frame-container--loading::after {\n      content: " ";\n      position: fixed;\n      top: 0px;\n      left: 0px;\n      right: 0px;\n      height: 100%;\n      height: 100%;\n      max-height: 380px;\n      background: linear-gradient(\n        180deg,\n        transparent 60%,\n        ').concat(r,"1A 70%,\n        ").concat(r," 100%\n      );\n    }\n\n    .gleap-frame-container--loading-nogradient::before {\n      max-height: 340px;\n      background: ").concat(t," !important;\n    }\n\n    .gleap-frame-container--loading-nofade::after {\n      display: none !important;\n    }
1\n\n    .gleap-frame-container--survey {\n      bottom: ").concat(a,"px !important;\n    }\n\n    .gleap-frame-container--extended {\n      max-width: 690px !important;\n    }\n\n    .gleap-frame-container--survey-full {\n      position: fixed;\n      top: 0 !important;\n      left: 0 !important;\n      bottom: 0 !important;\n      right: 0 !important;\n      width: 100vw !important;\n      max-width: 100vw !important;\n      height: 100vh;\n      height: 100dvh !important;\n      background-color: rgba(0, 0, 0, 0.5);\n      backdrop-filter: blur(6px);\n      display: flex !important;\n      justify-content: center !important;\n      align-items: center !important;\n      max-height: 100vh;\n      max-height: 100dvh !important;\n      border-radius: 0 !important;\n      animation-name: none !important;\n    }\n\n    .gleap-frame-container--survey-full .gleap-frame-container-inner {\n      max-width: 640px !important;\n      width: calc(100% - 24px);\n      border-radius: ").concat(w,"px;\n      overflow: hidden;\n    }\n\n    .gleap-frame-container--classic {\n      right: ").concat(i,"px;\n      bottom: ").concat(a,"px;\n    }\n\n    [dir=rtl].gleap-frame-container--classic {\n      right: auto;\n      left: ").concat(i,"px;\n      bottom: ").concat(a,"px;\n    }\n\n    .gleap-frame-container--no-button {\n      bottom: ").concat(a,"px;\n    }\n\n    [dir=rtl].gleap-frame-container--classic-left {\n      bottom: ").concat(a,"px;\n    }\n\n    .gleap-frame-container--classic-left {\n      right: auto;\n      left: ").concat(i,"px;\n      bottom: ").concat(a,"px;\n    }\n\n    [dir=rtl].gleap-frame-container--classic-left {\n      left: auto;\n      right: ").concat(i,"px;\n      bottom: ").concat(a,"px;\n    }\n\n    .gleap-frame-container--modern-left {\n      right: auto;\n      left: ").concat(i,"px;\n      bottom: ").concat(61+a,"px;\n    }\n\n    [dir=rtl].gleap-frame-container--modern-left {\n      left: auto;\n      right: ").concat(i,"px;\n      bottom: ").concat(61+a,"px;\n    }\n\n    .gleap-frame-container--animate {\n      pointer-events: auto !important;\n    }\n\n    @keyframes gleapFadeInUp {\n      from {\n          opacity: 0;\n          transform: translate3d(0, 100%, 0);\n      }\n      to {\n          opacity: 1;\n          transform: translate3d(0, 0, 0);\n      }\n    }\n\n    @keyframes gleapFadeInUpMobile {\n      from {\n          opacity: 0;\n          transform: translate3d(0, 10%, 0);\n      }\n      to {\n          opacity: 1;\n          transform: translate3d(0, 0, 0);\n      }\n    }\n\n    .gleap-notification-container {\n      position: fixed;\n      bottom: ").concat(C,"px;\n      right: ").concat(i,"px;\n      z-index: ").concat(0x7fffffee,";\n      display: flex;\n      flex-direction: column;\n      align-items: flex-end;\n      width: 100%;\n      max-width: min(340px, 80vw);\n    }\n\n    .gleap-notification-container--left {\n      left: ").concat(4+i,"px;\n      right: initial !important;\n    }\n\n    [dir=rtl].gleap-notification-container {\n      left: ").concat(4+i,"px;\n      right: initial !important;\n    }\n\n    [dir=rtl].gleap-notification-container--left {\n      left: initial !important;\n      right: ").concat(i,"px !important;\n      align-items: flex-start !important;\n    }\n\n    .gleap-notification-container--no-button {\n      bottom: ").concat(a,"px;\n    }\n\n    .gleap-notification-item {\n      animation-duration: 0.7s;\n      animation-fill-mode: both;\n      animation-name: bbFadeInOpacity;\n    }\n\n    .gleap-notification-close {\n      border-radius: 100%;\n      width: 28px;\n      height: 28px;\n      background-color: ").concat(m,";\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      margin-bottom: 8px;\n      cursor: pointer;\n      visibility: hidden;\n      pointer-events: none;\n    }\n\n    .gleap-notification-container:hover .gleap-notification-close {\n      visibility: visible;\n      pointer-events: auto;\n      animation-duration: 0.7s;\n      animation-fill-mode: both;\n      animation-name: bbFadeInOpacity;\n    }\n\n    @media only screen and (max-width: 450px) {\n      .gleap-notification-close {\n        visibility: visible;\n        pointer-events: auto;\n        animation-duration: 0.7s;\n        animation-fill-mode: both;\n        animation-name: bbFadeInOpacity;\n      }\n    }\n\n    .gleap-notification-close svg {\n      width: 45%;\n      height: 45%;\n      object-fit: contain;\n      fill: ").concat(r,";\n    }\n\n    .gleap-notification-item-checklist-container {\n      display: flex;\n      animation: fadeIn;\n      animation-duration: .45s;\n      background-color: ").concat(r,";\n      border-radius: ").concat(m,";\n      box-sizing: border-box;\n      cursor: pointer;\n      flex-direction: column;\n      overflow: hidden;\n      box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n      border-radius: ").concat(k,"px;\n      margin-bottom: 12px;\n    }\n\n    .gleap-notification-item-checklist-content {\n      align-items: flex-start;\n      display: flex;\n      flex-direction: column;\n      padding: 15px;\n      width: 100%;\n      width: min(310px, 70vw);\n      max-width: min(310px, 70vw);\n    }\n\n    .gleap-notification-item-checklist-content-title {\n      color: ").concat(p,";\n      font-size: 15px;\n      font-weight: 500;\n      line-height: 21px;\n      margin-bottom: 10px;\n      max-width: 100%;\n      -webkit-line-clamp: 3;\n      -webkit-box-orient: vertical;\n      overflow: hidden;\n    }\n\n    .gleap-notification-item-checklist-content-progress {\n      width: 100%;\n      height: 8px;\n      border-radius: 8px;\n      background-color: ").concat(v,";\n    }\n\n    .gleap-notification-item-checklist-content-progress-inner {\n      height: 100%;\n      border-radius: 8px;\n      background-color: ").concat(e,";\n    }\n\n    .gleap-notification-item-checklist-content-next {\n      color: ").concat(m,";\n      font-size: 15px;\n      font-weight: normal;\n      line-height: 21px;\n      margin-top: 10px;\n      max-width: 100%;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      display: flex;\n      align-items: center;\n    }\n\n    .gleap-notification-item-checklist-content-next svg {\n      height: 18px;\n      margin-right: 5px;\n      width: auto;\n    }\n\n    .gleap-notification-item-checklist-content-next b {\n      font-size: 15px;\n      font-weight: normal;\n      color: ").concat(p,";\n    }\n\n    .gleap-notification-item-news {\n      width: 100%;\n    }\n\n    .gleap-news-pagination {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      margin-top: 10px;\n      width: 100%;\n    }\n\n    .gleap-news-page-indicator {\n      font-size: 12px;\n      color: ").concat(m,";\n    }\n\n    .gleap-news-next-button {\n      background-color: ").concat(e,";\n      color: ").concat(u,";\n      border-radius: ").concat(S,"px;\n      box-sizing: border-box;\n      padding: 5px 10px;\n      font-size: 14px;\n      font-weight: bold;\n      line-height: 21px;\n      border: none;\n      text-align: center;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      box-shadow: none !important;\n      outline: none !important;^\n    }\n\n    .gleap-notification-item-news-content {\n      align-items: flex-start;\n      display: flex;\n      flex-direction: column;\n      padding: 15px;\n    }\n\n    .gleap-notification-item-news-preview {\n      color: ").concat(m,";\n      font-size: 14px;\n      line-height: 21px;\n      font-weight: 400;\n      overflow-wrap: break-word;\n      word-break: break-word;\n      display: block;\n      display: -webkit-box;\n      -webkit-line-clamp: 2;\n      -webkit-box-orient: vertical;\n      overflow: hidden;\n    }\n\n    .gleap-notification-item-news-sender {\n      display: flex;\n      align-items: center;\n      color: ").concat(m,";\n      font-size: 15px;\n      line-height: 21px;\n      font-weight: 400;\n    }\n    \n    .gleap-notification-item-news-content-title {\n      color: ").concat(p,";\n      font-size: 15px;\n      font-weight: 500;\n      line-height: 21px;\n      margin-bottom: 6px;\n      max-width: 100%;\n      -webkit-line-clamp: 3;\n      -webkit-box-orient: vertical;\n      overflow: hidden;\n      cursor: pointer;\n    }\n\n    .gleap-notification-item-news-sender img {\n      border-radius: 100%;\n      height: 20px;\n      margin-right: 8px;\n      object-fit: cover;
1\n      width: 20px;\n    }\n\n    [dir=rtl] .gleap-notification-item-news-sender img {\n      margin-left: 8px;\n      margin-right: 0px !important;\n    }\n\n    .gleap-notification-item-news-container {\n      display: flex;\n      animation: fadeIn;\n      animation-duration: .45s;\n      background-color: ").concat(r,";\n      border-radius: ").concat(m,";\n      box-sizing: border-box;\n      flex-direction: column;\n      overflow: hidden;\n      box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n      border-radius: ").concat(k,"px;\n      margin-bottom: 12px;\n    }\n\n    .gleap-notification-item-news-image {\n      background-color: ").concat(m,";\n      height: 170px;\n      max-height: 170px;\n      object-fit: cover;\n      width: 100%;\n      cursor: pointer;\n    }\n      \n    .gleap-notification-item-news-content-title:hover {\n      color: ").concat(e,";\n    }\n\n    .gleap-notification-item {\n      display: flex;\n      align-items: flex-end;\n      cursor: pointer;\n    }\n\n    .gleap-notification-item img {\n      width: 32px;\n      height: 32px;\n      min-width: 32px;\n      border-radius: 100%;\n      object-fit: cover;\n      margin-right: 8px;\n      margin-bottom: 12px;\n      cursor: pointer;\n    }\n\n    [dir=rtl] .gleap-notification-item img {\n      margin-left: 8px;\n      margin-right: 0px !important;\n    }\n\n    .gleap-notification-item-container {\n      box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n      border-radius: ").concat(k,"px;\n      border-bottom-left-radius: 0px;\n      padding: 20px;\n      background-color: ").concat(r,";\n      margin-bottom: 12px;\n      cursor: pointer;\n      font-size: 15px;\n      line-height: 21px;\n      color: ").concat(p,';\n      position: relative;\n    }\n\n    .gleap-notification-item-container::after {\n      content: " ";\n      position: absolute;\n      bottom: 0px;\n      width: 0px;\n      height: 0px;\n      left: -6px;\n      border-style: solid;\n      border-width: 0px 0px 10px 6px;\n      border-color: transparent transparent ').concat(r,";\n    }\n\n    .gleap-notification-item-sender {\n      color: ").concat(m,";\n      line-height: 20px;\n    }\n\n    .gleap-notification-item-content {\n      line-height: 20px;\n      color: ").concat(p,";\n      margin-top: 4px;\n      min-width: min(200px, 50vw);\n      word-wrap: break-word;\n      word-break: break-word;\n    }\n\n    .gleap-frame-container-inner {\n      position: relative;\n      width: 100%;\n      height: calc(100vh - ").concat(84+a,"px);\n      max-height: ").concat(700,'px;\n    }\n\n    .gleap-frame-container--survey .gleap-frame-container-inner {\n      height: calc(100vh - 40px);\n    }\n    \n    .gleap-frame-container-inner:before {\n      content: " ";\n      position: absolute;\n      width: 100%;\n      height: calc(100% - ').concat(w,"px);\n      top: ").concat(w,"px;\n      background-color: ").concat(r,";\n      z-index: -1;\n    }\n    \n    .gleap-frame-container iframe {\n      height: 100% !important;\n      width: 100% !important;\n      max-width: 100% !important;\n      display: block !important;\n      pointer-events: auto !important;\n    }\n    \n    .gleap-frame-container--hidden {\n      display: none !important;\n      pointer-events: none;\n      animation: none !important;\n    }\n    \n    .bb-feedback-button {\n      margin: 0px;\n      position: fixed;\n      bottom: ").concat(a,"px;\n      right: ").concat(i,"px;\n      border-radius: 30px;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      background-color: transparent;\n      color: #000000;\n      z-index: ").concat(0x7fffffee,";\n      box-sizing: border-box;\n      display: flex;\n      align-items: center;\n      padding: 0px;\n    }\n\n    @keyframes bbRedDotPulse {\n      0% {\n        opacity: 1;\n      }\n      50% {\n        opacity: 0.8;\n      }\n      100% {\n        opacity: 1;\n      }\n    }\n\n    .bb-feedback-button--red-dot {\n      position: absolute;\n      top: 0px;\n      right: 0px;\n      width: 14px;\n      height: 14px;\n      border-radius: 50%;\n      background-color: #ff3b30;\n      box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n      z-index: ").concat(0x7fffffef,";\n      animation: bbRedDotPulse 2s ease-in-out infinite;\n    }\n\n    [dir=rtl].bb-feedback-button {\n      bottom: ").concat(a,"px;\n      right: auto;\n      left: ").concat(i,"px;\n    }\n    \n    .bb-feedback-button--bottomleft {\n      bottom: ").concat(a,"px;\n      right: auto;\n      left: ").concat(i,"px;\n    }\n\n    [dir=rtl].bb-feedback-button--bottomleft {\n      bottom: ").concat(a,"px;\n      right: ").concat(i,'px;\n      left: auto;\n    }\n    \n    .bb-feedback-button--disabled {\n      display: none !important;\n    }\n\n    .bb-feedback-button--hidden {\n      display: none !important;\n    }\n    \n    .bb-feedback-button-text {\n      padding: 8px 12px;\n      display: flex;\n      flex-direction: column;\n      align-items: flex-start;\n      justify-content: center;\n      background-color: #fff;\n      border-radius: 8px;\n      box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n      position: relative;\n      z-index: 99;\n    }\n    \n    .bb-feedback-button-text:before {\n      content: "";\n      position: absolute;\n      box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n      transform: rotate(315deg);\n      bottom: 16px;\n      right: -4px;\n      border-width: 10px;\n      border-style: solid;\n      border-color: transparent #fff #fff transparent;\n    }\n    \n    .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n      display: none;\n    }\n    \n    .bb-feedback-button-text:after {\n      content: "";\n      position: absolute;\n      bottom: 12px;\n      right: 0px;\n      background-color: #fff;\n      width: 5px;\n      height: 30px;\n    }\n    \n    .bb-feedback-button-text-title {\n      font-family: sans-serif;\n      font-size: 14px;\n      color: #666;\n      line-height: 18px;\n      max-width: 220px;\n    }\n    \n    .bb-feedback-button-text-title b {\n      color: #000000;\n      font-weight: 600;\n    }\n\n    .bb-notification-bubble {\n      position: absolute;\n      top: -5px;\n      right: -5px;\n      min-width: 12px;\n      padding: 0px 4px;\n      height: 20px;
1\n      min-width: 20px;\n      border-radius: 20px;\n      background-color: red;\n      color: #fff;\n      font-size: 11px;\n      font-family: sans-serif;\n      text-align: center;\n      line-height: 20px;\n    }\n\n    .bb-notification-bubble--hidden {\n      display: none;\n    }\n    \n    .bb-feedback-button-icon {\n      width: 48px;\n      height: 48px;\n      border-radius: 48px;\n      background-color: #485bff;\n      transition: box-shadow, transform 0.2s ease-in-out;\n      box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n      position: relative;\n    }\n    \n    .bb-feedback-button-classic {\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      top: 50%;\n      right: 0px;\n      position: fixed;\n      transform: rotate(-90deg) translate(50%, -50%);\n      transform-origin: 100% 50%;\n      padding: 9px 20px;\n      text-align: center;\n      background-color: #485bff;\n      border-top-left-radius: 8px;\n      border-top-right-radius: 8px;\n      font-family: sans-serif;\n      font-size: 16px;\n      color: #fff;\n      box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n    }\n\n    [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n      top: 50%;\n      left: 0px;\n      right: auto;\n      transform: rotate(90deg) translate(-50%, -100%);\n      transform-origin: 0% 0%;\n    }\n    \n    .bb-feedback-button-classic--left {\n      top: 50%;\n      left: 0px;\n      right: auto;\n      transform: rotate(90deg) translate(-50%, -100%);\n      transform-origin: 0% 0%;\n    }\n\n    [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n      top: 50%;\n      right: 0px;\n      left: auto;\n      transform: rotate(-90deg) translate(50%, -50%);\n      transform-origin: 100% 50%;\n    }\n    \n    .bb-feedback-button-classic--bottom {\n      top: auto;\n      bottom: 0px;\n      transform: none;\n      right: ').concat(i,"px;\n      left: auto;\n    }\n    \n    [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n      top: auto;\n      bottom: 0px;\n      transform: none;\n      left: ").concat(i,"px;\n      right: auto;\n    }\n\n    .bb-feedback-button--classic-button-style {\n      animation-duration: 0.2s;\n      animation-fill-mode: both;\n      animation-name: bbFadeInOpacity;\n    }\n    \n    .bb-feedback-button--open.bb-feedback-button--classic-button-style {\n      animation-duration: 0.2s;\n      animation-fill-mode: both;\n      animation-name: bbFadeOutRight;\n    }\n    \n    .bb-feedback-button .bb-logo-logo {\n      position: absolute;\n      width: 30px;\n      height: 30px;\n      top: 9px;\n      left: 9px;\n      object-fit: contain;\n      animation-duration: 0.3s;\n      animation-fill-mode: both;\n      animation-name: bbZoomIn;\n    }\n    \n    .bb-feedback-button .bb-logo-arrowdown {\n      position: absolute;\n      width: 14px;\n      height: 14px;\n      top: 17px;\n      left: 17px;\n      object-fit: contain;\n      animation-duration: 0.3s;\n      animation-fill-mode: both;\n    }\n    \n    .bb-feedback-button .bb-logo-arrowdown {\n      animation-name: bbZoomOut;\n    }\n    \n    .bb-feedback-button--open .bb-logo-arrowdown {\n      animation-name: bbZoomIn;\n    }\n    \n    .bb-feedback-button--open .bb-logo-logo {\n      animation-name: bbZoomOut;\n    }\n    \n    .bb-feedback-button-icon:hover {\n      box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n      transform: scale(1.1);\n    }\n    \n    .bb-feedback-button--open .bb-feedback-button-text {\n      animation-name: bbFadeOutDown;\n    }\n    \n    .bb-feedback-button--open .bb-feedback-button-icon {\n      display: flex;\n    }\n    \n    .bb-capture-svg {\n      position: fixed;\n      z-index: ").concat(0x7fffffde,";\n      top: 0px;\n      left: 0px;\n      right: 0px;\n      width: 100%;\n      height: 100%;\n      padding: 0px;\n      margin: 0px;\n      cursor: crosshair;\n    }\n\n    .bb-capture-svg--preview {\n      cursor: auto !important;\n    }\n    \n    .bb-rec-on-circle {\n      animation-name: bbRecIconFade;\n      animation-duration: 2s;\n      animation-iteration-count: infinite;\n      animation-direction: alternate;\n    }\n    \n    .bb-rec-on-cont {\n      animation-name: bbRecIconContFade;\n      animation-duration: 2s;\n      animation-iteration-count: infinite;\n      animation-direction: alternate;\n    }\n    \n    .bb-capture-editor-drag-info {\n      position: fixed;\n      top: -200px;\n      left: 0px;\n      z-index: ").concat(0x7fffffe0,";\n      transition: opacity 0.3s ease-in-out;\n    }\n    \n    .bb-capture-editor-drag-info svg {\n      width: 24px;\n      height: 24px;\n    }\n    \n    .bb-capture-editor-borderlayer {\n      position: fixed;\n      top: 0px;\n      left: 0px;\n      width: 100vw;\n      height: 100vh;\n      border: 4px solid ").concat(e,";\n      cursor: crosshair;\n      z-index: ").concat(0x7fffffda,";\n      box-sizing: border-box;\n      pointer-events: none;\n    }\n    \n    .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n      background-color: rgba(0, 0, 0, 0.8);\n    }\n\n    .bb-capture-editor-recording .bb-capture-editor-borderlayer {\n      border: 4px solid #eb144c !important;\n    }\n    \n    .bb-capture-editor-recording .bb-capture-dismiss {\n      display: none;\n    }\n    \n    .bb-capture-editor-item-inactive {\n      opacity: 0.3;
1\n      cursor: not-allowed !important;\n    }\n    \n    .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n      opacity: 0.3;\n      cursor: not-allowed !important;\n    }\n    \n    .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n      display: none;\n    }\n    \n    .bb-capture-editor-notrecording .bb-capture-svg {\n      pointer-events: none !important;\n    }\n    \n    .bb-capture-toolbar {\n      position: fixed;\n      top: 20px;\n      left: 50%;\n      transform: translateX(-50%);\n      z-index: ").concat(0x7fffffe2,";\n      background-color: #fff;\n      padding: 5px;\n      display: flex;\n      align-items: center;\n      border-radius: 8px;\n      box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n      transition: opacity 0.3s ease-in-out;\n    }\n    \n    .bb-capture-dismiss {\n      position: fixed;\n      top: 0px;\n      right: 0px;\n      z-index: ").concat(0x7fffffe2,";\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      width: 36px;\n      height: 36px;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      background-color: ").concat(e,";\n      border-bottom-left-radius: ").concat(S,"px;\n    }\n\n    [dir=rtl] .bb-capture-dismiss {\n      top: 0px;\n      left: 0px;\n      right: auto;\n      border-bottom-left-radius: 0px !important;\n      border-bottom-right-radius: ").concat(S,"px;\n    }\n    \n    .bb-capture-dismiss svg path {\n      fill: ").concat(u,';\n    }\n    \n    .bb-capture-dismiss svg {\n      width: 20px;\n      height: 20px;\n      object-fit: contain;\n    }\n    \n    .bb-capture-button-next {\n      font-family: sans-serif;\n      box-sizing: border-box;\n      font-weight: 600;\n      text-align: center;\n      width: auto;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      margin: 0px;\n      line-height: 36px;\n      padding: 0px 12px;\n      font-size: 15px;\n      margin-left: 12px;\n    }\n\n    [dir=rtl].bb-capture-editor .bb-capture-button-next {\n      margin-left: auto;\n      margin-right: 12px;\n    }\n    \n    .bb-capture-toolbar-item-spacer {\n      width: 1px;\n      height: 38px;\n      min-width: 1px;\n      margin: 0px 5px;\n    }\n    \n    .bb-capture-toolbar-item {\n      width: 42px;\n      height: 38px;\n      min-width: 42px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      position: relative;\n      margin-right: 5px;\n    }\n\n    .drag-handle-item {\n      cursor: grab !important;\n      width: 34px;\n      min-width: 34px;\n    }\n\n    .drag-handle-item svg {\n      width: 18px !important;\n      height: 18px !important;\n    }\n    \n    .bb-capture-toolbar-item svg {\n      width: 23px;\n      height: 23px;\n      object-fit: contain;\n    }\n    \n    .bb-capture-toolbar-item-selectedcolor {\n      border-radius: 100%;\n      width: 20px;\n      height: 20px;\n      background-color: #db4035;\n    }\n    \n    .bb-capture-toolbar-item[data-type="undo"] svg {\n      width: 18px;\n      height: 18px;\n    }\n    \n    .bb-capture-toolbar-item[data-active="true"] {\n      position: relative;\n    }\n    \n    .bb-capture-preview {\n      display: none;\n      background-color: rgba(0, 0, 0, 0.6);\n      position: fixed;\n      top: 0px;\n      left: 0px;\n      width: 100vw;\n      height: 100vh;\n      justify-content: center;\n      align-items: center;\n      z-index: ').concat(0x7fffffe4,";\n    }\n    \n    .bb-capture-preview-inner {\n      background-color: #fff;\n      padding: 0px;\n      box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n      border-radius: 8px;\n      flex-direction: column;\n      max-width: 640px;\n      width: 100%;\n      margin: 20px;\n    }\n    \n    .bb-capture-preview-inner video {\n      border-radius: 8px 8px 0px 0px;\n      display: block;\n      border: 0px;\n      outline: none;\n      width: 100%;\n      max-height: 60vh;\n    }\n    \n    .bb-capture-preview-buttons {\n      display: flex;\n      justify-content: space-between;\n      padding: 14px;\n    }\n    \n    .bb-capture-preview-retrybutton {\n      font-family: sans-serif;\n      border-radius: 21px;\n      box-sizing: border-box;\n      padding: 12px 26px;\n      font-size: 16px;\n      line-height: 19px;\n      font-weight: 600;\n      text-align: center;\n      margin-top: 0px;\n      margin-bottom: 0px;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n    }\n    \n    .bb-capture-preview-sendbutton {\n      font-family: sans-serif;\n      border-radius: 21px;\n      box-sizing: border-box;\n      padding: 12px 26px;\n      font-size: 16px;\n      line-height: 19px;\n      font-weight: 600;\n      text-align: center;\n      margin-top: 0px;\n      margin-bottom: 0px;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n    }\n    \n    .bb-capture-preview-retrybutton:hover,\n    .bb-capture-preview-sendbutton:hover {\n      opacity: 0.9;\n    }\n    \n    .bb-capture-toolbar-item-recording {\n      margin-right: 0px;\n    }\n    \n    .bb-capture-toolbar-item-recording svg {\n      width: 33px;\n      height: 33px;\n    }\n    \n    .bb-capture-toolbar-item-colorpicker {\n      position: fixed;\n      top: 70px;\n      left: 50%;\n      transform: translateX(-50%);\n      z-index: ").concat(0x7fffffe2,';\n      background-color: #fff;\n      display: none;\n      padding: 10px;\n      box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n      border-radius: 8px;\n    }
1\n    \n    .bb-capture-toolbar-item-color {\n      width: 20px;\n      height: 20px;\n      border-radius: 100%;\n      margin-right: 12px;\n      box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n    }\n    \n    .bb-capture-toolbar-item-color:hover {\n      box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n    }\n    \n    .bb-capture-toolbar-item-color:last-of-type {\n      margin-right: 0px;\n    }\n    \n    [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n      margin-right: auto;\n      margin-left: 12px;\n    }\n    \n    [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n      margin-right: auto;\n      margin-left: 0px;\n    }\n    \n    .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n      display: none;\n    }\n    \n    .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n      display: block;\n    }\n    \n    .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n      display: block;\n    }\n    \n    .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n      display: none;\n    }\n    \n    .bb-capture-toolbar-item--active {\n      background-color: #eee;\n    }\n    \n    .bb-capture-toolbar-item:hover svg {\n      opacity: 1;\n    }\n    \n    .bb-capture-toolbar-item--active {\n      background-color: #f8f8f8;\n    }\n    \n    .bb-capture-toolbar-item--active svg {\n      opacity: 1;\n    }\n    \n    .bb-capture-toolbar-item--inactivecross::before {\n      content: "";\n      position: absolute;\n      top: 0;\n      right: 0;\n      bottom: 0;\n      left: 0;\n      height: 3px;\n      width: 26px;\n      margin: auto;\n      border-radius: 4px;\n      background-color: #e80000;\n      transform: rotate(45deg);\n    }\n    \n    .bb-capture-toolbar-item--inactivecross svg {\n      fill: #eee;\n    }\n    \n    .bb-capture-toolbar-item-timer {\n      text-align: left;\n      line-height: 32px;\n      font-size: 14px;\n      font-family: sans-serif;\n      margin: 5px;\n      min-width: 40px;\n      display: none;\n    }\n    \n    .bb-capture-toolbar-item .bb-tooltip {\n      background-color: #555;\n      color: #fff;\n      visibility: hidden;\n      font-size: 14px;\n      font-family: sans-serif;\n      text-align: center;\n      padding: 5px 10px;\n      position: absolute;\n      z-index: 1;\n      top: 45px;\n      left: 0px;\n      transform: translateX(calc(-50% + 21px));\n      opacity: 0;\n      transition: opacity 0.3s;\n      white-space: nowrap;\n    }\n    \n    .bb-capture-toolbar-item .bb-tooltip::after {\n      content: "";\n      position: absolute;\n      bottom: 100%;\n      left: 50%;\n      margin-left: -5px;\n      border-width: 5px;\n      border-style: solid;\n      transform: rotate(180deg);\n      border-color: #555 transparent transparent transparent;\n    }\n    \n    .bb-capture-toolbar-item:hover .bb-tooltip {\n      visibility: visible;\n      opacity: 1;\n    }\n    \n    .bb-capture-options {\n      display: none;\n    }\n    \n    .bb-capture-options--active {\n      display: flex;\n    }\n\n    @keyframes bbFadeOutRight {\n      from {\n        opacity: 1;\n      }\n    \n      to {\n        opacity: 0;\n      }\n    }\n    \n    @keyframes bbFadeOutDown {\n      from {\n        opacity: 1;\n      }\n    \n      to {\n        opacity: 0;\n        transform: translate3d(0, 100%, 0);\n      }\n    }\n    \n    @keyframes bbFadeInOpacity {\n      from {\n        opacity: 0;\n      }\n    \n      to {\n        opacity: 1;\n      }\n    }\n    \n    @keyframes bbZoomOut {\n      from {\n        opacity: 1;\n      }\n    \n      50% {\n        opacity: 0;\n        transform: scale3d(0.3, 0.3, 0.3);\n      }\n    \n      to {\n        opacity: 0;\n      }\n    }\n    \n    @keyframes bbZoomIn {\n      from {\n        opacity: 0;\n        transform: scale3d(0.3, 0.3, 0.3);\n      }\n    \n      50% {\n        opacity: 1;\n      }\n    }\n    \n    @keyframes bbRecIconContFade {\n      0% {\n        fill: #b10802;\n      }\n      50% {\n        fill: #ff0000;\n      }\n      100% {\n        fill: #b10802;\n      }\n    }  \n    .bb-capture-preview-retrybutton {\n      color: ').concat(p,";\n      border-radius: ").concat(b,"px;\n      background-color: ").concat(v,";\n    }\n    .bb-capture-preview-retrybutton:hover {\n      background-color: ").concat(y,";\n    }\n    @keyframes bb-suc-fill {\n      100% {\n        box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n      }\n    }\n    .bb-capture-toolbar-item-spacer {\n      background-color: ").concat(v,";\n    }\n    .bb-tooltip {\n      border-radius: ").concat(x,"px;\n    }\n    @keyframes bbRecIconFade {\n      0% {\n        fill: transparent;\n      }\n      50% {\n        fill: ").concat(y,";\n      }\n      100% {\n        fill: transparent;\n      }\n    }\n    .bb-capture-preview-sendbutton {\n      color: ").concat(u,";\n      background-color: ").concat(e,";\n      border-radius: ").concat(b,"px;\n    }\n    .bb-capture-button-next {\n      color: ").concat(u,";\n      background-color: ").concat(e,";\n      border-radius: ").concat(S,"px;\n    }\n    .bb-capture-preview-inner {\n      background-color: ").concat(r,";\n      border-radius: ").concat(x,"px;\n    }\n    .bb-capture-toolbar-item-timer {\n      color: ").concat(m,";\n    }\n    .bb-svg-path {\n      fill: ").concat(p,";\n    }\n    .bb-capture-toolbar-item {\n      border-radius: ").concat(x,"px;\n    }\n    .bb-capture-toolbar {\n      background-color: ").concat(r,";\n      border-radius: ").concat(x,"px;\n    }\n    .bb-capture-toolbar-item-colorpicker {\n      background-color: ").concat(r,";\n    }\n    .bb-capture-toolbar-item--active {\n      background-color: ").concat(v,";\n    }\n    .bb-feedback-button-classic {\n      border-top-left-radius: ").concat(x,"px;\n      border-top-right-radius: ").concat(x,"px;\n    }\n    .bb-logo-logo--default path {\n      fill: ").concat(d,";\n    }\n    .bb-logo-arrowdown {\n      fill: ").concat(d,";\n    }\n    .bb-feedback-button-icon {\n        background-color: ").concat(n,";\n    }\n    .bb-feedback-button-classic {\n      background-color: ").concat(n,";\n      color: ").concat(d,";\n    }\n\n    @media only screen and (max-width: 450px) {\n      [dir=rtl].gleap-frame-container,\n      .gleap-frame-container {\n        left: 0px;\n        right: 0px;\n        width: 100vw;\n        max-width: 100vw;\n        min-height: 100vh;\n        max-height: 100vh;\n        min-height: 100dvh !important;\n        max-height: 100dvh !important;\n        top: 0px;\n        bottom: 0px;\n        border-radius: 0px;\n        animation-name: gleapFadeInUpMobile;\n      }\n\n      .gleap-frame-container-inner {\n        width: 100vw;\n        height: 100%;\n      }\n\n      .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n        max-height: calc(var(--glvh, 1vh) * 100) !important;\n      }
1\n\n      .gleap-frame-container--survey {\n        height: auto !important;\n        top: initial !important;\n        bottom: 0px !important;\n        min-height: initial !important;\n      }\n\n      .gleap-frame-container--survey .gleap-frame-container-inner {\n        height: 100vh !important;\n      }\n\n      .bb-tooltip {\n        display: none !important;\n      }\n    \n      .bb-capture-toolbar-item-colorpicker {\n        top: 75px;\n      }\n    \n      .bb-capture-button-next {\n        margin-left: auto;\n      }\n    \n      .bb-capture-dismiss {\n        display: none;\n      }\n    \n      .bb-capture-toolbar {\n        top: 15px;\n        right: 15px;\n        left: 15px;\n        width: auto;\n        transform: none;\n      }\n\n      .bb-capture-editor-drag-info {\n        display: none;\n      }\n    \n      .bb-capture-editor-borderlayer {\n        border-width: 4px;\n      }\n    }\n    \n    @media print {\n      .bb-feedback-button {\n        display: none !important;\n      }\n      \n      .gleap-frame-container {\n        display: none !important;\n      }\n    }\n\n    .gleap-tour-sender {\n      display: flex;\n      align-items: center;\n      justify-content: flex-start;\n      margin-bottom: 10px;\n    }\n\n    .gleap-tour-sender-image {\n      width: 32px;\n      height: 32px;\n      border-radius: 32px;\n      margin-right: 10px;\n      background-size: cover;\n      background-repeat: no-repeat;\n    }\n\n    .gleap-tour-popover.gleap-tour-popover-post {\n      min-width: 550px;\n      max-width: 550px;\n    }\n\n    @media only screen and (max-width: 450px) {\n      .gleap-tour-popover.gleap-tour-popover-post {\n        min-width: calc(100vw - 40px);\n        max-width: calc(100vw - 40px);\n      }\n    }\n\n    .gleap-tour-message,\n    .gleap-tour-message p,\n    .gleap-tour-message ul {\n      color: ").concat(p,";\n    }\n\n    .gleap-tour-message h2 {\n      font-weight: 600;\n      font-size: 22px;\n    }\n\n    .gleap-tour-message h3 {\n      font-weight: 600;\n      font-size: 18px;\n    }\n\n    .gleap-tour-message p {\n      line-height: 1.3;\n      margin-bottom: 10px !important;\n      margin-top: 10px !important;\n    }\n\n    .gleap-tour-message ul {\n      line-height: 1.3;\n      padding-left: 20px;\n      margin-top: 10px !important;\n      margin-bottom: 10px !important;\n    }\n\n    .gleap-tour-message {\n      max-height: calc(80vh - 100px) !important;\n      overflow-y: auto;\n      min-width: 270px;\n    }\n\n    .gleap-tour-message::-webkit-scrollbar {\n      width: 5px;\n    }\n\n    .gleap-tour-message::-webkit-scrollbar-track {\n      border-radius: 0px;\n    }\n    \n    .gleap-tour-message::-webkit-scrollbar-thumb {\n      background: ").concat(y,"; \n      border-radius: 5px;\n    }\n\n    .gleap-tour-message::-webkit-scrollbar-thumb:hover {\n      background: ").concat(m,";\n    }\n\n    @media only screen and (max-width: 450px) {\n      .gleap-tour-message {\n        min-width: auto !important;\n      }\n    }\n\n    .gleap-tour-message iframe {\n      width: 100%;\n      height: 300px;\n      margin-top: 10px;\n      margin-bottom: 10px;\n      border: none;\n      outline: none;\n      display: block;\n    }\n\n    .gleap-tour-sender-name {\n      font-size: 15px;\n    }\n\n    .gleap-tour-video {\n      width: 100%;\n      max-width: 100%;\n    }\n\n    .gleap-tour-video-svg--fullscreen {\n      width: 100% !important;\n      height: 100% !important;\n      top: 0px !important;\n      left: 0px !important;\n      right: 0px !important;\n      bottom: 0px !important;\n    }\n\n    .gleap-tour-video--playing .gleap-tour-video-playpause {\n      opacity: 0;\n    }\n    \n    .gleap-tour-video--playing:hover .gleap-tour-video-playpause {\n      opacity: 1;\n    }\n\n    .gleap-tour-popover-video-pointer {\n      padding: 0px !important;\n      border-radius: 8px;\n      position: relative;\n      background-color: transparent !important;\n    }\n\n    .gleap-tour-popover-video-pointer .gleap-tour-popover-footer {\n      position: absolute;\n      top: 0px;\n      left: 20px;\n      right: 20px;\n      opacity: 0;\n      transition: opacity 200ms ease-in-out;\n    }\n\n    .gleap-tour-popover-video-pointer .gleap-tour-popover-footer button {\n      padding: 5px 12px;\n    }\n\n    .gleap-tour-popover-video-pointer.gleap-tour-popover-can-close .gleap-tour-popover-footer {\n      right: 40px !important;\n    }\n\n    .gleap-tour-popover-video-pointer:hover .gleap-tour-popover-footer {\n      opacity: 1;\n    }\n\n    .gleap-tour-popover-pointer.gleap-tour-popover-no-sender .gleap-tour-message {\n      padding-right: 20px;\n    }\n\n    .gleap-tour-video video {\n      width: 100%;\n      max-width: 100%;\n      height: auto;\n      border: none;\n      outline: none;\n      display: block;\n      border-radius: 8px;\n    }\n\n    .gleap-admin-collapse-ui {\n      z-index: ").concat(0x7ffffff3,";\n      cursor: pointer;\n      position: fixed;\n      bottom: 75px;\n      right: 20px;\n      width: 32px;\n      height: 32px;\n      border-radius: 100%;\n      background-color: #fff;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;\n    }
1\n\n    .gleap-admin-collapse-ui svg {\n      width: 20px;\n      height: 14px;\n      fill: #000 !important;\n    }\n\n    .gleap-admin-collapse-ui-active {\n      bottom: 20px !important;\n    }\n\n    .gleap-admin-collapse-ui-active svg {\n      transform: rotate(180deg);\n    }\n\n    .gleap-admin-frame-container-active {\n      display: none !important;\n    }\n\n    .gleap-admin-frame-container {\n      position: fixed;\n      bottom: 0px;\n      left: 0px;\n      right: 0px;\n      width: 100vw;\n      z-index: ").concat(0x7ffffff8,";\n    }\n\n    .gleap-admin-frame {\n      width: 100%;\n      height: 100% !important;\n      border: none;\n      outline: none;\n      display: block;\n    }\n    \n    .gleap-tour-message .linktype-link {\n      display: inline-block !important;\n      background-color: transparent !important;\n      color: ").concat(n," !important;\n    }\n\n    .gleap-tooltip .linktype-button,\n    .gleap-tour-message .linktype-button {\n      display: inline-block !important;\n      border-radius: 5px;\n      box-sizing: border-box;\n      padding: 10px 20px !important;\n      text-decoration: none !important;\n      background-color: ").concat(n," !important;\n      color: ").concat(d," !important;\n    }\n\n    .gleap-tour-message img {\n      width: 100%;\n      max-width: 100%;\n      min-height: 260px;\n      height: auto;\n      margin-top: 10px;\n      margin-bottom: 10px;\n      object-fit: cover;\n    }\n\n    .gleap-tour-active .gleap-tour-overlay {\n      pointer-events: none;\n    }\n    \n    .gleap-tour-active * {\n      pointer-events: none;\n    }\n    \n    .gleap-tour-active .gleap-tour-active-element,\n    .gleap-tour-active .gleap-tour-active-element *,\n    .gleap-tour-popover,\n    .gleap-tour-popover * {\n      pointer-events: auto;\n    }\n    \n    @keyframes animate-fade-in {\n      0% {\n        opacity: 0;\n      }\n    \n      to {\n        opacity: 1;\n      }\n    }\n    \n    .gleap-tour-fade .gleap-tour-overlay {\n      animation: animate-fade-in 200ms ease-in-out;\n    }\n    \n    .gleap-tour-fade .gleap-tour-popover {\n      animation: animate-fade-in 200ms;\n    }\n\n    .gleap-tour-video-playpause {\n      position: absolute;\n      bottom: 8px;\n      left: 8px;\n      width: 32px;\n      height: 32px;\n      padding: 4px;\n      background-color: rgba(0,0,0,0.5);\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      cursor: pointer;\n      border-radius: 8px;\n      transition: opacity 200ms ease-in-out;\n    }\n\n    .gleap-tour-popover-video-pointer .gleap-tour-popover-arrow {\n      display: none !important;\n    }\n\n    .gleap-tour-video-playpause svg {\n      width: 34px;\n      height: auto;\n      fill: #fff;\n    }\n    \n    /* Popover styles */\n    .gleap-tour-popover {\n      all: unset;\n      box-sizing: border-box;\n      color: #2d2d2d;\n      margin: 0;\n      padding: 15px;\n      border-radius: ").concat(x,'px;\n      min-width: 250px;\n      max-width: 300px;\n      box-shadow: 0 1px 10px #0006;\n      z-index: 1000000000;\n      position: fixed;\n      top: 0;\n      right: 0;\n      background-color: #fff;\n    }\n    \n    .gleap-tour-popover * {\n      font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;\n    }\n    \n    .gleap-tour-popover-title {\n      font: 19px / normal sans-serif;\n      font-weight: 700;\n      display: block;\n      position: relative;\n      line-height: 1.5;\n      zoom: 1;\n      margin: 0;\n    }\n    \n    .gleap-tour-popover-close-btn {\n      all: unset;\n      position: absolute;\n      top: 5px;\n      right: 5px;\n      width: 32px;\n      height: 32px;\n      cursor: pointer;\n      font-size: 30px;\n      font-weight: 500;\n      line-height: 32px;\n      color: #d2d2d2;\n      z-index: 1;\n      text-align: center;\n      transition: color;\n      transition-duration: 200ms;\n    }\n    \n    .gleap-tour-popover-close-btn:hover,\n    .gleap-tour-popover-close-btn:focus {\n      color: #2d2d2d;\n    }\n    \n    .gleap-tour-popover-title[style*="block"] + .gleap-tour-popover-description {\n      margin-top: 5px;\n    }\n    \n    .gleap-tour-popover-description {\n      margin-bottom: 0;\n      font: 15px / normal sans-serif;\n      line-height: 1.5;\n      font-weight: 400;\n      zoom: 1;\n    }\n    \n    .gleap-tour-popover-footer {\n      margin-top: 15px;\n      text-align: right;\n      zoom: 1;\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n    }\n    \n    .gleap-tour-popover-progress-text {\n      font-size: 13px;\n      font-weight: 400;\n      color: #727272;\n      zoom: 1;\n    }\n    \n    .gleap-tour-popover-footer button {\n      background-color: ').concat(e,";\n      color: ").concat(u,";\n      border-radius: ").concat(S,"px;\n      box-sizing: border-box;\n      padding: 10px 20px;\n      font-size: 14px;\n      font-weight: bold;\n      line-height: 21px;\n      border: none;\n      text-align: center;\n      cursor: pointer;\n      -webkit-tap-highlight-color: transparent;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      box-shadow: none !important;\n      outline: none !important;\n    }\n\n    .gleap-tour-popover-prev-btn {\n      color: ").concat(p," !important;\n      background-color: ").concat(v," !important;\n      margin-right: 3px;\n    }\n\n    .gleap-tour-popover-prev-btn:hover {\n      background-color: ").concat(e,"22 !important;\n      color: ").concat(e,' !important;\n    }\n    \n    .gleap-tour-popover-footer .gleap-tour-popover-btn-disabled {\n      opacity: 0.5;\n      pointer-events: none;\n    }\n    \n    .gleap-tour-no-interaction, .gleap-tour-no-interaction * {\n      pointer-events: none !important;\n    }\n    \n    .gleap-tour-popover-navigation-btns {\n      display: flex;\n      flex-grow: 1;\n      justify-content: flex-end;\n    }\n    \n    .gleap-tour-popover-navigation-btns button + button {\n      margin-left: 4px;\n    }\n    \n    .gleap-tour-popover-arrow {\n      content: "";\n      position: absolute;\n      border: 5px solid #fff;\n    }\n    \n    .gleap-tour-popover-arrow-side-over {\n      display: none;\n    }\n    \n    /** Popover Arrow Sides **/\n    .gleap-tour-popover-arrow-side-left {\n      left: 100%;\n      border-right-color: transparent;\n      border-bottom-color: transparent;\n      border-top-color: transparent;\n    }\n    \n    .gleap-tour-popover-arrow-side-right {\n      right: 100%;\n      border-left-color: transparent;\n      border-bottom-color: transparent;\n      border-top-color: transparent;\n    }\n    \n    .gleap-tour-popover-arrow-side-top {\n      top: 100%;\n      border-right-color: transparent;\n      border-bottom-color: transparent;\n      border-left-color: transparent;\n    }\n    \n    .gleap-tour-popover-arrow-side-bottom {\n      bottom: 100%;\n      border-left-color: transparent;\n      border-top-color: transparent;\n      border-right-color: transparent;\n    }\n    \n    .gleap-tour-popover-arrow-side-center {\n      display: none;\n    }\n    \n    /* Left/Start + Right/Start */\n    .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-start,\n    .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-start {\n      top: 15px;\n    }\n    \n    /* Top/Start + Bottom/Start */\n    .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-start,\n    .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-start {\n      left: 15px;\n    }\n    \n    /* End/Left + End/Right */\n    .gleap-tour-popover-arrow-align-en
1d.gleap-tour-popover-arrow-side-left,\n    .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-right {\n      bottom: 15px;\n    }\n    \n    /* Top/End + Bottom/End */\n    .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-end,\n    .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-end {\n      right: 15px;\n    }\n    \n    /* Left/Center + Right/Center */\n    .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-center,\n    .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-center {\n      top: 50%;\n      margin-top: -5px;\n    }\n    \n    /* Top/Center + Bottom/Center */\n    .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-center,\n    .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-center {\n      left: 50%;\n      margin-left: -5px;\n    }\n    \n    /* No arrow */\n    .gleap-tour-popover-arrow-none {\n      display: none;\n    }    \n\n    /* Modal styles */\n    .gleap-modal-wrapper {\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      z-index: ').concat(0x7ffffff8,";\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n\n    .gleap-modal-backdrop {\n      position: absolute;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      background-color: rgba(0, 0, 0, 0.5);\n      z-index: ").concat(0x7ffffff9,";\n    }\n\n    .gleap-modal {\n      position: relative;\n      width: 90%;\n      max-width: 600px;\n      max-height: 90vh;\n      z-index: ").concat(0x80000034,";\n      background-color: ").concat(r,";\n      border-radius: ").concat(w,"px;\n      overflow: hidden;\n      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n      animation-duration: 0.3s;\n      animation-fill-mode: both;\n      animation-name: gleapFadeInUp;\n    }\n\n    .gleap-modal-frame {\n      width: 100%;\n      border: none;\n      display: block;\n      outline: none;\n    }\n\n    body.gleap-modal-open {\n      overflow: hidden;\n    }\n\n    /* Agent Popup styles */\n    .gleap-agent-popup-wrapper {\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      z-index: ").concat(0x7ffffff8,";\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n\n    .gleap-agent-popup-backdrop {\n      position: absolute;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      background-color: rgba(0, 0, 0, 0.5);\n      z-index: ").concat(0x7ffffff9,";\n    }\n\n    .gleap-agent-popup {\n      position: relative;\n      width: 95%;\n      max-width: 700px;\n      height: 85vh;\n      max-height: 800px;\n      z-index: ").concat(0x80000034,";\n      background-color: ").concat(r,";\n      border-radius: ").concat(w,"px;\n      overflow: hidden;\n      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n      animation-duration: 0.3s;\n      animation-fill-mode: both;\n      animation-name: gleapFadeInUp;\n    }\n\n    .gleap-agent-popup-frame {\n      width: 100%;\n      height: 100%;\n      border: none;\n      display: block;\n      outline: none;\n    }\n\n    body.gleap-agent-popup-open {\n      overflow: hidden;\n    }\n\n    @keyframes gleapFadeInUp {\n      from {\n        opacity: 0;\n        transform: translate3d(0, 20px, 0);\n      }\n      to {\n        opacity: 1;\n        transform: translate3d(0, 0, 0);\n      }\n    }\n\n    .gleap-admin-frame-container,\n    .gleap-frame-container,\n    .bb-feedback-button,\n    .gleap-notification-container,\n    .gleap-tooltip,\n    .gleap-ai-ui-widget {\n      pointer-events: auto !important;\n    }\n    "),(L=document.querySelector(".gleap-styles"))&&L.remove(),(A=document.createElement("style")).innerHTML=E,A.className="gleap-styles",document.body.appendChild(A)})}},{key:"sendSilentCrashReport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return n.sendSilentCrashReportWithFormData({description:e},t,r)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout(function(){t.silentCrashReportSent=!1},1e4);var o=r?U(r):{},i=tR.getInstance();if(i.ready){var a=e||{};i.session.email&&(a.reportedBy=i.session.email),new np("CRASH",n,a,!0,o).sendFeedback().then(function(){}).catch(function(e){})}}}},{key:"showSurvey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"survey";n.startFeedbackFlowWithOptions(e,{hideBackButton:!0,format:t},!0)}},{key:"startClassicForm",value:function(e,t){n.startFeedbackFlowWithOptions(e,{hideBackButton:!t})}},{key:"startFeedbackFlow",value:function(e,t){n.startFeedbackFlowWithOptions(e,{hideBackButton:!t})}},{key:"startFeedbackFlowWithOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.autostartDrawing,i=t.hideBackButton,a=t.format;if(tR.getInstance().ready){n.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var l="start-feedbackflow";r&&(l="start-survey"),nT.getInstance().setAppMode(r?a:"widget"),nT.getInstance().sendMessage({name:l,data:{flow:e,hideBackButton:i,format:a}},!0),o?nT.getInstance().showDrawingScreen("screenshot"):nT.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),nT.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),nT.getInstance().showWidget())}},{key:"startConversation",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.startBot("",e)}},{key:"startBot",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),nT.getInstance().showWidget()}},{key:"askAI",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"ask-ai",data:{question:e,hideBackButton:!t}},!0),nT.getInstance().showWidget()}},{key:"sendAgentMessage",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return Promise.reject(Error("agentId and message are required."));var r={messages:[{role:"user",content:t.trim()}]};return n.conversationId&&(r.conversationId=n.conversationId),n.additionalContext&&(r.additionalContext=n.additionalContext),new Promise(function(t,o){var i="",a=n.conversationId||null,l=null;ev.getInstance().streamAgent(e,r,{onMeta:function(e){e.conversationId&&(a=e.conversationId),e.runId&&(l=e.runId)},onToken:function(e){i+=e.content||"",n.onToken&&n.onToken(e)},onDone:function(e){t({runId:l||(null==e?void 0:e.runId),status:(null==e?void 0:e.status)||"completed",response:i||(null==e?void 0:e.response)||"",conversationId:a})},onError:function(e){o(e)},onToolStart:function(){},onToolEnd:function(){}})})}},{key:"clearAgentConversation",value:function(){ev.getInstance().clearCache()}},{key:"createAgentChat",value:function(e){return new uL(e)}},{key:"openHelpCenterCollection",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e,hideBackButton:!t}},!0),nT.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),nT.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),nT.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),nT.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-news-article",data:{id:e}},!0),nT.getInstance().showWidget())}},{key:"openChecklists",value:function(){nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-checklists",data:{}},!0),nT.getInstance().showWidget()}},{key:"startChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return!!e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"start-checklist",data:uR({outboundId:e,hideBackButton:!t},n?{sharedKey:n}:{})},!0),nT.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),nT.getInstance().showWidget())}},{key:"getChecklistData",value:function(e,t){if(!e)return Promise.reject(Error("outboundId is required"));var n=Q.getInstance();return n.validateChecklist(e,t).then(function(e){return n.fetchChecklist(e)}
1)}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),nT.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){nT.getInstance().setAppMode("widget"),nT.getInstance().sendMessage({name:"open-feature-requests",data:{}},!0),nT.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this;tR.getInstance().startProductTourConfig(e).then(function(r){var o;!t||null==r||!r.startURL||null!=(o=window)&&null!=(o=o.location)&&null!=(o=o.href)&&o.includes(null==r?void 0:r.baseURL)?n.startProductTourWithConfig(e,r,!0):window.location.href="".concat(r.startURL,"?gleap_tour=").concat(e,"&gleap_tour_delay=1")}).catch(function(e){})}},{key:"checkForUncompletedTour",value:function(){var e=c8.getInstance().loadUncompletedTour();e&&c8.getInstance().startWithConfig(e.tourId,e.tourData,500)}},{key:"startProductTourWithConfig",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c8.getInstance().startWithConfig(e,t,0,n)}},{key:"showBanner",value:function(e){try{l3.getInstance().showBanner(e)}catch(e){}}},{key:"showModal",value:function(e){try{ce.getInstance().showModal(e)}catch(e){}}},{key:"startAgent",value:function(e,t){try{lX.getInstance().showWithAgent(e,t)}catch(e){}}},{key:"setAIAgent",value:function(e,t){try{lX.getInstance().setAgent(e,t)}catch(e){}}},{key:"showNotification",value:function(e){lz.getInstance().showNotification(e)}}],e&&uM(n.prototype,e),t&&uM(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();if(u_(uj,"invoked",!0),u_(uj,"silentCrashReportSent",!1),u_(uj,"instance",void 0),"u">typeof window){var uN=window.GleapActions;if(uN&&uN.length>0)for(var uF=0;uF<uN.length;uF++){var uB=uN[uF];uB&&uB.e&&uj[uB.e]&&uj[uB.e].apply(uj,uB.a)}}var uU=function(e){try{var t=e.split("/"),n=t[2];if("article"===n){var r=t[3];uj.openHelpCenterArticle(r,!0)}if("collection"===n){var o=t[3];uj.openHelpCenterCollection(o,!0)}if("flow"===n){var i=t[3];uj.startFeedbackFlow(i,!0)}if("survey"===n){var a=t[3];uj.showSurvey(a)}if("bot"===n){var l=t[3];uj.startBot(l,!0)}if("news"===n){var c=t[3];uj.openNewsArticle(c,!0)}if("checklist"===n){var u=t[3];uj.startChecklist(u,!0,t[4])}if("tour"===n){var d=t[3];uj.startProductTour(d)}}catch(t){console.error("Failed to handle Gleap link: ",e)}};let uH=uj,uz=uH;var uq=w.A;let uW=m.default.env.NEXT_PUBLIC_GLEAP_API_KEY||"zZTLyvnrC5cZDS5Y0EgzUPwl4IAzZvdz";e.s(["GleapProvider",0,function(){return(0,v.useEffect)(()=>{uq.initialize(uW)},[]),null}],644719)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.